@charset "utf-8";
/* The Timber Collective — studio visit page
   Implements PRD §6 (design system) and the §5 section layouts.
   Mobile first. Desktop is the adaptation. */

/* ---------------------------------------------------------------- 1. Fonts
   §6.2: two families, self-hosted, Latin subset, woff2 only, four files.
   Loaded from this folder only, never from a font CDN. Two families, no others. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-300.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-300-italic.woff2") format("woff2");
  font-weight: 300; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* §6.2: size-adjust metrics on the fallbacks so the swap does not shift layout.
   Ratios are the webfont's OS/2 xAvgCharWidth over the fallback's. */
@font-face {
  font-family: "Cormorant Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 88.9%; ascent-override: 103.9%; descent-override: 32.3%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Cormorant Fallback";
  src: local("Georgia Italic"), local("Georgia");
  font-style: italic;
  size-adjust: 82.4%; ascent-override: 112.2%; descent-override: 34.8%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Outfit Fallback";
  src: local("Helvetica Neue"), local("Arial");
  size-adjust: 102.1%; ascent-override: 97.9%; descent-override: 25.5%;
  line-gap-override: 0%;
}

/* --------------------------------------------------------------- 2. Tokens */

:root {
  --ground:      #FCF7F1;  /* warm cream. Page background. Never pure white. */
  --ground-alt:  #F6F1EB;  /* second cream. Bands, cards. */
  --ink:         #2B1D14;  /* deep walnut. Headings, body, primary button fill. */
  --walnut:      #533927;  /* secondary text, labels, captions, borders. */
  --caramel:     #B3723D;  /* accent: rules, stars, step numbers, underlines. */
  --brass:       #A8874E;  /* fine rules and borders, at 40% opacity. */
  --sand:        #D4B896;  /* pale amber. ONLY on --ink. */

  /* The same seven colours in channel form, so the rgba() values the PRD
     specifies (§5.3 hairline, §5.4 overlay and chip, §6.4 rules) have one
     source of truth. Not new colours. */
  --ground-rgb: 252, 247, 241;
  --ink-rgb:     43,  29,  20;
  --caramel-rgb:179, 114,  61;
  --brass-rgb:  168, 135,  78;
  --sand-rgb:   212, 184, 150;

  --serif: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif;
  --sans: "Outfit", "Outfit Fallback", system-ui, sans-serif;

  --gutter: 20px;
  --header-h: 60px;
  --pad: 72px;              /* section vertical padding, §6.3 */
  --max: 1200px;
}

/* ----------------------------------------------------------- 3. Base reset */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  /* §5.10: reserve the sticky bar's height so it never covers the last line. */
  padding-bottom: calc(60px + env(safe-area-inset-bottom));
}

img, picture, svg { display: block; max-width: 100%; }
picture { height: 100%; }
picture img { width: 100%; height: 100%; object-fit: cover; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, blockquote, address { margin: 0; }
address { font-style: normal; }
a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* §10.5: skip link, first focusable element. */
.skip {
  position: absolute; left: 20px; top: -60px; z-index: 60;
  background: var(--ink); color: var(--ground);
  font: 500 15px/1 var(--sans); padding: 14px 20px;
  transition: top 150ms;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--caramel); outline-offset: 3px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* --------------------------------------------- 4. Type scale, §6.2 */

.heading {
  font: 300 30px/1.15 var(--serif);
  letter-spacing: 0;
}
h1.heading { font-size: 36px; line-height: 1.1; letter-spacing: -0.005em; }
.heading em { font-style: italic; color: var(--caramel); }

.eyebrow {
  font: 500 12px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--walnut);
  margin-bottom: 14px;
}

.body { font: 400 16px/1.6 var(--sans); max-width: 34em; }
.body + .body { margin-top: 20px; }
.lede { font: 400 16px/1.6 var(--sans); max-width: 34em; }
.caption, .micro { font: 400 13px/1.5 var(--sans); letter-spacing: 0.01em; color: var(--walnut); }
.label {
  font: 500 12px/1 var(--sans); text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--walnut);
}

/* ------------------------------------------------ 5. Components, §6.4 */

/* §5.0: the 40px rule, 24px above and below. */
.rule {
  width: 40px; height: 1px; border: 0; margin: 24px 0;
  background: rgba(var(--brass-rgb), 0.5);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 2px;
  font: 500 15px/1 var(--sans); letter-spacing: 0.02em;
  transition: background-color 200ms, border-color 200ms, transform 100ms;
}
.btn-primary { background: var(--ink); color: var(--ground); }
.btn-ghost { border: 1px solid var(--walnut); color: var(--ink); }
.btn:active { transform: translateY(1px); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--walnut); }
  .btn-ghost:hover { border-color: var(--caramel); }
}

.link {
  border-bottom: 1px solid var(--caramel);
  padding-bottom: 2px;
  color: var(--ink);
}
@media (hover: hover) { .link:hover { border-bottom-color: var(--ink); } }

.card {
  background: var(--ground-alt);
  border: 1px solid rgba(var(--brass-rgb), 0.4);
  padding: 24px;
}

.stars { display: inline-flex; gap: 2px; vertical-align: -2px; }
.stars svg { fill: var(--caramel); }

/* §5.3 and §5.9: the ink band with the hairline texture. Used exactly twice. */
.band { position: relative; overflow: hidden; background: var(--ink); color: var(--ground); }
.band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 60px,
              rgba(var(--sand-rgb), 0.03) 60px 61px);
}
.band > * { position: relative; }
.band .eyebrow, .band .heading em, .band .attrib { color: var(--sand); }
.band .rule { background: rgba(var(--sand-rgb), 0.5); }
.band .heading, .band .body { color: var(--ground); }

.band-alt { background: var(--ground-alt); }

/* §5.4 header row. */
.row-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-top: 32px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(var(--brass-rgb), 0.4);
}
.row-head .count {
  font: 300 13px/1 var(--serif); letter-spacing: 0.08em; color: var(--walnut);
}

/* An unresolved PRD §2.3 input, rendered visibly so it cannot ship unnoticed. */
.placeholder {
  display: flex; align-items: center; justify-content: center; height: 100%;
  border: 1px dashed rgba(var(--brass-rgb), 0.4);
  font: 500 12px/1 var(--sans); letter-spacing: 0.12em; color: var(--walnut);
}

/* ------------------------------------------------------ 6. Motion, §6.5 */

.reveal { opacity: 0; transform: translateY(12px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 500ms cubic-bezier(0.2,0.6,0.2,1) var(--d, 0ms),
              transform 500ms cubic-bezier(0.2,0.6,0.2,1) var(--d, 0ms);
}
.reveal-group > .reveal.in { --d: calc(var(--i, 0) * 60ms); }
.reveal-now { opacity: 1; }        /* hero: visible immediately, no animation */

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0ms !important; animation-duration: 0ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------- 7. Header, §5.11
   Amended 2026-09-20: the logo mark joins the wordmark, there is one nav item,
   the phone number has an icon, and the bar is sticky at every size. */

#header {
  position: sticky; top: 0; z-index: 40;
  background: transparent;
  transition: background-color 200ms, border-color 200ms;
  border-bottom: 1px solid transparent;
}
#header.pinned {
  background: rgba(var(--ground-rgb), 0.96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom-color: rgba(var(--brass-rgb), 0.4);
}
.header-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 60px; flex-wrap: nowrap;
}

.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-mark { width: 26px; height: auto; color: var(--caramel); flex: none; }
.wordmark {
  /* Below 768 the header carries the mark, two tabs and the phone, and the name
     will not fit beside them on a 360px phone. The mark holds the brand there
     and the H1 underneath says the name in full. Clamped above that. */
  display: none;
  font: 300 clamp(14px, 2vw, 20px)/1 var(--serif);
  letter-spacing: 0.04em; white-space: nowrap; overflow: hidden;
}

.nav { display: flex; gap: 16px; flex: none; }
.nav a {
  font: 500 11px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--walnut); padding: 16px 0;
}
.nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--caramel); }
@media (hover: hover) { .nav a:hover { color: var(--ink); } }

.header-phone {
  display: flex; align-items: center; gap: 8px; flex: none;
  min-width: 44px; min-height: 44px; justify-content: flex-end;
  font: 400 14px/1 var(--sans); color: var(--walnut);
}
.header-phone svg { flex: none; }
.header-phone span { display: none; }

/* Desktop tel: links usually do nothing at all, so the click reveals the number
   instead of appearing broken. Mobile keeps the native dial. */
#phonebar { border-top: 1px solid rgba(var(--brass-rgb), 0.4); background: var(--ground-alt); }
#phonebar[hidden] { display: none; }
.phonebar-in { display: flex; align-items: center; gap: 16px; padding-block: 14px; }
.phonebar-num { font: 300 22px/1 var(--serif); letter-spacing: 0.04em; }
.phonebar-copy, .phonebar-close {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 12px; border: 0; background: none; cursor: pointer;
  font: 500 12px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--walnut);
}
.phonebar-close { margin-left: auto; }
@media (hover: hover) {
  .phonebar-copy:hover, .phonebar-close:hover { color: var(--ink); }
}

/* --------------------------------------------------------- 8. Hero, §5.1 */

.hero { padding-bottom: var(--pad); }

/* REMOVED FROM MOBILE 2026-09-20 at Aryamaan's request, after he judged the
   stacked image against the text on a real phone. Below 768 the hero is text
   only; from 768 up the image returns unchanged. The preload is gated to match
   (see heroPreload in _src/lib/render.js), so a phone downloads none of it.
   To put it back, delete this rule and the padding-top override below. */
.hero-media { display: none; }

.hero-media {
  margin-inline: calc(var(--gutter) * -1);
  /* FIX 2026-09-20. This width must be stated. Without it the width is `auto`,
     and an auto width on a box that has BOTH aspect-ratio and max-height is
     resolved back through the ratio from the clamped height — so capping the
     height silently narrowed the image instead of cropping it. Measured live at
     375px: the hero rendered 285.8px wide and stopped 89.2px short of the right
     edge, on index and collection alike. A definite width makes the ratio drive
     height only, and max-height then crops through object-fit: cover, which is
     what the cap was always meant to do. */
  width: calc(100% + var(--gutter) * 2);
  aspect-ratio: 4 / 5;
  /* §5.1 and §12: the primary button must be visible without scrolling at
     360x780 and 390x844. At 4/5 uncapped it is not, so the image is capped.
     44vh leaves the button ~30px clear at 360x780 on the measured type metrics
     (working in the build README); confirm on a real device.

     Amended 2026-09-20: the .brandline added above the eyebrow costs 28px of
     above-the-fold height (18px line + 10px margin), and measured live at
     360x780 that pushed the button 3.2px BELOW the fold. The cap gives back
     what the brand line took, so the §5.1 guarantee holds unchanged. */
  max-height: calc(44vh - 30px);
}
/* ROOT CAUSE FIX 2026-09-20, from a screenshot on Aryamaan's Android.
   The global rule is `picture { height: 100% }`, and a percentage height only
   resolves against a parent with a definite height. .hero-media had no height
   at all — only aspect-ratio and max-height. Chrome on desktop treats that as
   definite, so the image obeyed the box and every emulated width I measured
   (360, 375, 390, 412, 600, 768, 820, 1023) reported zero overlap. His browser
   treated it as indefinite, fell back to the intrinsic height — 412px wide on
   a 4/5 source is 515px tall against a 402px box — and, because the box was
   overflow: visible, the extra ~90px of photograph spilled straight down over
   the brand line, the eyebrow and the H1. That is the bug in his screenshot.

   Fixed by not depending on percentage resolution at all: the box establishes
   a containing block and clips, and the picture fills it absolutely. This is
   the same pattern .map and .tile-media already use here, and both were
   correct on his device. overflow: hidden alone would have masked it; this
   removes the cause. */
.hero-media { position: relative; overflow: hidden; }
.hero-media picture { position: absolute; inset: 0; height: auto; }
.hero-media picture img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

/* Added 2026-09-20. The mobile stand-in for the header wordmark — see the note
   in _src/blocks/hero.js. Serif, so it reads as the name rather than as another
   eyebrow, and sits directly above the real eyebrow. Hidden from 768 up, where
   the header carries the name again. */
.brandline {
  /* Amended 2026-09-20: matched to the desktop header wordmark exactly, so the
     name reads the same on a phone as it does on a laptop. Measured off the
     live header at 1024: Cormorant Garamond 300, 20px, line-height 1,
     letter-spacing 0.8px (= 0.04em at 20px), --ink. Keep these two rules in
     step — if .wordmark changes, this changes with it. */
  font: 300 20px/1 var(--serif);
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 12px;
}

/* 24px was the gap under the hero image. With no image above it on mobile the
   hero would start hard against the header, so it takes the air instead. */
.hero-text { padding-top: 56px; }
.hero-text .rule { margin: 20px 0; }
.hero-actions { margin-top: 24px; }
.hero-actions .btn { width: 100%; }
.hero-call { margin-top: 16px; font-size: 15px; }
.micro { margin-top: 20px; }

/* -------------------------------------------------------- 9. Slabs, §5.2 */

.slabs { padding-block: var(--pad); }
.slabs .body { margin-bottom: 28px; }
.slab-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72vw;
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scrollbar-width: none;
}
.slab-row::-webkit-scrollbar { display: none; }
.slab { aspect-ratio: 1 / 1; scroll-snap-align: start; }
.slabs .caption { margin-top: 16px; }

/* ------------------------------------------------------- 10. Maker, §5.3 */

.maker { padding-block: 96px; }
.maker-media { aspect-ratio: 10 / 7; margin-inline: calc(var(--gutter) * -1); }
.maker-text { padding-top: 32px; }
.pull { margin-top: 36px; }
.rule-quote { margin: 0 0 20px; }
.quote { font: 300 italic 24px/1.3 var(--serif); color: var(--sand); }
.attrib { margin-top: 14px; font: 400 13px/1.5 var(--sans); }

/* §5.3 names Sheesham and Acacia and used to show neither. Two grain panels,
   the same pair the main site shows under "The Wood". Landscape rather than the
   source's portrait, so the pair does not out-run the text column beside it. */
.woods { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.wood-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.wood-name {
  display: block; margin-top: 10px;
  font: 300 17px/1 var(--serif); letter-spacing: 0.04em; color: var(--sand);
}

/* -------------------------------------------------------- 11. Work, §5.4 */

.work { padding-block: var(--pad); }
.work .body-lead { color: var(--walnut); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: 24px; }
.tile { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.tile-media { position: absolute; inset: 0; }
.tile-media picture img {
  filter: saturate(0.9);
  transition: transform 600ms ease, filter 400ms;
}
@media (hover: hover) {
  .tile:hover .tile-media picture img { transform: scale(1.03); filter: saturate(1); }
}
@media (prefers-reduced-motion: reduce) {
  .tile:hover .tile-media picture img { transform: none; }
}
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top,
    rgba(var(--ink-rgb), 0.88) 0%, rgba(var(--ink-rgb), 0.30) 45%, transparent 70%);
}
.chip {
  position: absolute; top: 20px; left: 20px; z-index: 2;
  font: 500 11px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--sand);
  background: rgba(var(--sand-rgb), 0.15);
  border: 0.5px solid rgba(var(--sand-rgb), 0.4);
  padding: 5px 12px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.tile-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 28px 24px 24px; }
.tile-title { font: 300 22px/1.2 var(--serif); color: var(--ground); }
.tile-sub {
  margin-top: 6px; font: 400 11px/1 var(--sans);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--sand);
}
.btn-tile {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  min-height: 44px; padding: 9px 16px;
  background: var(--sand); color: var(--ink);
  font: 500 11px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.1em;
  transition: background-color 200ms;
}
.btn-tile .glyph { fill: var(--ink); }
@media (hover: hover) { .btn-tile:hover { background: var(--ground); } }

.work-more { margin-top: 32px; }
.work-more .btn { width: 100%; }

/* ------------------------------------- 11b. Collection gallery (added) ---
   Rebuilt after review. The first version was 135 images edge to edge at a 2px
   gap: a hot brown wall with nothing to click. Every image is matted now, the
   default view is per-category rows that scroll sideways, picking a category
   turns that row into a grid, and anything opens at 1280px. */

.gallery { padding-top: var(--pad); padding-bottom: 32px; }
.gallery .body { margin-bottom: 4px; }

/* --- the chip bar, pinned under the header --- */
.chipbar {
  position: sticky; top: var(--header-h); z-index: 30;
  margin-top: 32px; padding-block: 10px;
  background: rgba(var(--ground-rgb), 0.96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-block: 1px solid rgba(var(--brass-rgb), 0.4);
}
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
}
.chips::-webkit-scrollbar { display: none; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 44px; padding: 0 14px; cursor: pointer;
  background: none; border: 1px solid rgba(var(--brass-rgb), 0.4); border-radius: 0;
  font: 500 11px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--walnut);
  transition: background-color 200ms, color 200ms, border-color 200ms;
}
.chip-btn .chip-n {
  font-size: 10px; letter-spacing: 0.04em; color: var(--caramel);
  transition: color 200ms;
}
.chip-btn[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--ground);
}
.chip-btn[aria-pressed="true"] .chip-n { color: var(--sand); }
@media (hover: hover) {
  .chip-btn:hover {
    background: var(--ground-alt); border-color: var(--caramel); color: var(--ink);
  }
  .chip-btn[aria-pressed="true"]:hover { background: var(--walnut); color: var(--ground); }
}

.g-count {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin-top: 24px; font: 400 13px/1.5 var(--sans); color: var(--walnut);
}
.g-reset {
  border: 0; background: none; cursor: pointer; padding: 6px 0;
  font: 400 13px/1 var(--sans); color: var(--ink);
  border-bottom: 1px solid var(--caramel);
}
.g-reset[hidden] { display: none; }
@media (hover: hover) { .g-reset:hover { border-bottom-color: var(--ink); } }

/* --- category rows --- */
.g-cat { margin-top: 40px; }
.g-cat[hidden] { display: none; }
.g-cat .row-head { margin-top: 0; }
.g-all {
  border: 0; background: none; cursor: pointer; padding: 6px 0;
  font: 400 13px/1 var(--sans); color: var(--ink);
  border-bottom: 1px solid var(--caramel);
}
@media (hover: hover) { .g-all:hover { border-bottom-color: var(--ink); } }

/* Rows mode: one sideways strip per category, the §5.2 scroll-snap pattern.
   Grid mode: the same cells, wrapped. One DOM, two readings. */
.g-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 58vw;
  gap: 14px; margin-top: 20px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  /* The strip is NOT inside .wrap, so it must not carry the negative margins
     .slab-row and .chips use — that would push the whole page sideways. It
     bleeds right and insets left to line up with the row heading above it. */
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.g-strip::-webkit-scrollbar { display: none; }
.g-cell { scroll-snap-align: start; }

[data-mode="grid"] .g-strip {
  grid-auto-flow: row; grid-template-columns: 1fr 1fr; grid-auto-columns: auto;
  overflow: visible; margin-inline: auto; max-width: var(--max);
  padding-inline: var(--gutter); gap: 14px;
}
[data-mode="grid"] .g-all { display: none; }

/* The mat: cream ground, a brass hairline and real padding, so there is page
   between the pieces. §6.4 says images carry no border; these carry a frame
   around the mat instead, which is the change Aryamaan asked for. */
.g-open {
  display: block; width: 100%; padding: 8px; cursor: pointer;
  background: var(--ground); border: 1px solid rgba(var(--brass-rgb), 0.4);
  border-radius: 0;
  transition: border-color 250ms, background-color 250ms;
}
.g-mat { display: block; aspect-ratio: 4 / 5; overflow: hidden; }
.g-open picture img {
  filter: saturate(0.85);
  transition: transform 600ms ease, filter 400ms;
}
@media (hover: hover) {
  .g-open:hover { border-color: var(--caramel); background: var(--ground-alt); }
  .g-open:hover picture img { transform: scale(1.03); filter: saturate(1); }
}
@media (prefers-reduced-motion: reduce) {
  .g-open:hover picture img { transform: none; }
}

/* --- lightbox --- */
#lightbox { position: fixed; inset: 0; z-index: 80; }
#lightbox[hidden] { display: none; }
.lb-shade { position: absolute; inset: 0; background: rgba(var(--ink-rgb), 0.94); }
.lb-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 56px 16px calc(24px + env(safe-area-inset-bottom));
}
.lb-inner picture { height: auto; }
.lb-img {
  width: auto; height: auto; max-width: 100%; max-height: 74vh; object-fit: contain;
}
.lb-cap {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  justify-content: center; text-align: center;
  font: 400 13px/1.5 var(--sans); color: var(--sand);
}
.lb-n { font: 300 13px/1 var(--serif); letter-spacing: 0.08em; opacity: 0.7; }
.lb-btn {
  position: absolute; display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; min-height: 48px; cursor: pointer;
  background: none; border: 0; color: var(--sand);
  transition: color 200ms;
}
@media (hover: hover) { .lb-btn:hover { color: var(--ground); } }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ------------------------------------------------------- 12. Visit, §5.5 */

.visit { padding-block: var(--pad); }
.visit-media { aspect-ratio: 16 / 10; margin-inline: calc(var(--gutter) * -1); margin-bottom: 40px; }
.details {
  margin-top: 28px; font: 400 14px/1.7 var(--sans); color: var(--walnut);
}
.details i { color: var(--brass); font-style: normal; margin: 0 8px; }
.visit-actions { margin-top: 32px; }
.visit-actions .btn { width: 100%; }
.visit-call { display: block; margin-top: 16px; font-size: 15px; }

/* ------------------------------------------------------- 13. Proof, §5.6 */

.proof { padding-block: var(--pad); }
.rating { margin-bottom: 6px; }
.rating-link { display: inline-flex; align-items: center; gap: 10px; }
.rating-text { font: 400 14px/1 var(--sans); color: var(--walnut); }
.rating-note { font: 400 13px/1.5 var(--sans); color: var(--walnut); }

/* Three matted cards, so three testimonials read as three. Cream on the
   ground-alt band, which is what lifts them off it. */
.reviews { margin-top: 36px; display: grid; gap: 16px; }
.review {
  background: var(--ground);
  border: 1px solid rgba(var(--brass-rgb), 0.4);
  padding: 24px;
}
.review-stars { margin-bottom: 14px; }
.review-stars .stars svg { width: 13px; height: 13px; }
.review blockquote { font: 300 18px/1.45 var(--serif); }
.reviews-link { margin-top: 28px; font-size: 15px; }

.find { margin-top: 48px; padding-top: 40px; border-top: 1px solid rgba(var(--brass-rgb), 0.4); }
.find-map { margin-bottom: 28px; }

/* The live Google embed, simply present. The static image sits behind it as the
   placeholder so the slot is never an empty box while the iframe arrives, and it
   is what remains if the iframe is blocked. loading="lazy" keeps the embed off
   the initial load entirely — it fetches when the visitor nears this section. */
.map {
  position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  border: 1px solid rgba(var(--brass-rgb), 0.4);
}
.map picture { position: absolute; inset: 0; }
.map picture img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.6) sepia(0.15); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.find address { margin-top: 14px; font-size: 15px; }
.find-text p:last-child { margin-top: 20px; font-size: 15px; }

/* -------------------------------------------------- 14. Commission, §5.7 */

.commission { padding-block: var(--pad); }
.texture { display: none; }
.commission .body { margin-bottom: 40px; }
.step { display: grid; grid-template-columns: 48px 1fr; gap: 12px; }
.step + .step { margin-top: 32px; }
.step-n { font: 300 36px/1 var(--serif); color: var(--caramel); }
.step-t { font: 500 16px/1.4 var(--sans); }
.step-b { margin-top: 6px; font: 400 15px/1.6 var(--sans); color: var(--walnut); }
.cost { margin-top: 40px; margin-bottom: 0; }

/* ----------------------------------------------------- 15. Contact, §5.8 */

.contact { padding-block: var(--pad); }
.cards { margin-top: 40px; display: grid; gap: 16px; }
.card-t { font: 300 24px/1.2 var(--serif); }
.card-b { margin-top: 10px; font: 400 15px/1.6 var(--sans); color: var(--walnut); }
.card .btn { margin-top: 24px; width: 100%; }

/* ------------------------------------------------------ 16. Footer, §5.9 */

#footer { padding-block: 40px; text-align: center; }
.footer-tagline {
  font: 300 italic 17px/1.4 var(--serif); letter-spacing: 0.04em; color: var(--sand);
}
.footer-line {
  margin-top: 20px; display: grid; gap: 8px; justify-items: center;
  font: 400 13px/1.5 var(--sans); color: rgba(var(--ground-rgb), 0.8);
}
.footer-line a { color: var(--sand); border-bottom: 0.5px solid rgba(var(--sand-rgb), 0.4); }

/* ------------------------------------------------ 17. Sticky bar, §5.10 */

#sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(var(--ground-rgb), 0.96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(var(--brass-rgb), 0.4);
  opacity: 0; transition: opacity 250ms;
}
#sticky[hidden] { display: none; }
#sticky.in { opacity: 1; }
#sticky a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 44px; font: 500 14px/1 var(--sans); color: var(--ink);
}
#sticky svg { color: var(--ink); }

/* ============================================ Tablet, 768px and up ======= */

@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .header-phone span { display: inline; }
  .nav { gap: 24px; }
  .wordmark { display: block; }
  /* From 768 the header states the name, so the hero stand-in stands down. */
  .brandline { display: none; }
  /* From 768 the hero image returns, and the text goes back to sitting under it. */
  .hero-media { display: block; }
  .hero-text { padding-top: 24px; }
  /* The chip row scrolled on desktop and the last chip sat half-cut against the
     edge, which reads as broken rather than scrollable. Above 768 it wraps. */
  .chips {
    flex-wrap: wrap; overflow: visible; row-gap: 8px;
    margin-inline: 0; padding-inline: 0;
  }
  .g-strip { grid-auto-columns: 34vw; gap: 18px; }
  [data-mode="grid"] .g-strip { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .work-more .btn { width: auto; }
  .slab-row { grid-auto-columns: 40vw; }
  .visit-actions { display: flex; align-items: center; gap: 24px; }
  .visit-actions .btn { width: auto; }
  .visit-call { margin-top: 0; }
  .card .btn { width: auto; }
  .footer-line {
    grid-auto-flow: column; justify-content: center; gap: 0;
  }
  /* Sand, not brass: this separator sits on ink, where brass measures ~2:1. */
  .footer-line > * + *::before {
    content: "·"; color: rgba(var(--sand-rgb), 0.5); margin: 0 10px;
  }
}

/* =========================================== Desktop, 1024px and up ====== */

@media (min-width: 1024px) {
  :root { --gutter: 40px; --header-h: 72px; --pad: 128px; }

  body { font-size: 17px; padding-bottom: 0; }
  .body, .lede { font-size: 17px; }
  .heading { font-size: 40px; }
  h1.heading { font-size: 56px; }

  /* §5.11: desktop header is 72px. */
  .header-in { height: 72px; }
  .brand-mark { width: 30px; }
  .nav a { font-size: 12px; }
  .g-strip { grid-auto-columns: 300px; gap: 24px; margin-top: 24px; }
  [data-mode="grid"] .g-strip { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .g-cat { margin-top: 64px; }
  .g-open { padding: 10px; }
  .lb-close { top: 20px; right: 24px; }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
  .lb-inner { padding: 72px 96px 32px; gap: 20px; }
  .lb-img { max-height: 78vh; }

  /* --- Hero, §5.1: text cols 1–5, contained portrait cols 7–12 --- */
  .hero { padding-bottom: 0; }
  .hero-grid {
    display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
    align-items: center;
    min-height: min(calc(100vh - 72px), 880px);
    padding-block: 48px;
  }
  .hero-text { grid-column: 1 / span 5; grid-row: 1; padding-top: 0; }
  .hero-media {
    grid-column: 7 / span 6; grid-row: 1;
    /* §5.1 specified 3/4 for a portrait photograph of a person. The hero is now
       a square slab image, and cropping a square source to 3/4 would throw away
       a quarter of its width and leave 1.4x density at this column. Square keeps
       1.87x. See the constraint log. */
    /* width: auto undoes the full-bleed width set on the mobile rule — here the
       box is a grid item and must take its column, not the column plus gutters. */
    margin-inline: 0; width: auto; aspect-ratio: 1 / 1; max-height: 640px;
  }
  .hero-actions .btn { width: auto; }

  /* --- Slabs, §5.2: text cols 1–4, four squares cols 5–12 --- */
  .slabs-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: start; }
  .slabs-text { grid-column: 1 / span 4; }
  .slabs-media { grid-column: 5 / span 8; }
  .slabs .body { margin-bottom: 0; }
  .slab-row {
    grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto;
    gap: 16px; overflow: visible; margin-inline: 0; padding-inline: 0;
  }

  /* --- Maker, §5.3 --- */
  .maker { padding-block: 120px; }
  .maker-grid {
    display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
    align-items: start;
  }
  .maker-media { grid-column: 1 / span 6; grid-row: 1; margin-inline: 0; }
  .maker-text { grid-column: 8 / span 5; grid-row: 1 / span 2; padding-top: 0; }
  .woods {
    grid-column: 1 / span 6; grid-row: 2;
    gap: 20px; margin-top: 24px; padding-inline: 0; max-width: none;
  }
  .quote { font-size: 26px; }

  /* --- Work, §5.4: three columns, 2px gap, inside the content width --- */
  .tiles {
    grid-template-columns: repeat(3, 1fr); gap: 2px;
    max-width: var(--max); margin: 40px auto 0; padding-inline: var(--gutter);
  }
  .tile-title { font-size: 24px; }

  /* --- Visit, §5.5 --- */
  .visit-media { aspect-ratio: 21 / 9; margin-inline: 0; margin-bottom: 56px; }
  .visit-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: start; }
  .visit-grid > :first-child { grid-column: 1 / span 4; }
  .visit-text { grid-column: 5 / span 7; }

  /* --- Proof, §5.6 --- */
  .reviews { grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
  .review { padding: 28px; }
  .review blockquote { font-size: 19px; }
  .find {
    display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
    align-items: center; margin-top: 64px; padding-top: 48px;
  }
  .find-map { grid-column: 1 / span 7; margin-bottom: 0; }
  .find-text { grid-column: 9 / span 4; }

  /* --- Commission, §5.7 --- */
  .texture { display: block; aspect-ratio: 21 / 6; max-width: var(--max);
             margin: 0 auto 80px; padding-inline: var(--gutter); }
  .commission-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: start; }
  .commission-grid > :first-child { grid-column: 1 / span 4; }
  .commission-grid > :last-child { grid-column: 5 / span 8; }
  .commission .body { margin-bottom: 0; }
  .step { grid-template-columns: 64px 1fr; gap: 20px; }
  .step + .step { margin-top: 40px; }
  .step-n { font-size: 40px; }

  /* --- Contact, §5.8 --- */
  .contact { padding-bottom: 120px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }

  /* §5.10: no sticky bar on desktop. */
  #sticky { display: none !important; }
}

/* ===================================== Narrow phones ===================== */
/* §5.4: the two-column mosaic holds at 360px; the tile body tightens rather
   than dropping to one column, so the section stays three rows on a phone. */
@media (max-width: 400px) {
  .tile-body { padding: 24px 16px 20px; }
  .tile-title { font-size: 20px; }
  .chip { top: 14px; left: 14px; }
}
