/* Premier Building Products
   Direction: the builder's spec sheet. One sans family set big, flat fields of
   primer white, ink and drafting blue, square-cornered photographs that run to
   the edge, and the door itself as the one thing you can handle (the 3D viewer).
   House rules: no eyebrows, no monospace, no hairlines, no glass, no resting
   shadows, no gradients, no numbered steps. Space and tone steps do the work. */
:root {
  --paper: #f5f6f6;       /* primer white, cool: the ground */
  --surface: #ffffff;     /* one tone step up */
  --sunk: #e9ecee;        /* one tone step down */
  --ink: #14181c;
  --ink-2: #4b545c;
  --accent: #1d3b5c;      /* drafting blue */
  --accent-ink: #ffffff;
  --on-dark: #f5f6f6;
  --on-dark-2: #b9c1c8;
  --pine: #b8894a;
  --door: #ffffff;
  --mdf: #e6d6b8;
  --error: #c4352b;
  --float-shadow: 0 12px 32px rgba(20, 24, 28, 0.16);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Five sizes do all the visible work */
  --xl: clamp(2.25rem, 7vw, 6.5rem);
  --l: clamp(1.9rem, 3.7vw, 3.4rem);
  --m: clamp(1.2rem, 1.6vw, 1.45rem);
  --body: 1.125rem;
  --s: 0.9375rem;

  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --maxw: 84rem;
  --section: clamp(5rem, 11vw, 10rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* distance from the content edge to the window edge, so photos can run off the page */
  --bleed: calc(-1 * (max(32px, env(safe-area-inset-right, 0px)) + max(0px, (100vw - var(--maxw) - 64px) / 2)));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1215; --surface: #171b1f; --sunk: #0a0c0e; --ink: #eceef0; --ink-2: #a7b0b8;
    --accent: #8fb3da; --accent-ink: #0f1215; --on-dark: #eceef0; --on-dark-2: #a7b0b8;
    --pine: #d6ae73; --door: #e9ebec; --mdf: #b89a6a; --error: #ff8a7f;
    --float-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1215; --surface: #171b1f; --sunk: #0a0c0e; --ink: #eceef0; --ink-2: #a7b0b8;
  --accent: #8fb3da; --accent-ink: #0f1215; --on-dark: #eceef0; --on-dark-2: #a7b0b8;
  --pine: #d6ae73; --door: #e9ebec; --mdf: #b89a6a; --error: #ff8a7f;
  --float-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--body)/1.55 var(--font); letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[id] { scroll-margin-top: 5rem; }
::selection { background: var(--accent); color: var(--accent-ink); }

.skip { position: absolute; left: var(--gutter-l); top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: 0.7rem 1rem; text-decoration: none; transition: transform 150ms var(--ease); }
.skip:focus { transform: translateY(5rem); color: var(--paper); }

.wrap { max-width: calc(var(--maxw) + 64px); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
@media (min-width: 900px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; text-wrap: balance; color: inherit; font-weight: 700; }
h1 { font-size: var(--xl); line-height: 0.96; letter-spacing: -0.045em; }
h2 { font-size: var(--l); line-height: 1.02; letter-spacing: -0.035em; }
h3 { font-size: var(--m); line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; }
p { margin: 0; max-width: 64ch; text-wrap: pretty; }
.statement { font-size: var(--m); line-height: 1.4; letter-spacing: -0.015em; max-width: 34ch; }
.small { font-size: var(--s); }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Announcement + nav: a plain bar ---------- */
.announce { background: #1d3b5c; color: #ffffff; font-size: var(--s); }
.announce .wrap { padding-block: 0.6rem; }
.announce p { max-width: none; text-align: center; text-wrap: balance; }
.announce b { font-weight: 650; }
.announce a { color: inherit; margin-left: 0.35rem; white-space: nowrap; }
.announce a:hover { color: #d3dce6; }

.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--paper); transition: background-color 200ms ease; }
.nav.is-scrolled { background: var(--surface); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name b { font-size: 1.08rem; letter-spacing: -0.015em; font-weight: 700; }
.brand-name span { font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { display: block; padding: 0.5rem 0.8rem; font-size: 1rem; font-weight: 500; text-decoration: none; transition: color 150ms ease; }
.nav-links a[aria-current="page"]:not(.btn) { color: var(--accent); font-weight: 650; }
.nav-links .btn { margin-left: 0.5rem; }
.menu-btn { display: none; }

/* ---------- Buttons: flat, fully round, decided once ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.75rem 1.5rem; border: 0; border-radius: 999px;
  font: 600 1rem/1 var(--font); letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  transition: transform 120ms var(--ease), background-color 150ms ease, color 150ms ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); color: var(--paper); }
.btn-quiet { background: var(--sunk); color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--on-dark); color: #14181c; }
.btn-light:hover { background: #ffffff; color: #14181c; }
.link { font-weight: 600; text-decoration: underline; text-underline-offset: 0.25em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }

/* ---------- Sections ---------- */
section { padding-block: var(--section); }
.field-white { background: var(--surface); }
.field-ink { background: #14181c; color: var(--on-dark); }
.field-blue { background: #1d3b5c; color: #ffffff; }
.head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.head p { color: var(--ink-2); }
.field-ink .head p { color: var(--on-dark-2); }

/* Media: square corners, one treatment everywhere */
figure { margin: 0; }
.media { overflow: hidden; background: var(--sunk); max-width: 100%; }
.hero-photo, .trim-feature .media, .supply .media { max-width: none; }
main { overflow-x: clip; }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Home hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) 0; }
.hero h1 { max-width: 15ch; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); margin-top: clamp(2rem, 4vw, 3.5rem); align-items: end; }
.hero-copy { display: grid; gap: 1.75rem; padding-bottom: clamp(0rem, 2vw, 1.5rem); align-content: end; }
.hero-photo { aspect-ratio: 16 / 10; margin-right: var(--bleed); }
.hero-photo img { object-position: 70% 50%; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1.5rem; }
.facts li { display: grid; gap: 0.1rem; }
.facts b { font-weight: 650; }
.facts span { color: var(--ink-2); font-size: var(--s); }

/* ---------- The viewer: pick a style, turn it, open it ---------- */
.d3 { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.d3-pick { display: grid; gap: 0.25rem; }
.d3-pick button {
  display: grid; gap: 0.2rem; text-align: left; padding: 1rem 1.1rem; border: 0; background: transparent; color: inherit;
  font: inherit; cursor: pointer; transition: background-color 180ms ease, transform 120ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.d3-pick button:hover { background: var(--sunk); }
.d3-pick button:active { transform: scale(0.985); }
.d3-pick button b { font-size: var(--m); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.d3-pick button span { color: var(--ink-2); font-size: var(--s); }
.d3-pick button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.d3-pick button[aria-pressed="true"] span { color: color-mix(in srgb, var(--accent-ink) 78%, var(--accent)); }
.d3-view { display: grid; gap: 1rem; min-width: 0; }
.d3-stage {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: 4 / 3; max-height: 40rem; overflow: hidden;
  background: #e4e0d9; touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none;
}
.d3-dragging .d3-stage { cursor: grabbing; }
.d3-stage canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 400ms ease; }
.d3-ready .d3-stage canvas { opacity: 1; }
.d3-fallback { position: absolute; left: 50%; top: 50%; height: 86%; width: auto; max-width: none; transform: translate(-50%, -50%); transition: opacity 300ms ease; }
.d3-ready .d3-fallback { opacity: 0; pointer-events: none; }
.d3-status { position: absolute; z-index: 2; left: 0; right: 0; bottom: 1rem; margin: 0 auto; max-width: none; text-align: center; font-size: var(--s); color: #4b545c; }
.d3-turn { position: absolute; z-index: 2; right: 1rem; bottom: 1rem; display: flex; gap: 0.5rem; }
.d3-turn button { width: 3rem; height: 3rem; border: 0; border-radius: 999px; background: #ffffff; color: #14181c; display: grid; place-items: center; cursor: pointer; transition: transform 120ms var(--ease), background-color 150ms ease; -webkit-tap-highlight-color: transparent; }
.d3-turn button:hover { background: #14181c; color: #ffffff; }
.d3-turn button:active { transform: scale(0.92); }
.d3-turn svg { width: 1.15rem; height: 1.15rem; }
.d3:not(.d3-ready) .d3-turn { display: none; }
.d3-bar { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; justify-content: space-between; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.seg button {
  min-height: 2.75rem; padding: 0.5rem 1.1rem; border: 0; border-radius: 999px; background: var(--sunk); color: var(--ink);
  font: 500 1rem/1 var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease), background-color 150ms ease, color 150ms ease;
}
.seg button:hover { background: color-mix(in srgb, var(--ink) 14%, var(--sunk)); }
.seg button:active { transform: scale(0.95); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); font-weight: 600; }
.d3-readout { font-weight: 600; }
.d3-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; justify-content: space-between; }
.d3-foot .hint { color: var(--ink-2); font-size: var(--s); }
.d3-failed .d3-bar .seg, .d3-failed [data-open] { display: none; }

/* ---------- Double, bifold, barn: one big, two stacked ---------- */
.configs { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.config { display: grid; gap: 1rem; text-decoration: none; color: inherit; align-content: start; }
.config:hover { color: inherit; }
.config .media { transition: transform 400ms var(--ease); }
.config:hover h3 { color: var(--accent); }
.config-main .media { aspect-ratio: 5 / 4; }
.config-side { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-content: start; }
.config-side .media { aspect-ratio: 16 / 9; }
.config p { color: var(--ink-2); }
.config ul { margin: 0.25rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.25rem; color: var(--ink); }

/* ---------- Custom: the dark field ---------- */
.custom { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.custom .head { margin-bottom: 0; }
.custom-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 3.5vw, 3rem) clamp(1.5rem, 3vw, 3rem); margin: 0; }
.custom-list div { display: grid; gap: 0.4rem; }
.custom-list dt { font-size: var(--m); font-weight: 650; letter-spacing: -0.02em; }
.custom-list dd { margin: 0; color: var(--on-dark-2); }

/* ---------- Trim ---------- */
.trim-feature { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.trim-feature .media { aspect-ratio: 4 / 3.4; margin-left: var(--bleed); }
.stack { display: grid; gap: 1.5rem; align-content: start; min-width: 0; }
.trim-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin: 0; }
.trim-strip figure, .profiles figure {
  display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 0.75rem; justify-items: center; align-items: center;
  background: var(--surface); padding: 1.1rem 0.75rem 0.85rem; min-width: 0;
}
.field-white .trim-strip figure, .field-white .profiles figure { background: var(--paper); }
.trim-strip figure { height: 9rem; }
.trim-strip figcaption, .profiles figcaption { font-size: var(--s); font-weight: 600; text-align: center; }
svg.profile { display: block; width: auto; height: 100%; min-height: 0; max-width: 100%; overflow: visible; }
svg.profile path { fill: var(--mdf); stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
svg.profile .ref { stroke: var(--ink-2); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; }
svg.profile.casing { width: 100%; height: auto; }

/* ---------- How an order works: order by position, no numbers ---------- */
.order { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(1.5rem, 2.5vw, 2.5rem); }
.order li { display: grid; gap: 0.75rem; align-content: start; }
.order li::before { content: ""; display: block; height: 0.5rem; background: var(--accent); width: calc(20% * var(--i, 1)); min-width: 1rem; }
.order p { color: var(--ink-2); }

/* ---------- Who we supply ---------- */
.supply { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.supply .media { aspect-ratio: 4 / 5; margin-right: var(--bleed); }
.who { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.who li { display: grid; gap: 0.2rem; }
.who b { font-size: var(--m); font-weight: 650; letter-spacing: -0.02em; }
.who span { color: var(--ink-2); }

/* ---------- Closing call: a blue field beside a photograph ---------- */
.close { padding: 0; }
.close-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 30rem; }
.close-copy { display: grid; gap: 1.5rem; align-content: center; padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 5vw, 5rem) clamp(3rem, 7vw, 6rem) max(32px, calc((100vw - var(--maxw)) / 2)); }
.close-copy p { color: #d3dce6; }
.close .media { height: 100%; min-height: 20rem; }

/* ---------- Inner pages ---------- */
.page-head { padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 4vw, 3.5rem); }
.page-head .wrap { display: grid; gap: 1.5rem; }
.page-head h1 { max-width: 14ch; }
.page-head .statement { max-width: 44ch; color: var(--ink-2); }

.style-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.style-row + .style-row { margin-top: clamp(4rem, 8vw, 7rem); }
.style-row .door-box { background: var(--surface); display: grid; place-items: center; padding: clamp(1.5rem, 3vw, 2.5rem); }
.door-photo { height: clamp(16rem, 30vw, 26rem); width: auto; max-width: 100%; object-fit: contain; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.75rem; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; }

.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 5vw, 5rem); margin: 0; }
.pairs div { display: grid; gap: 0.5rem; align-content: start; }
.pairs dt { font-size: var(--m); font-weight: 650; letter-spacing: -0.02em; }
.pairs dd { margin: 0; color: var(--ink-2); }
.aside-note { margin-top: clamp(2.5rem, 5vw, 4rem); font-size: var(--m); letter-spacing: -0.015em; max-width: 40ch; }

.trim-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.trim-row + .trim-row { margin-top: clamp(4rem, 8vw, 7rem); }
.profiles { display: grid; gap: 0.5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profiles-1 { grid-template-columns: minmax(0, 14rem); }
.profiles figure { height: 12rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split > * { min-width: 0; }
.split .media.tall { aspect-ratio: 4 / 5; }
.split .media.wide { aspect-ratio: 4 / 3.4; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.checks li { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.75rem; align-items: start; }
.checks li::before {
  content: ""; width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; border-radius: 50%; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.checks b { display: block; font-weight: 650; }
.checks span { color: var(--ink-2); }

/* Tables keep their lines: they are real tables */
.table-wrap { overflow-x: auto; background: var(--surface); }
.field-white .table-wrap { background: var(--paper); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 1rem 1.25rem; border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: var(--s); font-weight: 650; color: var(--ink-2); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
td.wrap-ok { white-space: normal; }

/* About */
.person-panel { background: var(--surface); padding: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 1.75rem; align-content: start; }
.person { display: flex; align-items: center; gap: 1.25rem; }
.person img { width: 6rem; height: 6rem; border-radius: 50%; object-fit: cover; flex: none; background: #ffffff; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: grid; gap: 0.15rem; }
.contact-list .label { color: var(--ink-2); font-size: var(--s); }
.contact-list a, .contact-list .val { font-weight: 650; font-size: var(--m); letter-spacing: -0.015em; text-decoration: none; }
.contact-list a:hover { color: var(--accent); }

/* ---------- Quote form (forms keep their field outlines) ---------- */
.form-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
form { display: grid; gap: 3rem; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1.25rem; min-width: 0; }
legend { font-size: var(--m); font-weight: 650; letter-spacing: -0.02em; margin-bottom: 0.25rem; padding: 0; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.field { display: grid; gap: 0.45rem; min-width: 0; }
.field label, .field .label { font-size: 1rem; font-weight: 600; }
.field .hint { font-size: var(--s); color: var(--ink-2); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="month"], select, textarea {
  width: 100%; min-height: 3.1rem; padding: 0.7rem 0.9rem;
  font: 400 1.0625rem/1.4 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 6px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23888' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.2rem; }
textarea { min-height: 8rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.field.invalid input, .field.invalid select { border-color: var(--error); }
.field .err { font-size: var(--s); color: var(--error); }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.55rem 1.1rem; border-radius: 999px;
  background: var(--sunk); font-size: 1rem; font-weight: 500;
  transition: transform 120ms var(--ease), background-color 150ms ease, color 150ms ease;
}
.choice:hover span { background: color-mix(in srgb, var(--ink) 14%, var(--sunk)); }
.choice input:active + span { transform: scale(0.96); }
.choice input:checked + span { background: var(--accent); color: var(--accent-ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.status { font-size: 1rem; }
.status[data-kind="ok"] { color: var(--accent); font-weight: 600; }
.status[data-kind="error"] { color: var(--error); }
.aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 5.5rem); background: var(--surface); padding: clamp(1.5rem, 3vw, 2rem); display: grid; gap: 1.25rem; }
.aside p { color: var(--ink-2); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.consent { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.75rem; align-items: start; cursor: pointer; max-width: 64ch; }
.consent input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; accent-color: var(--accent); cursor: pointer; }
.consent a { color: var(--accent); }
.field-blue .actions .btn-light:hover, .field-ink .actions .btn-light:hover { background: #ffffff; }

/* ---------- Policy pages ---------- */
.legal { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 5rem); padding-bottom: var(--section); align-items: start; }
.legal-toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 5.5rem); }
.legal-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.legal-toc a { color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover { color: var(--accent); }
.legal-body { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); max-width: 68ch; }
.legal-sec { padding: 0; display: grid; gap: 1rem; }
.legal-sec h2 { font-size: var(--m); letter-spacing: -0.02em; }
.legal-sec ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.legal-sec a { color: var(--accent); }
@media (max-width: 860px) { .legal { grid-template-columns: 1fr; } .legal-toc { position: static; } }

/* ---------- Footer: the name comes back at full width ---------- */
footer { background: var(--surface); padding-block: clamp(4rem, 8vw, 6rem) 2rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: 2rem; }
.foot-grid > * { min-width: 0; }
.foot-grid h2 { font-size: 1rem; letter-spacing: -0.01em; margin-bottom: 0.9rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.foot-grid a { text-decoration: none; color: var(--ink-2); }
.foot-grid a:hover { color: var(--accent); }
.foot-grid .statement { max-width: 24ch; }
.foot-name { margin-top: clamp(3rem, 7vw, 6rem); font-size: clamp(2rem, 6.2vw, 6.25rem); font-weight: 700; letter-spacing: -0.055em; line-height: 0.9; color: var(--ink); white-space: nowrap; }
.foot-base { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-size: var(--s); color: var(--ink-2); }

/* ---------- Motion: entrances, staggered; content stays visible without script ---------- */
.reveal-on [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.reveal-on [data-reveal].in { opacity: 1; transform: none; }
.hero-photo img { animation: settle 1600ms var(--ease) both; }
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
.config .media img, .supply .media img, .trim-feature .media img { transition: transform 900ms var(--ease); }
.config:hover .media img { transform: scale(1.035); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .order { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d3 { grid-template-columns: 1fr; }
  .d3-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-grid, .configs, .custom, .trim-feature, .supply, .split, .style-row, .trim-row, .form-grid, .close-grid { grid-template-columns: 1fr; }
  .hero-photo, .supply .media { margin-right: calc(-1 * var(--gutter-r)); margin-left: calc(-1 * var(--gutter-l)); }
  .trim-feature .media { margin-left: calc(-1 * var(--gutter-l)); margin-right: calc(-1 * var(--gutter-r)); }
  .supply .media { aspect-ratio: 4 / 3; order: -1; }
  .close-copy { padding-inline: var(--gutter-l) var(--gutter-r); }
  .close .media { min-height: 16rem; aspect-ratio: 16 / 10; }
  .aside { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
  .style-row .door-box { max-width: 24rem; }

  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem;
    margin-right: -0.6rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer;
    transition: transform 120ms var(--ease), background-color 150ms ease;
  }
  .menu-btn:active { transform: scale(0.92); background: var(--sunk); }
  .menu-btn svg { width: 1.4rem; height: 1.4rem; }
  .nav-links {
    position: absolute; top: calc(100% + 6px); right: var(--gutter-r); width: min(19rem, calc(100vw - 32px));
    flex-direction: column; align-items: stretch; gap: 0.15rem; padding: 0.6rem;
    background: var(--surface); box-shadow: var(--float-shadow);
    transform-origin: top right; transform: scale(0.94) translateY(-6px); opacity: 0; visibility: hidden;
    transition: transform 320ms var(--ease), opacity 180ms ease, visibility 0s linear 320ms;
  }
  .nav.is-open .nav-links { transform: none; opacity: 1; visibility: visible; transition: transform 320ms var(--ease), opacity 180ms ease, visibility 0s; }
  .nav-links a:not(.btn) { padding: 0.8rem 0.9rem; font-size: 1.0625rem; }
  .nav-links .btn { margin: 0.4rem 0 0; }
}
@media (max-width: 560px) {
  :root { --body: 1.0625rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .d3-pick { grid-template-columns: 1fr 1fr; }
  .d3-pick button { padding: 0.8rem; }
  .d3-stage { aspect-ratio: 4 / 5; max-height: 32rem; }
  .seg { width: 100%; }
  .seg button { flex: 1 1 auto; padding-inline: 0.6rem; }
  .d3-bar .btn { width: 100%; }
  .custom-list, .pairs { grid-template-columns: 1fr; }
  .order { grid-template-columns: 1fr; }
  .trim-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profiles figure { height: 9rem; }
  .row { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 0.1rem; }
  .kv dd { margin-bottom: 0.6rem; }
  .announce { font-size: 0.875rem; }
  .foot-name { white-space: normal; }
}

/* ---------- Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; transition-delay: 0ms !important; }
  .reveal-on [data-reveal] { opacity: 1; transform: none; }
  .btn:active, .choice input:active + span, .menu-btn:active, .seg button:active, .d3-pick button:active { transform: none; }
  .nav-links { transform: none !important; }
}
@media (prefers-contrast: more) {
  :root { --ink-2: color-mix(in srgb, var(--ink) 88%, var(--paper)); --on-dark-2: #e6eaee; }
  .seg button, .choice span, .btn-quiet { outline: 1px solid var(--ink); }
}
