/* Ralph Fares - "Built on numbers"
   Layout: a fixed WebGL canvas behind everything; six sticky beats drive a camera while one tower assembles from a drawing
   and a day passes; then a ledger of ruled rows scrolls over the lit tower at night.
   Two phases of one theme: day (ink on drafting paper) and night (paper on ink). html[data-phase] switches the tokens and
   every colour transitions; a paper or ink plate sits behind each sheet of copy for guaranteed contrast over the scene.
   Type: Space Grotesk (display and text), IBM Plex Mono (every figure, label and title block). */
:root {
  --paper: #f3eee4;
  --paper-2: #e9e2d3;
  --ink: #141a24;
  --ink-2: #0b1020;
  --blue: #2b5bd7;
  --brass: #b8945a;
  --brass-2: #d8b878;
  --brass-ink: #1a1408;

  --bg: var(--paper);
  --fg: var(--ink);
  --fg-2: rgba(20, 26, 36, 0.74);
  --fg-3: rgba(20, 26, 36, 0.52);
  --accent: var(--blue);
  --line: rgba(20, 26, 36, 0.16);
  --line-2: rgba(20, 26, 36, 0.34);
  --plate: rgba(243, 238, 228, 0.82);
  --plate-solid: #f3eee4;
  --field: rgba(20, 26, 36, 0.04);
  --field-focus: rgba(20, 26, 36, 0.07);
  --pop: #fbf8f1;
  --danger: #b2392b;
  --shadow: rgba(20, 26, 36, 0.14);

  --font: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --swap: .5s;
  color-scheme: light;
}
html[data-phase="night"] {
  --bg: var(--ink-2);
  --fg: #eef0f4;
  --fg-2: rgba(238, 240, 244, 0.74);
  --fg-3: rgba(238, 240, 244, 0.5);
  --accent: var(--brass-2);
  --line: rgba(238, 240, 244, 0.14);
  --line-2: rgba(238, 240, 244, 0.3);
  --plate: rgba(11, 16, 32, 0.74);
  --plate-solid: #0e1428;
  --field: rgba(238, 240, 244, 0.05);
  --field-focus: rgba(238, 240, 244, 0.09);
  --pop: #121a33;
  --danger: #ffb4a2;
  --shadow: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(15px, 0.4vw + 13px, 17px);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: color var(--swap), background-color var(--swap);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, dt, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--brass); color: var(--brass-ink); }
.skip { position: fixed; left: 16px; top: -80px; z-index: 200; background: var(--brass); color: var(--brass-ink); font-weight: 600; padding: 10px 16px; transition: top .3s; }
.skip:focus { top: max(12px, env(safe-area-inset-top, 0px)); }
.mono, .eyebrow, .tblock, .figures dt, .row-n, .ledger-n, .step-n, .lot-n, .lot-area, .lot-price, .rail-pos, .spec dt, .sheet-no, .gauge, .field label, .field-count, .copy-btn, .dd-iso, .dd-dial, .footer-legal, .legal-updated, .loader-eyebrow, .loader-hint, .scroll-cue, .form-note, .field-error, .figcaption { font-family: var(--mono); }

/* ---------- fixed layers ---------- */
.scene { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; display: block; background: var(--paper-2); }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(4) infinite;
}
html[data-phase="night"] .grain { mix-blend-mode: screen; opacity: 0.035; }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-1%, -1%); } 100% { transform: translate(3%, 3%); } }

/* a drafting cross-hair instead of a dot */
.cursor { position: fixed; left: 0; top: 0; z-index: 60; width: 22px; height: 22px; pointer-events: none; transform: translate(-50%, -50%); opacity: 0; transition: opacity .3s, transform .35s var(--ease); }
.cursor::before, .cursor::after { content: ""; position: absolute; background: var(--fg); transition: background-color var(--swap); }
.cursor::before { left: 50%; top: 0; width: 1px; height: 100%; margin-left: -0.5px; }
.cursor::after { top: 50%; left: 0; height: 1px; width: 100%; margin-top: -0.5px; }
.cursor.is-on { opacity: .9; }
.cursor.is-hover { transform: translate(-50%, -50%) rotate(45deg) scale(1.5); }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--paper); color: var(--ink); padding-inline: var(--gutter-l) var(--gutter-r); transition: opacity .9s var(--ease), visibility .9s; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-inner { width: min(320px, 100%); display: grid; justify-items: center; text-align: center; }
.loader-mark { width: 64px; height: 64px; color: var(--ink); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); } }
.loader-eyebrow { margin-block: 18px 22px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(20, 26, 36, 0.55); }
.loader-bar { width: 100%; height: 1px; background: rgba(20, 26, 36, 0.18); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .35s var(--ease); }
.loader-hint { margin-top: 14px; font-size: 12px; color: rgba(20, 26, 36, 0.55); letter-spacing: .06em; }

/* ---------- nav ---------- */
.nav { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); z-index: 50; transition: transform .6s var(--ease); }
.nav.is-hidden { transform: translateY(-110%); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-inline: var(--gutter-l) var(--gutter-r); }
@media (min-width: 821px) { .nav-inner { padding-inline: max(28px, env(safe-area-inset-left, 0px)) max(28px, env(safe-area-inset-right, 0px)); } }
.logo { display: inline-flex; flex: none; }
.logo-img { display: block; height: auto; transition: filter var(--swap); }
html[data-phase="night"] .logo-img { filter: invert(1) hue-rotate(180deg) brightness(1.15); }
.nav-links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; color: var(--fg-2); }
.nav-links a { position: relative; padding-block: 6px; transition: color .3s; }
.nav-links a:hover { color: var(--fg); }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--accent); transition: right .5s var(--ease); }
.nav-links a:hover::after { right: 0; }
.nav-progress { height: 1px; background: transparent; margin-inline: var(--gutter-l) var(--gutter-r); }
.nav-progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
@media (max-width: 820px) { .nav-links { display: none; } .nav .logo-img { width: 124px; } }

/* right-edge gauge: the floor being placed and the time of day (desktop) */
.gauge {
  position: fixed; right: max(24px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); z-index: 40;
  display: grid; justify-items: end; gap: 2px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-3);
  opacity: 0; transition: opacity .8s, color var(--swap);
}
.gauge.is-on { opacity: 1; }
.gauge-v { font-size: 28px; letter-spacing: -0.02em; color: var(--fg); line-height: 1.1; font-variant-numeric: tabular-nums; transition: color var(--swap); }
.gauge-time { font-size: 18px; }
.gauge i { width: 1px; height: 54px; margin-block: 12px; background: var(--line-2); justify-self: end; margin-right: 6px; }
@media (max-width: 1180px), (pointer: coarse) { .gauge { display: none; } }

/* ---------- type ---------- */
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter-l) var(--gutter-r); }
.eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 500; transition: color var(--swap); }
.display { font-weight: 500; letter-spacing: -0.035em; line-height: 0.98; font-size: clamp(38px, 5.4vw, 80px); text-wrap: balance; }
.display b { font-weight: 700; color: var(--accent); transition: color var(--swap); }
.display-xl { font-size: clamp(46px, 8.2vw, 124px); letter-spacing: -0.045em; }
h3 { font-weight: 600; font-size: clamp(20px, 1.6vw, 25px); line-height: 1.15; letter-spacing: -0.02em; }
.lede { font-size: clamp(16px, 1.1vw + 10px, 20px); color: var(--fg-2); max-width: 34em; line-height: 1.5; transition: color var(--swap); }
.body { color: var(--fg-2); max-width: 34em; transition: color var(--swap); }
.body.small { font-size: 14px; max-width: 30em; }

/* line reveal: each line of a heading or paragraph rises out of its own clip */
[data-lines] .ln { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
[data-lines] .ln > span { display: block; transform: translateY(104%); transition: transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
[data-lines].is-in .ln > span { transform: none; }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- buttons: squared, ruled, a mono label ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding-inline: 24px; font-weight: 600; font-size: 15px; letter-spacing: -0.005em;
  border: 1px solid transparent; transition: background-color .4s, color .4s, border-color .4s, box-shadow .5s;
  white-space: nowrap;
}
.btn-sm { height: 42px; padding-inline: 16px; font-size: 14px; }
.btn-brass { background: var(--brass); color: var(--brass-ink); border-color: var(--brass); box-shadow: 0 14px 40px -18px rgba(184, 148, 90, 0.9); }
.btn-brass:hover { background: var(--brass-2); border-color: var(--brass-2); }
.btn-line { border-color: var(--line-2); color: var(--fg); background: var(--plate); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -4px; color: inherit; }
.btn .ico { transition: transform .5s var(--ease); }
.btn:hover .ico:not(.ico-lead) { transform: translateX(4px); }
.link-arrow { display: inline-flex; align-items: center; gap: 12px; color: var(--accent); font-size: 15px; font-weight: 600; margin-top: 8px; }
.link-arrow i { width: 34px; height: 1px; background: currentColor; position: relative; transition: width .5s var(--ease); }
.link-arrow i::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.link-arrow:hover i { width: 54px; }

/* ---------- story beats ---------- */
.story { position: relative; z-index: 2; }
.beat { height: 160vh; height: 160lvh; position: relative; }
.beat-hero { height: 140vh; height: 140lvh; }
.beat-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-items: end; overflow: hidden; }
/* the sheet: a plate of paper (or ink at night) with drafting corner marks and a hairline frame */
.sheet { position: relative; display: grid; gap: 20px; padding: clamp(22px, 2.6vw, 36px) clamp(22px, 2.8vw, 40px) clamp(20px, 2.4vw, 32px); background: var(--plate); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }   /* no transition on the plate: a frosted layer re-blurs on every frame of one, and the switch happens between sheets */
.sheet::before, .sheet::after { content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--fg-3); border-style: solid; border-width: 0; pointer-events: none; transition: border-color var(--swap); }
.sheet::before { left: 8px; top: 8px; border-left-width: 1px; border-top-width: 1px; }
.sheet::after { right: 8px; bottom: 8px; border-right-width: 1px; border-bottom-width: 1px; }
.sheet .display { font-size: clamp(34px, 4.4vw, 64px); }
.sheet .display-xl { font-size: clamp(42px, 6.4vw, 96px); }
.sheet-no { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-3); justify-self: end; margin-top: 2px; transition: color var(--swap); }
.beat-copy { opacity: 0; will-change: opacity, transform; margin-bottom: clamp(24px, 6vh, 64px); }
.sheet-left { justify-self: start; width: min(640px, calc(100vw - var(--gutter-l) - var(--gutter-r))); margin-left: max(var(--gutter-l), calc((100vw - 1240px) / 2 + 16px)); }
.sheet-right { justify-self: end; width: min(620px, calc(100vw - var(--gutter-l) - var(--gutter-r))); margin-right: max(var(--gutter-r), calc((100vw - 1240px) / 2 + 16px)); }
.sheet-center { justify-self: center; justify-items: center; text-align: center; width: min(820px, calc(100vw - var(--gutter-l) - var(--gutter-r))); }
.sheet-center .hero-actions { justify-content: center; }
@media (min-width: 821px) { .sheet-left { margin-left: max(28px, calc((100vw - 1240px) / 2 + 16px)); } .sheet-right { margin-right: max(28px, calc((100vw - 1240px) / 2 + 16px)); } }

.hero-grid { display: grid; align-items: end; min-height: 100svh; padding-top: calc(var(--nav-h) + 16px); padding-bottom: clamp(56px, 9vh, 96px); }
.hero-copy { max-width: 720px; gap: 22px; }
.hero-copy .display { font-size: clamp(44px, 6.4vw, 96px); font-weight: 500; }
.hero-copy .line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hero-copy .line > span { display: inline-block; transform: translateY(112%); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
[data-intro] { opacity: 0; transform: translateY(16px); }
/* title block, as on an architect's sheet */
.tblock { display: grid; grid-template-columns: repeat(4, auto); gap: 0; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); margin-top: 6px; width: max-content; max-width: 100%; transition: border-color var(--swap); }
.tblock div { padding: 8px 14px 8px 10px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: grid; gap: 2px; transition: border-color var(--swap); }
.tblock dt { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-3); }
.tblock dd { font-size: 12px; letter-spacing: .04em; color: var(--fg); white-space: nowrap; }

.scroll-cue { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; }
.scroll-cue span { width: 1px; height: 38px; background: var(--line-2); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: translateY(-100%); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60% { transform: translateY(100%); } 100% { transform: translateY(100%); } }

/* figures: big tabular numbers with a mono caption */
.figures { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 32px; margin-top: 4px; }
.figures div { display: grid; gap: 4px; border-left: 1px solid var(--line-2); padding-left: 14px; transition: border-color var(--swap); }
.figures dd { font-weight: 600; font-size: clamp(26px, 2.8vw, 40px); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.figures dt { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); }

/* ruled rows inside a sheet */
.rows { display: grid; width: 100%; border-top: 1px solid var(--line-2); }
.rows li { display: grid; grid-template-columns: 2.4rem 8.5rem minmax(0, 1fr); gap: 12px; align-items: baseline; padding-block: 10px; border-bottom: 1px solid var(--line); transition: border-color var(--swap); }
.rows-tight li { grid-template-columns: 2.4rem minmax(0, 1fr); }
.row-n { font-size: 11px; letter-spacing: .12em; color: var(--accent); font-variant-numeric: tabular-nums; }
.row-t { font-weight: 600; font-size: 17px; letter-spacing: -0.015em; }
.row-d { color: var(--fg-2); font-size: 15px; line-height: 1.45; }
.row-d strong { color: var(--fg); font-weight: 600; }

/* ---------- the ledger (panels) ---------- */
.panel { position: relative; z-index: 2; padding-block: clamp(84px, 11vw, 150px); }
.panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--plate); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.panel + .panel::before { border-top: 1px solid var(--line); }
.panel-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 60px); max-width: 820px; }
.panel-head-row { display: flex; justify-content: space-between; align-items: end; gap: 24px 48px; flex-wrap: wrap; max-width: none; }
.panel-head-row > div { display: grid; gap: 14px; max-width: 720px; }

.ledger { border-top: 1px solid var(--line-2); }
.ledger li { display: grid; grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 32px; align-items: start; padding-block: 26px; border-bottom: 1px solid var(--line); }
.ledger-n { font-size: 12px; letter-spacing: .14em; color: var(--accent); padding-top: 6px; }
.ledger p { color: var(--fg-2); font-size: 15.5px; max-width: 38em; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-left: 1px solid var(--line-2); }
.steps li { display: grid; gap: 12px; align-content: start; padding: 4px 26px 8px 22px; border-right: 1px solid var(--line); min-width: 0; }
.step-n { font-size: 12px; color: var(--accent); letter-spacing: .14em; margin-bottom: 10px; }
.steps p { color: var(--fg-2); font-size: 15px; max-width: 28em; }

/* the rail: listings run sideways as lots on one long sheet */
.panel-rail .wrap { position: relative; }
.rail-wrap { position: relative; }
.rail { display: flex; gap: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: max(var(--gutter-l), calc((100vw - 1240px) / 2 + 16px)) var(--gutter-r); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.rail { scroll-padding-inline-start: max(var(--gutter-l), calc((100vw - 1240px) / 2 + 16px)); }
.rail::-webkit-scrollbar { display: none; }
.lot { flex: 0 0 clamp(280px, 26vw, 360px); scroll-snap-align: start; border-right: 1px solid var(--line); }
.lot a { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-content: start; height: 100%; min-height: 300px; padding: 22px 22px 20px; transition: background-color .4s; }
.lot a:hover { background: var(--field); }
.lot-n { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.lot-area { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); text-align: right; }
.lot-name { grid-column: 1 / -1; margin-top: 26px; font-weight: 600; font-size: clamp(22px, 1.8vw, 27px); letter-spacing: -0.025em; line-height: 1.1; }
.lot-type { grid-column: 1 / -1; color: var(--fg-2); font-size: 14px; line-height: 1.45; min-height: 2.9em; }
.lot-price { grid-column: 1 / -1; margin-top: auto; padding-top: 18px; font-size: 20px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.lot-price small { font-size: 11px; letter-spacing: .12em; color: var(--fg-3); margin-right: 8px; }
.lot-go { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 12px; }
.lot-go .ico { width: 15px; height: 15px; transition: transform .4s var(--ease); }
.lot a:hover .lot-go .ico { transform: translate(2px, -2px); }
.lot-more .lot-type { min-height: 0; }
.lot-more .lot-go { margin-top: auto; padding-top: 18px; }
.rail-nav { display: flex; align-items: center; gap: 14px; justify-content: flex-end; padding-top: 16px; }
.rail-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--fg); transition: border-color .3s, color .3s; }
.rail-btn:hover { border-color: var(--accent); color: var(--accent); }
.rail-pos { font-size: 12px; letter-spacing: .14em; color: var(--fg-3); font-variant-numeric: tabular-nums; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 90px); align-items: start; }
.portrait { position: relative; max-width: 480px; }
.portrait img { width: 100%; height: auto; border: 1px solid var(--line); filter: saturate(0.92) contrast(1.02); }
.portrait figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.about-copy { display: grid; gap: 18px; }
.spec { display: grid; border-top: 1px solid var(--line-2); margin-top: 8px; }
.spec div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 12px; padding-block: 11px; border-bottom: 1px solid var(--line); }
.spec dt { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); padding-top: 4px; }
.spec dd { font-size: 15px; color: var(--fg); }

/* markets */
.markets-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 90px); align-items: start; }
.markets-grid .panel-head { margin-bottom: 0; }
.markets-copy { display: grid; gap: 16px; padding-top: 10px; }

/* questions */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 6vw, 90px); align-items: start; }
.faq-grid .panel-head { margin-bottom: 0; position: sticky; top: calc(var(--nav-h) + 24px); }
.faq { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 20px; font-weight: 600; font-size: clamp(17px, 1.3vw, 20px); letter-spacing: -0.015em; transition: color .3s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 11px; height: 11px; border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent); transform: translateY(-3px) rotate(45deg); transition: transform .4s var(--ease); }
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--fg-2); max-width: 40em; padding-bottom: 22px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 6vw, 90px); align-items: start; }
.contact-copy { display: grid; gap: 20px; }
.contact-direct { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-phone { font-size: 15px; color: var(--fg-2); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.contact-phone .ico { color: var(--accent); }
.contact-phone a { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line-2); }
.copy-btn { font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--line); padding: 5px 10px; transition: border-color .3s; }
.copy-btn:hover { border-color: var(--accent); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; padding: 26px; border: 1px solid var(--line-2); background: var(--plate-solid); position: relative; }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.field input, .field textarea { width: 100%; font: inherit; color: var(--fg); background: var(--field); border: 1px solid var(--line); border-radius: 0; padding: 13px 14px; transition: border-color .3s, background-color .3s; min-width: 0; }
.field textarea { resize: vertical; min-height: 118px; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--field-focus); }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid .dd-btn { border-color: var(--danger); }
.form-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.form-note { font-size: 12px; color: var(--fg-3); }
.form-legal { font-size: 12px; color: var(--fg-3); }
.inline-link { color: var(--accent); border-bottom: 1px solid var(--line-2); transition: border-color .3s; }
.inline-link:hover { border-color: var(--accent); }
.form-success { grid-column: 1 / -1; display: grid; gap: 10px; text-align: center; padding-block: 24px; }
.form-success .display { font-size: clamp(38px, 5vw, 60px); }
.form.is-sent .field, .form.is-sent .form-foot, .form.is-sent .form-legal { display: none; }
.field-error { font-size: 12px; line-height: 1.4; color: var(--danger); }
.field label .opt { margin-left: 6px; font-size: 9px; letter-spacing: .12em; color: var(--fg-3); }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-count { font-size: 11px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.field-count.is-near { color: var(--accent); }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form .btn[disabled] { opacity: .6; pointer-events: none; }
#turnstileBox:empty { display: none; }
.phone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.dd { position: relative; min-width: 0; }
.dd-btn { width: 100%; min-height: 50px; display: flex; align-items: center; gap: 9px; text-align: left; font: inherit; color: var(--fg); background: var(--field); border: 1px solid var(--line); padding: 12px 14px; transition: border-color .3s, background-color .3s; }
.dd-btn:hover, .dd-btn[aria-expanded="true"] { border-color: var(--accent); background: var(--field-focus); }
.dd-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dd-val.is-placeholder { color: var(--fg-3); }
.dd-iso { flex: none; font-size: 10px; font-weight: 500; letter-spacing: .08em; line-height: 1.5; color: var(--brass-ink); background: var(--brass); padding: 1px 5px; }
.dd-chev { flex: none; width: 7px; height: 7px; margin-left: 2px; border-right: 1px solid var(--fg-2); border-bottom: 1px solid var(--fg-2); transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease); }
.dd-btn[aria-expanded="true"] .dd-chev { transform: translateY(1px) rotate(-135deg); }
.dd-pop { position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); min-width: 100%; background: var(--pop); border: 1px solid var(--line-2); box-shadow: 0 26px 60px -18px var(--shadow); overflow: hidden; }
.dd-country .dd-pop { width: min(320px, 84vw); }
.field .dd-search { width: 100%; font-size: 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--field); padding: 12px 14px; }
.field .dd-search:focus { outline: none; background: var(--field-focus); }
.dd-list { position: relative; max-height: 248px; overflow-y: auto; overscroll-behavior: contain; padding: 6px; outline: none; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.dd-opt { display: flex; align-items: center; gap: 10px; padding: 10px; font-size: 14px; color: var(--fg-2); cursor: pointer; }
.dd-opt.is-active, .dd-opt:hover { background: var(--field-focus); color: var(--fg); }
.dd-opt[aria-selected="true"] { color: var(--accent); }
.dd-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-dial { flex: none; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.dd-empty { padding: 12px 10px; font-size: 13px; color: var(--fg-3); }

/* footer */
.footer { position: relative; z-index: 2; padding-block: 48px max(36px, env(safe-area-inset-bottom, 0px)); background: var(--plate-solid); border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px 48px; flex-wrap: wrap; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.footer-meta { font-size: 14px; color: var(--fg-3); line-height: 1.7; margin-top: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; font-weight: 500; color: var(--fg-2); padding-top: 8px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; padding-block: 4px; border-bottom: 1px solid var(--line); transition: color .3s, border-color .3s; }
.footer-links a:hover { color: var(--fg); border-color: var(--accent); }
.footer-links .ico { width: 16px; height: 16px; color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px 40px; flex-wrap: wrap; padding-top: 22px; }
.footer-legal { font-size: 12px; color: var(--fg-3); line-height: 1.7; letter-spacing: .02em; }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer-legal-links a { border-bottom: 1px solid var(--line); transition: color .3s, border-color .3s; }
.footer-legal-links a:hover { color: var(--fg); border-color: var(--accent); }

/* phone contact rail: three plain actions along the bottom edge, shown after the first screen, hidden over the contact block */
.rail-contact { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: none; grid-template-columns: 1.4fr 1fr 1fr; background: var(--plate-solid); border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(110%); transition: transform .6s var(--ease), background-color var(--swap); }
.rail-contact.is-on { transform: none; }
.rail-c { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; font-size: 13px; font-weight: 600; border-right: 1px solid var(--line); }
.rail-c:last-child { border-right: 0; }
.rail-c .ico { width: 17px; height: 17px; }
.rail-c-main { background: var(--brass); color: var(--brass-ink); }
@media (max-width: 820px), (pointer: coarse) and (max-width: 1024px) { .rail-contact { display: grid; } .footer { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- legal and error pages (no scene) ---------- */
.plain { background: var(--paper); color: var(--ink); min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.plain-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); }
.plain main { flex: 1; }
.legal { max-width: 760px; padding-block: clamp(36px, 6vw, 72px) clamp(56px, 8vw, 96px); }
.legal-updated { font-size: 12px; letter-spacing: .08em; color: var(--fg-3); }
.legal h1 { margin-top: 10px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(38px, 5.4vw, 64px); }
.legal-intro { margin-top: 18px; font-size: clamp(17px, 1.2vw + 10px, 20px); color: var(--fg-2); }
.legal section { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal h2 { font-weight: 600; font-size: clamp(20px, 1.6vw, 24px); letter-spacing: -0.02em; }
.legal section p { margin-top: 12px; color: var(--fg-2); }
.legal section ul { margin-top: 12px; padding-left: 20px; list-style: disc; color: var(--fg-2); display: grid; gap: 8px; }
.legal section li::marker { color: var(--accent); }
.plain .footer { margin-top: auto; }
.notfound { display: grid; align-content: center; justify-items: start; gap: 22px; max-width: 760px; padding-block: clamp(56px, 12vh, 140px); }
.notfound h1 { font-weight: 500; letter-spacing: -0.035em; line-height: 1.0; font-size: clamp(42px, 7vw, 84px); text-wrap: balance; }
.notfound h1 b { font-weight: 700; color: var(--accent); }
.notfound p { color: var(--fg-2); max-width: 44ch; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 0; }
  .steps li { border-left: 1px solid var(--line-2); border-right: 0; margin-bottom: 28px; }
  .ledger li { grid-template-columns: 4rem minmax(0, 1fr); }
  .ledger p { grid-column: 2; }
  .faq-grid, .markets-grid { grid-template-columns: 1fr; }
  .faq-grid .panel-head { position: static; margin-bottom: 8px; }
  .about-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
}
@media (max-width: 820px) {
  :root { --nav-h: 62px; }
  /* phones: the sheet sits at the bottom of the screen, the scene has the upper two thirds */
  .beat-sticky { align-items: end; }
  .beat-copy { margin-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }   /* clear of the contact rail */
  .sheet { gap: 14px; padding: 18px 18px 16px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--plate-solid); }
  .sheet-left, .sheet-right, .sheet-center { width: auto; margin-inline: var(--gutter-l) var(--gutter-r); justify-self: stretch; }
  .hero-grid { padding-top: calc(var(--nav-h) + 12px); padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .sheet .display { font-size: clamp(26px, 7.4vw, 36px); }
  .sheet .display-xl { font-size: clamp(32px, 9vw, 44px); }
  .hero-copy { gap: 14px; }
  .hero-copy .lede { font-size: 15px; line-height: 1.45; }
  .tblock { display: none; }
  .figures { grid-template-columns: repeat(3, auto); gap: 8px 18px; }
  .figures dd { font-size: 24px; }
  .rows li { grid-template-columns: 2rem minmax(0, 1fr); gap: 3px 10px; padding-block: 8px; }
  .rows li .row-t { grid-column: 2; }
  .rows li .row-d { grid-column: 2; font-size: 13.5px; line-height: 1.4; }
  .rows-tight li .row-d { grid-column: 2; }
  .scroll-cue { display: none; }
  .steps { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .form { grid-template-columns: 1fr; padding: 18px; }
  .panel::before { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--plate-solid); }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .lot { flex-basis: min(300px, 82vw); }
  .spec div { grid-template-columns: 7rem minmax(0, 1fr); }
}
/* short phones: tighter sheets */
@media (max-width: 820px) and (max-height: 720px) {
  .hero-copy .display { font-size: clamp(34px, 9.6vw, 44px); }
  .sheet { gap: 10px; }
  .rows li { padding-block: 7px; }
  .row-d { font-size: 13px; }
}
@media (max-width: 420px) {
  .display { font-size: clamp(32px, 9.6vw, 42px); }
  .hero-copy .display { font-size: clamp(36px, 10.6vw, 46px); }
  .display-xl { font-size: clamp(40px, 12vw, 52px); }
  .btn { height: 50px; padding-inline: 18px; font-size: 14px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue span::after, .loader-mark { animation: none; }
  [data-lines] .ln > span, .hero-copy .line > span { transform: none; transition: none; }
  [data-intro], .beat-copy, [data-reveal] { opacity: 1; transform: none; }
  .btn { transition: none; }
}
