/* Grafoline / gerivirtuvesbaldai.lt
   Flat fronts: square-cornered photographs, flat buttons and colour fields. The milled grip of a
   handleless front survives only where furniture is drawn (the planner). */

:root {
  --bg: #ffffff;
  --surface: #f0f0ed;
  --pale: #dfe8e6;
  --ink: #0e1111;
  --muted: #566060;
  --accent: #4b7574;          /* the green-grey of the painted MDF fronts in their latest kitchen */
  --accent-deep: #3a5f5e;
  --accent-ink: #ffffff;
  --field: #0e1111;
  --field-ink: #ffffff;

  --oak: #b98b5e;
  --walnut: #6d5644;
  --hpl: #d6d8d4;

 
  --font: "Chillax", ui-sans-serif, system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.125rem, 1.05rem + 0.2vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 0.9rem + 1.4vw, 2.25rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.25rem, 6.4vw, 6.25rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(5rem, 8.5vw, 8rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); font-weight: 400; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; overflow-wrap: break-word; }
@supports (overflow: clip) { body { overflow-x: clip; } }
h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 5rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.on-dark :focus-visible, .field-dark :focus-visible { outline-color: var(--pale); }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
p { max-width: 62ch; text-wrap: pretty; }
p + p { margin-top: 0.9em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.head { font-size: var(--step-head); }
.lead { font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.02em; }
.small { font-size: var(--step-small); line-height: 1.45; }
.muted { color: var(--muted); }
.nums { font-variant-numeric: tabular-nums; }

/* ---------- picture frames ---------- */
.front { position: relative; overflow: hidden; }
.front img { width: 100%; height: 100%; object-fit: cover; }

.button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 3.5rem; padding: 0 1.7rem; background: var(--accent); color: var(--accent-ink);
  font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button--ink { background: var(--ink); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-deep); }
  .button--ink:hover { background: #283030; }
}
.bullet { display: inline-block; width: 0.7em; height: 0.7em; background: var(--accent); position: relative; flex: none; }

.link { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.22em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }

/* ---------- header ---------- */
.site-head { position: absolute; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem var(--margin); }
.mark { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: var(--step-lead); letter-spacing: -0.03em; text-decoration: none; line-height: 1; }
.mark .bullet { width: 0.78em; height: 0.78em; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.25rem); color: var(--accent-ink); }
.nav a:not(.button) { text-decoration: none; font-weight: 500; position: relative; }
.nav a:not(.button)::before { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--t-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav a:not(.button):hover::before { transform: scaleX(1); } }
.nav .button { background: var(--bg); color: var(--ink); min-height: 3rem; padding-inline: 1.3rem; }
@media (hover: hover) and (pointer: fine) { .nav .button:hover { background: var(--pale); } }
.menu-toggle { display: none; font-weight: 500; padding: 0.6rem 0; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: max(640px, 100svh); display: grid; align-items: center; isolation: isolate; overflow: hidden; }
.hero-copy { position: relative; z-index: 3; width: min(46vw, 44rem); padding: 7rem 0 4rem; margin-left: var(--margin); }
.hero h1 { font-size: var(--step-display); line-height: 0.98; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero h1 [data-line] { display: block; }
.hero-text { margin-top: 2.25rem; max-width: 34ch; font-size: var(--step-body); }
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; }
.hero-actions .link { font-weight: 500; }
.door { position: absolute; z-index: 1; top: 0; bottom: -12vh; left: 46%; right: -8vw; background: var(--accent); }
.door-glass { position: absolute; top: 6.5rem; bottom: calc(12vh + 3.5vw); left: 4.5vw; right: calc(8vw + 3.5vw); }
.door-glass img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.door-glass figcaption { position: absolute; left: 0; bottom: -2.4rem; color: var(--accent-ink); font-size: var(--step-small); }

/* ---------- intro: what we make, room by room ---------- */
.intro { padding: var(--section) var(--margin); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.intro-text { grid-column: 1 / 7; }
.intro-text h2 { font-size: var(--step-head); }
.intro-text p { margin-top: 1.5rem; max-width: 44ch; }
.room-index { margin-top: 2.5rem; display: grid; }
.room-index a { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding: 0.5rem 0; text-decoration: none; }
.room-index .name { font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; transition: color var(--t-hover) ease, transform var(--t-ui) var(--ease-out); }
.room-index .count { color: var(--muted); font-size: var(--step-small); white-space: nowrap; font-variant-numeric: tabular-nums; transition: color var(--t-hover) ease; }
.room-index a.is-on .name { color: var(--accent); transform: translateX(0.4em); }
.room-index a.is-on .count { color: var(--accent-deep); }
.intro-photo { grid-column: 8 / 13; position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface); }
.intro-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.05); transition: opacity 500ms var(--ease-out), transform 1400ms var(--ease-soft); }
.intro-photo img.is-on { opacity: 1; transform: none; }
.intro-photo figcaption { position: absolute; left: 1rem; bottom: 1rem; z-index: 2; background: var(--bg); padding: 0.3rem 0.6rem 0.2rem; font-size: var(--step-small); }

/* ---------- showcase: kitchen styles ---------- */
.showcase { background: var(--surface); min-height: 88svh; display: grid; grid-template-columns: 1fr 1fr; }
.plate { display: grid; place-items: center; padding: clamp(2.5rem, 5vw, 5rem) 2.5rem; }
.plate .front { width: min(100%, 78svh); aspect-ratio: 1; }
.plate .front img { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms var(--ease-out), transform 1400ms var(--ease-soft); transform: scale(1.04); }
.plate .front img.is-on { opacity: 1; transform: none; }
.styles { display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; padding: clamp(2.5rem, 5vw, 5rem) var(--margin) clamp(2.5rem, 5vw, 5rem) 2.5rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; }
.tabs button { color: var(--muted); font-weight: 500; padding: 0.35rem 0; position: relative; transition: color var(--t-hover) ease; }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--t-ui) var(--ease-out); }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .tabs button:hover { color: var(--ink); } }
.style-panel h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; }
.style-panel p { margin-top: 1.75rem; max-width: 38ch; }
.style-panel + .style-panel { margin-top: 3rem; }
.js .style-panel[hidden] { display: none; }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cell { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; padding: 0 1.4rem; font-weight: 500; text-decoration: none; position: relative; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.cell:active { transform: scale(0.98); }
.cell--ink { background: var(--ink); color: #fff; }
.cell--tone { background: #e2e2dd; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .cell--ink:hover { background: var(--accent); } .cell--tone:hover { background: #d6d6d0; } }

/* ---------- planner band ---------- */
.planner { background: var(--field); color: var(--field-ink); padding: var(--section) var(--margin); }
.planner-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; row-gap: 1.5rem; }
.planner-head h2 { grid-column: 1 / 7; font-size: var(--step-head); }
.planner-head p { grid-column: 8 / 13; color: #d7dddc; }
.controls { margin-top: clamp(3rem, 6vw, 5rem); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1.75rem; align-items: end; }
.control { border: 0; padding: 0; margin: 0; min-width: 0; }
.control legend, .control > label { display: block; margin-bottom: 0.8rem; color: #c9d1d0; font-size: var(--step-small); padding: 0; }
.control--layout { grid-column: 1 / 6; }
.control--length { grid-column: 6 / 10; }
.control--finish { grid-column: 10 / 13; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 0.75rem 1rem 0.65rem; background: #1f2525; color: #fff; font-weight: 500; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.seg input:checked + span { background: var(--pale); color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid var(--pale); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .seg label:hover span { background: #2c3434; } .seg input:checked + span { background: var(--pale); } }
.range-row { display: flex; align-items: center; gap: 1rem; }
.range-row output { min-width: 5.5ch; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 2.75rem; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: #2c3434; }
input[type="range"]::-moz-range-track { height: 6px; background: #2c3434; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; background: var(--pale); border: 0; border-radius: 0; }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; background: var(--pale); border: 0; border-radius: 0; }
.second[hidden] { display: none; }
.plan-stage { margin-top: clamp(2.5rem, 4vw, 3.5rem); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2.5rem; align-items: start; }
.wall { grid-column: 1 / 9; display: grid; place-items: center start; min-height: 20rem; }
.wall svg { width: 100%; height: auto; max-height: 54vh; overflow: visible; }
.plan-side { grid-column: 9 / 13; display: grid; gap: 2rem; align-content: start; }
.wall svg .f { transform-box: fill-box; transform-origin: 50% 100%; }
.js .wall svg .f { animation: front-in 520ms var(--ease-out) both; animation-delay: calc(var(--i) * 22ms); }
@keyframes front-in { from { opacity: 0; transform: scaleY(0.6); } }
.zones { display: grid; gap: 1.1rem; }
.zones li { display: grid; grid-template-columns: 1.1rem 1fr auto; column-gap: 1rem; align-items: baseline; }
.zones li::before { content: ""; width: 1.1rem; height: 1.1rem; background: var(--tone); align-self: start; translate: 0 0.2rem; }
.zones b { grid-column: 2; font-weight: 600; line-height: 1.25; }
.zones .cm { grid-column: 3; grid-row: 1; font-weight: 600; color: var(--pale); font-variant-numeric: tabular-nums; }
.zones .what { grid-column: 2 / 4; color: #d7dddc; font-size: var(--step-small); }
.totals { line-height: 1.4; color: #d7dddc; max-width: none; }
.totals b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.planner .button { justify-self: start; background: var(--pale); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .planner .button:hover { background: #fff; } }

/* ---------- materials: specimens on tiles ---------- */
.materials { padding: var(--section) var(--margin) 0; }
.materials-intro { grid-column: 1 / 5; align-self: start; }
.materials-intro h2 { font-size: var(--step-head); }
.materials-intro p { margin-top: 1.5rem; max-width: 30ch; }
.tiles { grid-column: 5 / 13; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; row-gap: 2rem; }
.tile-wrap:nth-child(2) { grid-column: span 2; }
.tile { aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--surface); }
.tile-wrap:nth-child(2) .tile { aspect-ratio: 8 / 5; }
.tile.t-pale { background: var(--pale); }
.tile.t-dark { background: var(--field); }
.chip { width: 72%; aspect-ratio: 1; transition: transform 500ms var(--ease-out); }
.tile-wrap:nth-child(2) .chip { width: 36%; }
.chip img { transform: scale(var(--z, 1.6)); transform-origin: var(--o, 50% 50%); object-position: var(--o, 50% 50%); }
@media (hover: hover) and (pointer: fine) { .tile-wrap:hover .chip { transform: translateY(-6px); } }
.tile-wrap h3 { margin-top: 0.9rem; font-size: var(--step-body); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.tile-wrap p { margin-top: 0.2rem; max-width: 32ch; }

/* ---------- fittings list ---------- */
.fittings { padding: var(--section) var(--margin) 0; }
.cat + .cat { margin-top: 6rem; }
.cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2.5rem; }
.cat-head h2 { font-size: var(--step-lead); letter-spacing: -0.02em; }
.cat-head span { color: var(--muted); }
.items { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4rem; row-gap: 2.25rem; }
.item { display: grid; grid-template-columns: 64px 1fr; column-gap: 1.25rem; align-items: start; }
.item .front { width: 64px; height: 64px; }
.item .front img { transform: scale(var(--z, 2.2)); transform-origin: var(--o, 50% 50%); object-position: var(--o, 50% 50%); }
.item-line { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.item h3 { font-size: var(--step-body); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.item .note { white-space: nowrap; font-size: var(--step-small); color: var(--muted); }
.item p { margin-top: 0.2rem; max-width: 42ch; }
.cat-foot { margin-top: 2.25rem; color: var(--accent-deep); font-weight: 500; }

/* ---------- rooms: stacked folders ---------- */
.rooms { padding-top: var(--section); }
.rooms > h2 { padding-inline: var(--margin); font-size: var(--step-head); margin-bottom: 3rem; }
.band { --tab-h: 64px; position: sticky; top: calc(var(--k) * var(--tab-h)); background: var(--band, var(--surface)); color: var(--band-ink, var(--ink)); }
.band-head { height: var(--tab-h); display: flex; align-items: center; justify-content: space-between; padding-right: var(--margin); }
.band-tab { height: 100%; display: flex; align-items: center; min-width: min(26rem, 46vw); padding: 0.25rem var(--margin) 0; background: var(--tab, var(--accent)); color: var(--tab-ink, #fff); }
.band-tab h3 { font-size: var(--step-body); font-weight: 600; letter-spacing: -0.01em; }
.band-cat { font-size: var(--step-small); }
.band-body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: 2rem var(--margin) 2.75rem; }
.band-body .front { grid-column: 1 / 7; aspect-ratio: 16 / 10; }
.band-text { grid-column: 8 / 13; align-self: start; }
.band-text p { max-width: 40ch; }
.band-text ul { margin: 1.75rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.band-text li { display: flex; gap: 0.75rem; align-items: baseline; }
.band-text .link { display: inline-block; margin-top: 2rem; font-weight: 500; }
.band--surface { --band: var(--surface); --tab: var(--accent); --tab-ink: #fff; }
.band--pale { --band: var(--pale); --tab: var(--ink); --tab-ink: #fff; }
.band--dark { --band: var(--field); --band-ink: #fff; --tab: var(--pale); --tab-ink: var(--ink); }
.band--dark .bullet { background: var(--pale); }
.band figcaption { position: absolute; left: 1rem; bottom: 0.9rem; z-index: 2; background: var(--band); color: var(--band-ink, var(--ink)); padding: 0.3rem 0.6rem 0.2rem; font-size: var(--step-small); }

/* ---------- gallery: dense masonry ---------- */
.gallery { padding: var(--section) var(--margin) 0; }
.gallery-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; row-gap: 1.5rem; margin-bottom: 3.5rem; }
.gallery-top h2 { grid-column: 1 / 6; font-size: var(--step-head); }
.gallery-top p { grid-column: 8 / 13; max-width: 34ch; }
.filters { grid-column: 1 / 13; display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 1rem; }
.filters button { color: var(--muted); font-weight: 500; padding: 0.4rem 0; position: relative; transition: color var(--t-hover) ease; }
.filters button sup { font-size: 0.75em; margin-left: 0.15em; font-variant-numeric: tabular-nums; }
.filters button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--t-ui) var(--ease-out); }
.filters button[aria-pressed="true"] { color: var(--ink); }
.filters button[aria-pressed="true"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .filters button:hover { color: var(--ink); } }
.sheet { columns: 6; column-gap: 4px; }
.shot { break-inside: avoid; margin: 0 0 14px; }
.shot button { display: block; width: 100%; overflow: hidden; background: var(--surface); }
.shot img { width: 100%; transition: transform 700ms var(--ease-out), opacity 400ms ease; }
@media (hover: hover) and (pointer: fine) { .shot button:hover img { transform: scale(1.04); } }
.shot figcaption { margin-top: 6px; font-size: var(--step-small); line-height: 1.35; }
.shot[hidden] { display: none; }
.more { display: flex; justify-content: center; margin-top: 2.5rem; }
.lightbox { padding: 12px; border: 0; background: var(--field); max-width: min(1200px, 94vw); max-height: 94vh; color: #fff; overflow: visible; }
.lightbox::backdrop { background: rgb(8 10 10 / 0.88); }
.lightbox img { max-height: 80vh; width: auto; margin-inline: auto; }
.lightbox-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin-top: 1rem; }
.lightbox-bar p { font-size: var(--step-small); }
.lightbox-bar div { display: flex; gap: 6px; }
.lightbox-bar button { min-height: 3rem; padding: 0 1.1rem; background: #252c2c; color: #fff; font-weight: 500; transition: background-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .lightbox-bar button:hover { background: var(--accent); } }

/* ---------- process: tiles that grow ---------- */
.process { padding: var(--section) var(--margin) 0; }
.stages { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 10px; align-items: end; }
.process h2 { grid-column: 1 / 6; grid-row: 1; align-self: start; font-size: var(--step-head); }
.stage { grid-row: 2; }
.stage:nth-of-type(1) { grid-column: 1 / 3; }
.stage:nth-of-type(2) { grid-column: 3 / 6; }
.stage:nth-of-type(3) { grid-column: 6 / 9; }
.stage:nth-of-type(4) { grid-column: 9 / 13; grid-row: 1 / 3; }
.stage-tile { display: grid; place-items: center; overflow: hidden; }
.stage:nth-of-type(1) .stage-tile { height: 30vh; min-height: 200px; background: var(--pale); }
.stage:nth-of-type(2) .stage-tile { height: 40vh; min-height: 260px; background: var(--surface); }
.stage:nth-of-type(3) .stage-tile { height: 50vh; min-height: 320px; }
.stage:nth-of-type(4) .stage-tile { height: 62vh; min-height: 400px; }
.stage:nth-of-type(1) img { width: 82%; height: auto; mix-blend-mode: multiply; }
.stage:nth-of-type(2) svg { width: 82%; height: auto; }
.stage h3 { margin-top: 1.1rem; font-size: var(--step-body); font-weight: 600; letter-spacing: -0.01em; }
.stage p { margin-top: 0.2rem; max-width: 36ch; }
.stage:nth-of-type(4) h3 { margin-top: 1.1rem; }

/* ---------- faq ---------- */
.faq { padding: var(--section) var(--margin) 0; }
.faq h2 { grid-column: 1 / 5; align-self: start; position: sticky; top: 6rem; font-size: var(--step-head); }
.qa { grid-column: 5 / 13; display: grid; gap: 8px; }
.qa details { background: var(--surface); transition: background-color var(--t-ui) ease, color var(--t-ui) ease; }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; padding: 1rem 1.5rem 0.9rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.qa summary::-webkit-details-marker { display: none; }
.plus { position: relative; width: 16px; height: 16px; flex: none; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 6.5px; width: 16px; height: 3px; background: currentColor; transition: transform var(--t-ui) var(--ease-out); }
.plus::after { transform: rotate(90deg); }
.qa details[open] { background: var(--accent); color: var(--accent-ink); }
.qa details[open] .plus::after { transform: rotate(0deg); }
.qa .answer { padding: 0 1.5rem 1.6rem; max-width: calc(52ch + 3rem); }
@media (hover: hover) and (pointer: fine) { .qa details:not([open]) summary:hover { background: #e6e6e1; } }

/* ---------- contact: the coupon ---------- */
.contact { padding: var(--section) var(--margin); }
.coupon {
  grid-column: 2 / 12; position: relative; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); min-height: 28rem;
  background: var(--accent); color: var(--accent-ink);
}
.coupon-left { padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.coupon-left h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; }
.coupon-left p { max-width: 34ch; }
.coupon-left .direct { display: grid; gap: 0.4rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.coupon-left .direct a:first-child { font-size: var(--step-lead); letter-spacing: -0.02em; }
.coupon-left .direct a { text-decoration: none; }
.coupon-left .direct a:hover { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.16em; }
.coupon form { padding: 3rem; background: var(--accent-deep); display: grid; gap: 10px; align-content: center; }
.coupon input, .coupon select, .coupon textarea { width: 100%; min-height: 3.25rem; padding: 0.9rem 1rem 0.75rem; background: #557b7a; color: #fff; border: 0; border-radius: 0; font-size: var(--step-body); }
.coupon textarea { min-height: 7rem; resize: vertical; line-height: 1.4; }
.coupon ::placeholder { color: #eef3f2; opacity: 1; }
.coupon select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 3rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1.1rem center; }
.coupon option { color: var(--ink); background: #fff; }
.coupon input:focus-visible, .coupon select:focus-visible, .coupon textarea:focus-visible { outline: 3px solid #fff; outline-offset: 0; }
.coupon button[type="submit"] { min-height: 3.5rem; background: var(--ink); color: #fff; font-weight: 500; margin-top: 4px; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.coupon button[type="submit"]:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .coupon button[type="submit"]:hover { background: #283030; } }
.company { grid-column: 2 / 12; margin-top: 3.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem var(--gutter); }
.company h3 { font-size: var(--step-body); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.5rem; }


/* ---------- footer: the mark, built as a kitchen ---------- */
.site-foot { background: var(--field); color: var(--field-ink); padding: clamp(3rem, 6vw, 5rem) var(--margin) 2rem; }
.built { display: block; width: 100%; height: auto; }
.foot-grid { margin-top: 3.5rem; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2.5rem; }
.foot-col { grid-column: span 2; display: grid; gap: 0.45rem; align-content: start; }
.foot-col h3, .foot-contact h3 { font-size: var(--step-body); font-weight: 600; letter-spacing: 0; color: var(--pale); margin-bottom: 0.3rem; }
.foot-col a, .foot-contact a { text-decoration: none; }
.foot-col a:hover, .foot-contact a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.foot-contact { grid-column: 9 / 13; display: grid; gap: 0.45rem; align-content: start; }
.foot-last { margin-top: 3.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; font-size: var(--step-small); color: #c4cccb; }
.foot-last .button { min-height: 2.75rem; padding-inline: 1.1rem; background: var(--pale); color: var(--ink); }

/* ---------- motion (content stays visible without JavaScript) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 [data-line] { transform: translateY(105%); animation: line-up 1000ms var(--ease-expo) forwards; animation-delay: calc(var(--i, 0) * 110ms + 250ms); }
  .js [data-rise] { opacity: 0; transform: translateY(20px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 500ms); }
  .js .door { clip-path: inset(0 0 0 100%); animation: shutter 1100ms var(--ease-in-out) 100ms forwards; }
  .js .door-glass img { transform: scale(1.12); animation: settle 1700ms var(--ease-soft) 300ms forwards, drift 22s var(--ease-soft) 2.2s infinite alternate; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 901px) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .front[data-reveal="open"] { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .front[data-reveal="open"] img { transform: scale(1.1); transition: transform 1600ms var(--ease-soft), opacity 600ms var(--ease-out); }
  .js .front[data-reveal="open"].is-in img { transform: none; }
}
/* on phones and tablets nothing waits to appear: parts settle into place, they are never hidden */
@media (prefers-reduced-motion: no-preference) and (max-width: 900px) {
  .js [data-reveal] { transform: translateY(18px); transition: transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
  .js [data-reveal].is-in { transform: none; }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes shutter { to { clip-path: inset(0); } }
@keyframes settle { to { transform: scale(1); } }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06) translateX(-1.5%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .controls .control--layout { grid-column: 1 / 13; }
  .wall, .plan-side { grid-column: 1 / 13; }
  .plan-side { grid-template-columns: 1fr 1fr; column-gap: var(--gutter); align-items: start; }
  .plan-side .zones { grid-row: span 2; }
  .controls .control--length { grid-column: 1 / 7; }
  .controls .control--finish { grid-column: 7 / 13; }
  .materials-intro { grid-column: 1 / 13; margin-bottom: 3rem; }
  .materials-intro p { max-width: 48ch; }
  .tiles { grid-column: 1 / 13; }
  .sheet { columns: 4; }
}

@media (max-width: 900px) {
  .site-head { position: absolute; }
  .nav { color: var(--ink); }
  .nav .button { background: var(--accent); color: #fff; }
  .hero { min-height: auto; display: block; padding-bottom: 0; }
  .hero-copy { width: auto; margin: 0; padding: 7.5rem var(--margin) 0; }
  .hero h1 { font-size: clamp(2.375rem, 12vw, 5.5rem); }
  .door { position: relative; inset: auto; margin-top: 3.5rem; margin-inline: calc(-1 * var(--margin)) ; height: min(118vw, 760px); width: auto; left: auto; right: auto; }
  .hero { padding-inline: 0; }
  .door { margin-inline: 0; }
  .door-glass { inset: 8vw; }
  .door-glass figcaption { display: none; }
  .intro-text { grid-column: 1 / 13; }
  .intro-photo { grid-column: 1 / 13; grid-row: 1; aspect-ratio: 16 / 10; margin-bottom: 2.5rem; }
  .showcase { grid-template-columns: 1fr; min-height: 0; }
  .plate { padding: 3rem var(--margin) 0; }
  .plate .front { width: 100%; }
  .styles { padding: 2.5rem var(--margin) 3.5rem; }
  .planner-head h2, .planner-head p { grid-column: 1 / 13; }
  .items { grid-template-columns: 1fr; }
  .band { position: relative; top: auto; min-height: 0; }
  .band-body .front { grid-column: 1 / 13; aspect-ratio: 4 / 3; }
  .band-text { grid-column: 1 / 13; margin-top: 2rem; }
  .gallery-top h2, .gallery-top p { grid-column: 1 / 13; }
  .stages { grid-template-columns: 1fr; row-gap: 2.5rem; }
  .process h2 { grid-column: 1; grid-row: auto; margin-bottom: 0.5rem; }
  .stage, .stage:nth-of-type(n) { grid-column: 1; grid-row: auto; }
  .stage:nth-of-type(1) .stage-tile { display: block; height: 52vw; min-height: 0; }
  .stage:nth-of-type(1) img { width: 100%; height: 100%; object-fit: cover; }
  .stage:nth-of-type(2) .stage-tile { height: 58vw; min-height: 0; }
  .stage:nth-of-type(3) .stage-tile { height: 66vw; min-height: 0; }
  .stage:nth-of-type(4) .stage-tile { height: 78vw; min-height: 0; }
  .faq h2 { grid-column: 1 / 13; position: static; margin-bottom: 2.5rem; }
  .qa { grid-column: 1 / 13; }
  .coupon { grid-column: 1 / 13; grid-template-columns: 1fr; }
  .coupon form { padding: 2.25rem 1.75rem 2rem; }
  .coupon-left { padding: 2.5rem 1.75rem 2.25rem; }
  .company { grid-column: 1 / 13; grid-template-columns: 1fr 1fr; }
  .foot-col { grid-column: span 6; }
  .foot-contact { grid-column: 1 / 13; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .nav > a:not(.button) { display: none; }
  .nav .button { display: none; }
  .menu-toggle { display: inline-block; }
  .nav.is-open { position: fixed; inset: 0; z-index: 30; background: var(--bg); flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.25rem; padding: 6rem var(--margin) 3rem; }
  .nav.is-open > a:not(.button) { display: block; font-size: var(--step-head); font-weight: 600; letter-spacing: -0.03em; }
  .nav.is-open .button { display: inline-flex; margin-top: 1rem; }
  .nav.is-open .menu-toggle { position: absolute; top: 1.25rem; right: var(--margin); }
  .hero-copy { padding-top: 6.5rem; }
  .hero-text { margin-top: 1.5rem; }
  .hero-actions { margin-top: 1.75rem; }
  .door { height: 112vw; margin-top: 2.75rem; }
  .cells { grid-template-columns: 1fr; }
  .plan-side { grid-template-columns: 1fr; }
  .wall { min-height: 0; }
  .cell { min-height: 3.75rem; }
  .seg span { padding: 0.7rem 0.85rem 0.6rem; }
  .controls .control--length, .controls .control--finish { grid-column: 1 / 13; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; row-gap: 1.75rem; }
  .tile-wrap:nth-child(2) { grid-column: 1 / 3; order: -1; }
  .item { grid-template-columns: 52px 1fr; column-gap: 1rem; }
  .item .front { width: 52px; height: 52px; }
  .item-line { flex-wrap: wrap; row-gap: 0; }
  .item .note { white-space: normal; }
  .band-head { height: auto; flex-direction: column; align-items: stretch; padding-right: 0; }
  .band-tab { min-width: 0; min-height: 3.25rem; }
  .band-cat { padding: 0.9rem var(--margin) 0; }
  .band-body { padding: 1rem var(--margin) 3rem; }
  .sheet { columns: 2; column-gap: 8px; }
  .lightbox { max-width: calc(100vw - 2 * var(--margin)); }
  .lightbox-bar div { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .lightbox-bar button { padding: 0 0.5rem; }
  .shot figcaption .type { display: none; }
  .qa summary { min-height: 4rem; padding: 0.9rem 1.25rem 0.8rem; }
  .qa .answer { padding: 0 1.25rem 1.25rem; }
  .company { grid-template-columns: 1fr; }
  .foot-col { grid-column: span 6; }
}
