/* Self-hosted fonts. Switzer (ITF Free Font License, fonts/switzer-FFL.txt) for all text; Parisienne
   (SIL Open Font License, fonts/parisienne-OFL.txt) for the small script words over the giant words. */
@font-face {
  font-family: 'Switzer';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/switzer-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Switzer';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/switzer-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Parisienne';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/parisienne-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Qubba shared foundation. Tokens measured from the logo gear gradient. */
:root {
  --bg: #0A0B0D;
  --bg-2: #101215;
  --bg-3: #16191D;
  --ink: #F4F2EC;
  --ink-2: #C9CCD1;
  --mute: #858B92;
  --gold: #E4C25C;
  --gold-deep: #C2962C;
  --gold-light: #F1E47F;
  --gold-grad: linear-gradient(135deg, #C4972A 0%, #D9BD58 28%, #F1E47F 50%, #D3B863 72%, #BB9549 100%);
  --line: rgba(228, 194, 92, 0.22);
  --line-soft: rgba(244, 242, 236, 0.10);
  --paper: #EDE6D3;
  --paper-ink: #1A1712;
  --display: 'Switzer', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --script: 'Parisienne', 'Snell Roundhand', cursive;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 62ch;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
/* A width/height attribute pair maps to a fixed CSS height; without this, any image sized by width alone (an article
   visual, a mark at 30%) keeps the attribute's height and stretches into a tall crop on phones */
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a.sr-only:focus { position: fixed; top: 1rem; left: var(--gutter); z-index: 100; width: auto; height: auto; clip: auto; overflow: visible; padding: .75rem 1rem; background: var(--bg); color: var(--ink); white-space: normal; }
p a:not(.btn), .article-meta a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
h1, h2, h3, .display { font-family: var(--display); font-weight: 600; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 8.5vw, 8rem); line-height: 0.96; }
h2 { font-size: clamp(2.1rem, 5vw, 4.4rem); line-height: 1.02; }
h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.12; }
h4 { font-family: var(--sans); font-weight: 500; font-size: 1.125rem; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
p + p { margin-top: 1em; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }
.measure { max-width: var(--measure); }
em, .it { font-style: italic; }
.gold { color: var(--gold); }
.mute { color: var(--mute); }
.small { font-size: 0.9375rem; }

/* Layout */
.wrap { width: min(100% - 2 * var(--gutter), 1360px); margin-inline: auto; }
.section { padding-block: clamp(5rem, 12vh, 9rem); position: relative; }
.section + .section { border-top: 1px solid var(--line-soft); }
.grid { display: grid; gap: clamp(1.5rem, 4vw, 4rem); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 8rem); align-items: start; }
.split > .sticky { position: sticky; top: calc(var(--nav-h) + 2rem); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .split { grid-template-columns: 1fr; }
  .split > .sticky { position: static; }
}
/* Phones: one steady rhythm. Two stacked 12vh paddings left 200px of empty black between sections. */
@media (max-width: 700px) {
  .section { padding-block: 3.75rem; }
  .split { gap: 1.75rem; }
}

/* Ledger: rows with hairline gold rules, the house structure instead of cards */
.ledger { border-top: 1px solid var(--line); }
.ledger-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.5rem 3rem; padding: clamp(1.25rem, 2.5vw, 2rem) 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.ledger-row h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.ledger-row p { color: var(--ink-2); max-width: 56ch; }
@media (max-width: 700px) { .ledger-row { grid-template-columns: 1fr; gap: .5rem; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.5rem; border-radius: 999px; font-weight: 500; font-size: 1rem; line-height: 1; transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease); white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-light); }
.btn-line { border: 1px solid var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--gold); color: var(--gold); }
.btn-paper { background: var(--paper-ink); color: var(--paper); }
/* Over video and photo worlds: a dark glass pill with a light rim, legible on bright clouds and dark plates alike */
.btn-glass { background: rgba(10, 11, 13, .48); color: var(--ink); border: 1px solid rgba(244, 242, 236, .34); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.btn-glass:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn svg { width: 1em; height: 1em; flex: none; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
@media (max-width: 700px) {
  .btn { min-height: 50px; padding: .9rem 1.35rem; justify-content: center; }
}

/* Nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; transition: background .5s var(--ease), border-color .5s var(--ease); border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(10, 11, 13, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line-soft); }
.nav .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; }
.nav-logo { display: flex; align-items: center; justify-self: start; color: var(--ink); }
.nav-logo svg { height: 30px; width: auto; }
/* One pill of tabs, as on the Alan Chen site: the current section's tab is filled */
.nav-pill { grid-column: 2; display: flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--line-soft); border-radius: 999px; background: rgba(244, 242, 236, 0.05); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav-pill a { padding: .6rem 1.1rem; border-radius: 999px; font-size: .9rem; font-weight: 500; line-height: 1; color: var(--ink-2); white-space: nowrap; transition: color .25s var(--ease), background-color .25s var(--ease); }
.nav-pill a:hover { color: var(--ink); background: rgba(244, 242, 236, 0.08); }
.nav-pill a[aria-current] { color: var(--bg); background: var(--ink); }
.nav-cta { grid-column: 3; display: flex; align-items: center; justify-self: end; gap: .6rem; }
.nav-burger { display: none; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid rgba(244, 242, 236, .22); background: rgba(10, 11, 13, .4); }
.nav-burger span { display: block; width: 18px; height: 1px; background: var(--ink); box-shadow: 0 -5px 0 var(--ink), 0 5px 0 var(--ink); transition: .3s; }
.nav-sheet { position: fixed; inset: 0; z-index: 49; background: var(--bg); padding: calc(var(--nav-h) + 2rem) max(var(--gutter), env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left)); overflow-y: auto; overscroll-behavior: contain; scroll-padding-top: calc(var(--nav-h) + 1rem); -webkit-overflow-scrolling: touch; display: none; flex-direction: column; gap: 1.25rem; font-family: var(--display); font-size: 2.25rem; }
.nav-sheet > * { flex-shrink: 0; }
.nav-burger[aria-expanded="true"] span { box-shadow: none; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span::after { content: ""; display: block; width: 18px; height: 1px; background: var(--ink); transform: rotate(90deg); }
.nav-sheet a { border-bottom: 1px solid var(--line-soft); padding-bottom: 1rem; }
.nav-sheet .btn { font-family: var(--sans); font-size: 1rem; align-self: flex-start; margin-top: 1rem; }
.nav-sheet.is-open { display: flex; }
@media (max-width: 1240px) { .nav-pill a { padding: .55rem .8rem; font-size: .86rem; } }
@media (max-width: 1060px) {
  .nav-pill, .nav-cta .btn { display: none; }
  .nav-burger { display: inline-flex; }
}

/* Footer */
.footer { border-top: 1px solid var(--line); padding: clamp(3rem, 8vh, 6rem) 0 2.5rem; color: var(--ink-2); font-size: .95rem; }
.footer-top { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.footer-top .nav-logo svg { height: 34px; }
.footer h4 { color: var(--ink); margin-bottom: .9rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer a:hover { color: var(--gold); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft); color: var(--mute); font-size: .875rem; }
@media (max-width: 800px) { .footer-top { grid-template-columns: 1fr 1fr; } }

/* Scene shells shared by every hero world */
.scene { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.scene-pin { position: relative; }
.plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform, opacity; }
.plate-screen { mix-blend-mode: screen; }
.scene-copy { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: var(--gutter); pointer-events: none; }
.scene-copy > * { pointer-events: auto; }
.vignette::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(10, 11, 13, .75) 100%); pointer-events: none; }
.fade-bottom::before { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; z-index: 2; }

/* Marquee */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 3.5rem; width: max-content; animation: marquee 48s linear infinite; padding-block: .5rem; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Forms */
.field { display: grid; gap: .4rem; }
.field label { font-size: .875rem; color: var(--ink-2); }
.field input, .field textarea, .field select { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: .85rem 1rem; color: var(--ink); transition: border-color .3s; width: 100%; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); outline: none; }
/* Safari draws a native select as a white pill; this one matches the dark fields around it */
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.75rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23d6d5cf' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder, .waitlist-row input::placeholder { color: var(--mute); opacity: 1; }
.form-note { font-size: .875rem; color: var(--mute); }
.form-ok { border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.5rem; color: var(--ink); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* Reveal: one restrained entrance for ledger content, disabled under reduced motion */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* Reduced motion: scenes show their final state, nothing scrubs */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .btn:hover { transform: none; }
}

/* ===== v2 primitives: world, giant type, panels, rule strip ===== */
.world { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.world-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.world video, .world-sticky video, .video-plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.world-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(10, 11, 13, .82) 0%, rgba(10, 11, 13, .25) 45%, rgba(10, 11, 13, .15) 100%); }
.giant { position: relative; font-family: var(--display); font-weight: 700; font-size: clamp(6rem, 20vw, 24rem); line-height: .82; letter-spacing: -.03em; white-space: nowrap; color: var(--ink); will-change: transform;
  /* will-change gives the word its own GPU layer, and browsers may clip that layer at the box edge. With line-height .82 the
     descenders (q, g, y, comma) hang up to .14em below the box, so pad the box around the ink and pull it back with equal
     negative margins: the ink is inside the layer and nothing moves. Rules that set their own margin must keep the --ink terms. */
  --ink-t: 0em; --ink-x: .06em; --ink-b: .2em; padding: var(--ink-t) var(--ink-x) var(--ink-b); margin: calc(-1 * var(--ink-t)) calc(-1 * var(--ink-x)) calc(-1 * var(--ink-b)); }
/* The small script word over a giant word, as in the Tempting over Switzer sample. It lives in the giant's top
   padding (--ink-t), inside the box, and moves with the word. */
.has-script { --ink-t: .36em; }
/* em here is the script's own size. Parisienne's f, g and p swing up to .25em left of their start and .45em below the
   baseline; the padding keeps that ink inside this box, and the box inside the giant's, so no layer can cut a swash. */
.giant-script { position: absolute; left: 0; top: 0; padding: 0 .45em .5em; font-family: var(--script); font-weight: 400; font-size: .3em; line-height: 1.2; letter-spacing: 0; white-space: nowrap; color: var(--gold); pointer-events: none; }
/* Over a photograph or video the script keeps a soft dark halo, so gold stays gold on bright cloud */
.world .giant-script, .world-sticky .giant-script { text-shadow: 0 1px 2px rgba(10, 11, 13, .35), 0 4px 22px rgba(10, 11, 13, .6); }
/* Phones and tablets: .3em of a phone-sized giant is about 19px of a hairline script, which cannot be read. The script
   takes its own line above the word at a fixed readable size, with a hair of stroke to carry the thin strokes. The giant
   drops its top ink padding (the script now has a box of its own) and widens the side padding for the swashes. */
@media (max-width: 900px) {
  .has-script { --ink-t: 0em; --ink-x: .1em; }
  .giant-script { position: relative; display: block; width: max-content; max-width: none; padding: 0 .4em .02em .3em; margin: 0 0 .06em -.3em;
    font-size: clamp(1.9rem, 8.4vw, 2.75rem); line-height: 1.12; -webkit-text-stroke: .012em currentColor; }
}
.giant em, h1 em, h2 em, h3 em { font-style: normal; }
.giant-gold { color: var(--gold); }
.line { font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: 1.45; color: var(--ink-2); max-width: 44ch; text-wrap: pretty; }
.panel { position: relative; z-index: 2; background: rgba(10, 11, 13, .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line-soft); padding: clamp(3.5rem, 10vh, 8rem) 0; }
.panel-paper { background: var(--paper); color: var(--paper-ink); border-top: 0; }
.panel-paper .line, .panel-paper .rule-strip dt { color: #4a4438; }
.panel-paper .rule-strip { border-color: rgba(26, 23, 18, .25); }
.panel-paper .rule-strip > div { border-color: rgba(26, 23, 18, .12); }
.rule-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 2rem; margin: 0; border-top: 1px solid var(--line); }
.rule-strip > div { padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.rule-strip dt { font-size: .8rem; color: var(--mute); letter-spacing: .01em; }
.rule-strip dd { margin: .25rem 0 0; font-family: var(--display); font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1; }
.scene-copy-v2 { position: absolute; inset: 0; z-index: 2; display: grid; align-content: end; gap: 1rem; padding: 0 var(--gutter) clamp(2.5rem, 8vh, 6rem); }
.scene-copy-v2 .giant { margin-left: calc(-.04em - var(--ink-x)); }
.scene-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.two-col { columns: 2; column-gap: 3rem; }
.two-col li { break-inside: avoid; }
@media (max-width: 700px) {
  .two-col { columns: 1; }
  .giant { white-space: normal; font-size: clamp(4.2rem, 24vw, 8rem); }
  /* Two actions share the row, a lone action keeps its own width */
  .scene-actions .btn { flex: 1 1 auto; }
  .scene-actions .btn:only-child { flex: 0 1 auto; }
  /* Facts read as label and value on one row instead of a two column grid with an orphan */
  .rule-strip { grid-template-columns: minmax(0, 1fr); }
  .rule-strip > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .95rem 0; }
  .rule-strip dd { margin: 0; font-size: 1.45rem; text-align: right; }
  .panel { padding: 3.5rem 0; }
}
@media (prefers-reduced-motion: reduce) { .world video, .world-sticky video { display: none; } }

/* Preserve native hidden semantics even when component styles set display. */
[hidden] { display: none !important; }
