/* stamp: custom direction (walnut + limewash + lantern light), shape: photographic narrative, genre: atmospheric-editorial. Signature: "a space" becomes "aplace". Interaction layer: the visitor holds the light (stir the dust, drag the rooms, lamp over the sketch, the message writes itself). Self-critique: the risk is a generic dark luxury template; the real renders, plan drawing and material callouts are what keep it Aplace's own. */

:root {
  /* Colour: walnut at night, limewash by day, one lantern accent */
  --walnut-950: #1A130F;
  --walnut-900: #221913;
  --walnut-800: #2E231B;
  --bone: #EEE7DB;
  --bone-2: #CBBFAE;
  --line: rgba(238, 231, 219, 0.16);
  --lime: #E8E1D5;
  --lime-2: #DCD3C4;
  --ink: #2A1F18;
  --ink-2: #574A3E;
  --ink-line: rgba(42, 31, 24, 0.16);
  --lamp: #D9A66C;
  --lamp-deep: #8E5F2E;
  --sage: #8E957F;

  /* Type */
  --serif: "Gambetta", "Iowan Old Style", Georgia, serif;
  --sans: "Switzer", "Segoe UI", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
  --step-3: clamp(2.1rem, 1.3rem + 3vw, 4.25rem);
  --step-4: clamp(3rem, 1.2rem + 7.2vw, 8.75rem);

  /* Space (4px grid) */
  --gutter: clamp(1.25rem, 3vw, 3rem);
  --section: clamp(6rem, 14vh, 11rem);
  --max: 90rem;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --press: 150ms;

  --radius-s: 4px;
  --radius-m: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--walnut-950);
  color: var(--bone);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a, button, label, input, textarea { touch-action: manipulation; -webkit-tap-highlight-color: rgba(217, 166, 108, 0.18); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
::selection { background: var(--lamp); color: var(--walnut-950); }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 200; padding: 0.75rem 1rem; background: var(--bone); color: var(--walnut-950); }
.skip:focus { top: 1rem; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
h2 { font-family: var(--serif); font-weight: 300; font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.015em; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }

/* Buttons and links */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.5rem;
  border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap;
  transition: transform var(--press) var(--ease-out), background-color 200ms var(--ease-out), color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn--solid { background: var(--bone); color: var(--walnut-950); box-shadow: 0 0 0 0 rgba(217, 166, 108, 0); }
.btn--ghost { border: 1px solid var(--line); color: var(--bone); }
.btn--wide { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn--solid:hover { background: var(--lamp); box-shadow: 0 0 40px -6px rgba(217, 166, 108, 0.55); }
  .btn--ghost:hover { background: var(--bone); color: var(--walnut-950); }
}
.link { font-size: 0.9375rem; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); padding: 0.75rem 0.25rem; transition: text-decoration-color 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: var(--lamp); } }

/* ---------- Loader ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  pointer-events: none;
}
.loader__door { position: absolute; top: 0; bottom: 0; width: 50.5%; background: var(--walnut-900); }
.loader__door--l { left: 0; }
.loader__door--r { right: 0; background: #20170F; }
.loader__stage { position: relative; display: grid; place-items: center; }
.loader__stage > * { grid-area: 1 / 1; }
.loader__plan { width: min(64vw, 25rem); height: auto; opacity: 0.9; }
.plan-line { stroke: var(--bone-2); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.plan-line--thin { stroke-width: 1; stroke: rgba(188, 175, 158, 0.6); }
.loader__word {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(3.25rem, 11vw, 7.5rem); line-height: 1; letter-spacing: -0.02em;
  display: flex; white-space: pre;
  position: relative;
  opacity: 0;
}
.loader__word .ch { display: inline-block; }
.loader__count { position: fixed; bottom: 2rem; left: 50%; translate: -50% 0; font-size: var(--step--1); color: var(--bone-2); font-variant-numeric: tabular-nums; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: max(1.25rem, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 1.25rem max(var(--gutter), env(safe-area-inset-left));
  transition: transform 450ms var(--ease-out), color 300ms var(--ease-out);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__mark { text-decoration: none; padding: 0.25rem 0; }
.wordmark { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; line-height: 1; letter-spacing: -0.02em; display: inline-block; }
.nav__links { display: flex; gap: 1.75rem; margin-left: auto; font-size: 0.9375rem; }
.nav__links a { text-decoration: none; padding: 0.75rem 0; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.45rem; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover::after { transform: scaleX(1); transform-origin: left; } }
.nav__cta { min-height: 2.75rem; }
.nav__menu { display: none; margin-left: auto; min-height: 2.75rem; padding: 0 1.125rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9375rem; font-weight: 500; }
.nav.is-light { color: var(--ink); }
.nav.is-light .btn--ghost, .nav.is-light .nav__menu { border-color: var(--ink-line); color: var(--ink); }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(26, 19, 15, 0.94); border-bottom: 1px solid var(--line); opacity: 0; transition: opacity 300ms var(--ease-out); pointer-events: none; }
.nav.is-solid::before { opacity: 1; }
.nav.is-light::before { background: rgba(232, 225, 213, 0.95); border-bottom-color: var(--ink-line); }

.mobile-menu { position: fixed; inset: 0; z-index: 45; background: var(--walnut-900); padding: 7rem var(--gutter) 2rem; display: flex; flex-direction: column; justify-content: space-between; }
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: grid; gap: 0.5rem; }
.mobile-menu nav a { font-family: var(--serif); font-weight: 300; font-size: 2.75rem; line-height: 1.15; text-decoration: none; }
.mobile-menu__meta { color: var(--bone-2); font-size: var(--step--1); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 36rem; overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -1; background: var(--walnut-900) url("hero-poster.webp") center / cover no-repeat; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 0% 100%, rgba(20, 14, 10, 0.72) 0%, rgba(20, 14, 10, 0) 60%),
    linear-gradient(to top, rgba(20, 14, 10, 0.82) 0%, rgba(20, 14, 10, 0.25) 38%, rgba(20, 14, 10, 0) 60%),
    linear-gradient(to bottom, rgba(20, 14, 10, 0.55) 0%, rgba(20, 14, 10, 0) 22%),
    linear-gradient(to right, rgba(20, 14, 10, 0.35), rgba(20, 14, 10, 0) 20%, rgba(20, 14, 10, 0) 80%, rgba(20, 14, 10, 0.35));
}
.edge {
  position: absolute; top: 50%;
  writing-mode: vertical-rl;
  font-size: 0.8125rem; color: var(--bone-2); letter-spacing: 0.01em;
  white-space: nowrap;
}
.edge--left { left: calc(var(--gutter) * 0.6); transform: translateY(-50%) rotate(180deg); }
.edge--right { right: calc(var(--gutter) * 0.6); transform: translateY(-50%); }
.edge--right time { font-variant-numeric: tabular-nums; color: var(--bone); }
.hero__copy { position: absolute; left: var(--gutter); bottom: clamp(5.5rem, 13vh, 9rem); max-width: min(62rem, 80vw); }
.hero__title { font-family: var(--serif); font-weight: 300; font-size: var(--step-4); line-height: 0.94; letter-spacing: -0.03em; }
.hero__title .line { display: block; }
.hero__lede { margin-top: 1.5rem; max-width: 28rem; font-size: var(--step-1); line-height: 1.45; color: var(--bone); }
.hero__actions { position: absolute; right: var(--gutter); bottom: clamp(5.5rem, 13vh, 9rem); display: flex; align-items: center; gap: 1.25rem; }
.hero__caption { position: absolute; left: var(--gutter); bottom: 1.5rem; font-size: 0.8125rem; color: var(--bone-2); }
.hero__toggle { position: absolute; right: var(--gutter); bottom: 1rem; min-height: 2.75rem; padding: 0 0.25rem; font-size: 0.8125rem; color: var(--bone-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.25em; }
@media (hover: hover) and (pointer: fine) { .hero__toggle:hover { color: var(--bone); } }

/* ---------- Statement ---------- */
.statement { position: relative; padding-block: var(--section); background: var(--walnut-950); overflow: hidden; isolation: isolate; }
.statement__dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.statement__beam {
  position: absolute; z-index: -2; pointer-events: none;
  top: -20%; right: -10%; width: 70%; height: 140%;
  background: linear-gradient(105deg, rgba(217, 166, 108, 0) 30%, rgba(217, 166, 108, 0.09) 48%, rgba(217, 166, 108, 0.02) 62%, rgba(217, 166, 108, 0) 70%);
  transform: rotate(8deg);
}
.statement__text { font-size: clamp(2rem, 1rem + 3.6vw, 4.5rem); line-height: 1.08; max-width: 22ch; }
.statement__text .word { display: inline-block; }
.statement__sub { margin-top: 2.5rem; max-width: 34rem; margin-left: auto; color: var(--bone-2); font-size: var(--step-1); line-height: 1.5; }
.ledger { margin-top: clamp(4rem, 10vh, 7rem); padding-top: 2rem; border-top: 1px solid var(--line); font-family: var(--serif); font-weight: 300; font-size: var(--step-2); line-height: 1.35; max-width: 46rem; color: color-mix(in srgb, var(--bone) 86%, var(--walnut-950)); text-wrap: pretty; }
.ledger span:first-child { color: var(--bone); }

/* ---------- Work ---------- */
.work { position: relative; background: var(--walnut-900); }
.work__pin { display: grid; grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; padding: var(--section) 0 var(--section) var(--gutter); }
.work__head { align-self: center; }
.work__title { font-size: clamp(3rem, 1.5rem + 5vw, 6.5rem); line-height: 0.9; letter-spacing: -0.03em; }
.work__lede { margin-top: 1.25rem; color: var(--bone-2); max-width: 20rem; }
.spec { margin-top: 2rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.spec dt { font-size: 0.8125rem; color: var(--bone-2); }
.spec dd { font-size: 0.9375rem; }
.work__count { margin-top: 2rem; font-size: 0.8125rem; color: var(--bone-2); font-variant-numeric: tabular-nums; }
.work__track { display: flex; gap: clamp(1.5rem, 3vw, 3rem); padding-right: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.work__track::-webkit-scrollbar { display: none; }
.room { flex: 0 0 min(62vw, 58rem); scroll-snap-align: start; }
.room__frame { display: block; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-s); background: var(--walnut-800); cursor: zoom-in; }
.room__frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transform-origin: center; }
.room figcaption { margin-top: 1rem; display: flex; gap: 1rem; font-size: 0.9375rem; color: var(--bone-2); }
.room figcaption span { color: var(--bone); min-width: 9rem; }
.ready .work__track.is-pinned { overflow: visible; scroll-snap-type: none; }

/* lamp light that follows the pointer over images */
.lamp {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  width: 34rem; height: 34rem; margin: -17rem 0 0 -17rem; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 160, 0.28), rgba(255, 196, 130, 0.1) 45%, rgba(255, 196, 130, 0) 70%);
  mix-blend-mode: soft-light; opacity: 0;
  transition: opacity 400ms var(--ease-out);
}
.lamp.is-on { opacity: 1; }
.cursor-tag {
  position: fixed; left: 0; top: 0; z-index: 41; pointer-events: none;
  padding: 0.375rem 0.75rem; border-radius: 999px; background: var(--bone); color: var(--walnut-950);
  font-size: 0.8125rem; font-weight: 500; opacity: 0; scale: 0.9;
  transition: opacity 200ms var(--ease-out), scale 200ms var(--ease-out);
}
.cursor-tag.is-on { opacity: 1; scale: 1; }

/* ---------- Materials ---------- */
.materials { background: var(--walnut-950); }
.materials__pin { display: grid; grid-template-columns: minmax(18rem, 26rem) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: center; padding: var(--section) var(--gutter); max-width: var(--max); margin-inline: auto; min-height: 100vh; min-height: 100svh; }
.materials h2 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.25rem); }
.materials__list { margin-top: 2.5rem; counter-reset: m; border-top: 1px solid var(--line); }
.materials__list li { counter-increment: m; border-bottom: 1px solid var(--line); }
.materials__list button { display: grid; grid-template-columns: 2rem minmax(0, 1fr); width: 100%; text-align: left; padding: 0.875rem 0; color: var(--bone-2); font-size: 0.9375rem; line-height: 1.45; transition: color 250ms var(--ease-out); }
.materials__list button::before { content: counter(m); font-variant-numeric: tabular-nums; grid-row: span 2; color: var(--bone-2); }
.materials__list b { font-weight: 500; color: var(--bone); display: block; }
.materials__list li.is-active button { color: var(--bone); }
.materials__list li.is-active button::before { color: var(--lamp); }
@media (hover: hover) and (pointer: fine) { .materials__list button:hover { color: var(--bone); } }
.materials__view { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-s); background: var(--walnut-800); }
.materials__img { position: relative; width: 100%; height: 100%; transform-origin: 50% 50%; will-change: transform; }
.materials__img img { width: 100%; height: 100%; object-fit: cover; }
.pin {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: 1.75rem; height: 1.75rem; margin: -0.875rem 0 0 -0.875rem; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(26, 19, 15, 0.72); color: var(--bone); border: 1px solid rgba(238, 231, 219, 0.5);
  font-size: 0.75rem; font-variant-numeric: tabular-nums;
  transition: background-color 250ms var(--ease-out), color 250ms var(--ease-out), scale 250ms var(--ease-out);
}
.pin.is-active { background: var(--lamp); color: var(--walnut-950); border-color: var(--lamp); }

/* ---------- Process (limewash) ---------- */
.process { background: var(--lime); color: var(--ink); }
.process__pin { display: grid; grid-template-columns: minmax(18rem, 28rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: var(--section) var(--gutter); max-width: var(--max); margin-inline: auto; min-height: 100vh; min-height: 100svh; }
.steps { margin-top: 2rem; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); padding: 0.625rem 0; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; transition: color 300ms var(--ease-out); }
.steps li::before { content: counter(s); font-variant-numeric: tabular-nums; grid-row: span 2; }
.steps b { display: block; font-weight: 500; color: inherit; }
.ready .steps li { color: rgba(87, 74, 62, 0.66); }
.ready .steps li.is-done, .ready .steps li.is-active { color: var(--ink); }
.steps li.is-active::before { color: var(--lamp-deep); }
.progress { margin-top: 1.5rem; height: 2px; background: var(--ink-line); border-radius: 2px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-s); background: var(--lime-2); box-shadow: 0 1px 0 rgba(42, 31, 24, 0.08), 0 30px 60px -30px rgba(42, 31, 24, 0.35); }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame__sketch { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.ready .frame__sketch { clip-path: inset(0 0 0 0); }
.frame__pen { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--lamp); box-shadow: 0 0 18px 2px rgba(217, 166, 108, 0.7); }
.ready .frame__pen { left: 0; opacity: 0; }
.frame__label { margin-top: 1rem; font-size: 0.8125rem; color: var(--ink-2); }

/* ---------- Services (limewash continues) ---------- */
.services { background: var(--lime); color: var(--ink); padding-block: 0 clamp(5rem, 11vh, 6.5rem); }
.services__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.services h2 { max-width: 14ch; }
.service__desc { margin-top: 2.5rem; }
.services__right { align-self: end; }
.scope__head { font-size: 0.875rem; color: var(--ink-2); margin-bottom: 0.75rem; }
.switch { position: relative; display: inline-flex; margin-top: 2.5rem; padding: 4px; border-radius: 999px; background: var(--lime-2); isolation: isolate; }
.switch button { position: relative; z-index: 1; min-height: 2.75rem; padding: 0 1.25rem; border-radius: 999px; font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); transition: color 200ms var(--ease-out); }
.switch button[aria-checked="true"] { color: var(--bone); }
.switch__thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--ink); }
.service { margin-top: 3rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.service__text { font-family: var(--serif); font-weight: 300; font-size: var(--step-2); line-height: 1.3; max-width: 30rem; }
.service__desc .btn { margin-top: 2rem; }
.services .btn--solid { background: var(--ink); color: var(--bone); }
@media (hover: hover) and (pointer: fine) { .services .btn--solid:hover { background: var(--lamp-deep); box-shadow: none; } }
.scope { border-top: 1px solid var(--ink-line); }
.scope li { display: flex; align-items: center; gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid var(--ink-line); transition: color 300ms var(--ease-out); }
.scope li { font-family: var(--serif); font-size: var(--step-1); }
.scope li::before { content: ""; flex: none; width: 1.5rem; height: 1px; background: currentColor; transition: width 300ms var(--ease-out); }
.scope li.is-out { color: rgba(102, 88, 75, 0.5); text-decoration: line-through; text-decoration-thickness: 1px; }
.scope li.is-out::before { width: 0.5rem; }

/* ---------- Words ---------- */
.words { padding-block: clamp(5rem, 11vh, 6.5rem); background: var(--walnut-950); }
.quote blockquote p { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(2rem, 1rem + 3.4vw, 4.25rem); line-height: 1.12; letter-spacing: -0.015em; max-width: 24ch; text-wrap: balance; }
.quote figcaption { margin-top: 2rem; color: var(--bone-2); font-size: 1rem; }
.badges { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--bone-2); font-size: 0.9375rem; }

/* ---------- Contact ---------- */
.contact { padding-block: var(--section); background: var(--walnut-900); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(3rem, 7vw, 7rem); }
.contact__intro > p { margin-top: 1.25rem; color: var(--bone-2); font-size: var(--step-1); max-width: 26rem; }
.contact__info { margin-top: 3rem; display: grid; gap: 1.25rem; }
.contact__info dt { font-size: 0.8125rem; color: var(--bone-2); }
.contact__info dd a { text-decoration-color: var(--line); }
.form { display: grid; gap: 1.75rem; align-content: start; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-size: 0.875rem; color: var(--bone-2); margin-bottom: 0.5rem; padding: 0; }
.opt { color: rgba(188, 175, 158, 0.7); }
.field--row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; }
input[type="text"], textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--bone);
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 0.625rem 0; transition: border-color 200ms var(--ease-out);
}
textarea { resize: vertical; min-height: 5.5rem; }
input::placeholder, textarea::placeholder { color: rgba(188, 175, 158, 0.55); }
input[type="text"]:focus-visible, textarea:focus-visible { outline: none; border-bottom-color: var(--lamp); box-shadow: 0 1px 0 0 var(--lamp); }
input[aria-invalid="true"] { border-bottom-color: #E08A6B; }
.field__error { margin-top: 0.5rem; font-size: 0.875rem; color: #EBA58A; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips label { margin: 0; position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--bone); font-size: 0.9375rem; transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), border-color 150ms var(--ease-out); }
.chips input:checked + span { background: var(--bone); color: var(--walnut-950); border-color: var(--bone); }
.chips input:focus-visible + span { outline: 2px solid var(--lamp); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .chips label:hover span { border-color: var(--bone-2); } }
.form__note { font-size: 0.875rem; color: var(--bone-2); }
#sendBtn { overflow: hidden; }
#sendBtn[aria-busy="true"] { opacity: 0.8; }

/* ---------- Footer ---------- */
.footer { background: var(--walnut-950); padding-top: var(--section); overflow: hidden; }
.footer__mark { padding-inline: var(--gutter); line-height: 0.8; }
.footer__word { display: flex; font-family: var(--serif); font-weight: 300; font-size: clamp(6rem, 35vw, 46rem); letter-spacing: -0.045em; line-height: 0.8; color: var(--bone); }
.footer__word .ch { display: inline-block; }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 2rem; padding-block: 2.5rem 2rem; margin-top: 2rem; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--bone-2); }
.footer__links { display: flex; gap: 1.5rem; }
.footer__links a { padding: 0.5rem 0; text-decoration-color: var(--line); }
@media (hover: hover) and (pointer: fine) { .footer__links a:hover { color: var(--bone); } }
.footer__legal { width: 100%; }

/* ---------- Viewer ---------- */
.viewer { width: min(92vw, 90rem); max-height: 92vh; padding: 0; border: 0; background: transparent; color: var(--bone); overflow: visible; }
.viewer::backdrop { background: rgba(14, 10, 7, 0.92); }
.viewer img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: var(--radius-s); }
.viewer p { margin-top: 1rem; color: var(--bone-2); font-size: 0.9375rem; }
.viewer__nav { display: flex; gap: 1.5rem; margin-top: 0.75rem; }
.viewer__nav button { min-height: 2.75rem; font-size: 0.9375rem; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.25em; }
.viewer__nav button:last-child { margin-left: auto; }
::view-transition-group(room) { animation-duration: 550ms; animation-timing-function: var(--ease-io); }

/* ---------- Interaction layer: things the visitor can do, not only watch ---------- */
/* loader: click or tap to skip */
.loader__skip { position: fixed; right: var(--gutter); bottom: 2rem; z-index: 2; font-size: var(--step--1); color: var(--bone-2); opacity: 0; animation: skip-in 500ms var(--ease-out) 1.4s forwards; pointer-events: none; }
@keyframes skip-in { to { opacity: 1; } }

/* rooms: drag to walk, tilt under the hand */
.room__frame img { -webkit-user-drag: none; user-select: none; }
@media (hover: hover) and (pointer: fine) {
  .ready .work__track.is-pinned { user-select: none; -webkit-user-select: none; }
  .ready .work__track.is-pinned .room__frame { cursor: grab; }
  .ready .work__track.is-dragging .room__frame { cursor: grabbing; }
}

/* materials: the pins are clickable too */
.pin { cursor: pointer; }
.pin::before { content: ""; position: absolute; inset: -0.5rem; border-radius: 50%; }
@media (hover: hover) and (pointer: fine) { .pin:hover { scale: 1.15; background: var(--lamp); color: var(--walnut-950); border-color: var(--lamp); } }

/* process: hold a lamp over the sketch and the finished room shows through */
.frame { --mx: 50%; --my: 50%; --r: 0px; --ro: 0; touch-action: pan-y; }
.frame__sketch {
  -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), transparent 0, transparent calc(var(--r) * 0.45), #000 var(--r));
          mask-image: radial-gradient(circle at var(--mx) var(--my), transparent 0, transparent calc(var(--r) * 0.45), #000 var(--r));
}
.frame__lamp {
  position: absolute; left: var(--mx); top: var(--my); z-index: 2; pointer-events: none;
  width: calc(var(--r) * 1.45); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(217, 166, 108, 0.55), 0 0 36px rgba(217, 166, 108, 0.3);
  opacity: var(--ro); transition: opacity 300ms var(--ease-out);
}
.frame.is-built .frame__lamp { opacity: 0; }
.frame__hint { margin-top: 0.25rem; font-size: 0.8125rem; color: var(--ink-2); transition: opacity 300ms var(--ease-out); }
.process__visual.is-built .frame__hint { opacity: 0; }

/* contact: the message builds itself as the form is filled */
.preview { margin-top: 3rem; max-width: 26rem; }
.preview__head { font-size: 0.8125rem; color: var(--bone-2); margin-bottom: 0.75rem; }
.preview__bubble { position: relative; padding: 1rem 1.125rem 1.75rem; background: var(--walnut-800); border: 1px solid var(--line); border-radius: 1rem 1rem 0.25rem 1rem; font-size: 0.9375rem; line-height: 1.5; color: var(--bone); overflow-wrap: anywhere; }
.preview__bubble p + p { margin-top: 0.125rem; }
.preview__bubble p:first-child { margin-bottom: 0.5rem; }
.preview__bubble .is-empty { color: rgba(203, 191, 174, 0.55); }
.preview__time { position: absolute; right: 0.875rem; bottom: 0.5rem; font-size: 0.6875rem; color: var(--bone-2); font-variant-numeric: tabular-nums; }

/* footer: the wordmark warms up where the pointer is */
.footer__word .ch { color: color-mix(in oklab, var(--lamp) calc(var(--heat, 0) * 100%), var(--bone)); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
}
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__menu { display: inline-flex; align-items: center; }
  .edge { display: none; }
  .hero__copy { right: var(--gutter); bottom: 10.5rem; max-width: none; }
  .hero__actions { left: var(--gutter); right: auto; bottom: 4.75rem; }
  .hero__title { font-size: clamp(2.75rem, 12.5vw, 5rem); }
  .hero__lede { font-size: 1.0625rem; }
  .work__pin, .materials__pin, .process__pin { grid-template-columns: minmax(0, 1fr); padding-right: var(--gutter); min-height: 0; }
  .work__pin { padding-left: var(--gutter); }
  .room { flex-basis: 86vw; }
  .room figcaption { flex-direction: column; gap: 0.25rem; }
  .materials__view { order: -1; }
  .process__visual { order: -1; }
  .services__grid { grid-template-columns: minmax(0, 1fr); }
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .preview { display: none; }
  .statement__sub { margin-left: 0; }
}
@media (max-width: 560px) {
  .field--row { grid-template-columns: minmax(0, 1fr); }
  .hero__actions .link { display: none; }
  .switch button { padding: 0 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .loader { display: none; }
  .room__frame img { transform: none; }
  .ready .frame__sketch { clip-path: inset(0 0 0 50%); }
  .ready .frame__pen { left: 50%; opacity: 1; }
  .ready .steps li { color: var(--ink); }
}

/* If the script never runs, the loader steps aside on its own */
.js .loader { animation: loader-safety 0.4s ease 10s forwards; }
@keyframes loader-safety { to { opacity: 0; visibility: hidden; } }
