/* ============================================================
   style.css — Design system, tokens, base & shared utilities
   Used by: index.html, download.html, privacy.html, terms.html
   ============================================================ */

/* ── Design Tokens ── */
:root {
  /* Core palette — dark navy + gold/cream identity (unchanged) */
  --ink: #0E1420;
  --ink-deep: #0A0E18;
  --ink2: #141C2C;
  --ink3: #1B2438;
  --ink4: #26324A;

  --gold: #C9962C;
  --gold-bright: #E2B04A;
  --gold-deep: #A97A20;
  --gold-dim: rgba(201,150,44,0.10);
  --gold-mid: rgba(201,150,44,0.18);
  --gold-glow: rgba(201,150,44,0.28);
  --gold-border: rgba(201,150,44,0.32);

  --coral: #E8623C;
  --coral-dim: rgba(232,98,60,0.08);
  --coral-border: rgba(232,98,60,0.30);

  --teal: #2F8C8C;
  --teal-dim: rgba(47,140,140,0.09);
  --teal-border: rgba(47,140,140,0.30);

  --cream: #F3EDE1;
  --cream-60: rgba(243,237,225,0.60);
  --cream-72: rgba(243,237,225,0.72);
  --cream-80: rgba(243,237,225,0.80);
  --muted: #8A93A6;
  --line: rgba(243,237,225,0.10);
  --line-strong: rgba(243,237,225,0.18);

  /* Glass system */
  --glass-bg: rgba(16,22,38,0.55);
  --glass-bg-soft: rgba(16,22,38,0.40);
  --glass-border: rgba(243,237,225,0.09);
  --glass-border-strong: rgba(243,237,225,0.16);
  --glass-highlight: rgba(255,255,255,0.06);
  --glass-blur: 22px;

  /* Shadows */
  --shadow-soft: 0 24px 70px rgba(0,0,0,0.45);
  --shadow-glass: 0 18px 50px rgba(0,0,0,0.38), inset 0 1px 0 var(--glass-highlight);
  --glow-gold-soft: 0 0 40px rgba(201,150,44,0.22);

  /* Typography stacks */
  --ff-display: 'Space Grotesk', sans-serif;
  --ff-body: 'Inter', sans-serif;
  --ff-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px;
  --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px; --space-4xl: 80px; --space-5xl: 120px;

  --section-py: clamp(88px, 12vw, 150px);
  --section-py-tight: clamp(64px, 9vw, 110px);
  --container-px: clamp(20px, 4vw, 28px);
  --container-max: 1200px;

  /* Radius */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.2s;
  --dur-normal: 0.4s;
  --dur-slow: 0.7s;
  --dur-float: 9s;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  min-height: 100vh;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

::selection { background: rgba(201,150,44,0.35); color: var(--ink); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--ink-deep); }
::-webkit-scrollbar-thumb { background: var(--ink4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #33415f; }

/* ── Utilities ── */
.mono { font-family: var(--ff-mono); }
.accent {
  color: var(--gold-bright);
  font-weight: 700;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .accent {
    background: linear-gradient(120deg, #EDC36A, var(--gold) 48%, var(--gold-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}
.wrap--wide { max-width: 1360px; }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--ff-body); font-weight: 600; font-size: 15px;
  padding: 17px 30px; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid transparent; position: relative; overflow: hidden;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-normal) var(--ease-out),
              background var(--dur-normal) var(--ease-out),
              border-color var(--dur-normal) var(--ease-out);
}
.btn > * { position: relative; z-index: 1; }
.btn .btn-shine {
  content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-25deg); z-index: 0;
  transition: left 0.7s var(--ease-out);
}
.btn:hover .btn-shine { left: 130%; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  color: var(--ink);
  box-shadow: 0 6px 26px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-primary:hover {
  box-shadow: 0 10px 38px var(--gold-glow), 0 0 0 4px rgba(201,150,44,0.10);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--glass-bg-soft);
  color: var(--cream);
  border-color: var(--glass-border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  border-color: rgba(243,237,225,0.30);
  background: rgba(243,237,225,0.06);
  transform: translateY(-2px);
}
.btn-block { width: 100%; }
.btn-sm { padding: 12px 22px; font-size: 14px; }

/* Magnetic behaviour */
.magnetic { transform: translate(var(--mx, 0px), var(--my, 0px)); transition: transform var(--dur-normal) var(--ease-out); }
.magnetic:hover { transform: translate(var(--mx, 0px), calc(var(--my, 0px) - 2px)); }
@media (prefers-reduced-motion: reduce) {
  .magnetic { transition: none; }
}

/* ── Scroll reveal (only active when JS present) ── */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.js [data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* Masked heading reveal — hide overflow, slide content up */
.js .mask-reveal { overflow: hidden; }
.js .mask-reveal > * {
  display: block;
  transform: translateY(110%);
  transition: transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.js .mask-reveal.revealed > * { transform: translateY(0); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .js .mask-reveal > * { transform: none; transition: none; }
  html { scroll-behavior: auto; }
}