/* Vizunexa Phase 1: site shell + hero. Tokens and rationale: docs/PHASE1_CREATIVE_DIRECTION.md */

@font-face { font-family: "Lexend Exa"; src: url("assets/fonts/lexend-exa-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lexend Exa"; src: url("assets/fonts/lexend-exa-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("assets/fonts/unbounded-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #F7F6F1;
  --ink: #101014;
  --pink: #FF2D95;
  --blue: #2563FF;
  --purple: #A855F7;
  --lime: #BEFF27;
  --orange: #FF6B22;
  --yellow: #FFE536;
  --logo: "Lexend Exa", "Geist", system-ui, sans-serif;
  --display: "Unbounded", "Geist", system-ui, sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ruler-h: 46px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--body); overflow-x: clip; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip { position: fixed; left: 16px; top: 12px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: 8px; text-decoration: none; transform: translateY(-160%); transition: transform .2s; }
.skip:focus { transform: none; }

/* ---------- Header: appears once the hero has finished its story ---------- */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(16px, 3vw, 36px); pointer-events: none; opacity: 0; transform: translateY(-12px); transition: opacity .45s cubic-bezier(.2,.7,.2,1), transform .45s cubic-bezier(.2,.7,.2,1); }
.hdr.is-on { opacity: 1; transform: none; pointer-events: auto; }
/* a soft band of the scene colour behind the header, so text scrolling underneath never collides */
body { --band: var(--paper); }
body.on-dark { --band: var(--ink); }
body.on-blue { --band: var(--blue); } body.on-yellow { --band: var(--yellow); } body.on-pink { --band: var(--pink); }
body.on-purple { --band: var(--purple); } body.on-lime { --band: var(--lime); } body.on-orange { --band: var(--orange); } body.on-ink { --band: var(--ink); }
.hdr::before { content: ""; position: absolute; inset: 0 0 -26px 0; z-index: -1; background: linear-gradient(var(--band) 55%, color-mix(in srgb, var(--band) 0%, transparent)); pointer-events: none; }
.hdr-brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.hdr-v { width: 34px; height: auto; margin-right: 1px; transform: translateY(-1px); }
.hdr-word { font: 600 19px/1 var(--logo); letter-spacing: .02em; }
.hdr-nav { display: flex; gap: 6px; }
.hdr-nav a { font: 500 15px/1 var(--body); text-decoration: none; padding: 10px 14px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 80%, transparent); backdrop-filter: blur(8px); }
.hdr-nav a:hover { background: var(--ink); color: var(--paper); }
body.on-dark .hdr-brand, body.on-dark .hdr-nav a { color: var(--paper); }
body.on-dark .hdr-nav a { background: color-mix(in srgb, var(--ink) 60%, transparent); }
body.on-dark .hdr-nav a:hover { background: var(--paper); color: var(--ink); }

/* ---------- HERO ---------- */
.hero { position: relative; }
.hero-pin { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--paper); }
.hero-stage { position: absolute; inset: 0; display: grid; place-items: center; perspective: 1100px; perspective-origin: 50% 46%; }

.hero-word { position: absolute; margin: 0; display: flex; justify-content: center; font: 600 clamp(44px, 11.2vw, 220px)/1 var(--logo); letter-spacing: .01em; white-space: nowrap; transform-style: preserve-3d; color: var(--ink); }
.hl { display: inline-block; transform-style: preserve-3d; will-change: transform; }
.hl-in { display: inline-block; transform-origin: 50% 85%; backface-visibility: visible; }
.is-loading .hl-in { opacity: 0; }

/* Final logo composition (size D = the ring diameter; everything inside is in container units) */
.logo-frame { --d: min(80svh, 92vw); position: absolute; inset: 0 0 var(--ruler-h) 0; margin: auto; width: var(--d); height: var(--d); container-type: size; visibility: hidden; transform-style: preserve-3d; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-line { transform-origin: 500px 500px; }
.vmark { position: absolute; left: 28%; top: 15.5%; width: 44%; height: auto; overflow: visible; }

.lockup { position: absolute; left: 0; right: 0; top: 49.5%; text-align: center; }
.lk-word { font: 600 8.6cqw/1 var(--logo); letter-spacing: .03em; color: var(--ink); display: flex; justify-content: center; }
.lk-word span, .lk-ms span { display: inline-block; will-change: transform; }
.lk-sub { margin-top: 2.6cqw; display: flex; align-items: center; justify-content: center; gap: 2.4cqw; }
.lk-rule { display: block; width: 9cqw; height: 2px; background: var(--ink); transform-origin: center; }
.lk-ms { font: 500 2.9cqw/1 var(--logo); letter-spacing: .5em; margin-right: -.5em; color: var(--ink); white-space: nowrap; }
.lk-ms .sp { width: .6em; }
.lk-desc { margin-top: 3.4cqw; display: flex; align-items: center; justify-content: center; gap: 2cqw; font: 500 2.55cqw/1 var(--body); color: var(--ink); }
.lk-desc i { display: block; width: 2px; height: 2.4cqw; background: var(--pink); border-radius: 1px; }
.lk-desc span { display: inline-block; }

.hero-cue { position: absolute; left: 50%; bottom: calc(var(--ruler-h) + 22px); translate: -50% 0; margin: 0; font: 500 14px/1 var(--body); color: color-mix(in srgb, var(--ink) 60%, transparent); display: flex; align-items: center; gap: 10px; opacity: 0; transition: opacity .5s; }
.hero-cue.is-on { opacity: 1; }
.hero-cue.is-gone { opacity: 0; }
.hero-cue::before { content: ""; width: 1px; height: 26px; background: currentColor; transform-origin: top; animation: cue 1.8s cubic-bezier(.6,0,.2,1) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }


/* ---------- Timecode ruler (navigation + progress) ---------- */
.ruler { position: fixed; left: 0; right: 0; bottom: 0; height: var(--ruler-h); z-index: 25; display: flex; align-items: center; gap: 14px; padding: 0 clamp(12px, 2.4vw, 30px); color: #fff; mix-blend-mode: difference; pointer-events: none; }
.ruler-track { position: relative; flex: 1; height: 100%;
  background:
    linear-gradient(currentColor, currentColor) left 50% bottom 0 / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 80px) left bottom / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 16px) left bottom / 100% 6px no-repeat;
  opacity: .9; }
.ruler-head { position: absolute; bottom: 0; left: 0; width: 2px; height: 26px; background: currentColor; translate: -1px 0; }
.ruler-head::before { content: ""; position: absolute; left: -5px; top: -7px; border: 6px solid transparent; border-top: 8px solid currentColor; }
.ruler-tc { font: 500 13px/1 var(--body); font-variant-numeric: tabular-nums; letter-spacing: .04em; min-width: 7.2ch; text-align: right; }
.ruler-mark { position: absolute; bottom: 14px; translate: -1px 0; pointer-events: auto; border: 0; background: none; color: inherit; padding: 4px 6px 4px 8px; font: 500 12px/1 var(--body); cursor: pointer; border-left: 1px solid currentColor; white-space: nowrap; }
.ruler-mark.is-end { border-left: 0; border-right: 1px solid currentColor; padding: 4px 8px 4px 6px; translate: -100% 0; }
.ruler-mark:hover, .ruler-mark:focus-visible { text-decoration: underline; }

@media (max-width: 700px) {
  :root { --ruler-h: 40px; }
  .hdr-nav a:not(.hdr-cta) { display: none; }
  .hdr-nav a { white-space: nowrap; padding: 10px 12px; font-size: 14px; }
  .hdr-word { font-size: 16px; } .hdr-v { width: 28px; }
  .fp-pin, .how-pin, .build-pin, .svc-pin { padding-top: 92px !important; }
  .ruler-mark { font-size: 11px; }
  .logo-frame { --d: min(92vw, 74svh); }
}

/* ---------- Reduced motion: show the finished composition, no pinning ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-word { display: none; }
  .logo-frame { visibility: visible; }
  .hero-cue { display: none; }
  .hdr { opacity: 1; transform: none; pointer-events: auto; }
}

/* Owner decision 2026-11-22: no timecode ruler on the site. Only the sound toggle stays, bottom-left. */
.ruler-track, .ruler-tc { display: none !important; }
.ruler { right: auto; width: auto; height: auto; bottom: 16px; left: 16px; padding: 0; mix-blend-mode: difference; }
