/* Cambridge Violin Makers — "The workshop of sound" (r5 polish)
   One object carries the page: a spruce violin top, its sand pattern and, finally, the visitor's own pattern. */

:root {
  --paper: #f5ebda;
  --paper-2: #ecdcc2;
  --paper-3: #e3cfae;
  --ink: #241b17;
  --ink-soft: #4f3f34;
  --rust: #8a4426;        /* accent text on paper surfaces */
  --amber: #e2b06c;       /* brand accent, used on dark surfaces */
  --amber-glow: #ecc187;
  --night: #1b1410;
  --night-2: #2a201a;
  --line: rgba(36, 27, 23, .22);
  --line-dark: rgba(245, 235, 218, .2);
  --focus: var(--rust);
  --header: 64px;
  --gutter: max(16px, 4.5vw);
  --display: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; overflow-wrap: anywhere; hyphens: manual; text-wrap: balance; }
h2 { font: 500 clamp(2.2rem, 1.3rem + 3.6vw, 4.6rem)/1.02 var(--display); letter-spacing: -.015em; }
h2 em, h1 em { font-style: italic; color: var(--rust); }
h3 { font: 600 1.15rem/1.3 var(--sans); }
p { margin: 0 0 1rem; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.js-only { display: none !important; }
.enhanced .js-only { display: revert !important; }
.enhanced .btn.js-only { display: inline-flex !important; }
/* Plate controls only appear once the scene engine is actually running. */
.plate-tap, .hover-hint { display: none; }
.scenes-ready .plate-tap { display: inline-flex; align-items: center; }
@media (hover: hover) and (pointer: fine) { .motion.scenes-ready .hover-hint { display: inline; } }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 12px 16px; background: var(--ink); color: var(--paper); border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
.skip-scene { position: absolute; top: -200px; z-index: 5; }
.skip-scene:focus { top: calc(var(--header) + 12px); }

.eyebrow { font: 600 .78rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1rem; color: var(--ink-soft); display: flex; align-items: center; gap: .75rem; }
.num { font: 600 italic 1.35rem/1 var(--display); letter-spacing: 0; color: var(--rust); }
.smallprint { font-size: .85rem; color: var(--ink-soft); max-width: 46ch; }
.fig { font: 600 italic 1.05rem/1 var(--display); margin-right: .35em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7rem 1.35rem; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #3b2b22; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-call { min-height: 44px; padding: .5rem 1.15rem; background: var(--ink); color: var(--paper); }
.btn-light { background: var(--amber); color: var(--night); }
.btn-light:hover { background: var(--amber-glow); }
.btn-outline-light { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-outline-light:hover { background: var(--paper); color: var(--night); }
.btn-mini { min-height: 32px; padding: .25rem .8rem; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font: 600 .85rem/1 var(--sans); cursor: pointer; margin-left: .35rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Header (direct child of body; never inside a clipped or transformed ancestor) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 235, 218, .94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) { .site-header { background: rgba(245, 235, 218, .82); backdrop-filter: blur(12px) saturate(1.2); } }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 64px; padding: 8px var(--gutter); }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; min-height: 44px; font: 600 1.32rem/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.wordmark em { font-style: italic; color: var(--rust); }
.wordmark-mark { width: 17px; height: 28px; color: var(--rust); flex: none; }
.primary-nav { display: flex; align-items: center; gap: .25rem 1.4rem; margin-left: auto; flex-wrap: wrap; }
.primary-nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px) / 0 1px no-repeat; transition: background-size .3s var(--ease); }
.primary-nav a:hover, .primary-nav a[aria-current="true"] { background-size: 100% 1px; }
.header-call { flex: none; }
.menu-toggle { display: none; }

@media (max-width: 960px) {
  .header-row { flex-wrap: wrap; }
  .js .menu-toggle:not([hidden]) {
    display: inline-flex; align-items: center; gap: .55rem; margin-left: auto;
    min-height: 44px; padding: .4rem .9rem; border-radius: 999px; border: 1.5px solid var(--ink);
    background: transparent; color: var(--ink); font: 600 .95rem/1 var(--sans); cursor: pointer;
  }
  .menu-icon { display: grid; gap: 5px; width: 16px; }
  .menu-icon i { display: block; height: 1.5px; background: currentColor; transition: transform .25s var(--ease); }
  .menu-toggle[aria-expanded="true"] .menu-icon i:first-child { transform: translateY(3.25px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon i:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  /* Without JS the links stay visible and wrap onto a second row. */
  .primary-nav { order: 3; width: 100%; margin: 0; gap: 0 1.1rem; }
  .menu-ready .primary-nav { display: none; }
  .menu-ready .primary-nav.is-open { display: flex; flex-direction: column; align-items: stretch; padding: .25rem 0 1rem; }
  .menu-ready .primary-nav.is-open a { border-top: 1px solid var(--line); font-size: 1.15rem; min-height: 52px; }
}
@media (max-height: 800px) and (min-width: 861px) {
  .hero { padding-block: 1rem 2rem; }
  .hero-title { font-size: clamp(3rem, 13cqi, 7rem); }
  .concept-note { margin-bottom: .75rem; }
  .lede { margin-bottom: .5rem; }
  .facts { margin: 1rem 0 1.1rem; }
}
@media (max-width: 420px) {
  .wordmark { font-size: 1.12rem; gap: .45rem; }
  .wordmark em { display: block; }
  .wordmark span { display: grid; line-height: .95; }
  .header-row { gap: .5rem; }
  .js .menu-toggle:not([hidden]) { padding: .4rem .75rem; }
  .btn-call { padding: .5rem .95rem; }
}

/* ---------- Plate frames (canvas over a static SVG fallback) ---------- */
.plate-frame { position: relative; margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.plate-frame canvas, .plate-frame .plate-fallback { grid-area: 1 / 1; width: 100%; height: 100%; min-height: 0; }
.plate-frame:not(.is-live) canvas { display: none; }
.plate-frame .plate-fallback { padding: 4%; }
.plate-frame.is-live .plate-fallback { visibility: hidden; }
.plate-frame figcaption { padding-top: .6rem; font-size: .88rem; color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center; min-height: calc(100svh - var(--header)); padding: clamp(1.25rem, 4vw, 3rem) var(--gutter) clamp(2rem, 5vw, 4rem);
}
.hero-copy { container-type: inline-size; max-width: 680px; }
.concept-note { display: inline-block; font-size: .82rem; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; margin-bottom: 1.25rem; }
.hero-title { font: 600 clamp(3.1rem, 15.5cqi, 8.6rem)/.9 var(--display); letter-spacing: -.025em; margin: .1em 0 .35em; }
.hero-title .line { display: block; overflow: clip; padding-bottom: .06em; }
.hero-title .line > span { display: block; }
.lede { font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem); max-width: 40ch; color: var(--ink-soft); }
.facts { display: grid; gap: .1rem; margin: 1.25rem 0 1.5rem; padding: 0; border-top: 1px solid var(--line); max-width: 560px; }
.facts div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 600 .74rem/1.9 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rust); }
.facts dd { margin: 0; font-weight: 500; }
.hero-art { justify-self: center; width: min(100%, calc((100svh - var(--header) - 5rem) * .55), 470px); aspect-ratio: 420 / 800; }
.hero-art figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; }
.hero-art .hint { flex-basis: 100%; }
.plate-tap { min-height: 36px; padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font: 600 .85rem/1 var(--sans); cursor: pointer; }
.plate-tap:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 1rem; }
  .concept-note { margin-bottom: .8rem; }
  .hero .eyebrow { margin-bottom: .5rem; }
  .lede { font-size: 1.02rem; margin-bottom: .5rem; }
  .facts { margin: 1rem 0 1.25rem; }
  .facts div { grid-template-columns: 4.5rem minmax(0, 1fr); padding: .4rem 0; }
  .hero-art { width: min(78vw, 360px); order: 2; }
}

/* ---------- Section rhythm ---------- */
.services, .plan, .visit { padding: clamp(4rem, 9vw, 8rem) var(--gutter); }
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head h2 { margin-bottom: 1.1rem; }
.section-head > p:not(.eyebrow) { color: var(--ink-soft); max-width: 58ch; font-size: 1.08rem; }

/* ---------- 01 Services ---------- */
.services { background: var(--paper-2); }
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.service { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem 1.4rem 1.6rem; display: grid; align-content: start; gap: .8rem; }
.service p { color: var(--ink-soft); margin: 0; }
.tool { width: 96px; height: 64px; }
.tool path { fill: none; stroke: var(--rust); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.section-cta { margin: 2rem 0 0; }
@media (max-width: 1100px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .service-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 02 Plate scene ---------- */
.plate-scene { position: relative; background: var(--night); color: var(--paper); --focus: var(--amber); }
.plate-scene h2 em, .plate-scene .num { color: var(--amber); }
.plate-scene .eyebrow, .plate-scene .smallprint { color: #cdbca4; }
.plate-stage { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: clamp(3rem, 7vw, 5rem) var(--gutter); }
.plate-copy h2 { margin-bottom: 1.6rem; }
.steps { list-style: none; margin: 0 0 1.2rem; padding: 0; border-top: 1px solid var(--line-dark); }
.steps li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .6rem; padding: .85rem 0; border-bottom: 1px solid var(--line-dark); }
.steps p { margin: .3rem 0 0; color: #ddd0bc; max-width: 46ch; }
.step-num { font: 600 italic 1.3rem/1.2 var(--display); color: var(--amber); }
.scene-status { display: none; font: 600 italic 1.2rem/1 var(--display); color: var(--amber); }
.plate-scene-art { width: min(100%, 500px); aspect-ratio: 420 / 700; justify-self: center; }

/* Pinned version, only when the scene engine is running on a tall enough screen. */
.scenes-ready .plate-scene.is-pinned { height: 460svh; }
.scenes-ready .plate-scene.is-pinned .plate-stage { position: sticky; top: var(--header); height: calc(100svh - var(--header)); padding-block: 1.5rem; overflow: clip; }
/* Inactive steps dim by colour, not opacity, so they keep 4.5:1 contrast while still reading as "not yet". */
.scenes-ready .plate-scene.is-pinned .steps li { color: #9a8875; transition: color .4s var(--ease); }
.scenes-ready .plate-scene.is-pinned .steps li .step-num { color: #9a8875; }
.scenes-ready .plate-scene.is-pinned .steps li.is-active, .scenes-ready .plate-scene.is-pinned .steps li.is-active .step-num { color: var(--paper); }
.scenes-ready .plate-scene.is-pinned .steps li.is-active .step-num { color: var(--amber); }
.scenes-ready .plate-scene.is-pinned .steps li:not(.is-active) p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.scenes-ready .plate-scene.is-pinned .plate-scene-art { height: min(100%, 720px); width: auto; max-width: 100%; }
.scenes-ready .plate-scene.is-pinned .scene-status { display: block; }

@media (max-width: 860px) {
  .plate-stage { grid-template-columns: minmax(0, 1fr); }
  .scenes-ready .plate-scene.is-pinned .plate-stage { grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; gap: .75rem; padding-block: .75rem 1rem; }
  .scenes-ready .plate-scene.is-pinned .plate-scene-art { order: -1; height: 100%; min-height: 0; width: auto; aspect-ratio: 420 / 700; max-height: 100%; }
  .scenes-ready .plate-scene.is-pinned .plate-copy h2 { font-size: clamp(1.7rem, 7.5vw, 2.4rem); margin-bottom: .6rem; }
  .scenes-ready .plate-scene.is-pinned .plate-copy .eyebrow { margin-bottom: .4rem; }
  .scenes-ready .plate-scene.is-pinned .steps { border: 0; margin-bottom: .4rem; }
  .scenes-ready .plate-scene.is-pinned .steps li:not(.is-active) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .scenes-ready .plate-scene.is-pinned .steps li.is-active { border: 0; padding: 0; min-height: 8.2em; }
  .scenes-ready .plate-scene.is-pinned .smallprint { display: none; }
  .scenes-ready .plate-scene.is-pinned .scene-status { position: absolute; right: var(--gutter); top: 1rem; }
}

/* ---------- 03 Workshop / label ---------- */
.workshop { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(4rem, 9vw, 8rem) var(--gutter); background: var(--paper); overflow: clip; }
.label-window { --open: 1; display: grid; justify-items: center; gap: 1rem; min-width: 0; }
.label-aperture {
  width: 100%; overflow: clip; aspect-ratio: 4 / 5; border-radius: 24px; background: var(--night-2);
  display: grid; place-items: center; position: relative;
  clip-path: inset(0 calc((1 - var(--open)) * 44%) round calc(24px + (1 - var(--open)) * 200px));
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .55);
}
.maker-label {
  width: 78%; display: grid; justify-items: center; gap: .55rem; text-align: center; padding: 1.6rem 1rem;
  background: linear-gradient(170deg, #f3e3c4, #e2c99f); color: #2b1d15;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); font-family: var(--display);
  transform: rotate(calc(-3deg + var(--open) * 1.5deg)) scale(calc(1.25 - var(--open) * .25));
}
.label-big { font: 600 italic clamp(1.6rem, 4.6vw, 2.5rem)/1 var(--display); }
.label-small { font: 500 .95rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.label-rule { width: 60%; height: 1px; background: currentColor; opacity: .6; }
.fhole-edge { position: absolute; top: 8%; height: 84%; width: 16%; color: var(--amber); opacity: calc(1 - var(--open) * .55); pointer-events: none; }
.fhole-edge path { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; }
.fhole-edge circle { fill: currentColor; }
.fhole-edge.left { left: calc((1 - var(--open)) * 40%); }
.fhole-edge.right { right: calc((1 - var(--open)) * 40%); }
.label-stage { position: relative; width: min(100%, 420px); overflow: clip; border-radius: 24px; }
.label-note { font-size: .82rem; color: var(--ink-soft); text-align: center; max-width: 36ch; margin: 0; }
.workshop-copy > p:not(.eyebrow) { color: var(--ink-soft); max-width: 52ch; font-size: 1.08rem; }
.workshop-copy h2 { margin-bottom: 1.1rem; }
.timeline { list-style: none; margin: 1.75rem 0; padding: 0 0 0 1.5rem; position: relative; display: grid; gap: 1.1rem; }
.timeline::before { content: ""; position: absolute; left: 4px; top: .5rem; bottom: .5rem; width: 1.5px; background: var(--rust); transform-origin: top; }
.timeline li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(-1.5rem + 0px); top: .55rem; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--rust); }
.timeline strong { font: 600 1.45rem/1.1 var(--display); color: var(--rust); }
.sources { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.sources a { display: inline-flex; min-height: 32px; align-items: center; font-weight: 600; }
@media (max-width: 860px) {
  .workshop { grid-template-columns: minmax(0, 1fr); }
  .label-stage { width: min(100%, 320px); }
}
@media (max-width: 420px) { .timeline li { grid-template-columns: minmax(0, 1fr); gap: .1rem; } }

/* ---------- 04 Planner ---------- */
.plan { background: var(--paper-2); }
.plan-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.plan-controls { display: grid; gap: 1.6rem; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { font: 600 .82rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--rust); margin-bottom: .8rem; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; scroll-margin-top: calc(var(--header) + 24px); }
.chips span { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .55rem 1.05rem; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 600; transition: background-color .2s, color .2s; pointer-events: none; }
.chips input:checked + span { background: var(--ink); color: var(--paper); text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.chips input:checked + span::before { content: "✓" / ""; }
.chips input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.chips label:hover span { background: var(--paper-3); }
.chips label:hover input:checked + span { background: #3b2b22; }
.field label { display: block; font: 600 .82rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--rust); margin-bottom: .6rem; }
.optional { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-soft); }
.field input { width: 100%; min-height: 50px; padding: .7rem 1rem; font: 400 1rem/1.4 var(--sans); color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; scroll-margin-top: calc(var(--header) + 24px); }
.field input::placeholder { color: #75655a; }
.field-hint { font-size: .85rem; color: var(--ink-soft); margin: .5rem 0 0; }
.plan-result { display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.plan-art { aspect-ratio: 420 / 770; background: var(--night); border-radius: 22px; overflow: clip; }
.plan-art figcaption, .close-art figcaption { padding: .7rem 1rem .9rem; color: #e8dcc9; font-size: .85rem; line-height: 1.3; }
.note-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.25rem, 3vw, 2rem); }
.note-kicker { font: 600 .74rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rust); margin-bottom: .6rem; }
.note-text { font: 500 clamp(1.35rem, 1.1rem + .9vw, 1.75rem)/1.25 var(--display); margin-bottom: 1rem; overflow-wrap: anywhere; }
.note-context { font-size: .95rem; color: var(--ink-soft); border-left: 2px solid var(--amber); padding-left: .9rem; }
.ready { margin: 0 0 1.4rem; padding-left: 1.1rem; }
.ready li { margin-bottom: .25rem; }
.note-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.copy-hint { font-size: .85rem; color: var(--ink-soft); margin: .9rem 0 0; }
.copy-status { font-size: .85rem; color: var(--ink); font-weight: 600; margin: .3rem 0 0; min-height: 1.4em; }
.is-updating .note-text, .is-updating .note-context, .is-updating .ready { opacity: .25; transform: translateY(6px); }
.note-text, .note-context, .ready { transition: opacity .28s var(--ease), transform .28s var(--ease); }
@media (max-width: 1100px) { .plan-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) {
  .plan-result { grid-template-columns: minmax(0, 1fr); }
  .plan-art { width: min(64vw, 260px); justify-self: center; }
}

/* ---------- 05 Visit (the deliberate calm chapter) ---------- */
.visit { background: var(--paper); }
.visit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.visit-card { font-style: normal; border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.25rem, 3vw, 2.2rem); background: var(--paper); }
.card-kicker { font: 600 .74rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rust); margin-bottom: .5rem; }
.visit-address { font: 500 1.6rem/1.2 var(--display); margin-bottom: 1.25rem; }
.visit-card a:not(.btn) { display: inline-block; min-height: 28px; font-weight: 600; }
.hours table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.hours th, .hours td { text-align: left; padding: .5rem 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.hours th { font-weight: 600; width: 45%; }
.hours-note { font-size: .95rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .visit-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 06 Close ---------- */
.close { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(4rem, 9vw, 8rem) var(--gutter); background: var(--night); color: var(--paper); --focus: var(--amber); }
.close .eyebrow { color: #cdbca4; }
.close .num, .close h2 em { color: var(--amber); }
.close-art { width: min(100%, 380px); aspect-ratio: 420 / 770; justify-self: center; }
.close-copy h2 { font-size: clamp(2.6rem, 1.4rem + 5vw, 6.2rem); margin-bottom: 1.2rem; }
.close-copy h2 .line { display: block; overflow: clip; padding-bottom: .06em; }
.close-copy h2 .line > span { display: block; }
.close-summary { font-size: 1.15rem; max-width: 48ch; color: #e8dcc9; margin-bottom: 1.6rem; }
.close-summary strong { color: var(--amber-glow); font-weight: 600; }
.close .btn-primary { background: var(--amber); color: var(--night); }
.close .btn-primary:hover { background: var(--amber-glow); }
.close .btn-ghost { color: var(--paper); border-color: var(--paper); }
.close .btn-ghost:hover { background: var(--paper); color: var(--night); }
@media (max-width: 860px) {
  .close { grid-template-columns: minmax(0, 1fr); }
  .close-art { width: min(62vw, 280px); order: 2; }
}

/* ---------- Owner panel + footer ---------- */
.owner { background: var(--night-2); color: var(--paper); padding: clamp(3rem, 7vw, 5rem) var(--gutter); --focus: var(--amber); border-top: 1px solid var(--line-dark); }
.owner-inner { max-width: 860px; }
.owner .eyebrow { color: var(--amber); }
.owner h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); margin-bottom: 1rem; }
.owner p { color: #e8dcc9; }
.owner a:not(.btn) { color: var(--amber-glow); }
.selectable { user-select: all; overflow-wrap: anywhere; font-weight: 600; color: var(--paper); }
.owner-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.owner-hint { font-size: .9rem; }
.owner-status { font-size: .9rem; min-height: 1.4em; margin: 0; }
.site-footer { background: var(--paper-3); padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) calc(2rem + env(safe-area-inset-bottom)); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-name { font: 600 1.25rem/1.2 var(--display); margin-bottom: .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 28px; }
.footer-note { color: var(--ink-soft); font-size: .88rem; }
.back-top { font-weight: 600; min-height: 44px !important; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; } }

/* ---------- Motion states (only once the engine has set up; content is visible otherwise) ---------- */
.motion.scenes-ready .hero-title .line > span { animation: rise 1s var(--ease) both; }
.motion.scenes-ready .hero-title .line:nth-child(2) > span { animation-delay: .12s; }
.motion.scenes-ready .hero .concept-note, .motion.scenes-ready .hero .eyebrow, .motion.scenes-ready .hero .lede, .motion.scenes-ready .facts, .motion.scenes-ready .hero .actions { animation: fade-up .9s var(--ease) both; animation-delay: .3s; }
.motion.scenes-ready .facts { animation-delay: .42s; }
.motion.scenes-ready .hero .actions { animation-delay: .52s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.motion.scenes-ready [data-reveal].service { clip-path: inset(100% 0 0 0 round 20px); transform: translateY(40px); transition: clip-path 1s var(--ease), transform 1s var(--ease); }
.motion.scenes-ready [data-reveal].service .tool path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease) .35s; }
.motion.scenes-ready [data-reveal].service.is-in { clip-path: inset(0 0 0 0 round 20px); transform: none; }
.motion.scenes-ready [data-reveal].service.is-in .tool path { stroke-dashoffset: 0; }
.motion.scenes-ready .service:nth-child(2) { transition-delay: .1s; }
.motion.scenes-ready .service:nth-child(3) { transition-delay: .2s; }
.motion.scenes-ready .service:nth-child(4) { transition-delay: .3s; }

.motion.scenes-ready .timeline[data-reveal]::before { transform: scaleY(0); transition: transform 1.4s var(--ease); }
.motion.scenes-ready .timeline[data-reveal] li { opacity: 0; transform: translateX(-28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.motion.scenes-ready .timeline[data-reveal].is-in::before { transform: none; }
.motion.scenes-ready .timeline[data-reveal].is-in li { opacity: 1; transform: none; }
.motion.scenes-ready .timeline li:nth-child(2) { transition-delay: .25s; }
.motion.scenes-ready .timeline li:nth-child(3) { transition-delay: .5s; }
.motion.scenes-ready .timeline li:nth-child(4) { transition-delay: .75s; }

.motion.scenes-ready .close-copy h2 .line > span { transform: translateY(105%); transition: transform 1.1s var(--ease); }
.motion.scenes-ready .close-copy h2 .line:nth-child(2) > span { transition-delay: .14s; }
.motion.scenes-ready .close.is-in .close-copy h2 .line > span { transform: none; }
.motion.scenes-ready .close .close-summary, .motion.scenes-ready .close .actions { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease) .35s, transform .8s var(--ease) .35s; }
.motion.scenes-ready .close.is-in .close-summary, .motion.scenes-ready .close.is-in .actions { opacity: 1; transform: none; }

@media (max-height: 800px) and (min-width: 861px) {
  .scenes-ready .plate-scene.is-pinned .plate-copy h2 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); margin-bottom: 1rem; }
  .scenes-ready .plate-scene.is-pinned .steps li { padding: .6rem 0; }
  .scenes-ready .plate-scene.is-pinned .smallprint { display: none; }
}

/* Short or landscape screens: the plate scene is never pinned (JS also checks), all steps read as a list. */
@media (max-height: 560px) {
  .scenes-ready .plate-scene.is-pinned { height: auto; }
  .scenes-ready .plate-scene.is-pinned .plate-stage { position: static; height: auto; }
}

/* ---------- Forced colours ---------- */
@media (forced-colors: active) {
  .btn, .chips span, .menu-toggle, .plate-tap { border: 2px solid ButtonText; }
  .chips input:checked + span { border-width: 3px; text-decoration: underline; forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .chips input:focus-visible + span, :focus-visible { outline: 3px solid Highlight; }
  .plate-frame canvas { forced-color-adjust: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header { position: static; }
  .skip, .menu-toggle, .plate-frame canvas, .js-only, .enhanced .js-only, .enhanced .btn.js-only, .plate-tap, .owner-actions, .note-actions { display: none !important; }
  .plate-frame .plate-fallback { visibility: visible !important; }
  .plate-scene, .close, .owner { background: #fff !important; color: #000 !important; }
  .plate-scene .plate-stage { position: static !important; height: auto !important; }
  .plate-scene { height: auto !important; }
  .steps li, .steps li p { opacity: 1 !important; position: static !important; width: auto !important; height: auto !important; clip: auto !important; white-space: normal !important; }
  [data-reveal], [data-reveal] li, .close-copy * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .label-aperture { clip-path: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; overflow-wrap: anywhere; }
}
