/* ==========================================================================
   Barkitecture. Direction A, drawing set.
   The site reads like a furniture maker's drawing set: drafting-film ground,
   ink lines, title blocks that carry real information, one oak accent.
   Tokens: film #C9D2D8, ink #13222C, line #3B5566, oak #A8743F, paper #E3E8EB.
   ========================================================================== */

:root {
  --film: #C9D2D8;
  --ink: #13222C;
  --line: #3B5566;
  --oak: #A8743F;
  --paper: #E3E8EB;
  --rule: rgba(19, 34, 44, .2);
  --rule-2: rgba(19, 34, 44, .38);
  --grid: rgba(19, 34, 44, .055);
  --serif: 'Hedvig Letters Serif', Georgia, serif;
  --sans: 'Hedvig Letters Sans', system-ui, sans-serif;
  --gut: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--film); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); overflow-x: clip; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
/* the serif draws ff as a broken ligature ("Ofset"), so ligatures stay off everywhere */
*, ::before, ::after { font-variant-ligatures: no-common-ligatures !important; }
img, svg, picture, video, canvas { display: block; max-width: 100%; }
picture img { width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-underline-offset: .28em; text-decoration-thickness: 1px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.025em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 5.8vw, 6rem); }
h2 { font-size: clamp(2rem, 3.9vw, 3.5rem); }
h3 { font: 500 1.05rem/1.35 var(--sans); }
p { text-wrap: pretty; }
.lede { font-size: clamp(1.1rem, 1.35vw, 1.3rem); line-height: 1.5; max-width: 40rem; }
.muted { color: var(--line); }
.small { font-size: .9rem; }
.k { font-size: .82rem; color: var(--line); }
::selection { background: var(--ink); color: var(--film); }
:focus-visible { outline: 2px solid var(--oak); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--film); padding: .6rem 1rem; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 var(--gut); }
.wrap.narrow { max-width: 960px; }
.row { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 6rem); align-items: start; }

/* the drawing sheet: a hairline frame around the viewport */
.sheet-frame { position: fixed; inset: 10px; border: 1px solid var(--rule); pointer-events: none; z-index: 70; }

/* ---------- buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--ink); color: var(--film); border: 1px solid var(--ink); padding: .9rem 1.35rem; font: 500 .96rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .25s, color .25s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn-sm { padding: .7rem 1rem; font-size: .9rem; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--film); }
.btn-invert { background: var(--film); color: var(--ink); border-color: var(--film); }
.btn-invert:hover { background: transparent; color: var(--film); }
.tlink { text-decoration: underline; text-decoration-color: var(--rule-2); font-weight: 500; transition: text-decoration-color .25s; }
.tlink:hover { text-decoration-color: var(--ink); }

/* ---------- header ---------- */
.top { position: fixed; inset: 10px 10px auto; z-index: 60; display: flex; align-items: center; gap: 2rem; padding: 14px clamp(14px, 3vw, 40px); transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.top.scrolled { background: var(--film); border-color: var(--rule); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font: 400 1.55rem/1 var(--serif); letter-spacing: -.03em; }
.mark-svg { width: 28px; height: 24px; }
.top nav { display: flex; gap: 1.5rem; margin-left: auto; font-size: .95rem; }
.top nav a { text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { text-decoration: underline; }
.top .nav-quote { display: none; }
.menu { display: none; }

/* ---------- title blocks ---------- */
.tblock { display: grid; grid-template-columns: auto 1fr; border: 1px solid var(--ink); background: rgba(227, 232, 235, .9); font-size: .86rem; min-width: 18rem; }
.tblock div { display: contents; }
.tblock dt, .tblock dd { padding: .5rem .75rem; border-bottom: 1px solid var(--rule); }
.tblock dt { color: var(--line); border-right: 1px solid var(--rule); }
.tblock div:last-child dt, .tblock div:last-child dd { border-bottom: 0; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 600px; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media picture, .hero-media video, .hero-media .trace { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media video { object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero.vid-on video { opacity: 1; }
.trace path { fill: none; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.6, 0, .2, 1) forwards var(--d, 0s), settle 1.4s ease forwards 3.6s; }
.trace text { font: 400 16px var(--sans); fill: var(--ink); opacity: 0; animation: fadein .6s ease forwards 2.2s, settle 1.4s ease forwards 3.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes settle { to { opacity: .28; } }
.hero-copy { position: absolute; left: clamp(28px, 5vw, 76px); top: clamp(96px, 14vh, 150px); max-width: min(62vw, 58rem); display: grid; gap: 1.2rem; }
.hero-copy h1 { font-size: clamp(2.6rem, 4.7vw, 5.6rem); }
.hero-copy p { font-size: 1.12rem; max-width: min(30rem, 26vw); }
.hero-tb { position: absolute; right: clamp(28px, 4vw, 60px); top: clamp(100px, 15vh, 160px); }

/* load-in: one orchestrated stagger */
.rise { animation: rise 1s var(--ease) both var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- bands ---------- */
.band { padding: clamp(5rem, 10vw, 8.5rem) 0; position: relative; }
.band-flush { padding-top: 0; }
.band-paper { background: var(--paper); }
.band-grid, .story, .phead { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: end; border-bottom: 1px solid var(--ink); padding-bottom: 1.1rem; margin-bottom: 2.4rem; }
.sec-head p { justify-self: end; max-width: 34rem; }
.two .sec-head { grid-template-columns: 1fr; }
.two .sec-head p { justify-self: start; }

[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
.reveal-img { position: relative; }
.js .reveal-img::after { content: ''; position: absolute; inset: -1px; z-index: 3; background: var(--film); transform-origin: bottom; transition: transform 1.1s var(--ease); pointer-events: none; }
.js .band-paper .reveal-img::after { background: var(--paper); }
.js .reveal-img.in::after { transform: scaleY(0); }

.statement { display: grid; gap: 3.5rem; }
.statement .big { font: 400 clamp(1.8rem, 3.4vw, 3rem)/1.18 var(--serif); letter-spacing: -.02em; max-width: 30ch; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.facts div { padding: 1.2rem 1.5rem 0 0; display: grid; gap: .4rem; }
.facts div + div { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.facts p { color: var(--line); }

/* ---------- story: from drawing to object ---------- */
.story { position: relative; height: 620vh; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.story-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.story-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease; }
.story.gl-on canvas { opacity: 1; }
.story-fallback { position: absolute; inset: 20% 10% 20% 38%; display: grid; place-items: center; }
html.gl .story-fallback { display: none; }
.story-copy { position: absolute; left: clamp(28px, 5vw, 76px); top: 50%; transform: translateY(-50%); width: min(27rem, 32vw); display: grid; }
.stage { grid-area: 1 / 1; display: grid; gap: .9rem; opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.stage.on { opacity: 1; transform: none; }
.stage-k { font-size: .86rem; color: var(--line); border-bottom: 1px solid var(--rule); padding-bottom: .6rem; }
.stage h2 { font-size: clamp(2.2rem, 3.6vw, 3.4rem); }
.stage p:last-child { color: color-mix(in srgb, var(--ink) 80%, var(--film)); }
html:not(.gl) .story { height: auto; }
html:not(.gl) .story-stage { position: relative; height: auto; min-height: 100svh; }
html:not(.gl) .story-copy { position: relative; left: auto; top: auto; transform: none; width: auto; padding: 6rem var(--gut) 2rem; gap: 3rem; }
html:not(.gl) .stage { grid-area: auto; opacity: 1; transform: none; }
html:not(.gl) .story-fallback { position: relative; inset: auto; padding: 0 var(--gut) 6rem; }
html:not(.gl) .story-tb, html:not(.gl) .ruler { display: none; }
.story-tb { position: absolute; right: clamp(28px, 4vw, 60px); bottom: clamp(28px, 5vh, 56px); }
.ruler { position: absolute; left: 24px; top: 14vh; bottom: 14vh; width: 8px; border-left: 1px solid var(--rule-2); background: repeating-linear-gradient(var(--rule-2) 0 1px, transparent 1px 5%); background-size: 6px 100%; background-repeat: no-repeat; }
.ruler i { position: absolute; left: -1px; top: 0; width: 1px; height: 100%; background: var(--ink); transform-origin: top; transform: scaleY(0); }
.dimlabels span { position: absolute; left: 0; top: 0; font-size: .82rem; background: var(--film); padding: 0 .3rem; color: var(--line); pointer-events: none; transition: opacity .3s; opacity: 0; }
.callouts .co { position: absolute; left: 0; top: 0; margin-top: -20px; padding-left: 30px; font-size: .86rem; line-height: 1; white-space: nowrap; color: var(--ink); pointer-events: none; opacity: 0; transition: opacity .35s; }
.callouts .co i { position: absolute; left: 0; top: 20px; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border: 1px solid var(--ink); background: var(--film); border-radius: 50%; }
.callouts .co::before { content: ''; position: absolute; left: 0; top: 20px; width: 30px; height: 1px; background: var(--ink); transform-origin: left; transform: rotate(-34deg); }
.callouts .co.left { padding-left: 0; padding-right: 30px; translate: -100% 0; }
.callouts .co.left i { left: auto; right: 0; margin: -3.5px -3.5px 0 0; }
.callouts .co.left::before { left: auto; right: 0; transform-origin: right; transform: rotate(34deg); }

/* ---------- sheets (the collection) ---------- */
.sheets { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.sheet { grid-column: span 4; display: grid; grid-template-rows: 1fr auto; background: var(--paper); border: 1px solid var(--rule-2); text-decoration: none; min-height: 400px; transition: border-color .3s; }
.sheet.big { grid-column: span 6; min-height: 460px; }
.sheets-4 .sheet { grid-column: span 3; min-height: 340px; }
.sheets-3 .sheet { grid-column: span 4; }
.sheet:hover { border-color: var(--ink); }
.sheet-view { position: relative; display: grid; place-items: center; padding: 1.6rem; overflow: hidden; }
.sheet-view .elev { width: 100%; max-height: 250px; transition: opacity .5s ease, transform .8s var(--ease); }
.sheet-photo { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.sheet-photo img { transform: scale(1.04); transition: transform 1.2s var(--ease); }
.sheet:hover .sheet-photo { opacity: 1; }
.sheet:hover .sheet-photo img { transform: none; }
.sheet-tb { display: grid; grid-template-columns: 1.6fr .8fr 1.1fr; border-top: 1px solid var(--ink); font-size: .86rem; }
.sheet-tb > div { padding: .65rem .8rem; border-right: 1px solid var(--rule); display: grid; align-content: start; gap: .1rem; }
.sheet-tb > div:last-child { border-right: 0; }
.sheet-tb span { color: var(--line); }
.st-name b { font: 400 1.45rem/1.1 var(--serif); letter-spacing: -.02em; }

/* drawings */
.elev .ln { fill: none; stroke: var(--ink); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.elev .thin { stroke-width: .7; stroke: var(--line); }
.elev .glow { stroke: var(--oak); }
.elev .dim { fill: none; stroke: var(--line); stroke-width: .8; vector-effect: non-scaling-stroke; }
.elev .dim-t { font-size: var(--fs); fill: var(--line); font-family: var(--sans); }
.elev .fig polygon { fill: rgba(78, 106, 124, .12); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.elev.redraw { animation: wipe .9s var(--ease) both; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.board { background: var(--paper); border: 1px solid var(--ink); padding: clamp(1rem, 3vw, 2.4rem); }
.board .elev { width: 100%; }

/* ---------- tables: schedules and revisions ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--ink); background: rgba(227, 232, 235, .6); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .85rem 1rem; border-bottom: 1px solid var(--rule); }
thead th { font-weight: 400; font-size: .84rem; color: var(--line); border-bottom: 1px solid var(--ink); white-space: nowrap; }
tbody th { font: 400 1.15rem/1.3 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
tbody th a, td a { text-decoration: none; }
tbody th a:hover, td a:hover { text-decoration: underline; }
tbody tr:last-child > * { border-bottom: 0; }
.sched td { white-space: nowrap; }
.revs td.rev { font: 400 1.4rem/1.2 var(--serif); width: 4rem; }
.revs tbody th { width: 17rem; }
.yes { display: inline-block; width: 10px; height: 10px; background: var(--ink); }
.no { display: inline-block; width: 10px; height: 1px; background: var(--rule-2); vertical-align: middle; }

/* ---------- materials ---------- */
.mat { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.mat-img { aspect-ratio: 3 / 2; border: 1px solid var(--rule-2); }
.legend { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; border-top: 1px solid var(--ink); }
.legend li { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--rule); align-items: center; }
.legend svg { width: 40px; height: 40px; }
.legend b { font-weight: 500; display: block; }
.legend span { color: var(--line); font-size: .95rem; }

.pano { position: relative; height: 88svh; overflow: hidden; display: flex; align-items: flex-end; }
.pano-img { position: absolute; inset: 0; }
.pano::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(19, 34, 44, .72), rgba(19, 34, 44, 0) 55%); }
.pano-cap { position: relative; z-index: 2; color: var(--film); padding-bottom: clamp(2.5rem, 7vh, 5rem); display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; width: 100%; }
.pano-cap h2 { max-width: 20ch; }

/* ---------- notes (FAQ) ---------- */
.notes { border-top: 1px solid var(--ink); }
.notes details { border-bottom: 1px solid var(--rule); }
.notes summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1.1rem 0; font: 400 1.25rem/1.3 var(--serif); letter-spacing: -.01em; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after { content: ''; width: 12px; height: 12px; margin-top: .45rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: rotate(45deg); transition: transform .3s var(--ease); }
.notes details[open] summary::after { transform: rotate(-135deg); }
.notes .a { padding: 0 0 1.4rem; max-width: 60ch; color: color-mix(in srgb, var(--ink) 82%, var(--film)); }

/* ---------- CTA ---------- */
.cta { background: var(--ink); color: var(--film); padding: clamp(5rem, 10vw, 8rem) 0; }
.cta-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2.5rem 4rem; align-items: end; }
.cta h2 { font-size: clamp(2.4rem, 5vw, 4.6rem); max-width: 16ch; }
.cta-side { display: grid; gap: 1.6rem; border-top: 1px solid rgba(201, 210, 216, .4); padding-top: 1.4rem; }
.cta .tlink { text-decoration-color: rgba(201, 210, 216, .4); }

/* ---------- page head ---------- */
.phead { position: relative; padding: clamp(8.5rem, 16vw, 11rem) 0 clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--rule); }
.phead-in { display: grid; grid-template-columns: minmax(0, 1.5fr) auto; gap: 2.5rem; align-items: end; }
.phead-copy { display: grid; gap: 1.3rem; }
.phead h1 { font-size: clamp(2.6rem, 5.4vw, 5.4rem); max-width: 16ch; }
.phead.has-img { min-height: 86svh; display: flex; align-items: flex-end; color: var(--film); background: none; }
.phead-img { position: absolute; inset: 0; }
.phead.has-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(19, 34, 44, .92), rgba(19, 34, 44, .72) 50%, rgba(19, 34, 44, .1) 85%); }
.phead.has-img .phead-in { text-shadow: 0 1px 12px rgba(19, 34, 44, .5); }
.phead.has-img .phead-in { position: relative; z-index: 2; width: 100%; }
.phead.has-img .crumbs { color: var(--film); }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .88rem; color: var(--line); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- design page ---------- */
.dhero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); min-height: 100svh; border-bottom: 1px solid var(--rule); }
.dhero-img { position: relative; }
.dhero-img picture { position: absolute; inset: 0; }
.dhero-copy { padding: clamp(7.5rem, 13vw, 10rem) var(--gut) 3rem clamp(2rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: flex-end; gap: 1.2rem; }
.dhero-copy h1 { font-size: clamp(3.6rem, 7.4vw, 7rem); }
.dhero-type { font-size: 1.05rem; color: var(--line); }
.dhero-line { font: 400 clamp(1.35rem, 1.9vw, 1.8rem)/1.25 var(--serif); letter-spacing: -.01em; max-width: 26ch; }
.dhero-tb { margin-top: 1rem; min-width: 0; }
.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.feat-img { aspect-ratio: 3 / 2; border: 1px solid var(--rule-2); position: sticky; top: 110px; }
.keyed { display: grid; border-top: 1px solid var(--ink); margin-top: 1.8rem; }
.keyed div { display: grid; grid-template-columns: minmax(9rem, .7fr) 1fr; gap: 1.2rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.keyed dt { font-weight: 500; }
.keyed dd { color: color-mix(in srgb, var(--ink) 80%, var(--film)); }
.keyed-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 0; margin-top: 0; gap: 0; }
.keyed-5 div { grid-template-columns: 1fr; gap: .5rem; border-top: 1px solid var(--ink); border-bottom: 0; padding: 1rem 1.2rem 0 0; }
.studio { aspect-ratio: 4 / 5; border: 1px solid var(--rule-2); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { display: inline-block; padding: .5rem .85rem; border: 1px solid var(--rule-2); text-decoration: none; font-size: .95rem; transition: background .2s, color .2s; }
.chips a:hover { background: var(--ink); color: var(--film); }
.caution { border: 1px solid var(--ink); padding: 1.4rem; display: grid; gap: .6rem; align-self: start; }

/* viewer */
.viewer { border: 1px solid var(--ink); background: var(--film); display: grid; grid-template-columns: 1fr; }
.viewer-stage { position: relative; height: min(68vh, 640px); overflow: hidden; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.viewer-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; opacity: 0; transition: opacity .8s ease; touch-action: pan-y; }
.viewer-stage canvas:active { cursor: grabbing; }
.viewer.gl-on canvas { opacity: 1; }
.viewer-fallback { position: absolute; inset: 8%; display: grid; place-items: center; }
html.gl .viewer-fallback { display: none; }
.viewer-hint { position: absolute; left: 1rem; bottom: .8rem; font-size: .84rem; color: var(--line); }
html:not(.gl) .viewer-hint, html:not(.gl) .viewer-bar .seg, html:not(.gl) [data-explode] { display: none; }
.viewer-bar { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; padding: .9rem 1rem; border-top: 1px solid var(--ink); background: var(--paper); }
.seg { display: inline-flex; border: 1px solid var(--ink); margin: 0; padding: 0; }
.seg button, .seg-one, .seg label span { font: 500 .9rem/1 var(--sans); background: none; border: 0; padding: .6rem .85rem; cursor: pointer; color: var(--ink); display: block; }
.seg button + button, .seg label + label span { border-left: 1px solid var(--rule-2); }
.seg button[aria-pressed="true"], .seg input:checked + span { background: var(--ink); color: var(--film); }
.seg-one { border: 1px solid var(--ink); }
.seg-one[aria-pressed="true"] { background: var(--ink); color: var(--film); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; left: 0; top: 0; }
.seg label { position: relative; }
.dogpick { display: flex; align-items: center; gap: .6rem; margin-left: auto; font-size: .9rem; color: var(--line); }
select, input, textarea { font: 400 1rem/1.4 var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule-2); padding: .45rem 0; width: 100%; min-width: 0; border-radius: 0; }
select { appearance: none; padding-right: 1.4rem; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
.dogpick select { width: auto; min-width: 13rem; }
.viewer-tb { border: 0; border-top: 1px solid var(--ink); grid-template-columns: repeat(3, auto 1fr); min-width: 0; }
.viewer-tb dt, .viewer-tb dd { border-bottom: 0; }

/* sizing */
.sizer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.sizer-form { display: grid; gap: 1.2rem; }
.sizer-form label { display: grid; gap: .35rem; font-size: .86rem; color: var(--line); }
.sizer-form .seg { flex-wrap: wrap; }
.sizer-form .seg label { display: block; color: var(--ink); }
.sizer-out { display: grid; gap: 1.2rem; }
.sizer-tb { min-width: 0; }

/* quote */
.qgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); background: rgba(227, 232, 235, .6); }
.qgrid > label, .qgo { display: grid; gap: .35rem; padding: .9rem 1rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: .84rem; color: var(--line); }
.qgrid .q2 { grid-column: span 2; }
.qgrid .q3 { grid-column: span 1; }
.qgrid .q4 { grid-column: 1 / -1; }
.qgo { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-bottom: 0; color: var(--ink); font-size: .95rem; }
.form-status { max-width: 36rem; }

/* ---------- footer ---------- */
.foot { padding: clamp(4rem, 8vw, 6rem) 0 3rem; border-top: 1px solid var(--ink); }
.foot-sheet { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 2.5rem; padding-bottom: 3rem; }
.fs-brand { display: grid; gap: 1rem; align-content: start; }
.fs-brand p { color: var(--line); max-width: 34ch; }
.fs-col { display: grid; gap: .5rem; align-content: start; }
.fs-col a { text-decoration: none; }
.fs-col a:hover { text-decoration: underline; }
.foot-tb { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); font-size: .9rem; }
.foot-tb div { padding: .75rem 1rem; border-right: 1px solid var(--rule); display: grid; gap: .1rem; }
.foot-tb div:last-child { border-right: 0; }
.callbar { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .trace path { stroke-dashoffset: 0; opacity: .28; }
  .trace text { opacity: .28; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .sheets-4 .sheet { grid-column: span 6; }
  .keyed-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 0; }
  .viewer-tb { grid-template-columns: auto 1fr; }
  .viewer-tb dt, .viewer-tb dd { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 900px) {
  .top { gap: 1rem; }
  .top nav { position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 1rem; padding: 0 var(--gut); background: var(--film); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; margin: 0; }
  .top nav.open { opacity: 1; visibility: visible; }
  .top nav a { font: 400 2.2rem/1.15 var(--serif); }
  .top .nav-quote { display: block; }
  .menu { display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--ink); color: var(--ink); padding: .55rem .9rem; font: 500 .9rem var(--sans); cursor: pointer; }
  .top-cta { display: none; }
  .hero-tb { display: none; }
  .hero-copy { right: var(--gut); left: var(--gut); top: 96px; gap: 1rem; }
  .hero-copy h1 { font-size: clamp(2.4rem, 10.5vw, 3.2rem); }
  .hero-copy p { max-width: none; font-size: 1rem; }
  .hero .trace { display: none; }
  .two, .mat, .feat, .cta-in, .phead-in, .dhero, .sizer { grid-template-columns: minmax(0, 1fr); }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head p { justify-self: start; }
  .facts { grid-template-columns: 1fr; }
  .facts div, .facts div + div { padding: 1rem 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .sheets .sheet, .sheets .sheet.big, .sheets-4 .sheet, .sheets-3 .sheet { grid-column: 1 / -1; min-height: 0; }
  .sheet-view { display: block; padding: 0; }
  .sheet-photo { position: relative; opacity: 1; aspect-ratio: 4 / 3; }
  .sheet-photo img { transform: none; }
  .sheet-view .elev { position: absolute; right: 10px; bottom: 10px; width: 38%; max-height: 110px; background: rgba(227, 232, 235, .9); border: 1px solid var(--rule-2); padding: 4px; }
  .dhero { min-height: 0; }
  .dhero-img { aspect-ratio: 4 / 3; }
  .dhero-copy { padding: 2rem var(--gut) 3rem; }
  .feat-img { position: relative; top: auto; }
  .keyed div { grid-template-columns: 1fr; gap: .25rem; }
  .keyed-5 { grid-template-columns: 1fr; }
  .phead-tb { min-width: 0; }
  .pano-cap { flex-direction: column; align-items: flex-start; }
  .foot-sheet { grid-template-columns: 1fr 1fr; }
  .fs-brand { grid-column: 1 / -1; }
  .foot-tb { grid-template-columns: 1fr 1fr; }
  .foot-tb div:nth-child(2) { border-right: 0; }
  .foot-tb div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .qgrid { grid-template-columns: 1fr 1fr; }
  .qgrid .q2, .qgrid .q3 { grid-column: 1 / -1; }
  .viewer-stage { height: 62vh; }
  .dogpick { margin-left: 0; width: 100%; }
  .dogpick select { flex: 1; min-width: 0; }
  .story { height: 420vh; }
  .story-copy { top: 84px; transform: none; left: var(--gut); right: var(--gut); width: auto; }
  .stage { gap: .5rem; }
  .stage h2 { font-size: 2rem; }
  .stage p:last-child { font-size: .95rem; }
  .story-tb { left: var(--gut); right: var(--gut); bottom: 84px; font-size: .8rem; }
  .ruler { display: none; }
  .story .callouts { display: none; }
  .sheets-swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut) .5rem; scrollbar-width: none; }
  .sheets-swipe::-webkit-scrollbar { display: none; }
  .band-grid .sched tbody tr:nth-child(n+6) { display: none; }
  .pano { height: 62svh; }
  .band { padding: 4.2rem 0; }
  .sheets-swipe .sheet, .sheets-swipe .sheet.big { flex: 0 0 82%; scroll-snap-align: center; }
  .hero-copy .tlink { display: none; }
}

@media (max-width: 760px) {
  body { padding-bottom: 66px; }
  .sheet-frame { inset: 6px; }
  .top { inset: 6px 6px auto; padding: 10px 14px; }
  .brand { font-size: 1.3rem; }
  .callbar { display: grid; grid-template-columns: 1.5fr .8fr 1.1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 65; padding: 8px; background: var(--film); border-top: 1px solid var(--ink); }
  .tblock { min-width: 0; }
  .revs tbody th { width: auto; white-space: normal; }
  .revs thead { display: none; }
  .revs tr { display: grid; grid-template-columns: 3rem 1fr; border-bottom: 1px solid var(--rule); }
  .revs td, .revs th { border: 0; padding: .6rem .8rem; }
  .revs td:last-child { grid-column: 2; padding-top: 0; }
  .viewer-bar .seg button { padding: .55rem .6rem; }
  .qgo { flex-direction: column; align-items: flex-start; }
}

/* ---------- home: builder band ---------- */
.band-ink { background: var(--ink); color: var(--film); }
.bband { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; }
.bband h2 { font-size: clamp(2.6rem, 5.4vw, 5rem); }
.bband-side { display: grid; gap: 1.4rem; justify-items: start; border-top: 1px solid rgba(201, 210, 216, .4); padding-top: 1.2rem; }

/* ---------- builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); min-height: 100svh; border-bottom: 1px solid var(--ink); }
.b-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; border-right: 1px solid var(--ink); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.b-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; opacity: 0; transition: opacity .6s ease; }
.b-stage.gl-on canvas { opacity: 1; }
.b-stage canvas:active { cursor: grabbing; }
.b-tools { position: absolute; left: 24px; bottom: 24px; display: flex; flex-wrap: wrap; gap: .6rem; background: rgba(227, 232, 235, .88); padding: .6rem; border: 1px solid var(--ink); }
.b-tools-2 { left: auto; right: 24px; }
.b-dims { position: absolute; left: 24px; top: 96px; font-size: .9rem; background: rgba(227, 232, 235, .88); border: 1px solid var(--ink); padding: .5rem .75rem; }
.b-dims b { font-weight: 500; }
.b-nogl { display: none; position: absolute; inset: 30% 10% auto; text-align: center; }
.builder.no-gl .b-nogl { display: block; }
.builder.no-gl .b-tools { display: none; }
.seg-one:disabled { opacity: .35; cursor: default; }
.b-panel { padding: 96px 24px 3rem; display: grid; gap: 0; align-content: start; min-width: 0; grid-template-columns: minmax(0, 1fr); background: var(--film); }
.b-head { display: grid; gap: .8rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--ink); }
.b-head h1 { font-size: clamp(2.1rem, 3vw, 2.9rem); }
.b-head p { color: color-mix(in srgb, var(--ink) 80%, var(--film)); }
.b-sec { border-bottom: 1px solid var(--rule); }
.b-sec summary { list-style: none; cursor: pointer; padding: 1rem 0; font: 400 1.35rem/1.2 var(--serif); display: flex; justify-content: space-between; align-items: center; }
.b-sec summary::-webkit-details-marker { display: none; }
.b-sec summary::after { content: ''; width: 10px; height: 10px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: rotate(45deg); margin-top: -4px; transition: transform .3s var(--ease); }
.b-sec[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.b-sec > div { padding: 0 0 1.4rem; display: grid; gap: .8rem; }
.b-sec .k { margin-top: .3rem; }
.b-sec .seg { flex-wrap: wrap; width: fit-content; max-width: 100%; }
.presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.preset { text-align: left; background: var(--paper); border: 1px solid var(--rule-2); padding: .7rem .8rem; cursor: pointer; display: grid; gap: .15rem; font: inherit; color: var(--ink); transition: border-color .2s, background .2s; }
.preset b { font: 400 1.1rem/1.15 var(--serif); }
.preset span { font-size: .82rem; color: var(--line); line-height: 1.3; }
.preset:hover { border-color: var(--ink); }
.preset[aria-pressed="true"] { background: var(--ink); color: var(--film); border-color: var(--ink); }
.preset[aria-pressed="true"] span { color: var(--film); opacity: .75; }
.fld { display: grid; gap: .3rem; font-size: .84rem; color: var(--line); }
.fld.rng input { padding: 0; border: 0; accent-color: var(--ink); }
.two-f { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tgl { display: flex; gap: .6rem; align-items: center; font-size: .95rem; cursor: pointer; }
.tgl input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.mods { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mods li { background: var(--paper); border: 1px solid var(--rule-2); padding: .7rem .8rem; display: grid; gap: .6rem; }
.mod-top { display: flex; gap: .6rem; align-items: center; }
.mod-top select { font: 400 1.1rem var(--serif); flex: 1; }
.mod-act { display: flex; gap: 4px; }
.mod-act button { font: 500 .8rem var(--sans); border: 1px solid var(--rule-2); background: var(--film); padding: .35rem .55rem; cursor: pointer; color: var(--ink); }
.mod-act button:disabled { opacity: .35; cursor: default; }
.mod-opts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; align-items: center; }
.adds { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-tabs { display: flex; flex-wrap: wrap; border: 1px solid var(--ink); width: fit-content; }
.slot-tabs button { display: flex; align-items: center; gap: .45rem; font: 500 .9rem var(--sans); padding: .5rem .75rem; border: 0; background: none; cursor: pointer; color: var(--ink); }
.slot-tabs button + button { border-left: 1px solid var(--rule-2); }
.slot-tabs button[aria-selected="true"] { background: var(--ink); color: var(--film); }
.slot-tabs i { width: 16px; height: 16px; background-size: cover; border: 1px solid rgba(19, 34, 44, .4); }
.cur b { font-weight: 500; }
.cur span { color: var(--line); font-size: .88rem; }
.filters { display: grid; gap: 8px; }
.fsearch { border: 1px solid var(--rule-2); padding: .55rem .7rem; background: var(--paper); }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: 420px; overflow-y: auto; padding: 2px; }
.sw { border: 1px solid var(--rule); background: var(--paper); padding: 0; cursor: pointer; display: grid; text-align: left; color: var(--ink); }
.sw img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.sw span { font-size: .72rem; line-height: 1.2; padding: .3rem .35rem .4rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sw:hover { border-color: var(--ink); }
.sw[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.fabrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fab { border: 1px solid var(--rule); background: var(--paper); padding: .4rem; cursor: pointer; display: grid; gap: .3rem; font: 400 .75rem var(--sans); color: var(--ink); text-align: left; }
.fab i { display: block; height: 30px; border: 1px solid rgba(19, 34, 44, .25); }
.fab[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.b-out { display: grid; gap: 1rem; padding-top: 1.6rem; }
.b-spec { min-width: 0; font-size: .84rem; }
.linkbtn { background: none; border: 0; padding: 0; font: 500 .92rem var(--sans); color: var(--ink); cursor: pointer; }
.builder .callouts .co { z-index: 4; }

@media (max-width: 900px) {
  .bband { grid-template-columns: 1fr; }
  .builder { grid-template-columns: minmax(0, 1fr); }
  .b-stage { top: 52px; height: 46svh; z-index: 5; border-right: 0; border-bottom: 1px solid var(--ink); }
  .b-tools { left: 8px; right: 8px; bottom: 8px; padding: .4rem; gap: .4rem; }
  .b-tools .seg button, .b-tools .seg-one { padding: .45rem .55rem; font-size: .82rem; }
  .b-tools-2 { display: none; }
  .b-dims { top: 8px; left: 8px; font-size: .8rem; }
  .b-panel { padding: 1.4rem var(--gut) 3rem; }
  .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; }
  .builder .callouts { display: none; }
}

.sw span em { display: block; font-style: normal; color: var(--line); font-size: .66rem; margin-top: .1rem; }
.b-stage { background-color: var(--film); }

/* ---------- builder preset cards with photos ---------- */
.preset.has-img { grid-template-columns: 52px 1fr; grid-template-rows: auto 1fr; column-gap: .7rem; align-items: start; }
.preset.has-img img { grid-row: 1 / 3; width: 52px; height: 64px; object-fit: cover; border: 1px solid var(--rule); }

/* header over a dark page photo: light type until the bar fills in */
.top.on-img:not(.scrolled) { color: var(--film); background: rgba(19, 34, 44, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-color: rgba(201, 210, 216, .18); }
.top.on-img:not(.scrolled) .menu { color: var(--film); border-color: var(--film); }
.nav-open .top.on-img { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--ink); }
.nav-open .top.on-img .menu { color: var(--ink); border-color: var(--ink); }

/* spam trap, off screen for people */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.b-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; position: relative; }
.b-contact .b-wide { grid-column: 1 / -1; }
.b-contact input, .b-contact textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-2); padding: .55rem .65rem; width: 100%; }
.b-contact textarea { resize: vertical; }
.b-status:empty { display: none; }

.cta-contact { font-size: .98rem; }
.cta-contact a { color: inherit; text-underline-offset: .2em; white-space: nowrap; }
.phead-tb a { color: inherit; text-underline-offset: .2em; }
/* menu links stay on one line on small laptops */
.top nav a { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1200px) { .top { gap: 1.2rem; } .top nav { gap: 1rem; font-size: .88rem; } }

/* ---------- furniture-type pages ---------- */
.ucards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ucard { display: grid; grid-template-rows: auto 1fr; text-decoration: none; background: var(--paper); border: 1px solid var(--rule-2); transition: border-color .3s; }
.ucard:hover { border-color: var(--ink); }
.ucard-img { aspect-ratio: 4 / 5; overflow: hidden; border-bottom: 1px solid var(--ink); }
.ucard-img img { transition: transform 1.2s var(--ease); }
.ucard:hover .ucard-img img { transform: scale(1.03); }
.ucard-body { padding: .9rem 1rem 1.1rem; display: grid; gap: .35rem; align-content: start; }
.ucard h3 { font: 400 1.45rem/1.1 var(--serif); letter-spacing: -.02em; }
.ucard-body p { color: color-mix(in srgb, var(--ink) 80%, var(--film)); font-size: .95rem; }
@media (max-width: 900px) { .ucards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .ucard h3 { font-size: 1.2rem; } .ucard-body p { font-size: .88rem; } }
