/* ============================================
   loaded.pt v5 — Design Tokens (vanilla, offline-first fonts)
   ============================================ */

/* Local fonts */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/fraunces-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-mono-latin.woff2') format('woff2');
}

:root {
  /* ============= BRAND ============= */
  --primary:          #7289DA;
  --primary-light:    #9BAFF0;
  --primary-lighter:  #C7B8FF;
  --primary-dark:     #5B6FB8;
  --primary-dim:      rgba(114, 137, 218, 0.14);
  --primary-glow:     rgba(114, 137, 218, 0.35);
  --primary-deep:     #4752C4;
  --accent-mint:      #A5F1D4;

  /* ============= BACKGROUNDS ============= */
  --bg:               #08090D;
  --bg-secondary:     #0F1218;
  --bg-tertiary:      #171A24;
  --bg-elevated:      #1D2130;

  /* ============= FG ============= */
  --fg1:              #FFFFFF;
  --fg2:              #B4B8C6;
  --fg3:              #7A8091;
  --fg4:              #4A4F5C;

  /* ============= BORDERS ============= */
  --line:             rgba(255, 255, 255, 0.08);
  --line-strong:      rgba(255, 255, 255, 0.16);

  /* ============= SEMANTIC ============= */
  --success:          #57F287;
  --warning:          #FEE75C;
  --danger:           #ED4245;

  /* ============= FONTS ============= */
  --font-sans:   'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif:  'Fraunces', 'Times New Roman', Georgia, serif;
  --font-mono:   'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ============= FLUID TYPE ============= */
  --fs-mega:      clamp(2.75rem, 1.75rem + 3.6vw, 6rem);
  --fs-hero:      clamp(3rem,   2.25rem + 4.5vw, 7rem);
  --fs-h1:        clamp(2.25rem, 1.75rem + 2.4vw, 3.75rem);
  --fs-h2:        clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --fs-h3:        clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --fs-h4:        clamp(1rem,    0.95rem + 0.25vw, 1.1875rem);
  --fs-body-lg:   1.0625rem;
  --fs-body:      0.9375rem;
  --fs-small:     0.8125rem;
  --fs-xs:        0.75rem;
  --fs-label:     0.6875rem;
  --fs-stat:      clamp(3rem, 2rem + 4vw, 5.5rem);

  /* ============= LINE HEIGHTS ============= */
  --lh-mega:     0.95;
  --lh-tight:    1.02;
  --lh-heading:  1.1;
  --lh-body:     1.55;

  /* ============= LETTER SPACING ============= */
  --ls-mega:     -0.045em;
  --ls-hero:     -0.035em;
  --ls-heading:  -0.02em;
  --ls-body:     -0.005em;
  --ls-label:    0.08em;

  /* ============= SPACING ============= */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.5rem;
  --sp-6:  2rem;
  --sp-7:  3rem;
  --sp-8:  4rem;
  --sp-9:  6rem;
  --sp-section: clamp(4rem, 7vw, 7rem);

  /* ============= RADII ============= */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-pill: 999px;

  /* ============= SHADOWS + GLOWS ============= */
  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md:  0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg:  0 20px 50px rgba(0, 0, 0, 0.5);
  --glow-primary:    0 4px 30px rgba(114, 137, 218, 0.45);
  --glow-primary-lg: 0 12px 48px rgba(114, 137, 218, 0.55);
  --glow-inset:      inset 0 1px 0 rgba(255,255,255,0.14);

  /* ============= GRADIENTS ============= */
  --grad-hero:        linear-gradient(135deg, #FFFFFF 0%, #C7B8FF 45%, #7289DA 100%);
  --grad-hero-2:      linear-gradient(135deg, #7289DA 0%, #C7B8FF 60%, #FFFFFF 100%);
  --grad-btn:         linear-gradient(135deg, #7289DA 0%, #9BAFF0 100%);
  --grad-btn-hover:   linear-gradient(135deg, #9BAFF0 0%, #C7B8FF 100%);
  --grad-border:      linear-gradient(135deg, #7289DA 0%, #C7B8FF 50%, #7289DA 100%);
  --grad-price:       linear-gradient(120deg, #FFFFFF 0%, #C7B8FF 40%, #7289DA 90%);
  --grad-stat:        linear-gradient(180deg, #FFFFFF 0%, #C7B8FF 60%, #7289DA 100%);
  --grad-glow:        radial-gradient(circle at 50% 50%, rgba(114,137,218,0.5), transparent 70%);
  --grad-mesh:
    radial-gradient(1200px 800px at 80% 20%, rgba(114,137,218,0.28), transparent 60%),
    radial-gradient(900px 700px at 10% 80%, rgba(199,184,255,0.18), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgba(71,82,196,0.14), transparent 65%);
  --grad-card-hover:  linear-gradient(135deg, rgba(114,137,218,0.5), rgba(199,184,255,0.5) 50%, rgba(114,137,218,0.5));

  /* ============= MOTION ============= */
  --ease-out:    cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.4, 1);
  --dur-fast:  180ms;
  --dur-base:  260ms;
  --dur-slow:  440ms;

  /* ============= LAYOUT ============= */
  --container:  min(84rem, 100% - 2.5rem);
  --content:    min(72rem, 100% - 2.5rem);
  --gutter:     clamp(1rem, 3vw, 2rem);
  --nav-h:      3.5rem;
}

/* ============= ELEMENT DEFAULTS ============= */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--fg1);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--fg1);
  font-family: var(--font-sans);
  line-height: var(--lh-body);
  overflow-x: hidden;
  min-height: 100vh;
  letter-spacing: var(--ls-body);
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--fg1);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  font-weight: 600;
}

p { color: var(--fg2); font-size: var(--fs-body); line-height: var(--lh-body); }
small { font-size: var(--fs-small); color: var(--fg3); }

code, pre, kbd, .mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum", "zero";
  font-size: 0.925em;
}

.tabular { font-variant-numeric: tabular-nums slashed-zero; font-feature-settings: "tnum", "zero"; }

a { color: inherit; text-decoration: none; transition: color var(--dur-base) ease; }
button { font-family: inherit; }
::selection { background: var(--primary); color: var(--fg1); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.label-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg3);
}

.italic-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.03em;
}

/* ============= REVEAL ON SCROLL (IntersectionObserver-driven) ============= */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
