/* Stillroom Studio — fictional showcase site
   Fonts: Instrument Serif & Instrument Sans, SIL Open Font License 1.1 (see assets/fonts) */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-Variable.ttf") format("truetype");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #f6f1e8;
  --paper: #fbf8f2;
  --linen: #ede5d8;
  --stone: #d9d0c3;
  --charcoal: #2a2826;
  --charcoal-soft: #4a4642;
  --muted: #5e5850;
  --oak: #b08a5e;
  --bronze: #8a6841;
  --bronze-text: #7a5a34;
  --bronze-light: #d8bf97;
  --error: #9b2c1f;

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --header-h: 68px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

/* The hidden attribute must always win over component display rules. */
[hidden] { display: none !important; }

html {
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}
/* No CSS smooth scrolling: it races focus scrolling and can leave focused elements under the sticky header. */

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.6rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, [id] { scroll-margin-top: calc(var(--header-h) + 24px); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--charcoal); color: var(--ivory); padding: .75rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding-inline: var(--gutter); }

.eyebrow {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
  color: var(--bronze-text); margin: 0 0 1.25rem;
}
.section-no {
  display: flex; align-items: center; gap: .9rem;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
  color: var(--bronze-text); margin: 0 0 1.5rem;
}
.section-no::before { content: ""; width: 40px; height: 1px; background: var(--bronze); }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.25rem); color: var(--charcoal-soft); max-width: 36rem; }
.muted { color: var(--muted); }

/* Buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.5rem;
  background: var(--charcoal); color: var(--ivory);
  border: 1px solid var(--charcoal); border-radius: 0;
  font-weight: 600; font-size: .98rem; letter-spacing: .01em; text-decoration: none;
  cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: #151412; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--charcoal); }
.btn--ghost:hover { background: var(--linen); }
.btn--light { background: var(--ivory); color: var(--charcoal); border-color: var(--ivory); }
.btn--light:hover { background: #fff; }
.btn--small { min-height: 44px; padding: .55rem 1rem; font-size: .92rem; }

.text-link {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px;
  font-weight: 600; text-decoration: underline; text-decoration-color: var(--bronze);
}
.text-link:hover { text-decoration-thickness: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 232, .94);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { backdrop-filter: blur(8px); background: rgba(246, 241, 232, .86); }
}
.site-header.is-scrolled { border-bottom-color: var(--stone); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }
.wordmark {
  font-family: var(--serif); font-size: 1.6rem; line-height: 1; text-decoration: none; letter-spacing: -.01em;
  display: inline-flex; align-items: baseline; gap: .35rem; white-space: nowrap;
}
.wordmark span { font-family: var(--sans); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--bronze-text); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2rem; }
.site-nav a:not(.btn) {
  text-decoration: none; font-weight: 500; font-size: .98rem; padding: .6rem 0; display: inline-block;
  border-bottom: 1px solid transparent;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--bronze); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--charcoal); }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  :root { --header-h: 60px; }
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .9rem;
    background: transparent; border: 1px solid var(--charcoal); cursor: pointer; font-weight: 600; font-size: .92rem;
  }
  .site-nav ul { gap: 1.25rem; flex-wrap: wrap; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ivory); border-bottom: 1px solid var(--stone);
    padding: 1rem var(--gutter) 1.5rem;
  }
  .js .site-nav[hidden] { display: none; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .js .site-nav a:not(.btn) { display: block; padding: .8rem 0; border-bottom: 1px solid var(--stone); }
  .js .site-nav .btn { width: 100%; margin-top: 1rem; }
  /* Without JS the nav simply wraps under the wordmark */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: .6rem; }
  html:not(.js) .site-header { position: static; }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: stretch;
  min-height: min(calc(100vh - var(--header-h)), 860px);
  padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2));
}
.hero-copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 4rem) clamp(3rem, 6vw, 5rem) 0;
  position: relative;
}
.hero-copy h1 { margin-bottom: 1.5rem; max-width: 9.5em; }
.hero-copy .lede { margin-bottom: 2.25rem; max-width: 30rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.fiction-note {
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--stone);
  font-size: .88rem; color: var(--muted); max-width: 28rem;
}
.hero-media { position: relative; margin: 0; border-left: 1px solid var(--bronze); }
.hero-media picture, .hero-media img { width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: 62% 50%; min-height: 520px; }
.hero-media figcaption {
  position: absolute; left: 0; bottom: 0;
  background: var(--ivory); padding: .7rem 1rem .6rem 1.1rem; font-size: .82rem; color: var(--charcoal-soft);
}
.hero-media figcaption strong { font-weight: 600; color: var(--charcoal); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-left: 0; min-height: 0; }
  .hero-copy { padding: 2rem var(--gutter) 2.25rem; }
  .hero-copy h1 { font-size: clamp(2.5rem, 11vw, 3.4rem); margin-bottom: 1rem; }
  .hero-copy .lede { font-size: 1.05rem; margin-bottom: 1.5rem; }
  .hero-actions .btn { width: 100%; }
  .fiction-note { margin-top: 1.5rem; }
  .hero-media { border-left: 0; border-top: 1px solid var(--bronze); }
  .hero-media img { min-height: 0; aspect-ratio: 4 / 5; }
  .hero-media figcaption { position: static; padding: .7rem var(--gutter); }
}

/* Generic section spacing */
.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.section--tight { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--paper { background: var(--paper); }
.section--dark { background: var(--charcoal); color: var(--ivory); }
.section--dark .section-no, .section--dark .eyebrow { color: var(--bronze-light); }
.section--dark .section-no::before { background: var(--bronze-light); }
.section--dark .lede { color: #d9d2c6; }

.caption { font-size: .84rem; color: var(--muted); margin-top: .75rem; line-height: 1.45; }
.caption strong { color: var(--charcoal); font-weight: 600; }
.ai-label { display: inline-block; }

/* Comparison */
.compare-layout {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(2rem, 4vw, 4rem);
  align-items: start; margin-top: clamp(2rem, 4vw, 3.5rem);
}
.compare-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 4rem; align-items: end; }
.compare-intro h2 { max-width: 12em; }

.compare { margin: 0; }
.compare-stage { position: relative; }
/* Fallback (no JS): side-by-side */
.compare-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare-pane { position: relative; margin: 0; }
.compare-pane img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.compare-tag {
  position: absolute; top: 12px; background: var(--ivory); color: var(--charcoal);
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; padding: .35rem .7rem; pointer-events: none;
}
.compare-pane .compare-tag { left: 12px; }
.compare-range, .compare-handle, .compare-controls { display: none; }

/* Enhanced slider */
.compare.is-slider .compare-pair { display: block; position: relative; overflow: hidden; }
.compare.is-slider .compare-pane--b {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 var(--pos, 50%));
}
.compare.is-slider .compare-pane--b .compare-tag { left: auto; right: 12px; }
.compare.is-slider .compare-range {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; touch-action: pan-y; z-index: 3;
  -webkit-appearance: none; appearance: none;
}
.compare.is-slider .compare-handle {
  display: block; position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 0; z-index: 2; pointer-events: none;
}
.compare-handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--ivory);
  box-shadow: 0 0 0 1px rgba(42, 40, 38, .25);
}
.compare-grip {
  position: absolute; top: 50%; left: 0; width: 48px; height: 48px; transform: translate(-50%, -50%);
  background: var(--ivory); border: 1px solid var(--charcoal); border-radius: 50%;
  display: grid; place-items: center;
}
.compare-grip svg { width: 22px; height: 22px; }
.compare.is-slider:has(.compare-range:focus-visible) .compare-grip { outline: 3px solid var(--bronze); outline-offset: 3px; }
.compare.is-slider.has-focus .compare-grip { outline: 3px solid var(--bronze); outline-offset: 3px; }

.compare.is-slider .compare-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip {
  min-height: 44px; padding: .5rem 1rem; background: transparent; border: 1px solid var(--stone);
  font-size: .9rem; font-weight: 600; cursor: pointer; transition: border-color .2s, background-color .2s;
}
.chip:hover { border-color: var(--charcoal); }
.chip[aria-pressed="true"] { background: var(--charcoal); color: var(--ivory); border-color: var(--charcoal); }
.compare-help { font-size: .84rem; color: var(--muted); margin: .75rem 0 0; display: none; }
.compare.is-slider .compare-help { display: block; }

.differences { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--stone); }
.differences li { padding: 1.1rem 0; border-bottom: 1px solid var(--stone); }
.differences h3 { font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--bronze-text); margin-bottom: .45rem; }
.differences p { font-size: .96rem; margin: 0; }
.differences b { font-weight: 600; }
.concept-note {
  margin-top: 1.5rem; padding: 1rem 1.1rem; background: var(--linen); border-left: 2px solid var(--bronze);
  font-size: .9rem; color: var(--charcoal-soft);
}

@media (max-width: 960px) {
  .compare-intro, .compare-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .compare-pair { grid-template-columns: 1fr; }
  .compare-tag { font-size: .74rem; top: 8px; }
  .compare-pane .compare-tag { left: 8px; }
  .compare.is-slider .compare-pane--b .compare-tag { right: 8px; }
  .compare-grip { width: 44px; height: 44px; }
  .compare.is-slider .compare-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compare-controls .chip { padding: .5rem .35rem; font-size: .82rem; line-height: 1.2; }
}

/* Everyday choices */
.choices { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 1fr) minmax(0, 6fr); align-items: start; margin-top: clamp(2.5rem, 5vw, 4rem); }
.choices figure { margin: 0; grid-column: 1; }
.choices figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.choice-list { grid-column: 3; list-style: none; margin: 0; padding: 0; counter-reset: choice; }
.choice-list li { display: grid; grid-template-columns: 3.5rem 1fr; gap: 0 1rem; padding: 1.75rem 0; border-top: 1px solid var(--stone); }
.choice-list li:last-child { border-bottom: 1px solid var(--stone); }
.choice-list li::before {
  counter-increment: choice; content: "0" counter(choice);
  font-family: var(--serif); font-size: 2.2rem; line-height: 1; color: var(--bronze-text);
}
.choice-list .kicker { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: .35rem; }
.choice-list h3 { margin-bottom: .6rem; }
.choice-list p { margin: 0; color: var(--charcoal-soft); }
@media (max-width: 860px) {
  .choices { grid-template-columns: 1fr; gap: 2rem; }
  .choices figure, .choice-list { grid-column: 1; }
  .choices figure img { aspect-ratio: 4 / 3; object-position: 50% 70%; }
}

/* Statement band */
.statement { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 5rem; align-items: end; }
.statement p.big { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.1; margin: 0; }
.statement .links { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.section--dark .text-link { text-decoration-color: var(--bronze-light); }
@media (max-width: 860px) { .statement { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: end; border-top: 1px solid var(--charcoal); padding-top: 2.5rem; }
.cta-band h2 { max-width: 14em; }
.cta-band p { margin-top: 1rem; color: var(--charcoal-soft); max-width: 34rem; }
@media (max-width: 700px) { .cta-band { grid-template-columns: 1fr; } .cta-band .btn { width: 100%; } }

/* Footer */
.site-footer { background: var(--linen); padding-block: 3rem 2.5rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); gap: 2rem 3rem; align-items: start; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.footer-grid a { display: inline-block; padding: .35rem 0; }
.footer-fiction { color: var(--charcoal-soft); max-width: 34rem; }
.footer-small { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--stone); font-size: .82rem; color: var(--muted); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* Page intro */
.page-intro { padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem); }
.page-intro-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 4rem; align-items: end; }
.page-intro h1 { max-width: 11em; }
.page-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--stone); }
.page-index li { border-bottom: 1px solid var(--stone); }
.page-index a { display: grid; grid-template-columns: 2.5rem 1fr; padding: .9rem 0; text-decoration: none; font-weight: 500; }
.page-index a span { color: var(--bronze-text); font-family: var(--serif); font-size: 1.2rem; line-height: 1.2; }
.page-index a:hover { text-decoration: underline; text-decoration-color: var(--bronze); }
@media (max-width: 860px) { .page-intro-grid { grid-template-columns: 1fr; } }

/* Hotspots */
.hotspot-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(1.5rem, 3.5vw, 3.5rem); align-items: start; margin-top: clamp(2rem, 4vw, 3rem); }
.hotspot-figure { margin: 0; }
.hotspot-stage { position: relative; }
.hotspot-stage img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hotspot {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  text-decoration: none; z-index: 2;
}
.hotspot span {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ivory); color: var(--charcoal); border: 1px solid var(--charcoal);
  font-weight: 700; font-size: .95rem; box-shadow: 0 2px 10px rgba(42, 40, 38, .25);
  transition: background-color .2s, color .2s, transform .25s var(--ease);
}
.hotspot::before {
  content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid var(--ivory);
  opacity: .8;
}
/* Marker positions measured on the kitchen-dining image (percent of width / height) */
.hs-1 { --x: 13.5%; --y: 38%; }
.hs-2 { --x: 42%; --y: 33%; }
.hs-3 { --x: 89%; --y: 74%; }
.intro-lede { margin-top: 1.5rem; }
.hotspot:hover span { transform: scale(1.08); }
.hotspot[aria-current="true"] span { background: var(--bronze-text); color: #fff; border-color: var(--bronze-text); transform: scale(1.12); }
.hotspot:focus-visible { outline: 3px solid var(--ivory); outline-offset: 1px; box-shadow: 0 0 0 6px var(--bronze); }

.detail-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--stone); }
.detail {
  border-bottom: 1px solid var(--stone); padding: 1.25rem 1rem 1.35rem 1.25rem; position: relative;
  transition: background-color .25s var(--ease);
}
.detail::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; transition: background-color .25s var(--ease); }
.detail.is-active { background: var(--paper); }
.detail.is-active::before { background: var(--bronze); }
.detail-head { display: flex; gap: .85rem; align-items: baseline; }
.detail-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--charcoal);
  display: inline-grid; place-items: center; font-weight: 700; font-size: .82rem; transform: translateY(-2px);
}
.detail.is-active .detail-num { background: var(--bronze-text); border-color: var(--bronze-text); color: #fff; }
.detail h3 { font-size: 1.45rem; margin-bottom: .45rem; }
.detail-show {
  background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit;
}
.detail-show:hover h3 { text-decoration: underline; text-decoration-color: var(--bronze); text-decoration-thickness: 1px; }
.detail p { margin: 0 0 0 calc(28px + .85rem); color: var(--charcoal-soft); font-size: .98rem; }
.detail .tag { display: block; margin: 0 0 .5rem calc(28px + .85rem); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--bronze-text); }
.hotspot-help { font-size: .86rem; color: var(--muted); margin: 0 0 1rem; }
@media (max-width: 960px) { .hotspot-layout { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .hotspot { width: 44px; height: 44px; }
  .hotspot span { width: 32px; height: 32px; font-size: .88rem; }
  .hotspot-figure { margin-inline: calc(var(--gutter) * -1); }
  .hotspot-figure .caption { padding-inline: var(--gutter); }
}

/* Bedroom feature */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 1fr) minmax(0, 6fr); align-items: start; }
.feature-copy { grid-column: 1; padding-top: clamp(0rem, 4vw, 4rem); }
.feature-media { grid-column: 3; margin: 0; }
.feature-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.notes { margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--stone); }
.notes div { padding: 1.1rem 0; border-bottom: 1px solid var(--stone); }
.notes dt { font-weight: 600; margin-bottom: .25rem; }
.notes dd { margin: 0; color: var(--charcoal-soft); font-size: .98rem; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 2rem; }
  .feature-copy, .feature-media { grid-column: 1; }
  .feature-media { order: -1; }
  .feature-copy { padding-top: 0; }
}

/* Materials diptych */
.diptych { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 1fr) minmax(0, 6fr); align-items: start; margin-top: clamp(2rem, 4vw, 3.5rem); }
.diptych figure { margin: 0; }
.diptych figure:first-child { grid-column: 1; margin-top: clamp(0rem, 8vw, 7rem); }
.diptych figure:last-child { grid-column: 3; }
.diptych figure:first-child img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.diptych figure:last-child img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
@media (max-width: 860px) {
  .diptych { grid-template-columns: 1fr; gap: 2rem; }
  .diptych figure:first-child, .diptych figure:last-child { grid-column: 1; margin-top: 0; }
}

/* Process story */
.story { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 1fr) minmax(0, 5fr); margin-top: clamp(2rem, 4vw, 3.5rem); }
.story-visual { display: none; }
.story-steps { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.story-step { padding: 2rem 0; border-top: 1px solid var(--stone); }
.story-step:last-child { border-bottom: 1px solid var(--stone); }
.story-step .step-label { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--bronze-text); margin-bottom: .75rem; display: block; }
.story-step h3 { margin-bottom: .75rem; }
.story-step p { color: var(--charcoal-soft); max-width: 32rem; }
.story-step-media { margin: 1.25rem 0 0; }
.story-step-media img, .story-step-media .brief-card { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Desktop + JS: sticky visual with active step */
@media (min-width: 900px) {
  .js .story-visual { display: block; grid-column: 1; position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
  .js .story-steps { grid-column: 3; }
  .js .story-step-media { display: none; }
  .js .story-step {
    min-height: 62vh; display: flex; flex-direction: column; justify-content: center;
    padding: 2.5rem 1.5rem 2.5rem 2rem; position: relative; border-top: 1px solid var(--stone);
    transition: background-color .35s var(--ease);
  }
  .js .story-step::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent;
    transition: background-color .35s var(--ease);
  }
}
.story-stage { position: relative; aspect-ratio: 4 / 5; max-height: calc(100vh - var(--header-h) - 9rem); width: 100%; overflow: hidden; background: var(--linen); }
.story-frame {
  position: absolute; inset: 0; margin: 0; opacity: 0; transform: scale(1.03);
  transition: opacity .55s var(--ease), transform .8s var(--ease);
}
.story-frame img, .story-frame .brief-card, .story-frame svg { width: 100%; height: 100%; object-fit: cover; }
.story-frame.is-active { opacity: 1; transform: none; }
.story-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.story-count { font-weight: 600; font-size: .95rem; }
.story-count span { color: var(--bronze-text); }
.story-progress { display: flex; gap: 6px; }
.story-progress button {
  width: 44px; height: 44px; padding: 0; background: none; border: 0; cursor: pointer; position: relative;
}
.story-progress button::before {
  content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 4px; transform: translateY(-50%);
  background: var(--stone); transition: background-color .3s var(--ease);
}
.story-progress button[aria-current="step"]::before { background: var(--bronze); }
.story-progress button.is-done::before { background: var(--oak); }
.story-caption { font-size: .84rem; color: var(--muted); margin-top: .35rem; }

/* Active step (all sizes when JS runs) */
.js .story-step.is-active { background: var(--paper); }
.js .story-step.is-active::before { background: var(--bronze); }
.js .story-step .step-num-badge {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--stone); font-weight: 700; font-size: .9rem; margin-bottom: .9rem;
  transition: background-color .3s var(--ease), color .3s, border-color .3s;
}
.js .story-step.is-active .step-num-badge { background: var(--bronze-text); border-color: var(--bronze-text); color: #fff; }
.step-num-badge { display: none; }
.js .step-num-badge { display: inline-grid; }
.step-active-flag {
  display: none; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  color: var(--bronze-text); margin-left: .6rem; vertical-align: middle;
}
.js .story-step.is-active .step-active-flag { display: inline; }

@media (max-width: 899px) {
  .js .story-step { position: relative; padding-left: 1.25rem; padding-right: .75rem; transition: background-color .35s var(--ease); }
  .js .story-step::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; transition: background-color .35s var(--ease); }
  .story-step-media img { transition: filter .45s var(--ease); }
  .js .story-step:not(.is-active) .story-step-media img,
  .js .story-step:not(.is-active) .story-step-media .brief-card { filter: saturate(.55) brightness(1.04); }
}

/* Brief card visual (process step 4) */
.brief-card {
  background: var(--paper); border: 1px solid var(--stone); padding: clamp(1.25rem, 3vw, 2.25rem);
  display: flex; flex-direction: column; justify-content: center; gap: .9rem;
  background-image: linear-gradient(var(--linen) 1px, transparent 1px);
  background-size: 100% 2.2rem; background-position: 0 1.1rem;
}
.brief-card .bc-title { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.1; }
.brief-card dl { margin: 0; display: grid; gap: .55rem; }
.brief-card dt { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--bronze-text); }
.brief-card dd { margin: 0 0 .3rem; font-size: .98rem; }
.brief-card .bc-foot { font-size: .78rem; color: var(--muted); border-top: 1px solid var(--stone); padding-top: .6rem; }

/* Space brief demo */
.brief-shell { background: var(--paper); border: 1px solid var(--stone); max-width: 920px; margin: clamp(2rem, 4vw, 3rem) auto 0; }
.brief-top { padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem); border-bottom: 1px solid var(--stone); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.brief-progress { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem 1.5rem; flex-wrap: wrap; counter-reset: bp; }
.brief-progress li { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); font-weight: 500; }
.brief-progress li::before {
  counter-increment: bp; content: counter(bp);
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--stone); display: inline-grid; place-items: center;
  font-size: .78rem; font-weight: 700;
}
.brief-progress li[aria-current="step"] { color: var(--charcoal); font-weight: 700; }
.brief-progress li[aria-current="step"]::before { background: var(--charcoal); color: var(--ivory); border-color: var(--charcoal); }
.brief-progress li.is-done::before { background: var(--linen); border-color: var(--bronze); color: var(--bronze-text); }
.brief-status { font-size: .9rem; font-weight: 600; margin: 0; }
.brief-body { padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.5rem); }
.brief-step h3 { margin-bottom: .5rem; }
.brief-step > p.muted { margin-bottom: 1.75rem; }
.js .brief-step[hidden] { display: none; }
html:not(.js) .brief-step + .brief-step { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--stone); }

fieldset { border: 0; margin: 0 0 2rem; padding: 0; min-width: 0; }
legend { font-weight: 700; font-size: 1.05rem; margin-bottom: .35rem; padding: 0; }
.hint { font-size: .9rem; color: var(--muted); margin: 0 0 1rem; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.options--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.option { position: relative; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option label {
  display: flex; align-items: center; gap: .75rem; min-height: 52px; padding: .7rem 1rem;
  background: var(--ivory); border: 1px solid var(--stone); cursor: pointer; font-weight: 500; line-height: 1.3;
  transition: border-color .2s, background-color .2s;
}
.option label::before {
  content: ""; flex: none; width: 20px; height: 20px; border: 1.5px solid var(--charcoal-soft); background: var(--paper);
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.option input[type="radio"] + label::before { border-radius: 50%; }
.option label:hover { border-color: var(--charcoal-soft); }
.option input:checked + label { border-color: var(--charcoal); background: #fff; box-shadow: inset 0 0 0 1px var(--charcoal); }
.option input[type="checkbox"]:checked + label::before {
  background: var(--charcoal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%23fbf8f2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  border-color: var(--charcoal);
}
.option input[type="radio"]:checked + label::before { background: var(--charcoal); box-shadow: inset 0 0 0 4px var(--paper); border-color: var(--charcoal); }
.option input:focus-visible + label { outline: 2px solid var(--bronze); outline-offset: 2px; }
.option input:disabled + label { opacity: .5; cursor: not-allowed; }
.options-divider { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; font-size: .82rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin: .4rem 0; }
.options-divider::before, .options-divider::after { content: ""; flex: 1; height: 1px; background: var(--stone); }
.live-note { font-size: .9rem; color: var(--bronze-text); font-weight: 600; min-height: 1.5em; margin: .6rem 0 0; }

/* Atmosphere image options */
.atmos-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.atmos-grid .option { height: 100%; }
.atmos-grid .option label { height: 100%; flex-direction: column; align-items: stretch; padding: 0; gap: 0; min-height: 0; }
.atmos-grid .option label::before { position: absolute; top: 10px; left: 10px; z-index: 1; box-shadow: 0 0 0 3px rgba(251, 248, 242, .8); }
.atmos-grid .option input[type="radio"]:checked + label::before { box-shadow: inset 0 0 0 4px var(--paper), 0 0 0 3px rgba(251, 248, 242, .8); }
.atmos-grid .option img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.atmos-grid .option .atmos-name { flex: 1; padding: .7rem .85rem .8rem; font-weight: 600; }
.atmos-grid .option input:checked + label .atmos-name { background: var(--charcoal); color: var(--ivory); }
.atmos-unsure { margin-top: .75rem; }
.atmos-unsure label { justify-content: flex-start; }
.atmos-unsure .sub { font-weight: 400; color: var(--muted); margin-left: .25rem; }
@media (max-width: 760px) { .atmos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .options--3 { grid-template-columns: 1fr; } }

textarea {
  width: 100%; min-height: 120px; padding: .85rem 1rem; background: var(--ivory); border: 1px solid var(--charcoal-soft);
  resize: vertical; line-height: 1.5;
}
.char-count { font-size: .85rem; color: var(--muted); text-align: right; margin-top: .35rem; }
.privacy-reminder {
  display: flex; gap: .75rem; padding: .9rem 1rem; background: var(--linen); border-left: 2px solid var(--bronze);
  font-size: .92rem; margin-bottom: .9rem;
}

.error-box {
  border: 1px solid var(--error); border-left-width: 4px; background: #fbefec; padding: 1rem 1.1rem; margin-bottom: 1.75rem;
}
.error-box h4 { margin: 0 0 .4rem; font-size: 1rem; color: var(--error); }
.error-box ul { margin: 0; padding-left: 1.1rem; }
.error-box a { color: var(--error); font-weight: 600; }
.field-error { color: var(--error); font-weight: 600; font-size: .92rem; margin: 0 0 .75rem; }
fieldset.has-error .option label { border-color: #c9a39c; }

.review { margin: 2rem 0 0; border-top: 1px solid var(--stone); }
.review h4 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 1.5rem 0 .75rem; }
.review dl { margin: 0; }
.review-row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto; gap: .5rem 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--stone); align-items: baseline; }
.review-row dt { font-weight: 600; font-size: .92rem; }
.review-row dd { margin: 0; }
.review-row .edit { background: none; border: 0; padding: .5rem 0; min-height: 44px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--bronze); cursor: pointer; }
@media (max-width: 600px) { .review-row { grid-template-columns: 1fr auto; } .review-row dd { grid-column: 1 / -1; grid-row: 2; } }

.brief-nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem); border-top: 1px solid var(--stone); background: var(--ivory);
}
.brief-nav .group { display: flex; gap: .75rem; flex-wrap: wrap; }
.reset-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: 1rem clamp(1.25rem, 4vw, 2.5rem); background: #f3ebe0; border-top: 1px solid var(--stone); }
.reset-confirm p { margin: 0; font-weight: 600; }
.reset-confirm[hidden] { display: none; }
@media (max-width: 600px) {
  .brief-nav { flex-direction: column-reverse; align-items: stretch; }
  .brief-nav .group { flex-direction: column-reverse; }
  .brief-nav .btn { width: 100%; }
}

.brief-result { padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.5rem); }
.brief-result[hidden] { display: none; }
.done-message {
  display: flex; gap: .9rem; align-items: flex-start; padding: 1.1rem 1.25rem; background: var(--charcoal); color: var(--ivory);
  font-weight: 600; margin: 1.25rem 0 2rem;
}
.done-message svg { flex: none; width: 22px; height: 22px; margin-top: .1rem; }
.result-prose { font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.35; max-width: 40rem; }
.result-prose p { margin-bottom: .8em; }
.result-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.noscript-note { padding: 1rem 1.25rem; background: var(--linen); border-left: 2px solid var(--bronze); margin-bottom: 2rem; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .story-frame { transform: none; }
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.nowrap { white-space: nowrap; }
