﻿/* ===== Praetela / ZeroGuess  -  shared design tokens ============================
   Tech-utility Ã— cinematic dark. Black canvas, ember orange accent, mono-led
   typography. Used by variant-a, variant-b, variant-c.
============================================================================ */

:root {
  /* Palette ----------------------------------------------------------------- */
  --bg:        oklch(8% 0.005 60);
  --bg-2:      oklch(11% 0.008 60);
  --surface:   oklch(13% 0.012 50);
  --surface-2: oklch(16% 0.015 50);
  --hairline:  oklch(22% 0.012 50);
  --fg:        oklch(98% 0.012 80);
  --muted:     oklch(70% 0.012 70);
  --quiet:     oklch(50% 0.012 70);

  --accent:    oklch(72% 0.18 45);
  --accent-2:  oklch(80% 0.16 75);
  --danger:    oklch(64% 0.22 25);
  --ice:       oklch(78% 0.12 240);

  /* Type -------------------------------------------------------------------- */
  --font-display: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --font-serif:   'Tiempos Headline', 'Newsreader', 'Iowan Old Style', Georgia, serif;

  /* Rhythm ------------------------------------------------------------------ */
  --maxw: 1200px;
  --gutter: clamp(20px, 4vw, 64px);
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 24px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: black; }

/* Type ---------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 1px;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
}

.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
  font-size: clamp(40px, 6.5vw, 88px);
  text-wrap: balance;
}

.h-display-mono {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
  font-size: clamp(34px, 5.5vw, 72px);
  text-wrap: balance;
}

.h-serif {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.02;
  font-size: clamp(44px, 8vw, 128px);
  text-wrap: balance;
}

.subhead {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 60ch;
  text-wrap: pretty;
}

.mono { font-family: var(--font-mono); }

/* Layout -------------------------------------------------------------------- */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(80px, 12vw, 160px) 0;
  position: relative;
}

.section-tight { padding: clamp(48px, 7vw, 96px) 0; }

.divider {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 0;
}

.horizon {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-2) 12%,
    var(--accent-2) 88%,
    transparent 100%
  );
  opacity: 0.55;
}

/* Buttons ------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: oklch(15% 0.02 50);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 32px 0 color-mix(in oklch, var(--accent) 50%, transparent);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--hairline);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-arrow::after {
  content: '\2192';
  font-family: var(--font-mono);
  transform: translateX(0);
  transition: transform 0.18s ease;
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* Pills --------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pill-live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.success-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: oklch(82% 0.16 80);
  color: oklch(20% 0.02 50);
  border-radius: 6px;
  border: 2px solid oklch(15% 0.02 50);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  box-shadow: 4px 4px 0 oklch(15% 0.02 50);
}

/* Hero composition ---------------------------------------------------------- */
.hero-stage {
  position: relative;
  width: 100%;
  height: clamp(520px, 70vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-row {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  padding: 16px clamp(24px, 6vw, 96px) 0;
  gap: clamp(8px, 2vw, 32px);
}

.icon-row .app-icon {
  width: clamp(56px, 8vw, 96px);
  height: clamp(56px, 8vw, 96px);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.6));
  transform-origin: top center;
  animation: bob 6s ease-in-out infinite;
}
.icon-row .app-icon:nth-child(1) { justify-self: end; animation-delay: 0s; }
.icon-row .app-icon:nth-child(2) { justify-self: end; animation-delay: 0.6s; }
.icon-row .app-icon:nth-child(3) { justify-self: center; animation-delay: 1.2s; }
.icon-row .app-icon:nth-child(4) { justify-self: start; animation-delay: 1.8s; }
.icon-row .app-icon:nth-child(5) { justify-self: start; animation-delay: 2.4s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* Footer -------------------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--hairline);
  padding: 64px var(--gutter) 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--quiet);
  letter-spacing: 0.06em;
}

/* ScrollStack  -  palette override -------------------------------------------- */
.scroll-stack-card {
  background: var(--surface) !important;
  border: 1px solid var(--hairline) !important;
  color: var(--fg);
  height: auto !important;
  min-height: 22rem;
  padding: clamp(28px, 4vw, 56px) !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7) !important;
}

.scroll-stack-inner { padding: 20vh 0 60vh !important; }

/* ScrollReveal  -  palette override ------------------------------------------- */
.scroll-reveal { margin: 0 !important; }
.scroll-reveal-text {
  color: var(--fg);
  font-weight: 500;
  font-family: var(--font-body);
  line-height: 1.45 !important;
  font-size: clamp(20px, 2.6vw, 36px) !important;
  text-wrap: pretty;
}
.scroll-reveal .word { display: inline-block; }
.scroll-reveal-text .accent { color: var(--accent); }
.scroll-reveal-text em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}
.scroll-reveal-text .story-hot,
.scroll-reveal-text .story-free {
  color: var(--fg);
  font-weight: 800;
  text-shadow: 0 0 24px color-mix(in oklch, var(--accent) 34%, transparent);
}
.scroll-reveal-text .story-cut,
.scroll-reveal-text .story-warning {
  color: var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
}
.scroll-reveal-text .story-time {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.92em;
  font-weight: 700;
  letter-spacing: -0.03em;
  animation: story-pulse 2.8s ease-in-out infinite;
}
.scroll-reveal-text .story-code {
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.86em;
  font-weight: 700;
  padding: 0.05em 0.35em;
  border: 1px solid color-mix(in oklch, var(--accent) 38%, var(--border));
  border-radius: 999px;
  background: color-mix(in oklch, var(--accent) 10%, transparent);
}
.scroll-reveal-text .story-muted {
  color: var(--muted);
}
@keyframes story-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 color-mix(in oklch, var(--accent) 0%, transparent)); }
  50% { filter: drop-shadow(0 0 18px color-mix(in oklch, var(--accent) 65%, transparent)); }
}

.story-warning-headline {
  max-width: 980px;
  margin: 0 0 clamp(46px, 7vw, 88px);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(34px, 6.4vw, 78px);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.story-warning-headline .story-you {
  color: var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  text-shadow: 0 0 34px color-mix(in oklch, var(--accent) 44%, transparent);
}
.story-warning-headline .story-attention {
  color: var(--fg);
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-size: 0.76em;
  letter-spacing: 0.01em;
  padding: 0.02em 0.16em;
  border: 1px solid color-mix(in oklch, var(--accent) 45%, var(--border));
  background: color-mix(in oklch, var(--accent) 12%, transparent);
}
.story-warning-headline .story-money {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9em;
  letter-spacing: -0.06em;
  animation: story-pulse 2.4s ease-in-out infinite;
}

.scroll-lock-gate {
  position: relative;
  isolation: isolate;
}

.scroll-lock-gate::before {
  content: '3 second read lock';
  position: absolute;
  right: 0;
  top: -34px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--quiet);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-lock-gate--active::before {
  opacity: 1;
  transform: translateY(0);
}

.scroll-lock-meter {
  width: min(420px, 100%);
  height: 2px;
  margin: -24px 0 clamp(46px, 7vw, 88px);
  background: color-mix(in oklch, var(--accent) 18%, transparent);
  overflow: hidden;
  opacity: 0;
}

.scroll-lock-meter::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.scroll-lock-gate--active .scroll-lock-meter {
  opacity: 1;
}

.scroll-lock-gate--active .scroll-lock-meter::before {
  animation: scroll-lock-meter 3s linear forwards;
}

.scroll-gate-page-locked {
  overscroll-behavior: none;
}

@keyframes scroll-lock-meter {
  to { transform: scaleX(1); }
}

/* LogoLoop fade override ---------------------------------------------------- */
.logoloop { --logoloop-fadeColor: var(--bg); }
.logoloop__node img,
.logoloop__item img { filter: grayscale(0.05) brightness(0.95); }

/* Utility ------------------------------------------------------------------- */
.center-flex { display: flex; align-items: center; justify-content: center; }
.col { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.text-center { text-align: center; }
.relative { position: relative; }
.grid { display: grid; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* EvilEye (CSS/SVG approximation) ------------------------------------------- */
.evil-eye-wrap {
  position: relative;
  width: var(--eye-size, 320px);
  height: var(--eye-size, 320px);
  display: grid;
  place-items: center;
  isolation: isolate;
}
.evil-eye-wrap::before {
  content: '';
  position: absolute;
  inset: -25%;
  background: radial-gradient(
    closest-side,
    color-mix(in oklch, var(--accent) 55%, transparent) 0%,
    transparent 70%
  );
  filter: blur(28px);
  z-index: -1;
}

.evil-eye-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.evil-eye-iris {
  transform-origin: center;
  animation: iris-flicker 3.8s ease-in-out infinite;
}
@keyframes iris-flicker {
  0%, 100% { filter: brightness(1) saturate(1.15); }
  47%      { filter: brightness(1.18) saturate(1.3); }
  53%      { filter: brightness(0.92) saturate(1.05); }
}

.evil-eye-pupil {
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform-box: fill-box;
  transform-origin: center;
}

.evil-eye-noise {
  mix-blend-mode: screen;
  opacity: 0.35;
  animation: noise-drift 6s steps(20) infinite;
}
@keyframes noise-drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-32px, -32px); }
}

/* CardNav  -  dark cinematic override ----------------------------------------- */
.card-nav-container { z-index: 99; }
.card-nav { backdrop-filter: blur(14px) saturate(1.2); }
.card-nav-cta-button {
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0 18px;
}
.nav-card-label { font-family: var(--font-display); font-weight: 600; }
.nav-card-link  { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; }
.nav-word-glow {
  font-weight: 700;
  text-shadow:
    0 0 10px currentColor,
    0 0 22px color-mix(in oklch, currentColor 54%, transparent);
}
.nav-word-bronze {
  color: oklch(72% 0.13 58);
}
.nav-word-gold {
  color: oklch(84% 0.15 82);
}
