/* Caboche — public site. Colors and type come from the design canvas. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('/fonts/instrument-sans-latin.woff2') format('woff2');
}

:root {
  --ground: #F6F4F0;
  --surface: #FFFFFF;
  --ink: #1D1A17;
  --ink-hover: #3A332D;
  --ink-2: #3D3732;
  --muted: #57504A;
  --line: #DDD4C6;
  --field: #8C8279;
  --tag: #EAE3D7;
  --wood: #E3D0AE;
  --recess: #F4ECDD;
  --red: #B0222A;
  --jade-bg: #E4EFEA;
  --jade-ink: #234A3D;
  --jade-ring: #3F7A66;

  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --text: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;

  --gutter: 32px;
  --shelf-gap: 16px;
  --section: 112px;

  --shelf-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 40px 60px -40px rgba(60, 38, 16, .45);
  --recess-shadow: inset 0 18px 20px -14px rgba(92, 62, 28, .55), inset 12px 0 14px -12px rgba(92, 62, 28, .35), inset -12px 0 14px -12px rgba(92, 62, 28, .25);
  --piece-shadow: 0 14px 18px -10px rgba(52, 32, 12, .5), 0 2px 4px rgba(52, 32, 12, .2);
  --piece-shadow-up: 0 24px 26px -12px rgba(52, 32, 12, .55), 0 2px 4px rgba(52, 32, 12, .2);
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --shelf-gap: 10px; --section: 64px; }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
}
img { display: block; max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--display); letter-spacing: -.02em; }
[hidden] { display: none !important; }

@media (max-width: 640px) { body { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-bottom: var(--section); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; padding: 8px 14px; background: var(--surface); }

.eyebrow {
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.h2 { font-size: clamp(38px, 5vw, 52px); line-height: 1; font-weight: 750; font-stretch: 85%; letter-spacing: -.03em; }
.h2--small { font-size: clamp(30px, 4vw, 40px); line-height: 1.05; }
.h3 { font-size: clamp(24px, 3vw, 28px); line-height: 1.1; font-weight: 700; font-stretch: 88%; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
@media (max-width: 640px) { .eyebrow { margin-bottom: 14px; font-size: 12px; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn--dark { background: var(--ink); color: #FFFFFF; }
.btn--dark:hover { background: var(--ink-hover); border-color: var(--ink-hover); color: #FFFFFF; }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #FFFFFF; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
@media (max-width: 640px) {
  .btn { height: 48px; padding: 0 22px; }
  .actions { margin-top: 24px; gap: 10px; }
}

/* ---------- header and footer ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
  padding-block: 24px;
}
.logo { position: relative; display: inline-block; padding-top: 12px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo__hat { position: absolute; top: 0; left: -5px; width: 30px; height: 20px; transform: rotate(-12deg); }
.logo__word { font-family: var(--display); font-size: 32px; font-weight: 800; font-stretch: 85%; letter-spacing: -.03em; line-height: 1; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 16px; font-weight: 600; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
@media (max-width: 640px) {
  .site-header { padding-block: 12px; gap: 4px 12px; }
  .logo { padding-top: 10px; }
  .logo__hat { left: -4px; width: 25px; height: 17px; }
  .logo__word { font-size: 26px; }
  .site-nav { gap: 0 14px; font-size: 15px; }
}

.site-footer { border-top: 1px solid var(--line); }
.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px 40px;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- home: hero ---------- */

.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 32px; padding-bottom: var(--section); }
.hero__text { flex: 1 1 560px; min-width: 0; }
.hero__title { font-size: clamp(50px, 6.4vw, 84px); line-height: .96; font-weight: 750; font-stretch: 82%; letter-spacing: -.035em; }
.hero__lead { margin: 28px 0 0; max-width: 32em; font-size: 20px; line-height: 1.5; color: var(--ink-2); }
.hero__figure { flex: 1 1 380px; min-width: 0; margin: 0; }
.hero__figure img { width: 100%; height: 560px; object-fit: cover; object-position: 30% 40%; border-radius: 4px; }
.hero__figure figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) {
  .hero { gap: 32px; padding-top: 8px; }
  .hero__lead { margin-top: 18px; font-size: 17px; }
  .hero__figure img { height: 380px; }
  .hero__figure figcaption { font-size: 13px; }
}

/* ---------- section heads and filters ---------- */

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 28px;
}
.section__head p { margin: 12px 0 0; }
.section__head--baseline { align-items: baseline; margin-bottom: 24px; }
.more { font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.chip:hover { background: var(--tag); color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); color: #FFFFFF; }
@media (max-width: 640px) { .chip { padding: 0 14px; font-size: 14px; } }

/* ---------- the shelf (her birch cubby wall) ---------- */

.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  grid-auto-flow: dense;
  gap: var(--shelf-gap);
  margin: 0;
  padding: var(--shelf-gap);
  list-style: none;
  background: var(--wood);
  border-radius: 6px;
  box-shadow: var(--shelf-shadow);
}
@media (max-width: 600px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 5px; } }

.cell { min-width: 0; }
.cell__link { display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none; }
.cell__link:hover { color: var(--ink); }

.cubby {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--recess);
  border-radius: 2px;
  box-shadow: var(--recess-shadow);
}
.cubby img {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  max-width: 72%;
  max-height: 76%;
  margin: auto;
  box-shadow: var(--piece-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
@media (hover: hover) {
  .cell__link:hover .cubby img { transform: translateY(-5px); box-shadow: var(--piece-shadow-up); }
}

/* A wide piece spans two cubbies and keeps the row's height: half its width, minus half a gap. */
.cell--large { grid-column: span 2; container-type: inline-size; }
.cell--large .cubby { aspect-ratio: auto; height: calc((100cqi - var(--shelf-gap)) / 2); }
.cell--large .cubby img { max-width: 88%; max-height: 62%; }

.cell__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 12px 4px 2px;
}
.cell__title { font-family: var(--display); font-size: 17px; font-weight: 650; line-height: 1.25; }
.cell__price { font-size: 15px; font-weight: 600; white-space: nowrap; }
.sold { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.sold__dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--red); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
@media (max-width: 600px) {
  .cubby { box-shadow: inset 0 14px 16px -12px rgba(92, 62, 28, .55), inset 9px 0 12px -10px rgba(92, 62, 28, .35), inset -9px 0 12px -10px rgba(92, 62, 28, .25); }
  .cubby img { max-width: 70%; max-height: 74%; }
  .cell__label { flex-direction: column; gap: 2px; padding: 8px 2px 2px; }
  .cell__title { font-size: 15px; line-height: 1.2; }
  .cell__price, .sold { font-size: 14px; }
}

.empty { margin: 0; padding: 32px; border-radius: 6px; background: var(--recess); color: var(--muted); text-align: center; }

/* ---------- home: how to buy, about ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.steps li { padding-top: 18px; border-top: 2px solid var(--ink); }
.steps h3 { margin: 0 0 8px; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.steps p { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) {
  .steps { gap: 24px; margin-top: 24px; }
  .steps h3 { font-size: 21px; }
}

.about { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.about__photo { flex: 1 1 360px; max-width: 460px; aspect-ratio: 4 / 5; margin: 0; overflow: hidden; border-radius: 4px; background: var(--recess); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__text { flex: 1 1 480px; min-width: 0; }
.about__text .eyebrow { margin-bottom: 14px; }
.bio { margin: 24px 0 0; max-width: 34em; font-size: 19px; color: var(--ink-2); }
.bio + .bio { margin-top: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.tags li { padding: 6px 14px; border-radius: 999px; background: var(--tag); font-size: 15px; font-weight: 600; }
@media (max-width: 640px) {
  .about { gap: 28px; }
  .about__photo { max-width: none; }
  .bio { margin-top: 16px; font-size: 17px; }
  .bio + .bio { margin-top: 12px; }
  .tags li { padding: 5px 12px; font-size: 14px; }
}

/* ---------- contact ---------- */

.contact-section { display: flex; flex-wrap: wrap; gap: 32px 72px; }
.contact-section__intro { flex: 1 1 340px; min-width: 0; }
.contact-section__intro p { margin: 20px 0 0; max-width: 26em; color: var(--ink-2); }
.contact-section .card { flex: 1 1 560px; min-width: 0; }

.card { padding: 32px; border-radius: 8px; background: var(--surface); box-shadow: 0 1px 2px rgba(40, 25, 10, .08); }
@media (max-width: 640px) { .card { padding: 20px; } }

.contact { display: flex; flex-direction: column; gap: 18px; }
.contact__head p { margin: 6px 0 0; }
.contact__about { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 6px; background: var(--ground); font-size: 15px; }
.contact__about img { width: 44px; height: 44px; object-fit: cover; border-radius: 3px; }
.contact__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.contact__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.contact__foot p { margin: 0; }
.contact__foot .btn:only-child { margin-right: auto; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  padding: 0 14px;
  border: 1.5px solid var(--field);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 17px;   /* 16px or more: iOS doesn't zoom in on focus */
  font-weight: 400;
}
.field input { height: 48px; }
.field textarea { padding-block: 12px; line-height: 1.5; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field__error { font-size: 14px; font-weight: 600; color: #8E1C24; }
.field__error:empty { display: none; }
.field [aria-invalid="true"] { border-color: #8E1C24; }

.contact__alert { margin: 0; padding: 10px 14px; border-radius: 6px; background: #F7E1E2; color: #8E1C24; font-size: 15px; font-weight: 600; }
/* the trap field for robots: off screen, out of the tab order, hidden from screen readers */
.contact__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-zone { position: relative; }
.contact__done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.contact__done:focus { outline: none; }
.contact__done p { margin: 0; color: var(--ink-2); }
.contact__check { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--jade-bg); color: var(--jade-ink); }
.link-btn {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.contact-page { max-width: 720px; }
.contact-page__title { margin-bottom: 24px; }
.contact__done--page { padding-block: 36px; }
.contact__done--page .btn { margin-top: 8px; }

/* ---------- piece page ---------- */

.crumb { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 16px; font-weight: 600; text-decoration: none; }
.share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.share:hover { color: var(--red); }
.share[hidden] { display: none; }

.fiche { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 56px; padding-bottom: var(--section); }
.fiche__media { flex: 1 1 560px; min-width: 0; }
.frame { padding: 20px; border-radius: 6px; background: var(--wood); box-shadow: var(--shelf-shadow); }
.cubby--big { overflow: hidden; box-shadow: inset 0 22px 24px -16px rgba(92, 62, 28, .55), inset 14px 0 16px -14px rgba(92, 62, 28, .35), inset -14px 0 16px -14px rgba(92, 62, 28, .25); }
.cubby--wide { aspect-ratio: 3 / 2; }
.cubby--big img.is-piece { max-width: 76%; max-height: 76%; box-shadow: 0 22px 26px -14px rgba(52, 32, 12, .55), 0 3px 6px rgba(52, 32, 12, .2); }
.cubby--wide img.is-piece { max-width: 88%; max-height: 70%; }
.cubby--big img.is-photo { max-width: 100%; max-height: 100%; box-shadow: none; }

.thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.thumb { display: block; border-radius: 6px; }
.thumb img { width: 88px; height: 88px; object-fit: cover; border: 3px solid transparent; border-radius: 6px; }
.thumb[aria-current="true"] img { border-color: var(--ink); }

.fiche__info { flex: 1 1 400px; max-width: 520px; min-width: 0; }
.fiche__info .eyebrow { margin-bottom: 12px; }
.fiche__title { font-size: clamp(44px, 5vw, 64px); line-height: 1; font-weight: 750; font-stretch: 82%; letter-spacing: -.03em; }
.fiche__price { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.price { font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.badge--avail { background: var(--jade-bg); color: var(--jade-ink); }
.badge--sold { background: var(--tag); color: var(--ink); }
.badge__ring { width: 9px; height: 9px; border: 2px solid var(--jade-ring); border-radius: 50%; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 28px 0 0; font-size: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.fiche__desc { margin: 24px 0 0; color: var(--ink-2); }
.fiche__desc + .fiche__desc { margin-top: 12px; }
.fiche__info .card { margin-top: 36px; padding: 28px; }
@media (max-width: 640px) {
  .crumb { padding-bottom: 8px; }
  .frame { padding: 12px; border-radius: 5px; }
  .thumbs { margin-top: 12px; }
  .thumb img { width: 72px; height: 72px; }
  .fiche__price { margin-top: 16px; }
  .price { font-size: 28px; }
  .facts { margin-top: 20px; font-size: 15px; }
  .fiche__info .card { margin-top: 28px; padding: 20px; }
}

/* ---------- error page ---------- */

.error { padding-block: 48px 160px; }
.error__text { margin: 20px 0 32px; max-width: 32em; color: var(--ink-2); }
