/* Scroll-told homepage. Shares tokens and the footer with style.css. */
:root {
  --ink: #070a10;
  --ivory: #f4f0e8;
  --gold: #c8ab7d;
  --gold-soft: #d4c3a5;
  --muted: #b7b2aa;
  --serif: "Cormorant Garamond", Georgia, serif;
  --card-w: 360px;
  --card-h: 540px;
  --gutter: clamp(1rem, 4vw, 3rem);
}

[data-layer="compass"] { --c: #d5a95c; }
[data-layer="lens"] { --c: #9d8bd8; }
[data-layer="palette"] { --c: #73b8a6; }
[data-layer="well"] { --c: #789ed8; }
[data-layer="presence"] { --c: #d39aaf; }
[data-layer="portrait"] { --c: #d48a88; }

html { scroll-behavior: auto; }
body.landing { display: block; min-height: 0; background: var(--ink); overflow-x: clip; }
body.landing::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 50% 30%, #25221b55, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 90%, #10182a66, transparent 70%),
    linear-gradient(135deg, #0c1018, #070a10 55%, #090a10);
}
.landing main { width: auto; margin: 0; padding: 0; text-align: left; }
.particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Top bar and progress */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: max(.5rem, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) .5rem max(var(--gutter), env(safe-area-inset-left));
  pointer-events: none;
}
.topbar a { pointer-events: auto; display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; transition: opacity .5s ease, visibility .5s; }
.topbar-brand { gap: .55rem; color: var(--ivory); font-family: var(--serif); font-size: 1.35rem; letter-spacing: .02em; opacity: 0; visibility: hidden; }
.topbar-brand.is-visible, .topbar-skip.is-visible { opacity: 1; visibility: visible; }
.topbar-skip { gap: .45rem; color: #a49b8d; font-size: .6875rem; letter-spacing: .16em; text-transform: uppercase; opacity: 0; visibility: hidden; }
.topbar-skip:hover { color: var(--gold); }
.rail { position: fixed; z-index: 29; right: max(1.4rem, env(safe-area-inset-right)); top: 50%; width: 1px; height: 9rem; margin-top: -4.5rem; background: #c8ab7d26; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.rail.is-visible { opacity: 1; }
.rail-fill { position: absolute; inset: 0; background: linear-gradient(#c8ab7d, #f1d9a9); transform-origin: top; transform: scaleY(0); }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 5rem 1.5rem 7rem; text-align: center; }
.hero-inner { will-change: transform, opacity; }
.hero-mark { display: block; width: clamp(8.5rem, 17vw, 11.25rem); height: auto; margin: 0 auto 1rem; overflow: visible; filter: drop-shadow(0 8px 24px #0008); }
.hero h1 { font-size: clamp(4.5rem, 10vw, 7rem); line-height: 1; letter-spacing: .015em; margin: 0; }
.hero .tagline { margin-top: 1.4rem; }
.scroll-cue { position: absolute; left: 50%; bottom: max(2.2rem, env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; display: grid; justify-items: center; gap: .9rem; color: #a49b8d; font-size: .625rem; letter-spacing: .28em; text-transform: uppercase; white-space: nowrap; }
.scroll-cue i { position: relative; display: block; width: 1px; height: 3.2rem; overflow: hidden; background: #c8ab7d22; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; width: 1px; height: 40%; background: linear-gradient(transparent, var(--gold)); animation: cue 2.6s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes cue { from { transform: translateY(-110%); } to { transform: translateY(260%); } }

.hero-links { display: flex; justify-content: center; align-items: center; gap: 0 1.4rem; margin-top: 1.6rem; }
.hero-links a { display: inline-flex; align-items: center; gap: 1.4rem; min-height: 44px; color: var(--muted); font-size: .6875rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; transition: color .3s ease; }
.hero-links a:hover { color: var(--gold); }
.hero-links a + a::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #c8ab7d99; }

.hero-mark, .hero h1, .hero .tagline, .hero-links, .scroll-cue { animation: rise 1.6s cubic-bezier(.2, .7, .2, 1) both; }
.hero h1 { animation-delay: .25s; }
.hero .tagline { animation-delay: .5s; }
.hero-links { animation-delay: .7s; }
.scroll-cue { animation-name: cue-in; animation-delay: 1.1s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes cue-in { from { opacity: 0; } }

/* Story stage */
.story { position: relative; height: 2000vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scene { position: absolute; inset: 0; transition: opacity .22s ease; }
.scene.is-fading { opacity: 0; }
.visuals { position: absolute; inset: 0; z-index: 0; }
.visuals > .field, .visuals > .threads { opacity: 1; }
.field { inset: 0; }
.visuals > *, .field > * { position: absolute; left: 0; top: 0; opacity: 0; transform-origin: 50% 50%; }
.lines { position: absolute; top: 0; bottom: 0; left: max(var(--gutter), 5vw); width: min(34vw, 30rem); display: grid; z-index: 10; pointer-events: none; }
.line { grid-area: 1 / 1; align-self: center; margin: 0; opacity: 0; font-family: var(--serif); font-weight: 400; color: var(--ivory); font-size: clamp(2rem, 3.3vw, 3.25rem); line-height: 1.14; letter-spacing: .005em; text-wrap: balance; }
.layer-line h2 { margin: 0; font-size: clamp(2.6rem, 4.4vw, 4.25rem); line-height: 1; font-style: italic; color: var(--ivory); }
.layer-line > p { margin: 0; }
.layer-line > p:not(.line-eyebrow) { margin-top: 1.1rem; font-size: clamp(1.25rem, 1.8vw, 1.7rem); line-height: 1.35; color: var(--gold-soft); max-width: 24ch; }
.line-eyebrow { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .625rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.line-eyebrow::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 14px var(--c); }

/* Plain, all-at-once profiles */
.plain-card { width: 300px; height: 470px; border-radius: 14px; overflow: hidden; background: #171a20; border: 1px solid #ffffff12; box-shadow: 0 30px 60px -30px #000c; filter: saturate(.55) brightness(.9); }
.plain-photo { display: block; width: 100%; height: 64%; object-fit: cover; object-position: 50% 25%; background: #22252c; }
.plain-body { display: grid; gap: .55rem; padding: 1rem 1.1rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.plain-body strong { font-size: 1.15rem; color: #e6e3de; }
.plain-body small { margin-top: -.35rem; font-size: .72rem; color: #8d8a85; }
.plain-body b { display: block; width: 45%; height: .8rem; border-radius: 4px; background: #2b2e35; }
.plain-body i { display: block; height: .45rem; border-radius: 4px; background: #2a2d33; }
.plain-body i:nth-of-type(2) { width: 88%; }
.plain-body i:nth-of-type(3) { width: 64%; }
.plain-body span { display: flex; gap: .4rem; margin-top: .2rem; }
.plain-body em { width: 3.4rem; height: 1.3rem; border-radius: 99px; border: 1px solid #ffffff1c; }

.spark { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, #fff6df 0 18%, #f1d9a9 30%, #c8ab7d55 55%, transparent 72%); box-shadow: 0 0 40px 10px #c8ab7d33; }
.union { width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(circle, #f1d9a92e, #c8ab7d14 38%, transparent 68%); }

/* Layer and person cards */
.card { width: var(--card-w); height: var(--card-h); border-radius: 24px; overflow: hidden; isolation: isolate; color: var(--ivory); box-shadow: 0 40px 80px -40px #000e, 0 0 0 1px #00000040; }
.layer-card {
  border: 1px solid color-mix(in srgb, var(--c) 42%, transparent);
  background:
    radial-gradient(120% 70% at var(--light, 15% 0%), color-mix(in srgb, var(--c) 30%, transparent), transparent 62%),
    radial-gradient(90% 60% at 100% 100%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%),
    linear-gradient(165deg, #141924, #0b0e15 70%);
}
.layer-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(120deg, #ffffff10, transparent 30%); }
.card-glow { position: absolute; inset: 0; z-index: 3; border-radius: inherit; opacity: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c, #c8ab7d) 85%, white), inset 0 0 60px color-mix(in srgb, var(--c, #c8ab7d) 40%, transparent);
  background: radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--c, #c8ab7d) 26%, transparent), transparent 70%); }
.person-card .card-glow { --c: #c8ab7d; }
.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.icon .fill { fill: currentColor; stroke: none; }
.icon use { fill: none; }

.face-stack, .face-focus { position: absolute; inset: 0; }
.layer-card .face-stack { color: color-mix(in srgb, var(--c) 70%, white); }
.layer-card .face-stack .icon { position: absolute; top: 84px; left: 30px; font-size: 64px; stroke-width: .8; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--c) 50%, transparent)); }
/* Spine titles stay legible while the next card covers most of this one. */
.stack-title { position: absolute; left: 34px; bottom: 34px; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--serif); font-size: 50px; line-height: 1; color: var(--ivory); white-space: nowrap; }
.numeral { position: absolute; top: 28px; left: 32px; font-family: var(--serif); font-size: 30px; color: color-mix(in srgb, var(--c) 70%, white); opacity: .85; }
.watermark { position: absolute; right: -46px; bottom: -46px; font-size: 260px; stroke-width: .5; color: var(--c); opacity: .13; }
.focus-index { position: absolute; left: 32px; bottom: 30px; margin: 0; font-family: var(--serif); font-size: 16px; letter-spacing: .12em; color: color-mix(in srgb, var(--c) 60%, #8f897f); }
.face-focus { opacity: 0; padding: 34px 32px; }
.focus-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 75%, white); }
.focus-eyebrow .icon { font-size: 22px; }
.face-focus h3 { margin: 16px 0 0; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; }
.face-focus ul { list-style: none; margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid color-mix(in srgb, var(--c) 30%, transparent); display: grid; gap: 18px; }
.face-focus li { position: relative; padding-left: 22px; font-family: var(--serif); font-style: italic; font-size: 23px; line-height: 1.22; color: #ece6da; opacity: 0; }
.face-focus li::before { content: ""; position: absolute; left: 0; top: .62em; width: 11px; height: 1px; background: var(--c); }

.person-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.person-card { background: #11141b; border: 1px solid #c8ab7d55; }
.person-card .face-stack { display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; background: linear-gradient(transparent 52%, #070a10d9 88%); }
.person-card .face-stack strong { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1; }
.person-card .face-stack small { margin-top: 10px; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-soft); }
.person-card .face-focus { background: linear-gradient(#070a10f0 0%, #070a10b3 40%, transparent 66%); }
.person-card .face-focus h3 { margin-top: 14px; }
.person-card .face-focus ul { border-top-color: #d48a8855; gap: 12px; }
.person-card .face-focus li { font-size: 20px; }

/* A single voice per dealt layer card; light falls differently on each. */
.layer-card.voice-0 { --light: 92% 8%; }
.layer-card.voice-1 { --light: 40% 100%; }
.layer-card .face-focus li { padding: 0; margin-top: 8px; font-size: 32px; line-height: 1.2; text-wrap: pretty; }
.layer-card .face-focus li::before { content: "\201C"; position: static; display: block; width: auto; height: auto; margin-bottom: 18px; background: none; font-size: 84px; font-style: normal; line-height: .5; color: var(--c); opacity: .75; }

/* Field threads and alignment bridges */
.threads { overflow: visible; width: 1px; height: 1px; opacity: 1 !important; }
.threads line { stroke: #f1d9a9; stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; filter: drop-shadow(0 0 4px #c8ab7d); }
.bridges { display: grid; align-content: space-between; }
.bridge { position: relative; height: 24px; text-align: center; }
.bridge span { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #8f897f; white-space: nowrap; }
.bridge i { position: absolute; bottom: 0; width: 50%; height: 1px; background: #c8ab7d50; transform: scaleX(0); }
.bridge i:nth-of-type(1) { left: 0; transform-origin: left; }
.bridge i:nth-of-type(2) { right: 0; transform-origin: right; }
.bridge.is-aligned span { color: var(--gold-soft); }
.bridge.is-aligned i:nth-of-type(1) { background: linear-gradient(90deg, #c8ab7d, #f1d9a9); }
.bridge.is-aligned i:nth-of-type(2) { background: linear-gradient(270deg, #c8ab7d, #f1d9a9); }
.bridge b { position: absolute; bottom: -3px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; background: #f1d9a9; transform: rotate(45deg) scale(0); box-shadow: 0 0 12px #f1d9a9; }
.bridge:not(.is-aligned) b { display: none; }

/* Finale */
.finale { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; justify-items: center; padding: 6rem 1.5rem 3rem; text-align: center; outline: none; }
.finale-mark { width: clamp(5.5rem, 10vw, 7.5rem); height: auto; margin-bottom: 1.8rem; filter: drop-shadow(0 8px 24px #0008); }
.finale h2 { margin: 0; font-size: clamp(2.6rem, 5.4vw, 4rem); line-height: 1.1; }
.finale-lead { margin: 1.1rem auto 0; max-width: 26rem; color: var(--muted); font-size: .9375rem; line-height: 1.8; text-wrap: pretty; }
.finale .demo-cta { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; min-height: 48px; margin-top: 2rem; padding: .8rem 1.5rem; border: 1px solid #d4bd97; border-radius: 4px; background: var(--gold); color: #10131a; font-size: .875rem; font-weight: 500; line-height: 1.5; text-decoration: none; transition: background .3s ease, box-shadow .3s ease, opacity 1.1s cubic-bezier(.2, .7, .2, 1), transform 1.1s cubic-bezier(.2, .7, .2, 1), filter 1.1s cubic-bezier(.2, .7, .2, 1); }
.finale .demo-cta:hover { background: #dcc59f; box-shadow: 0 0 34px #c8ab7d44; }
.finale .demo-note { margin: .8rem 0 0; font-size: .75rem; color: #a49b8d; }
.reveal { opacity: 0; transform: translateY(18px); filter: blur(5px); transition: opacity 1.1s cubic-bezier(.2, .7, .2, 1), transform 1.1s cubic-bezier(.2, .7, .2, 1), filter 1.1s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }
.finale-mark { transition-delay: 0s; }
.finale h2.reveal { transition-delay: .12s; }
.finale-lead.reveal { transition-delay: .26s; }
.finale .demo-cta.reveal { transition-delay: .4s, .4s, .4s, .4s, .4s; }
.finale .demo-note.reveal { transition-delay: .55s; }
.landing footer { position: relative; }

/* Compact: phones and tall, narrow windows */
@media (max-width: 819px), (max-aspect-ratio: 9/10) {
  .rail { top: 0; left: 0; right: 0; width: auto; height: 1px; margin: 0; }
  .rail-fill { transform-origin: left; background: linear-gradient(90deg, #c8ab7d, #f1d9a9); transform: scaleX(0); }
  .stage::after { content: ""; position: absolute; inset: auto 0 0; height: 46%; z-index: 9; pointer-events: none; background: linear-gradient(#070a1000, #070a10d9 34%, #070a10f7 56%, #070a10); }
  .line { font-size: clamp(1.65rem, 6.6vw, 2.2rem); text-align: center; align-self: end; justify-self: center; max-width: 22ch; }
  .layer-line h2 { font-size: clamp(2.2rem, 9.5vw, 2.9rem); }
  .layer-line > p:not(.line-eyebrow) { margin: .7rem auto 0; font-size: 1.15rem; }
  .line-eyebrow { justify-content: center; margin-bottom: .8rem !important; }
  .lines { left: 1.25rem; right: 1.25rem; width: auto; top: auto; bottom: calc(env(safe-area-inset-bottom) + 1.5rem); height: 34%; }
  .line { align-self: center; }
  .bridge span { font-size: 9px; letter-spacing: .12em; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mark, .hero h1, .hero .tagline, .hero-links, .scroll-cue { animation: none; }
  .scroll-cue i::after { animation: none; transform: translateY(60%); }
  .reveal { transform: none; filter: none; transition: opacity .6s ease; }
}
