/* Trinity Dream Custom Homes
   Night film, ivory pages. One accent (deep maroon, from the shadow side of the logo's T) for buttons only,
   worn as glass: a tinted fill lit by a soft inner highlight and shade (technique after Write-with-Nature's
   CSS glass, re-expressed here; no file from it is used).
   Type: Cormorant Garamond (display), Cinzel (small caps labels), IBM Plex Sans (body/UI).
   Sizes are fluid tokens (WEBSITE_PLAYBOOK.md Part 2): clamp() on width, capped by svh where
   the fold matters; layout switches by aspect ratio. Never vh. */

@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* colour (no hardcoded colours below this block) */
  --night: #0d0c0b;
  --night-veil: rgba(13, 12, 11, .55);
  --ivory: #f4f0ea;
  --paper: #faf8f4;
  --surface: #fbf9f6;
  --ink: #1c1815;
  --ink-2: #4a433c;          /* readable secondary on ivory, 8.9:1 */
  --pale: #f2eee8;
  --pale-2: #cdc6bc;         /* readable secondary on night, 11:1 */
  --accent: #5c1018;         /* deep maroon; ivory on it is 11.9:1, and it is 11:1 as text on ivory */
  --accent-hover: #6e1520;
  --on-accent: #f4f0ea;
  --rule: rgba(28, 24, 21, .1);
  --pale-hover: #ffffff;
  --pale-faint: rgba(242, 238, 232, .35);
  --veil-on-dark: rgba(242, 238, 232, .12);    /* hover / active fill on dark glass */
  --veil-on-light: rgba(28, 24, 21, .06);      /* the same on light glass */
  --shadow-1: 0 1px 2px rgba(28, 24, 21, .06), 0 10px 30px rgba(28, 24, 21, .08);
  --shadow-2: 0 1px 2px rgba(28, 24, 21, .08), 0 18px 50px rgba(28, 24, 21, .12);
  /* maroon glass: tinted fill, top-left inner light, bottom-right inner shade, a gloss, layered drop shadow */
  --glass-maroon: linear-gradient(180deg, rgba(122, 30, 40, .94) 0%, rgba(92, 16, 24, .96) 55%, rgba(70, 10, 17, .98) 100%);
  --glass-maroon-hover: linear-gradient(180deg, rgba(140, 38, 50, .95) 0%, rgba(106, 20, 30, .97) 55%, rgba(80, 12, 20, .98) 100%);
  --glass-maroon-light: inset 1px 1px 4px rgba(255, 214, 214, .4), inset -1px -1px 3px rgba(28, 0, 4, .4), 0 1px 2px rgba(60, 8, 12, .2), 0 10px 24px rgba(60, 8, 12, .26);
  --glass-gloss: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04) 48%, transparent 52%);
  /* clear glass with a faint maroon tint, for small actions on light surfaces */
  --glass-clear: rgba(92, 16, 24, .05);
  --glass-clear-hover: rgba(92, 16, 24, .1);
  /* the business card */
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .09 0 0 0 0 .08 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --card-shadow: 0 1px 1px rgba(28, 24, 21, .06), 0 14px 28px -10px rgba(28, 24, 21, .22), 0 44px 80px -34px rgba(28, 24, 21, .3);
  --card-sheen: rgba(255, 255, 255, .55);
  --card-press: rgba(255, 255, 255, .85);       /* letterpress: a light edge under ink */
  --card-floor: repeating-linear-gradient(0deg, rgba(201, 166, 127, .14) 0 22px, rgba(150, 112, 78, .22) 22px 23px);
  --rule-strong: rgba(28, 24, 21, .3);
  --glass-clear-light: inset 1px 1px 4px rgba(255, 255, 255, .85), inset -1px -1px 3px rgba(60, 8, 12, .1), 0 1px 2px rgba(60, 8, 12, .08), 0 4px 12px rgba(60, 8, 12, .08);
  --shadow-on-film: 0 8px 26px rgba(0, 0, 0, .25);
  --shadow-pill: 0 4px 14px rgba(0, 0, 0, .18);
  --text-shadow-title: 0 2px 24px rgba(0, 0, 0, .35);
  --text-shadow-body: 0 1px 14px rgba(0, 0, 0, .55);
  --text-shadow-pill: 0 1px 6px rgba(0, 0, 0, .35);

  /* film veils and scrims (contrast measured pixel by pixel in review/audit.md) */
  --night-veil-top: rgba(13, 12, 11, .45);     /* extra band under the nav, for bright skies */
  --film-veil:
    linear-gradient(180deg, var(--night-veil-top) 0%, transparent 20%),
    radial-gradient(120% 90% at 62% 45%, transparent 52%, var(--night-veil) 100%),
    linear-gradient(180deg, var(--night-veil) 0%, transparent 22%, transparent 64%, var(--night-veil) 100%);
  --scrim-strong: rgba(13, 12, 11, .78);
  --scrim-mid: rgba(13, 12, 11, .45);
  --scrim-phone: rgba(13, 12, 11, .86);
  --tile-scrim: rgba(13, 12, 11, .5);          /* under the gallery captions, for bright photo corners */

  /* aurora: soft colour fields behind the ivory pages (maroon blush, sage, honey oak, pale sky, rose clay) */
  --aurora-1: rgba(122, 30, 40, .26);      /* maroon */
  --aurora-2: rgba(204, 132, 140, .34);    /* rose */
  --aurora-3: rgba(150, 40, 58, .2);       /* garnet */
  --aurora-4: rgba(236, 190, 180, .5);     /* blush */
  --aurora-5: rgba(110, 18, 32, .16);      /* wine */
  /* theme switch */
  --toggle-knob: #f2eee8;
  --toggle-icon: #5c1018;
  --toggle-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  --toggle-well: inset 0 1px 3px rgba(0, 0, 0, .18);
  /* frosted glass panels on the aurora (large panels need more tint than the small glass above) */
  --glass-panel: rgba(250, 248, 244, .44);
  --glass-panel-blur: blur(28px) saturate(175%);
  --glass-card: rgba(250, 248, 244, .6);        /* the contact card: frosted vellum, still crisp for its ink lines */
  --glass-panel-light: inset 0 1px 22px -8px rgba(255, 255, 255, .8), inset 0 -26px 40px -34px rgba(122, 30, 40, .12), 0 1px 2px rgba(28, 24, 21, .05), 0 26px 64px -28px rgba(28, 24, 21, .26);
  --glass-sheen: linear-gradient(135deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, .1) 34%, transparent 58%);
  /* glass recipe (playbook 1A): light tint, blur 16 + saturate 160, soft inner highlight, no border or edge line */
  --glass-dark: rgba(18, 15, 12, .16);
  --glass-dark-hover: rgba(18, 15, 12, .28);
  --glass-light: rgba(250, 248, 244, .58);
  --glass-light-hover: rgba(250, 248, 244, .74);
  --glass-blur: blur(16px) saturate(160%);
  --glass-edge: inset 0 10px 18px -12px rgba(255, 255, 255, .14), inset 0 -1px 1px rgba(0, 0, 0, .04);
  --glass-edge-light: inset 0 10px 18px -12px rgba(255, 255, 255, .55);
  --glass-lift: 0 1px 2px rgba(0, 0, 0, .1), 0 10px 28px rgba(0, 0, 0, .14);

  /* lite mode fills (no blur) */
  --lite-dark: rgba(13, 12, 11, .8);
  --lite-light: rgba(250, 248, 244, .95);
  --lite-veil: rgba(13, 12, 11, .14);          /* stands in for the film's brightness(.86), which lite drops */

  /* type */
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --caps: "Cinzel", "Cormorant Garamond", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  /* Cormorant has a small x-height, so display steps sit ~12% above the playbook defaults */
  --step-display: clamp(2.5rem, min(6.2vi, 10svh), 5.75rem);
  --step-title:   clamp(2.125rem, min(4.6vi, 8.5svh), 4.25rem);
  --step-item:    clamp(1.5rem, 1.3rem + .7vi, 2.125rem);
  --step-lead:    clamp(1.0625rem, 1.01rem + .24vi, 1.1875rem);
  --step-body:    1rem;
  --step-label:   clamp(.8125rem, .78rem + .12vi, .9375rem);
  --step-caption: clamp(.8125rem, .79rem + .1vi, .875rem);
  --step-micro:   .75rem;

  /* space */
  --gutter: clamp(1.25rem, 3.6vi, 3.75rem);
  --shell: min(100%, 1360px);
  --section: clamp(5rem, 12vi, 10rem);
  --radius: clamp(18px, 1.8vi, 26px);
  --nav-h: calc(44px + 2 * clamp(.5rem, 1.2svh, .75rem) + clamp(10px, 1.6svh, 18px));
  --ease: cubic-bezier(.2, .7, .1, 1);


  /* floor plan scene (js/plan3d.js reads these): the drawing, then the built house and its garden */
  --fp-paper: var(--paper);
  --fp-ink: #23201c;
  --fp-plaster: #f3efe9;
  --fp-cap: #5d554d;          /* wall tops: the plan's ink, carried into 3D */
  --fp-oak: #c9a67f;
  --fp-stone: #ddd7ce;
  --fp-concrete: #d1ccc4;
  --fp-deck: #b88b66;
  --fp-paver: #dfd8cd;
  --fp-coping: #ebe6de;
  --fp-water: #7fbcc4;
  --fp-glass: #c4dbe2;
  --fp-lawn: #b8c7a2;
  --fp-shade: #2a2520;        /* contact shadows */
  --fp-walnut: #6e4c37;
  --fp-white: #f6f3ee;
  --fp-linen: #f1ebe0;
  --fp-cream: #e6dccb;
  --fp-sand: #d3c3aa;
  --fp-sage: #9fb08e;
  --fp-clay: #c4846a;
  --fp-slate: #7c8c9f;
  --fp-charcoal: #3a3531;
  --fp-black: #1f1c1a;
  --fp-oxblood: var(--accent);
  --fp-terracotta: #b8724f;
  --fp-aqua: #a7d2d6;
  --fp-mirror: #cdd8dc;
  --fp-leaf: #86a26f;
  --fp-leaf2: #9bb583;
  --fp-leaf3: #6f8d5d;
  --fp-bark: #7a5c45;
  --fp-bulb: #ffd3a0;
  --fp-sun: #fff0da;
  --fp-sky: #eef3fb;
  --fp-bounce: #eadcc8;
  --fp-env: #d9d3c9;
  --fp-label-font: var(--caps);
  --fp-caption-font: var(--sans);
}

/* ---------- themes ----------
   Dark: blood maroon with ivory type, crimson and rose glows, buttons turned to ivory glass.
   The drawings (the Process floor plan and the contact card) are paper in both themes: they carry
   data-theme="light", which puts the light values back (shadows stay the page's, so they still lift). */
html[data-theme="dark"] {
  color-scheme: dark;
  --glass-card: rgba(250, 248, 244, .9);      /* the contact card stays paper on the dark page, not pink */
  --ivory: #22070c;
  --surface: #2c0a11;
  --ink: #f4ece6;
  --ink-2: #d9c2bd;
  --rule: rgba(255, 228, 224, .12);
  --rule-strong: rgba(255, 228, 224, .32);
  --veil-on-light: rgba(255, 228, 224, .08);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .35), 0 18px 50px rgba(0, 0, 0, .45);
  --accent: #e7a3ab;
  --accent-hover: #f2bcc2;
  --on-accent: #4a0c14;
  --glass-light: rgba(46, 10, 17, .55);
  --glass-light-hover: rgba(52, 12, 20, .8);
  --glass-edge-light: inset 0 10px 18px -12px rgba(255, 210, 214, .18);
  --glass-panel: rgba(44, 9, 16, .46);
  --glass-panel-light: inset 0 1px 22px -8px rgba(255, 196, 202, .2), inset 0 -26px 40px -34px rgba(255, 110, 130, .16), 0 1px 2px rgba(0, 0, 0, .35), 0 26px 64px -28px rgba(0, 0, 0, .65);
  --glass-sheen: linear-gradient(135deg, rgba(255, 214, 220, .14) 0%, rgba(255, 214, 220, .03) 34%, transparent 58%);
  --card-press: rgba(255, 255, 255, .85);
  --glass-clear: rgba(255, 220, 224, .08);
  --glass-clear-hover: rgba(255, 220, 224, .14);
  --glass-clear-light: inset 1px 1px 4px rgba(255, 220, 224, .22), inset -1px -1px 3px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .25), 0 4px 12px rgba(0, 0, 0, .25);
  --glass-maroon: linear-gradient(180deg, rgba(255, 250, 246, .97) 0%, rgba(244, 234, 228, .96) 55%, rgba(228, 214, 208, .96) 100%);
  --glass-maroon-hover: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(250, 242, 237, .98) 55%, rgba(236, 224, 218, .97) 100%);
  --glass-maroon-light: inset 1px 1px 4px rgba(255, 255, 255, .9), inset -1px -1px 3px rgba(74, 12, 20, .18), 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px rgba(0, 0, 0, .4), 0 0 24px rgba(231, 163, 171, .18);
  --glass-gloss: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .1) 48%, transparent 52%);
  --lite-light: rgba(34, 7, 12, .95);
  --toggle-knob: #4a0c14;
  --toggle-icon: #f4ece6;
  --aurora-1: rgba(196, 34, 60, .42);
  --aurora-2: rgba(122, 14, 34, .62);
  --aurora-3: rgba(232, 122, 140, .2);
  --aurora-4: rgba(160, 30, 62, .42);
  --aurora-5: rgba(244, 196, 176, .12);
  --card-shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 14px 28px -10px rgba(0, 0, 0, .5), 0 44px 80px -34px rgba(0, 0, 0, .6);
}
[data-theme="light"] {
  --ivory: #f4f0ea;
  --surface: #fbf9f6;
  --ink: #1c1815;
  --ink-2: #4a433c;
  --rule: rgba(28, 24, 21, .1);
  --rule-strong: rgba(28, 24, 21, .3);
  --veil-on-light: rgba(28, 24, 21, .06);
  --shadow-1: 0 1px 2px rgba(28, 24, 21, .06), 0 10px 30px rgba(28, 24, 21, .08);
  --shadow-2: 0 1px 2px rgba(28, 24, 21, .08), 0 18px 50px rgba(28, 24, 21, .12);
  --accent: #5c1018;
  --accent-hover: #6e1520;
  --on-accent: #f4f0ea;
  --glass-light: rgba(250, 248, 244, .58);
  --glass-light-hover: rgba(250, 248, 244, .74);
  --glass-edge-light: inset 0 10px 18px -12px rgba(255, 255, 255, .55);
  --glass-panel: rgba(250, 248, 244, .44);
  --glass-panel-light: inset 0 1px 22px -8px rgba(255, 255, 255, .8), inset 0 -26px 40px -34px rgba(122, 30, 40, .12), 0 1px 2px rgba(28, 24, 21, .05), 0 26px 64px -28px rgba(28, 24, 21, .26);
  --glass-sheen: linear-gradient(135deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, .1) 34%, transparent 58%);
  --card-press: rgba(255, 255, 255, .85);
  --glass-clear: rgba(92, 16, 24, .05);
  --glass-clear-hover: rgba(92, 16, 24, .1);
  --glass-clear-light: inset 1px 1px 4px rgba(255, 255, 255, .85), inset -1px -1px 3px rgba(60, 8, 12, .1), 0 1px 2px rgba(60, 8, 12, .08), 0 4px 12px rgba(60, 8, 12, .08);
  --glass-maroon: linear-gradient(180deg, rgba(122, 30, 40, .94) 0%, rgba(92, 16, 24, .96) 55%, rgba(70, 10, 17, .98) 100%);
  --glass-maroon-hover: linear-gradient(180deg, rgba(140, 38, 50, .95) 0%, rgba(106, 20, 30, .97) 55%, rgba(80, 12, 20, .98) 100%);
  --glass-maroon-light: inset 1px 1px 4px rgba(255, 214, 214, .4), inset -1px -1px 3px rgba(28, 0, 4, .4), 0 1px 2px rgba(60, 8, 12, .2), 0 10px 24px rgba(60, 8, 12, .26);
  --glass-gloss: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04) 48%, transparent 52%);
  --lite-light: rgba(250, 248, 244, .95);
  --toggle-knob: #f2eee8;
  --toggle-icon: #5c1018;
  color: var(--ink);
}

/* scroll-world engine theme: set ON .sw-root, because the engine declares its defaults on that element
   (a declaration on the element beats anything inherited from :root, whatever the layer) */
.sw-root {
  --sw-bg: var(--night);
  --sw-ink: var(--pale);
  --sw-ink-soft: var(--pale-2);
  --sw-accent: var(--pale);
  --sw-font-display: var(--display);
  --sw-font-body: var(--sans);
}
.sw-root .sw-particles { display: none; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
html, body { margin: 0; background: var(--ivory); color: var(--ink); }
body { font: 400 var(--step-body)/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main:focus-visible { outline: none; }
.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; }
.skip { position: fixed; z-index: 400; top: 12px; left: 12px; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--ivory); text-decoration: none; transform: translateY(-160%); transition: transform .2s; }
.skip:focus { transform: none; }

/* ---------- shared type ---------- */
.label { margin: 0; font: 500 var(--step-label)/1.3 var(--caps); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.title { margin: .35em 0 0; font: 500 var(--step-title)/1.04 var(--display); letter-spacing: -.012em; max-width: 18ch; text-wrap: balance; }
.head { width: var(--shell); margin: 0 auto clamp(2rem, 5vi, 4.5rem); }
.head__note { margin: .9rem 0 0; font: 500 var(--step-micro)/1.3 var(--caps); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 1.5rem;
  border: 0; border-radius: 999px; font: 500 var(--step-body)/1 var(--sans); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, transform .12s ease-out; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn--accent { position: relative; isolation: isolate; background: var(--glass-maroon); color: var(--on-accent); box-shadow: var(--glass-maroon-light); }
.btn--accent::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--glass-gloss); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .btn--accent:hover { background: var(--glass-maroon-hover); } }

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 300; left: 50%; top: calc(clamp(10px, 1.6svh, 18px) + env(safe-area-inset-top));
  width: min(calc(100% - 2 * clamp(10px, 2.4vi, 28px)), 1360px); transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(.5rem, 1.2svh, .75rem) clamp(.5rem, 1.2svh, .75rem) clamp(.5rem, 1.2svh, .75rem) 1rem; border-radius: 999px;
  background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), var(--glass-lift); color: var(--pale);
  transition: opacity .45s var(--ease), transform .45s var(--ease), background-color .3s, color .3s;
}
.nav[data-tone="light"] { background: var(--glass-light); color: var(--ink); box-shadow: var(--glass-edge-light), var(--shadow-1); }
/* ships hidden in the HTML (no flash on load); without scripts the class does nothing and the nav stays,
   in the light tone, because the page is all ivory then */
.js .nav.is-hidden { opacity: 0; pointer-events: none; transform: translate(-50%, -24px); }
html:not(.js) .nav { background: var(--glass-light); color: var(--ink); box-shadow: var(--glass-edge-light), var(--shadow-1); }
.nav__brand { display: flex; align-items: center; gap: .75rem; min-height: 44px; text-decoration: none; }
.nav__brand img { width: 40px; height: 40px; }
.nav__word { display: flex; flex-direction: column; font: 600 .9375rem/1.1 var(--caps); letter-spacing: .14em; text-transform: uppercase; }
.nav__word small { font: 500 var(--step-micro)/1.2 var(--caps); letter-spacing: .22em; margin-top: 2px; }
.nav__links { display: flex; gap: 2px; }
/* full-strength text (faded links failed 4.5:1 over bright skies); the current section gets a soft fill instead */
.nav__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; font: 500 var(--step-caption)/1 var(--sans); letter-spacing: .02em; text-decoration: none; transition: background-color .15s; }
.nav__links a.is-active { background: var(--veil-on-dark); }
.nav[data-tone="light"] .nav__links a.is-active { background: var(--veil-on-light); }
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { background: var(--veil-on-dark); }
  .nav[data-tone="light"] .nav__links a:hover { background: var(--veil-on-light); }
}
.nav__call { min-height: 44px; padding: 0 1.125rem; font-size: var(--step-caption); }

/* theme switch (sun / moon) beside Contact */
.nav__end { display: flex; align-items: center; gap: .35rem; }
.theme-toggle { display: grid; place-items: center; width: 60px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
.theme-toggle__track { position: relative; width: 52px; height: 28px; border-radius: 999px; background: var(--veil-on-dark); box-shadow: var(--toggle-well); transition: background-color .3s; }
.nav[data-tone="light"] .theme-toggle__track { background: var(--veil-on-light); }
.theme-toggle__knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--toggle-icon); background: var(--toggle-knob); box-shadow: var(--toggle-shadow); transition: transform .45s var(--ease), background-color .3s; }
.theme-toggle__knob svg { grid-area: 1 / 1; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: opacity .3s, transform .45s var(--ease); }
.theme-toggle__moon { fill: currentColor; stroke: none; opacity: 0; transform: rotate(-30deg) scale(.6); }
.theme-toggle[aria-checked="true"] .theme-toggle__knob { transform: translateX(24px); }
.theme-toggle[aria-checked="true"] .theme-toggle__sun { opacity: 0; transform: rotate(60deg) scale(.6); }
.theme-toggle[aria-checked="true"] .theme-toggle__moon { opacity: 1; transform: none; }
@media (max-width: 26rem) { .nav__word { display: none; } }   /* small phones: emblem, switch, Contact */
/* each theme shows its own logo art (the red wordmark on ivory, an ivory one on blood maroon) */
html[data-theme="dark"] .for-light, html:not([data-theme="dark"]) .for-dark { display: none; }
/* the switch washes the new theme across the page from the toggle (main.js, View Transitions where supported) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- opening shot ---------- */
/* without scripts this is a plain logo screen; with them, a fixed layer over a 170svh scroll spacer */
.opening { position: relative; }
.opening__layer { position: relative; height: 100svh; display: grid; place-items: center; }
.js .opening { height: 170svh; }
.js .opening__layer { position: fixed; z-index: 200; inset: 0; height: 100lvh; pointer-events: none; }
.opening__layer.is-done { visibility: hidden; }
/* ivory plate with a hole the exact shape of the logo's sky; the film shows through it */
.opening__plate {
  position: absolute; inset: 0; background: var(--ivory);
  -webkit-mask-image: linear-gradient(#000, #000), url("../assets/brand/sky-mask-2048.webp");
  -webkit-mask-repeat: no-repeat; -webkit-mask-size: 100% 100%, var(--ms, 0px) var(--ms, 0px);
  -webkit-mask-position: 0 0, var(--mx, 0px) var(--my, 0px); -webkit-mask-composite: xor;
  mask-image: linear-gradient(#000, #000), url("../assets/brand/sky-mask-2048.webp");
  mask-repeat: no-repeat; mask-size: 100% 100%, var(--ms, 0px) var(--ms, 0px);
  mask-position: 0 0, var(--mx, 0px) var(--my, 0px); mask-composite: exclude;
}
.opening__layer:not(.is-open) .opening__plate { -webkit-mask-image: none; mask-image: none; }
.opening__mark { position: relative; display: grid; justify-items: center; gap: clamp(1rem, 3svh, 2rem); transform: translateY(-2svh); }
/* the sky centre (measured from the logo file) is the push-in origin */
/* no will-change: transform here. Chrome would keep the first raster and blur the logo deep in the 9x push */
.opening__emblem { position: relative; width: min(34svh, 62vw); aspect-ratio: 1; transform-origin: 76.37% 36.52%; }
.opening__emblem img { position: absolute; inset: 0; width: 100%; height: 100%; }
.opening__full { will-change: opacity; }
.opening__word { width: min(46svh, 78vw); will-change: opacity, transform; }
.opening__word img { width: 100%; height: auto; }
.opening__hint { position: absolute; left: 50%; bottom: calc(clamp(18px, 4svh, 40px) + env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; display: grid; justify-items: center; gap: 10px; font: 500 var(--step-micro)/1 var(--caps); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-2); }
.opening__hint i { width: 1px; height: 36px; background: linear-gradient(var(--ink-2), transparent); transform-origin: top; animation: hint 2.4s var(--ease) infinite; }
@keyframes hint { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- film (engine overrides; engine CSS lives in @layer sw) ---------- */
.sw-root .sw-topbar, .sw-root .sw-scrollbar, .sw-root .sw-copy__num, .sw-root .sw-copy__tags { display: none; }
.sw-root .sw-scene__video, .sw-root .sw-scene__still { filter: saturate(1.02) contrast(1.04) brightness(.86); }
/* the global img rule (height: auto) would beat the engine's layered 100%, leaving posters at 16:9 with night below */
.sw-root .sw-scene__still { height: 100%; max-width: none; }
.sw-root .sw-stage::after { content: ""; position: absolute; inset: 0; z-index: 200; pointer-events: none; background: var(--film-veil); }
/* once the ivory covers the screen, stop drawing the film (and nothing dark shows in an iOS overscroll) */
body.film-off .sw-sky, body.film-off .sw-stage { visibility: hidden; }
/* soft radial scrim behind the copy so the footage never fights the words */
.sw-root .sw-copylayer::before {
  width: min(70vi, 900px);
  background: radial-gradient(90% 70% at 0% 55%, var(--scrim-strong) 0%, var(--scrim-mid) 45%, transparent 80%);
}
.sw-root .sw-copy { width: min(46vi, 600px); }
.sw-root .sw-copy__eyebrow { margin-top: 0; font: 500 var(--step-label)/1.3 var(--caps); letter-spacing: .2em; text-transform: uppercase; color: var(--pale); }
.sw-root .sw-copy__title { font: 500 var(--step-display)/1.0 var(--display); letter-spacing: -.012em; color: var(--pale); text-shadow: var(--text-shadow-title); text-wrap: balance; }
.sw-root .sw-copy__body { font: 400 var(--step-lead)/1.55 var(--sans); color: var(--pale-2); max-width: 36ch; text-shadow: var(--text-shadow-body); }
.sw-root .sw-btn { min-height: 48px; display: inline-flex; align-items: center; font: 500 var(--step-body)/1 var(--sans); transition: background-color .15s; }
.sw-root .sw-btn:hover { transform: none; }   /* the engine's lift sticks after a tap on touch screens */
.sw-root .sw-btn--primary { background: var(--pale); color: var(--ink); box-shadow: var(--shadow-on-film); }
.sw-root .sw-btn--ghost { color: var(--pale); border: 0; background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge), var(--glass-lift); }
.sw-root .sw-route__dot { width: 44px; height: 44px; }
.sw-root .sw-route::before { background: var(--pale); opacity: .18; }
.sw-root .sw-route__dot i, .sw-root .sw-route__dot:hover i { background: var(--pale-faint); transform: none; }
@media (hover: hover) and (pointer: fine) {
  .sw-root .sw-btn--primary:hover { background: var(--pale-hover); }
  .sw-root .sw-btn--ghost:hover { background: var(--glass-dark-hover); }
  .sw-root .sw-route__dot:hover i { background: var(--pale); }
}
@media (hover: none) { .sw-root .sw-route__dot:not(.is-active):hover .sw-route__label { opacity: 0; } }
.sw-root .sw-route__dot.is-active i { background: var(--pale); box-shadow: none; transform: scale(1.3); }
.sw-root .sw-route__label { font: 500 var(--step-caption)/1 var(--sans); color: var(--ink); background: var(--glass-light-hover); border: 0; box-shadow: var(--shadow-1); }
.sw-root .sw-hint { display: none; }
/* "Concept imagery": stock footage is labelled as such until the client's own replaces it */
.film-note {
  position: fixed; z-index: 20; margin: 0; pointer-events: none;
  right: max(var(--gutter), env(safe-area-inset-right)); bottom: calc(clamp(12px, 2.4svh, 22px) + env(safe-area-inset-bottom));
  font: 500 var(--step-micro)/1 var(--caps); letter-spacing: .18em; text-transform: uppercase; color: var(--pale); text-shadow: var(--text-shadow-body);
}
html:not(.js) .film-note { display: none; }
body.in-opening .sw-route, body.in-opening .sw-copylayer, body.in-opening .film-note { opacity: 0; }
body.past-film .sw-route, body.past-film .sw-copylayer, body.past-film .film-note { opacity: 0; pointer-events: none; }
.sw-route, .sw-copylayer, .film-note { transition: opacity .4s var(--ease); }

/* ---------- ivory pages slide up over the film ---------- */
main { position: relative; z-index: 60; background: var(--ivory); }
/* the fade overlaps main by 1px, so a fractional scroll position never leaves a seam of film between them */
main::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 36svh; pointer-events: none; background: linear-gradient(180deg, transparent, var(--ivory)); }
html:not(.js) main::before { display: none; }   /* nothing to fade from without the film */
main > section { padding: var(--section) max(var(--gutter), env(safe-area-inset-left)) var(--section) max(var(--gutter), env(safe-area-inset-right)); }

/* ---------- aurora + frosted glass on the ivory pages ----------
   The aurora is sticky inside main: it sits behind every section, fades in under the nav, and drifts with
   scroll only (main.js), so an idle page does no work. Panels frost it. */
.aurora {
  position: sticky; top: 0; z-index: 0; height: 100lvh; margin-bottom: -100lvh; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 28svh); mask-image: linear-gradient(transparent, #000 28svh);
}
.aurora i { position: absolute; display: block; border-radius: 50%; will-change: transform; }
.aurora i:nth-child(1) { width: 78vmax; height: 78vmax; left: -22vmax; top: 18%; background: radial-gradient(closest-side, var(--aurora-2), transparent); }
.aurora i:nth-child(2) { width: 64vmax; height: 64vmax; right: -18vmax; top: -8%; background: radial-gradient(closest-side, var(--aurora-1), transparent); }
.aurora i:nth-child(3) { width: 70vmax; height: 70vmax; left: 22%; bottom: -34vmax; background: radial-gradient(closest-side, var(--aurora-3), transparent); }
.aurora i:nth-child(4) { width: 56vmax; height: 56vmax; right: 4%; top: 36%; background: radial-gradient(closest-side, var(--aurora-4), transparent); }
.aurora i:nth-child(5) { width: 46vmax; height: 46vmax; left: 30%; top: 2%; background: radial-gradient(closest-side, var(--aurora-5), transparent); }
main > section, main > footer { position: relative; z-index: 1; }
/* one recipe for every large panel: frost, a soft top light, a faint maroon floor, a lifting shadow, a sheen */
.glass-panel {
  position: relative; isolation: isolate; background: var(--glass-panel);
  -webkit-backdrop-filter: var(--glass-panel-blur); backdrop-filter: var(--glass-panel-blur); box-shadow: var(--glass-panel-light);
}
.glass-panel::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--glass-sheen); pointer-events: none; }

/* about */
.about { width: min(calc(100% - 2 * var(--gutter)), 70rem); margin: clamp(3rem, 8vi, 6rem) auto max(6rem, 8vi); padding: clamp(3rem, 7vi, 6rem) clamp(1.5rem, 5vi, 5rem); border-radius: calc(var(--radius) * 1.6); text-align: center; display: grid; justify-items: center; gap: clamp(1.25rem, 3vi, 2rem); }
.about__statement { margin: 0; max-width: 20ch; font: 500 var(--step-display)/1.06 var(--display); letter-spacing: -.012em; text-wrap: balance; }
.about__statement .w { opacity: .28; transition: opacity .3s linear; }
.about__statement .w.on { opacity: 1; }
.about__lead { margin: 0; max-width: 46ch; font: 400 var(--step-lead)/1.6 var(--sans); color: var(--ink-2); }

/* details bento: columns by shape, not width alone */
.bento { width: var(--shell); margin: 0 auto; display: grid; gap: clamp(.625rem, 1.2vi, 1.125rem); grid-template-columns: 1fr; grid-auto-rows: clamp(14rem, 60vi, 22rem); }
/* five tiles, no holes: 2 columns = wide, pair, wide, wide; 3 columns = wide + tall, pair, full-width close */
@media (min-width: 40rem) and (min-aspect-ratio: 3/4) { .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(13rem, 34vi, 20rem); } .tile--wide, .bento > :nth-child(4) { grid-column: span 2; } }
@media (min-width: 64rem), (min-width: 48rem) and (min-aspect-ratio: 6/5) { .bento { grid-template-columns: repeat(3, 1fr); grid-auto-rows: clamp(13rem, 24vi, 22rem); } .tile--tall { grid-row: span 2; } .bento > :nth-child(4) { grid-column: auto; } .bento > :last-child { grid-column: 1 / -1; } }
.tile { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--rule); isolation: isolate; box-shadow: var(--shadow-1); }
.tile img { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; will-change: transform; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(70% 60% at 0% 100%, var(--tile-scrim), transparent); }
.tile figcaption {
  position: absolute; z-index: 2; left: clamp(.75rem, 1.4vi, 1rem); bottom: clamp(.75rem, 1.4vi, 1rem);
  min-height: 36px; display: inline-flex; align-items: center; padding: 0 .9rem; border-radius: 999px;
  font: 500 var(--step-caption)/1 var(--sans); color: var(--pale);
  background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), var(--shadow-pill); text-shadow: var(--text-shadow-pill);
}

/* ---------- contact: the floor-plan business card ----------
   The card is an architect's drawing of a small house; each room is one way to reach the client, the title
   block holds the brand. Walls draw themselves in ink on first view, the card tilts under a fine pointer,
   and "Message" turns it over to write on the back. Sizes are in cqw, so it scales like a printed card. */
.visit__wrap { width: var(--shell); margin: 0 auto; display: grid; gap: clamp(1.75rem, 4vi, 3rem); }
@media (min-width: 76rem) { .visit__wrap { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); align-items: center; } }
.visit__head .title { max-width: 14ch; }
.visit__card { perspective: 1600px; }
.bcard {
  container: bcard / inline-size; position: relative; max-width: 54rem;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d;
  transition: transform .6s var(--ease);
}
.bcard__flip { display: grid; transform-style: preserve-3d; transition: transform .85s var(--ease); }
.bcard__face {
  grid-area: 1 / 1; position: relative; border-radius: clamp(10px, 1.6cqw, 18px); overflow: hidden;
  color: var(--ink); background: var(--glass-sheen), var(--paper-grain), var(--glass-card);
  -webkit-backdrop-filter: var(--glass-panel-blur); backdrop-filter: var(--glass-panel-blur);
  box-shadow: var(--glass-panel-light), var(--card-shadow);
}
.bcard__front { aspect-ratio: 1750 / 1000; }
/* a soft sheen that follows the pointer, like light across heavy paper */
.bcard__front::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease);
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 10%), var(--card-sheen), transparent 45%);
}
.bcard:hover .bcard__front::after { opacity: 1; }

/* the drawing (decorative; text lives in HTML so it never drops below 12px) */
.bcard__plan { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 1px 0 var(--card-press)); }
.bcard__plan--tall { display: none; }
.ink { fill: none; stroke: var(--ink); stroke-linecap: square; }
.ink--ext { stroke-width: 14; }
.ink--int { stroke-width: 8; }
.ink--fine { stroke-width: 2.5; stroke-linecap: butt; }
.ink--fine rect { stroke-width: 3; }
.ink--arc { stroke-width: 2; opacity: .7; }
.ink--sym { stroke-width: 2; opacity: .4; }
.ink--fill { fill: var(--ink); stroke: none; }
/* main.js measures each line into --len; without it the dash sums to zero and the line is simply solid */
.ink path { stroke-dasharray: var(--len, 0) var(--len, 0); stroke-dashoffset: 0; transition: stroke-dashoffset 1.5s var(--ease) var(--d, 0s); }
.ink--ext { --d: 0s; } .ink--int { --d: .35s; } .ink--fine { --d: .7s; }
.js .bcard:not(.is-drawn) .ink path { stroke-dashoffset: var(--len, 0); }
.ink--sym, .ink--sym path { transition: opacity .8s var(--ease) 1.2s; stroke-dasharray: none; }
.js .bcard:not(.is-drawn) .ink--sym { opacity: 0; }
.bcard__dim, .room, .bcard__title { transition: opacity .7s var(--ease) .9s; }
.js .bcard:not(.is-drawn) :is(.bcard__dim, .room, .bcard__title) { opacity: 0; }

/* the dimension line carries the town, set into a gap in the line */
.bcard__dim { position: absolute; z-index: 2; left: 5.14%; width: 66.29%; top: 4%; height: 6.4%; margin: 0; display: grid; place-items: center; }
.bcard__dim span { font: 500 clamp(12px, 1.3cqw, 14px)/1 var(--caps); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-2); }

/* rooms: each a link or button the size of the room; the floor turns to oak on hover */
.room {
  position: absolute; z-index: 2; left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  display: flex; flex-direction: column; align-items: flex-start; gap: .35cqw; padding: 2.3cqw 2.4cqw;
  border: 0; margin: 0; background: none; color: inherit; text-align: left; text-decoration: none; cursor: pointer; font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.room::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--card-floor); opacity: 0; transition: opacity .4s var(--ease); }
.room:focus-visible { outline-offset: -6px; }
.room:active::before, .room:focus-visible::before { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .room:hover::before { opacity: 1; } .room:hover .room__act { background: var(--glass-clear-hover); } }
.room--phone   { --x: 5.54%;  --y: 11.7%; --w: 30.8%;  --h: 34.9%; }
.room--insta   { --x: 36.8%;  --y: 11.7%; --w: 34.23%; --h: 34.9%; }
.room--address { --x: 5.54%;  --y: 47.4%; --w: 45.66%; --h: 40.9%; }
.room--message { --x: 51.66%; --y: 47.4%; --w: 19.37%; --h: 40.9%; }
.room__label { display: inline-flex; align-items: center; gap: .5em; font: 500 clamp(12px, 1.45cqw, 15px)/1.2 var(--caps); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
.room__glyph { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; }
.room__glyph .room__glyph-dot { fill: currentColor; stroke: none; }
.room__value { font: 500 clamp(18px, 2.85cqw, 30px)/1.12 var(--display); text-shadow: 0 1px 0 var(--card-press); }
.room__value--handle { font-size: clamp(15px, 2.15cqw, 23px); overflow-wrap: break-word; }
.room__act {
  margin-top: auto; display: inline-flex; align-items: center; gap: .4em; min-height: 44px; padding: 0 1.1em; border-radius: 999px;
  font: 500 clamp(12px, 1.4cqw, 14px)/1 var(--sans); color: var(--accent); background: var(--glass-clear); box-shadow: var(--glass-clear-light);
  white-space: nowrap; transition: background-color .2s;
}
.room__arrow { width: .95em; height: .95em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* title block: the brand, as on an architect's sheet */
/* rows line up with the drawn lines: brand above y 600 of 1000, then two rows (160 and 200 units) */
.bcard__title { position: absolute; z-index: 2; left: 74.29%; width: 23.43%; top: 4%; height: 92%; }
.bcard__brand { position: absolute; inset: 0 0 39.13% 0; display: grid; place-items: center; align-content: center; gap: 1.6cqw; }
.bcard__emblem { width: 62%; height: auto; }
.bcard__name { margin: 0; text-align: center; font: 600 clamp(12px, 1.55cqw, 16px)/1.25 var(--caps); letter-spacing: .16em; text-transform: uppercase; }
.bcard__name span { display: block; margin-top: .35em; font-weight: 500; font-size: max(12px, .8em); letter-spacing: .24em; color: var(--ink-2); }
.bcard__rows { position: absolute; inset: 60.87% 0 0 0; margin: 0; display: grid; grid-template-rows: 44.4% 55.6%; }
.bcard__rows div { display: grid; align-content: center; gap: .3em; padding: 0 1.6cqw; }
.bcard__rows dt { font: 500 clamp(12px, 1.1cqw, 13px)/1 var(--caps); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.bcard__rows dd { margin: 0; font: 500 clamp(13px, 1.55cqw, 17px)/1.2 var(--display); }

/* the back of the card: a note, written on ruled paper */
.bcard__back { display: grid; align-content: center; padding: 4.5cqw 5cqw; }
.message { display: grid; gap: 2.4cqw 4cqw; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; }
.message__head { display: grid; gap: .6rem; align-content: start; }
.message__kicker { margin: 0; font: 500 clamp(12px, 1.45cqw, 15px)/1.2 var(--caps); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
.message__title { margin: 0; font: 500 clamp(26px, 4.4cqw, 44px)/1.05 var(--display); }
.message__note { font: 400 var(--step-micro)/1.45 var(--sans); color: var(--ink-2); }
.message__fields { display: grid; gap: 1.6cqw; }
.message__field { display: grid; gap: .2rem; }
.message__field span { font: 500 clamp(12px, 1.3cqw, 13px)/1.2 var(--caps); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.message__field input, .message__field textarea {
  width: 100%; min-height: 44px; padding: .35rem 0; border: 0; border-radius: 0; resize: none; background: transparent;
  font: italic 400 clamp(18px, 2.3cqw, 22px)/1.5 var(--display); color: var(--ink);
  box-shadow: inset 0 -1.5px 0 var(--rule-strong);
}
.message__field textarea { background: repeating-linear-gradient(transparent 0 calc(1.5em - 1.5px), var(--rule) calc(1.5em - 1.5px) 1.5em); }
.message__field input:focus, .message__field textarea:focus { outline: none; box-shadow: inset 0 -2px 0 var(--accent); }
.message__send { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: .4rem; }
.message__back { min-height: 44px; padding: 0 1.1rem; border: 0; border-radius: 999px; cursor: pointer; font: 500 var(--step-caption)/1 var(--sans); color: var(--accent); background: var(--glass-clear); box-shadow: var(--glass-clear-light); }
html:not(.js) .message__back { display: none; }

/* scripts on: the two faces share one place and the card turns over */
.js .bcard__back { position: absolute; inset: 0; transform: rotateY(180deg); }
.js .bcard__face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.js .bcard.is-flipped .bcard__flip { transform: rotateY(180deg); }
html:not(.js) .bcard__flip { gap: 1.5rem; }
html:not(.js) .bcard__back { grid-area: auto; }

/* narrow cards turn upright: title block on top, rooms in a column */
@container bcard (max-width: 599px) {
  .bcard__front { aspect-ratio: 1000 / 1800; }
  .bcard__plan--wide { display: none; }
  .bcard__plan--tall { display: block; }
  .bcard__dim { left: 9%; width: 82%; top: 22.8%; height: 2.2%; }
  .bcard__dim span { font-size: clamp(12px, 3.4cqw, 13px); }
  .room { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label act" "value act"; align-content: center; gap: .3rem .8rem; padding: 0 4.2cqw; }
  .room__label { grid-area: label; font-size: clamp(12px, 3.4cqw, 14px); }
  .room__value { grid-area: value; font-size: clamp(19px, 6.2cqw, 26px); }
  .room__value--handle { font-size: clamp(14px, 4.4cqw, 19px); }
  .room__act { grid-area: act; margin: 0; font-size: clamp(12px, 3.4cqw, 14px); }
  .room--phone   { --x: 9.7%; --y: 26.5%;  --w: 80.6%; --h: 14.39%; }
  .room--insta   { --x: 9.7%; --y: 41.33%; --w: 80.6%; --h: 14.56%; }
  .room--address { --x: 9.7%; --y: 56.33%; --w: 80.6%; --h: 21.22%; }
  .room--message { --x: 9.7%; --y: 78%;    --w: 80.6%; --h: 15.5%; }
  .room--insta .room__act, .room--address .room__act { width: 44px; padding: 0; justify-content: center; gap: 0; }
  .room__act-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .room--insta .room__arrow, .room--address .room__arrow { width: 18px; height: 18px; }
  .bcard__title { left: 3%; width: 94%; top: 1.67%; height: 19.4%; }
  .bcard__brand { inset: 0; grid-template-columns: auto 1fr; place-items: center start; gap: 4cqw; padding: 0 6cqw; }
  .bcard__emblem { width: 24cqw; }
  .bcard__name { margin: 0; text-align: left; font-size: clamp(14px, 4.6cqw, 18px); }
  .bcard__rows { display: none; }
  .bcard__back { padding: 7cqw 6cqw; }
  .message { grid-template-columns: 1fr; gap: 6cqw; }
  .message__title { font-size: clamp(26px, 8cqw, 34px); }
  .message__fields { gap: 4cqw; }
  .message__field input, .message__field textarea { font-size: clamp(18px, 5.4cqw, 21px); }
}
@media (prefers-reduced-motion: reduce) {
  .bcard, .bcard__flip, .ink path, .ink--sym, .bcard__dim, .room, .bcard__title { transition: none; }
}

/* footer */
.footer { display: grid; justify-items: center; gap: 1rem; text-align: center; padding: clamp(4rem, 9vi, 7rem) var(--gutter) calc(2.5rem + env(safe-area-inset-bottom)); box-shadow: inset 0 1px 0 var(--rule); }
.footer__logo { width: clamp(160px, 18vi, 220px); }
.footer__logo--dark { display: grid; justify-items: center; gap: .75rem; }
.footer__logo--dark img:first-child { width: 58%; height: auto; }
.footer__meta { margin: 0; font: 400 var(--step-body)/1.7 var(--sans); color: var(--ink-2); }
.footer__meta a { display: inline-block; padding: .6rem .1rem; color: var(--ink); text-decoration: none; }
.footer__fine { margin: 0; font: 400 var(--step-micro)/1.5 var(--sans); color: var(--ink-2); }

/* reveal: fast in, then hold (only when scripts run; otherwise everything simply shows) */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- small screens ---------- */
@media (max-width: 63.99rem) { .nav__links { display: none; } }
@media (max-width: 40rem) {
  .nav__word { font-size: .8125rem; letter-spacing: .1em; }
  .sw-root .sw-copy { width: auto; }
  .sw-root .sw-copylayer::before { width: 100%; background: linear-gradient(0deg, var(--scrim-phone) 10%, var(--scrim-mid) 50%, transparent 100%); }
  .sw-root .sw-route { display: none; }   /* the copy runs full width here; the dots would sit on the words */
}
/* short landscape screens (phones on their side, by shape not width): copy low and wide, so titles wrap
   less, both buttons share a row and nothing reaches the nav */
@media (max-height: 34rem) and (min-aspect-ratio: 6/5) {
  .sw-root .sw-copy {
    top: auto; right: auto; bottom: calc(clamp(14px, 5svh, 32px) + env(safe-area-inset-bottom));
    left: max(clamp(18px, 5vw, 64px), env(safe-area-inset-left)); transform: none; width: min(64vi, 680px); max-width: none;
  }
  .sw-root .sw-copy__title { font-size: clamp(1.75rem, 8.5svh, 2.75rem); }
  .sw-root .sw-copy__cta { margin-top: 18px; flex-wrap: nowrap; }
  .sw-root .sw-copylayer::before {
    inset: 0; width: min(84vi, 1000px); height: auto;
    background: radial-gradient(100% 90% at 0% 100%, var(--scrim-strong) 0%, var(--scrim-mid) 50%, transparent 85%);
  }
  .sw-root .sw-route { display: none; }
}

@media (max-height: 30rem) { .opening__hint { display: none; } }

/* ---------- lite mode (weak or software GPU): no blur, no filters, solid-enough fills ---------- */
html[data-quality="lite"] .nav,
html[data-quality="lite"] .tile figcaption,
html[data-quality="lite"] .sw-root .sw-btn--ghost { -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-quality="lite"] .nav,
html[data-quality="lite"] .tile figcaption,
html[data-quality="lite"] .sw-root .sw-btn--ghost { background: var(--lite-dark); }
html[data-quality="lite"] .nav[data-tone="light"] { background: var(--lite-light); }
html[data-quality="lite"] .sw-root .sw-scene__video,
html[data-quality="lite"] .sw-root .sw-scene__still { filter: none; }
/* the filter's darkening comes back as one flat veil (free), so the copy keeps its measured contrast */
html[data-quality="lite"] .sw-root .sw-stage::after { background: var(--film-veil), linear-gradient(var(--lite-veil), var(--lite-veil)); }
html[data-quality="lite"] .tile img { transform: none !important; }
html[data-quality="lite"] :is(.glass-panel, .bcard__face) { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--lite-light); }
html[data-quality="lite"] .aurora i { transform: none !important; }

/* ---------- user settings ---------- */
@media (prefers-reduced-motion: reduce) {
  .opening__hint i { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .about__statement .w { opacity: 1; }
  .tile img { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass-panel, .bcard__face { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
  .nav, .tile figcaption, .sw-root .sw-btn--ghost { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav { background: var(--night); }
  .nav[data-tone="light"] { background: var(--surface); }
  .tile figcaption, .sw-root .sw-btn--ghost { background: var(--night); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .btn--accent { background: var(--accent); }
  .btn--accent::before { display: none; }
}
@media (prefers-contrast: more) {
  :root { --ink-2: #2e2924; --pale-2: #e4ded6; }
  .about__statement .w { opacity: 1; }
}
