/* QTK Fine Cabinetry, homepage
   Direction: photographs at uneven sizes. Every picture keeps its own size and place on one
   12-column grid, the way every QTK cabinet is cut to its own size ("batch size one"). */

/* ---------- tokens ---------- */
:root {
  --bg: #ebe5e3;
  --surface: #e1dad7;
  --surface-2: #d6cdc9;
  --line: #c8bdb8;             /* hairline around form fields */
  --ink: #2b2622;
  --muted: #6a615d;
  --accent: #6a4527;          /* walnut, from the QTK spoon */
  --accent-strong: #523419;
  --accent-ink: #ffffff;
  --dark: #2b2622;            /* inverted chapters: process and footer */
  --dark-ink: #ebe5e3;
  --dark-muted: #b6aca7;
  --error: #9b2c1c;

  --font: "Clash Grotesk", "Helvetica Neue", Arial, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.5rem, 1.3rem + 3.4vw, 4.25rem);
  --step-display: clamp(4.25rem, 12vw, 11.25rem);

  --margin: clamp(1.25rem, 5vw, 5rem);
  --gutter: clamp(1rem, 2vw, 1.75rem);
  --section: clamp(7.5rem, 14vw, 13rem);
  --bar: 4.5rem;
  --notice: 0px;   /* height of the seasonal banner above the bar, 0 when there is none */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); font-weight: 400; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, figure, ul, ol, address, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
fieldset { border: 0; min-width: 0; }
img, video { display: block; max-width: 100%; height: auto; background: var(--surface); }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
:target { scroll-margin-top: var(--bar); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body.menu-open { overflow: hidden; }

.skip { position: absolute; left: var(--margin); top: -4rem; z-index: 60; background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; }
.skip:focus { top: 0.75rem; }

/* ---------- controls ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.5rem;
  background: var(--accent); color: var(--accent-ink); font-weight: 500; white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.button-small { min-height: 2.75rem; padding: 0 1.1rem; font-size: var(--step-small); }
.button-light { background: var(--dark-ink); color: var(--dark); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease; }
.link-under { text-decoration-color: currentColor; }
.square {
  display: grid; place-items: center; width: 3rem; height: 3rem; background: var(--dark-ink); color: var(--dark);
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, opacity var(--t-hover) ease;
}
.square:active { transform: scale(0.94); }
.square[disabled] { opacity: 0.35; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-strong); }
  .button-light:hover { background: #fff; color: var(--dark); }
  .link:hover { text-decoration-color: currentColor; }
  .link-under:hover { color: var(--accent); }
  .square:not([disabled]):hover { background: #fff; }
}

/* ---------- bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--bar);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-inline: var(--margin);
  transition: background-color var(--t-ui) ease, transform var(--t-ui) var(--ease-out);
}
/* frosted backing once the page scrolls; it lives on ::before so the blur doesn't trap the fixed phone menu */
.bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 9%, transparent);
  opacity: 0; transition: opacity var(--t-ui) ease;
}
.bar.is-solid::before, .bar.is-open::before { opacity: 1; }
.bar-mark { transition: opacity var(--t-hover) ease; }

/* nav links: a hairline that draws in from the left; the current section keeps it */
.bar-nav .link { position: relative; padding-block: 0.5rem; text-decoration: none; font-size: 1.0625rem; }
.bar-nav .link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.3rem; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform var(--t-ui) var(--ease-out);
}
.bar-nav .link[aria-current]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .bar-nav .link:hover::after { transform: scaleX(1); transform-origin: left; }
  .bar-mark:hover { opacity: 0.7; }
}

/* ---------- seasonal banner ---------- */
/* switched on by the inline script in index.html's head (html.has-notice) until its end date;
   the bar sits under it at the top and slides up to 0 as it scrolls away (--bar-top, set in home.js) */
.notice, .toy-season-only, .notice-short { display: none; }
html.toy-season .toy-season-only { display: list-item; }
html.has-notice { --notice: 4.5rem; }
/* festive, in the toy drive page's own colours: deep pine, a brass gift and call to action, a brass
   hairline underneath and a few slow flakes of snow drifting behind the words */
html.has-notice .notice {
  --pine: #1f2e25; --gold: #d2ab68;
  position: absolute; inset: 0 0 auto; z-index: 51; height: var(--notice); overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 1rem; padding-inline: var(--margin) 3rem;
  background: var(--pine); color: var(--dark-ink); font-size: var(--step-small);
  box-shadow: inset 0 -1px 0 rgb(210 171 104 / 0.55);
}
.notice::before {
  content: ""; position: absolute; inset: -100% 0 0; pointer-events: none; opacity: 0.5;
  background-image:
    radial-gradient(circle, #ebe5e3 0 1.2px, transparent 1.7px),
    radial-gradient(circle, #ebe5e3 0 0.9px, transparent 1.4px),
    radial-gradient(circle, #d2ab68 0 1px, transparent 1.5px);
  background-size: 9.5rem 2.5rem, 6.5rem 2.5rem, 13rem 2.5rem;
  background-position: 1rem 0.4rem, 4rem 1.5rem, 7rem 1rem;
}
/* the gift, then two lines (the ask on top, the drive's name under it), then a separate brass
   "Learn more" pill; the whole banner is one link */
.notice-link { position: relative; min-width: 0; display: flex; align-items: center; gap: 1.25rem; line-height: 1.25; }
.notice-gift { flex: none; width: 1.75rem; height: 1.75rem; color: var(--gold); }
.notice-text { min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.notice-ask, .notice-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-ask { font-size: 1.125rem; font-weight: 500; color: #fff; letter-spacing: -0.005em; }
.notice-name { font-size: 0.75rem; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; }
.notice-name strong { font-weight: 600; }
.notice-cta {
  flex: none; display: inline-flex; align-items: center; gap: 0.4em; min-height: 2.25rem; padding: 0 1rem;
  border: 1px solid rgb(210 171 104 / 0.7); border-radius: 999px; color: var(--gold); font-weight: 500; white-space: nowrap;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.notice-close {
  position: absolute; right: calc(var(--margin) - 0.75rem); top: 50%; translate: 0 -50%;
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center; font-size: 1.25rem; line-height: 1; color: var(--dark-muted);
}
@media (prefers-reduced-motion: no-preference) {
  .notice::before { animation: notice-snow 9s linear infinite; }
  .notice-gift { transform-origin: 50% 80%; animation: notice-gift 6s var(--ease-in-out) infinite; }
}
@keyframes notice-snow { to { transform: translateY(2.5rem); } }
@keyframes notice-gift { 0%, 86%, 100% { transform: none; } 90% { transform: rotate(-9deg); } 94% { transform: rotate(7deg); } 97% { transform: rotate(-3deg); } }
html.has-notice .bar { top: var(--bar-top, var(--notice)); }
html.has-notice .hero { margin-top: var(--notice); height: calc(100svh - var(--notice)); }
@media (hover: hover) and (pointer: fine) {
  .notice-link:hover .notice-cta { background: var(--gold); color: var(--pine); }
  .notice-close:hover { color: var(--dark-ink); }
}
.bar.is-hidden { transform: translateY(-100%); }
.bar-mark img { width: auto; height: 1.9rem; background: none; filter: brightness(0) opacity(0.86); }
.bar-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.25rem); font-size: var(--step-small); font-weight: 500; }
.bar-menu { display: none; min-height: 2.75rem; padding: 0 0.25rem; font-weight: 500; }

/* ---------- hero: statement beside a specimen board ---------- */
/* exactly one screen: the specimen board is cropped by the bottom edge instead of stretching the
   hero, so the sentence and the button always sit on the first screen */
.hero { display: grid; grid-template-columns: 1fr 1fr; height: 100svh; min-height: 34rem; }
.hero-text {
  display: flex; flex-direction: column; padding: calc(var(--bar) + clamp(2rem, 7vh, 5rem)) clamp(1.5rem, 4vw, 4rem) clamp(2.5rem, 7vh, 4.5rem) var(--margin);
}
/* sized to the column: the longest line, "Your Wine Room.", is about 7.1em wide and never wraps */
.hero-title { font-size: clamp(2rem, 5.4vw, 7rem); font-weight: 500; line-height: 1; letter-spacing: -0.035em; }
.hero-title span { display: block; white-space: nowrap; }
/* rotating room word: every word shares one grid cell; script slides them through and sizes the slot */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero-title .swap {
  display: inline-grid; justify-items: start; overflow: hidden;
  padding-block: 0.12em; margin-block: -0.12em; /* room for descenders (y) inside the clip */
}
.hero-title .swap-word { display: block; grid-area: 1 / 1; white-space: nowrap; }
html:not(.js) .hero-title .swap-word:not(.is-on) { display: none; }
.js .hero-title .swap-word { opacity: 0; transition: opacity 500ms ease; }
.js .hero-title .swap-word.is-on { opacity: 1; }
.hero-lead { margin-top: auto; padding-top: 2.5rem; max-width: 34ch; font-size: var(--step-lead); line-height: 1.3; }
.hero-act { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; }
.hero-act .link { font-size: var(--step-body); }

/* the whole board fits inside the field, sized by whichever of its width and height is tighter, so
   no photograph is cropped by the edge of the screen */
.hero-field {
  position: relative; background: var(--surface); overflow: hidden; container-type: size;
  display: grid; place-content: center; padding: calc(var(--bar) + 1.5rem) 14px 1.5rem;
}
/* the large photograph with the four rooms in a strip down its right side */
.specimens {
  display: grid; grid-template-columns: 4fr 1fr; grid-template-rows: repeat(4, 1fr); gap: 14px;
  width: min(100cqw, 100cqh * 15 / 16); aspect-ratio: 15 / 16;
}
.spec { overflow: hidden; background: var(--surface-2); min-height: 0; }
.spec img { width: 100%; height: 100%; object-fit: cover; }
.spec-big { grid-column: 1; grid-row: 1 / span 4; position: relative; }
/* the room named in the headline, laid over the kitchen as the word changes (added by home.js).
   A plain crossfade here; with motion allowed it wipes up instead (see the motion block) */
.spec-swap { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 800ms ease; }
.spec-swap.is-on { opacity: 1; }
/* desktop: copies of the two photographs trading places (home.js), laid over the board while the
   real ones swap underneath */
.spec-fly { position: absolute; overflow: hidden; pointer-events: none; transform-origin: center; will-change: transform, clip-path; }
.spec-fly img { display: block; width: 100%; height: 100%; object-fit: cover; }
.spec-a { grid-area: 1 / 2; }
.spec-b { grid-area: 2 / 2; }
.spec-c { grid-area: 3 / 2; }
.spec-d { grid-area: 4 / 2; }
.spec { --depth: 150; }
.spec-big { --depth: 70; }

/* ---------- about: the title holds on the left, the shop passes on the right ---------- */
.about { padding: var(--section) var(--margin) 0; }
.about-stage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.about-pin { grid-column: 1 / span 5; position: sticky; top: calc(var(--bar) + 2rem); }
.about-title { font-size: var(--step-display); font-weight: 500; line-height: 0.85; letter-spacing: -0.045em; }
.about-title span { display: block; }
.about-close { margin-top: 2.5rem; max-width: 24ch; font-size: var(--step-lead); line-height: 1.25; }
.people { grid-column: 7 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); row-gap: 5rem; }
.person:nth-child(even) { margin-top: 14rem; }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.person-name { margin-top: 1rem; font-size: var(--step-body); font-weight: 500; }
.person-role { font-size: var(--step-small); color: var(--muted); }
.person-text { margin-top: 0.6rem; max-width: 30ch; }

/* ---------- rooms: a loose scatter ---------- */
.rooms { padding: var(--section) var(--margin) 0; }
.rooms-head { margin-bottom: clamp(3rem, 8vh, 6rem); }
.rooms-title { font-size: var(--step-head); line-height: 1; letter-spacing: -0.035em; }
.rooms-lead { margin-top: 1rem; font-size: var(--step-lead); line-height: 1.3; max-width: 32ch; }
.scatter { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: clamp(3.5rem, 8vh, 6rem); }
/* rooms pair up side by side so no row is left half empty */
.scatter > :nth-child(1), .scatter > :nth-child(2) { grid-row: 1; }
.scatter > :nth-child(3), .scatter > :nth-child(4) { grid-row: 2; }
.scatter > :nth-child(5), .scatter > :nth-child(6) { grid-row: 3; }
.scatter > :nth-child(7) { grid-row: 4; }
.room-1 { grid-column: 1 / span 6; }
.room-2 { grid-column: 8 / span 5; }
.room-3 { grid-column: 3 / span 7; }
.room a { display: block; }
.room-name { display: block; margin-bottom: 0.6rem; font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.01em; }
.room-pic { display: block; overflow: hidden; background: var(--surface); }
.room-pic img { width: 100%; height: 100%; object-fit: cover; transition: scale 900ms var(--ease-soft); }
.room-1 .room-pic { aspect-ratio: 3 / 2; }
.room-2 .room-pic { aspect-ratio: 4 / 5; }
.room-3 .room-pic { aspect-ratio: 16 / 9; }
.room-text { display: block; margin-top: 0.75rem; max-width: 40ch; }
.room-more {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; margin-top: 0.35rem;
  color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 0.07em;
}
.room-more span { transition: translate var(--t-ui) var(--ease-out); }
.room a:focus-visible .room-more span { translate: 4px 0; }
.room-remark { grid-column: 10 / span 3; align-self: center; }
.room-remark p { font-size: var(--step-lead); line-height: 1.25; max-width: 22ch; }
@media (hover: hover) and (pointer: fine) {
  .room a:hover .room-pic img { scale: 1.035; }
  .room a:hover .room-name { color: var(--accent); }
  .room a:hover .room-more { color: var(--accent-strong); }
  .room a:hover .room-more span { translate: 5px 0; }
}

/* ---------- process: a drag row on the dark field ---------- */
.process { margin-top: var(--section); padding-block: clamp(5rem, 10vw, 8rem); background: var(--dark); color: var(--dark-ink); }
.process-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding-inline: var(--margin); }
.process-title { font-size: var(--step-head); line-height: 1; letter-spacing: -0.035em; max-width: 14ch; }
.process-buttons { display: flex; gap: 0.5rem; }
.progress { height: 6px; margin: 2rem var(--margin) 3rem; background: rgba(235, 229, 227, 0.18); }
.progress span { display: block; height: 100%; width: 100%; background: var(--dark-ink); transform-origin: left; transform: scaleX(var(--p, 0.2)); will-change: transform; }
.row {
  /* grid + subgrid: every step's title, text and photo share rows, so each --gap starts from the same line */
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(17.5rem, 22vw, 21rem); grid-template-rows: repeat(3, auto);
  column-gap: 2rem; row-gap: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: var(--margin);
  padding-inline: var(--margin); scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y;
}
.row::-webkit-scrollbar { display: none; }
.row:focus-visible { outline-offset: -3px; }
.step { grid-row: span 3; display: grid; grid-template-rows: subgrid; align-content: start; scroll-snap-align: start; }
.step-name { font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.01em; }
.step-text { margin-top: 0.6rem; color: var(--dark-muted); max-width: 30ch; }
.step img { margin-top: var(--gap, 96px); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #3a332e; }

/* ---------- made: a tinted band, four photographs in two columns with their words beneath ---------- */
.made { padding: clamp(4rem, 8vw, 6.5rem) var(--margin); background: var(--surface); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.made > * { grid-column: 1 / -1; }
.made-intro { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; }
.made-title { grid-column: 1 / -1; font-size: var(--step-head); line-height: 1; letter-spacing: -0.035em; }
.made-lead { grid-column: 1 / span 6; margin-top: 1.5rem; font-size: var(--step-lead); line-height: 1.3; max-width: 36ch; }

.benefits { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 5vw, 4.5rem) clamp(2rem, 6vw, 6rem); }
.benefit { display: grid; gap: 1.5rem; align-content: start; }
.benefit-title { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 3rem); line-height: 1.05; letter-spacing: -0.025em; }
.benefit-words p { margin-top: 0.9rem; max-width: 38ch; }
.benefit-pic { order: -1; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }

/* ---------- journal: a statement, the table pushed right ---------- */
.journal { padding: clamp(5rem, 9vw, 8rem) var(--margin) 0; }
.journal-title { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.035em; }
.journal-body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); margin-top: clamp(2.5rem, 5vw, 4rem); }
.journal-pic { grid-column: 1 / span 4; grid-row: 1; align-self: end; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.journal-table { grid-column: 6 / -1; grid-row: 1; }
.entries { display: grid; row-gap: 1.25rem; }
.entries a {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline;
  padding-block: 0.4rem; transition: color var(--t-hover) ease;
}
.entries-group { margin-top: 2.75rem; }
.entry-kind { color: var(--muted); }
.entry-name { font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.01em; }
.entry-value { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry-value span, .entry-value .out { display: inline-block; transition: transform var(--t-ui) var(--ease-out); }
.entry-value .out { width: 0.7em; height: 0.7em; vertical-align: 0.02em; }
@media (hover: hover) and (pointer: fine) {
  .entries a:hover { color: var(--accent); }
  .entries a:hover .entry-value span { transform: translateX(4px); }
  .entries a:hover .entry-value .out { transform: translate(2px, -2px); }
}

/* ---------- gallery: staggered pairs ---------- */
.gallery { padding: var(--section) var(--margin) 0; }
.gallery-title { font-size: var(--step-head); line-height: 1; letter-spacing: -0.035em; }
.pairs { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); margin-top: clamp(3rem, 7vh, 5rem); }
.pic img, .pic video { width: 100%; object-fit: cover; }
.pic video { aspect-ratio: 3 / 4; }
.pic-cap { margin-top: 0.65rem; font-size: var(--step-small); color: var(--muted); }
.pic-a { grid-column: 1 / span 4; }
.pic-d { grid-column: 5 / span 4; }
.pic-e { grid-column: 9 / span 4; }
.pic-follow { grid-column: 2 / span 5; grid-row: 3; align-self: center; display: grid; justify-items: start; gap: 1.75rem; }
.pic-follow p { font-size: var(--step-lead); line-height: 1.25; max-width: 26ch; }

/* ---------- contact ---------- */
.contact { padding: var(--section) var(--margin) clamp(6rem, 10vw, 8rem); }
.contact-band { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.contact-words { grid-column: 1 / span 6; }
.contact-title { font-size: var(--step-head); line-height: 1; letter-spacing: -0.035em; }
.contact-lead { margin-top: 1.25rem; font-size: var(--step-lead); line-height: 1.3; max-width: 30ch; }
.contact-links { grid-column: 9 / -1; display: grid; justify-items: start; gap: 0.5rem; font-size: var(--step-body); }
.contact-ask { font-weight: 500; margin-bottom: 0.75rem; }
.contact-where { margin-top: 0.75rem; font-size: var(--step-small); color: var(--muted); max-width: 28ch; }

.contact-body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); margin-top: clamp(4rem, 8vw, 6rem); }
.contact-form { grid-column: 1 / span 7; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem var(--gutter); align-content: start; }
.map { grid-column: 9 / -1; width: 100%; height: 100%; min-height: 28rem; border: 0; background: var(--surface); filter: grayscale(1) contrast(0.95); position: sticky; top: calc(var(--bar) + 1rem); max-height: calc(100svh - var(--bar) - 2rem); }
.form-group { display: grid; gap: 0.5rem; align-content: start; }
.full-width { grid-column: 1 / -1; }
.form-group > label, .form-group > legend { font-size: var(--step-small); font-weight: 500; }
.required { color: var(--accent); }
.optional { color: var(--muted); font-weight: 400; }
.field {
  width: 100%; min-height: 3.25rem; padding: 0.8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 0;
  font-size: max(1rem, var(--step-body)); color: var(--ink); transition: background-color var(--t-hover) ease;
}
textarea.field { min-height: 8rem; resize: vertical; line-height: 1.45; }
.field::placeholder { color: var(--muted); opacity: 1; }
.field:hover { background: var(--surface-2); }
.field:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; background: var(--surface); }
.radio-group { display: flex; gap: 0.75rem; }
.choice { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 3rem; padding: 0 1.1rem; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: background-color var(--t-hover) ease; }
.choice:hover { background: var(--surface-2); }
.choice:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.choice input, .checkbox-label input { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; margin: 0; }
.file-upload { position: relative; }
.file-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-upload-label { display: flex; align-items: center; min-height: 4.5rem; padding: 1rem; background: var(--surface); border: 1px dashed var(--line); color: var(--muted); transition: background-color var(--t-hover) ease; }
.file-upload:hover .file-upload-label { background: var(--surface-2); }
.file-upload input:focus-visible + .file-upload-label { outline: 2px solid var(--accent); }
.file-info { font-size: var(--step-small); color: var(--muted); }
.checkbox-label span { max-width: 54ch; }
.checkbox-label { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; align-items: start; font-size: var(--step-small); line-height: 1.5; color: var(--muted); cursor: pointer; }
.checkbox-label input { margin-top: 0.2rem; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 0.5rem; }
.form-legal { display: flex; gap: 1.25rem; font-size: var(--step-small); color: var(--muted); }
.field-error { font-size: var(--step-small); color: var(--error); }
.has-error .field, .has-error .choice, .has-error .file-upload-label { outline: 2px solid var(--error); outline-offset: 0; }
.form-status { padding: 1rem 1.25rem; }
.form-status.is-success { background: var(--ink); color: var(--bg); }
.form-status.is-error { background: var(--error); color: #fff; }

/* the booking question after a request is sent (a real dialog, so it may float) */
#appointment-popup-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--margin); background: rgba(43, 38, 34, 0.55); }
.appointment-popup { width: min(30rem, 100%); padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--bg); box-shadow: 0 24px 60px rgba(43, 38, 34, 0.3); } /* taste-skill-ignore: a real dialog */
.popup-header { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.popup-header h3 { font-size: var(--step-lead); font-weight: 500; }
.close-popup { font-size: 1.75rem; line-height: 1; width: 2.75rem; height: 2.75rem; margin: -0.5rem -0.5rem 0 0; }
.popup-content p { margin-top: 0.75rem; }
.popup-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.popup-buttons button { min-height: 3rem; padding: 0 1.25rem; font-weight: 500; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.popup-buttons button:active { transform: scale(0.97); }
.btn-yes { background: var(--accent); color: var(--accent-ink); }
.btn-no { background: var(--surface); }

/* ---------- footer: four columns, the spoon under the address ---------- */
.foot {
  overflow: hidden;
  padding: 2.5rem var(--margin) 1.25rem; background: var(--dark); color: var(--dark-muted); font-size: var(--step-body);
}
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem var(--gutter); }
.foot-head { color: var(--dark-ink); font-weight: 500; margin-bottom: 0.4rem; }
.foot-cols ul { display: grid; gap: 0.3rem; justify-items: start; }
.foot-cols .button { margin-top: 0.75rem; }
.foot a:not(.button) { color: var(--dark-muted); }
@media (hover: hover) and (pointer: fine) { .foot a:not(.button):hover { color: var(--dark-ink); } }
.foot-mark { margin-top: 1.75rem; width: min(16rem, 100%); }
.foot-mark img { width: 100%; height: auto; background: none; }
.foot-legal { margin-top: 3rem; font-size: var(--step-small); display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

/* ---------- tablet ---------- */
@media (max-width: 60em) {
  /* menu button: the word plus two lines that cross into an X */
  .bar-menu { display: inline-flex; align-items: center; gap: 0.7rem; }
  .bar-menu::after {
    content: ""; width: 1.25rem; height: 0.5rem;
    background: linear-gradient(currentColor, currentColor) top / 100% 1.5px no-repeat,
                linear-gradient(currentColor, currentColor) bottom / 100% 1.5px no-repeat;
    transition: transform var(--t-ui) var(--ease-out);
  }
  .bar-menu[aria-expanded="true"]::after {
    height: 1.25rem;
    background: linear-gradient(45deg, transparent calc(50% - 0.75px), currentColor calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px)),
                linear-gradient(-45deg, transparent calc(50% - 0.75px), currentColor calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px));
    transform: scale(0.8);
  }

  /* full-screen menu: large rows on hairlines, the booking button pinned to the bottom */
  .bar-nav {
    position: fixed; inset: calc(var(--bar) + var(--bar-top, var(--notice))) 0 0; display: flex; flex-direction: column; align-items: stretch; gap: 0;
    padding: 1.5rem var(--margin) calc(1.5rem + env(safe-area-inset-bottom)); background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; opacity: 0; transform: translateY(-0.75rem);
    transition: opacity var(--t-ui) ease, transform var(--t-ui) var(--ease-out), visibility 0s linear var(--t-ui);
  }
  .bar.is-open .bar-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .bar-nav .link {
    display: block;
    padding-block: 1rem; border-top: 1px solid var(--line);
    font-size: clamp(1.75rem, 7.5vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em;
  }
  .bar-nav .link:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .bar-nav .link::after { display: none; }
  .bar-nav .link[aria-current] { color: var(--accent); }
  .bar-nav .button { margin-top: auto; min-height: 3.5rem; font-size: var(--step-body); }
  .bar-nav .link:nth-last-child(2) { margin-bottom: 2rem; }
  .process-buttons { display: none; }

  .about-pin { grid-column: 1 / -1; position: static; }
  .people { grid-column: 1 / -1; margin-top: 4rem; }
  .room-1 { grid-column: 1 / span 7; }
  .room-2 { grid-column: 8 / -1; }
  .room-3 { grid-column: 2 / span 10; }
  .room-remark { grid-column: 1 / span 8; }
  .scatter > :nth-child(4) { grid-row: 3; }
  .scatter > :nth-child(5), .scatter > :nth-child(6) { grid-row: 4; }
  .scatter > :nth-child(7) { grid-row: 5; }
  .made > *, .made-title, .made-lead { grid-column: 1 / -1; }
  .journal-pic { grid-column: 1 / span 4; }
  .journal-table { grid-column: 5 / -1; grid-template-columns: 1fr; }
  .contact-words { grid-column: 1 / -1; }
  .contact-links { grid-column: 1 / -1; margin-top: 2.5rem; }
  .contact-form { grid-column: 1 / -1; }
  .map { grid-column: 1 / -1; position: static; min-height: 20rem; max-height: none; margin-top: 3rem; }
}

/* ---------- phone ---------- */
@media (max-width: 40em) {
  :root { --bar: 4rem; }
  .bar-mark img { height: 1.5rem; }
  .notice-more, .notice-cta-words { display: none; }
  .notice-link { gap: 0.75rem; }
  .notice-gift { display: none; }
  .notice-ask { font-size: min(1rem, 4.1vw); }
  .notice-name { font-size: min(0.6875rem, 2.75vw); letter-spacing: 0.04em; }
  .notice-cta { width: 2.25rem; padding: 0; justify-content: center; }
  .notice-short { display: inline; }

  /* phone hero: headline, then the one photograph that changes with the word, then the sentence and
     the button and phone number.
     .hero-text steps aside (display: contents) so its children can sit either side of the photograph */
  .hero, html.has-notice .hero { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .hero-text { display: contents; }
  .hero-title { order: 1; padding: calc(var(--bar) + 2rem) var(--margin) 0; font-size: 10.5vw; max-width: none; }
  .hero-field { order: 2; display: block; container-type: normal; height: auto; padding: 1.5rem var(--margin) 0; background: none; overflow: visible; }
  .hero-lead { order: 3; margin-top: 0; padding: 1.5rem var(--margin) 0; max-width: none; font-size: var(--step-body); }
  .hero-act { order: 4; margin-top: 0; padding: 1.5rem var(--margin) 3rem; gap: 0.75rem 1.25rem; }
  .hero-act .button { min-height: 3rem; padding-inline: 1.25rem; }
  .specimens { display: block; width: auto; aspect-ratio: auto; }
  .spec-big { aspect-ratio: 4 / 5; height: auto; }
  .spec:not(.spec-big) { display: none; }

  .about-title { font-size: 24vw; }
  .people { grid-template-columns: 1fr; row-gap: 3rem; }
  .person { width: 72%; }
  .person:nth-child(even) { margin-top: 0; justify-self: end; }

  .scatter { row-gap: 4.5rem; }
  .scatter > * { grid-row: auto !important; }
  .room-1 { grid-column: 1 / -1; }
  .room-2 { grid-column: 5 / -1; margin-top: 0; }
  .room-3 { grid-column: 1 / span 10; }
  .room-remark { grid-column: 1 / -1; }

  .row { column-gap: 1rem; grid-auto-columns: 72vw; }
  .step img { margin-top: calc(var(--gap, 96px) / 2.5); }

  .benefits { grid-template-columns: 1fr; }
  .benefit-title { font-size: 1.625rem; }

  .journal-title { font-size: 9.5vw; text-indent: 0; }
  .journal-body { margin-top: 3rem; }
  .journal-table { grid-column: 1 / -1; }
  .journal-pic { grid-column: 6 / -1; grid-row: 2; margin-top: 3rem; }
  .entries a { grid-template-columns: 1fr auto; row-gap: 0.15rem; }
  .entry-kind { grid-column: 1; grid-row: 1; }
  .entry-value { grid-column: 2; grid-row: 1; }
  .entry-name { grid-column: 1 / -1; grid-row: 2; font-size: var(--step-body); }

  .pairs { display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--margin) * -1); padding-inline: var(--margin); scroll-padding-inline: var(--margin);
    scrollbar-width: none; }
  .pairs::-webkit-scrollbar { display: none; }
  .pairs > * { flex: 0 0 62vw; margin-top: 0 !important; scroll-snap-align: start; }
  .pic-follow { grid-column: 1 / -1; }

  .contact-form { grid-template-columns: 1fr; }

  .foot-cols { grid-template-columns: 1fr 1fr; gap: 2rem var(--gutter); }
}

/* ---------- motion (content stays visible without script) ---------- */
.shutter { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js [data-rise] { opacity: 0; transform: translateY(22px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
  /* a part is hidden ("armed") only just before it scrolls in, then rises into place; parts far down
     the page are never hidden, so nothing stays invisible for a reader who has not got there yet */
  .js [data-reveal].is-armed { opacity: 0; transform: translateY(26px); }
  .js [data-reveal].is-armed.is-in { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 75ms); }
  .js .shutter[data-reveal].is-armed { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); }
  .js .shutter[data-reveal].is-armed img { transform: scale(1.12); }
  .js .shutter[data-reveal].is-armed.is-in { clip-path: inset(0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .shutter[data-reveal].is-armed.is-in img { transform: none; transition: transform 1500ms var(--ease-soft); }
  /* the room photograph: waits below, wipes up over the last one while it settles back from a slight
     zoom, and lifts away by the top; the same travel as the word in the headline */
  .js .spec-swap { opacity: 1; clip-path: inset(100% 0 0 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .spec-swap.is-on { clip-path: inset(0); }
  .js .spec-swap.is-out { clip-path: inset(0 0 100% 0); }
  .js .shutter[data-reveal] .spec-swap img,
  .js .shutter[data-reveal].is-armed.is-in .spec-swap img { transform: scale(1.16) translateY(4%); transition: transform 1700ms var(--ease-soft); }
  .js .shutter[data-reveal].is-armed.is-in .spec-swap.is-on img { transform: none; }
  .js .shutter[data-reveal].is-armed.is-in .spec-swap.is-out img { transform: scale(1.08) translateY(-4%); }

  @supports (animation-timeline: view()) {
    .about-title span { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    .about-title span + span { animation-range: entry 10% cover 45%; }
  }
}

/* ---------- scroll-linked motion ----------
   home.js writes two numbers while the page scrolls (never under reduced motion, so everything
   rests at 0 there): --hero, 0 → 1 as the hero leaves; --sp on each [data-scroll] element,
   -1 entering from below … 0 centred … 1 leaving at the top. Only translate moves, so layout
   never shifts. Mouse and trackpad screens only: on touch
   screens the page scrolls on its own thread and these would trail behind it, so there they rest. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .spec { translate: 0 calc(var(--hero, 0) * var(--depth, 120) * -1px); }
  .hero-text { translate: 0 calc(var(--hero, 0) * 90px); }

  .person > * { translate: 0 calc(var(--sp, 0) * -24px); }
  .person:nth-child(even) > * { translate: 0 calc(var(--sp, 0) * -72px); }

  .room-pic img { height: 116%; translate: 0 calc(-6.9% + var(--sp, 0) * 6.9%); }

  .row { padding-bottom: 4rem; margin-bottom: -4rem; }
  .row .step img { translate: 0 calc(var(--sp, 0) * var(--gap, 96px) * -0.45); }


  .journal-title { translate: calc(var(--sp, 0) * -2.5vw) 0; }
  .journal-pic { translate: 0 calc(var(--sp, 0) * -40px); }

  .pic > * { translate: 0 calc(var(--sp, 0) * var(--drift, -28px)); }

}

@media (prefers-reduced-motion: no-preference) {
  /* reduced motion keeps the plain crossfade above; otherwise words slide up through the slot.
     Not scroll-linked, so phones get it too (a crossfade there shows both words at once) */
  .js .hero-title .swap { transition: width 650ms var(--ease-expo); }
  .js .hero-title .swap-word { transform: translateY(110%); transition: transform 750ms var(--ease-expo), opacity 450ms ease; }
  .js .hero-title .swap-word.is-on { transform: none; }
  .js .hero-title .swap-word.is-out { transform: translateY(-110%); }
  .js .pic.is-armed :is(img, video) { clip-path: inset(100% 0 0 0); }
  /* the pictures sit far apart, so each wipes open the moment it arrives instead of waiting on a stagger */
  .js .pic[data-reveal].is-armed.is-in { transition-delay: 0ms; }
  .js .pic.is-armed.is-in :is(img, video) { clip-path: inset(0); transition: clip-path 650ms var(--ease-out); }
}

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0.25; transform: translateX(-0.12em); } to { opacity: 1; transform: none; } }

/* phone menu: rows rise in one after another as it opens */
@media (max-width: 60em) and (prefers-reduced-motion: no-preference) {
  .bar.is-open .bar-nav > * { animation: nav-in 520ms var(--ease-out) both; }
  .bar.is-open .bar-nav > :nth-child(2) { animation-delay: 40ms; }
  .bar.is-open .bar-nav > :nth-child(3) { animation-delay: 80ms; }
  .bar.is-open .bar-nav > :nth-child(4) { animation-delay: 120ms; }
  .bar.is-open .bar-nav > :nth-child(5) { animation-delay: 160ms; }
  .bar.is-open .bar-nav > :nth-child(6) { animation-delay: 200ms; }
}
@keyframes nav-in { from { opacity: 0; transform: translateY(0.75rem); } }
