/* ============================================================
   BEX.GE — Design System
   Data-terminal meets keynote. Dark-primary, light toggle.
   ============================================================ */

/* ---------- Fonts ---------- */
@import url("https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&family=Space+Grotesk:wght@300;400;500;600;700&family=Noto+Sans+Georgian:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap");

/* ---------- Tokens ---------- */
:root {
  /* Accent palette (overridden by [data-accent]) */
  --a1: #00a2ed;          /* primary accent */
  --a1-deep: #005fb8;     /* deep variant */
  --a2: #2ecc71;          /* secondary / live / positive */
  --a1-rgb: 0, 162, 237;
  --a2-rgb: 46, 204, 113;

  /* Dark theme surfaces (default) */
  --bg: #080b11;
  --bg-2: #0c1018;
  --surface: #11161f;
  --surface-2: #161d29;
  --elevated: #1b2433;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --ink: #eef1f6;
  --ink-2: #b9c1cf;
  --ink-3: #6b7689;
  --glow: rgba(var(--a1-rgb), 0.5);
  --grid-line: rgba(255, 255, 255, 0.035);
  --tile: #f4f6fa;       /* partner logo tile */
  --shadow-card: 0 24px 60px -28px rgba(0, 0, 0, 0.8);

  /* Motion */
  --mo: 1.5;              /* motion multiplier, set by tweaks */
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-io: cubic-bezier(0.65, 0, 0.35, 1);

  /* Type */
  --f-display: "Syncopate", "Space Grotesk", sans-serif;
  --f-sans: "Space Grotesk", "Noto Sans Georgian", sans-serif;
  --f-ge: "Noto Sans Georgian", "Space Grotesk", sans-serif;
  --f-mono: "JetBrains Mono", monospace;

  --maxw: 1240px;
}

/* Accent palettes */
[data-accent="azure"]   { --a1:#00a2ed; --a1-deep:#005fb8; --a2:#2ecc71; --a1-rgb:0,162,237;  --a2-rgb:46,204,113; }
[data-accent="violet"]  { --a1:#8b5cf6; --a1-deep:#5b34c9; --a2:#22d3ee; --a1-rgb:139,92,246;  --a2-rgb:34,211,238; }
[data-accent="amber"]   { --a1:#f2c811; --a1-deep:#c99a00; --a2:#1fd1a5; --a1-rgb:242,200,17;  --a2-rgb:31,209,165; }
/* keep yellow legible on light backgrounds */
[data-theme="light"][data-accent="amber"] { --a1:#a87f00; --a1-deep:#7d5e00; --a1-rgb:168,127,0; }
[data-accent="magenta"] { --a1:#ec4899; --a1-deep:#b21e6b; --a2:#3b82f6; --a1-rgb:236,72,153;  --a2-rgb:59,130,246; }

/* Light theme */
[data-theme="light"] {
  --bg: #eef1f6;
  --bg-2: #e7ebf2;
  --surface: #ffffff;
  --surface-2: #f4f6fa;
  --elevated: #ffffff;
  --line: rgba(10, 18, 30, 0.10);
  --line-strong: rgba(10, 18, 30, 0.18);
  --ink: #0c1320;
  --ink-2: #3c485b;
  --ink-3: #7b8597;
  --grid-line: rgba(10, 18, 30, 0.05);
  --tile: #ffffff;
  --shadow-card: 0 24px 50px -30px rgba(20, 40, 80, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--f-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.5s var(--e-out), color 0.5s var(--e-out);
}
:lang(ka), [lang="ka"] { font-family: var(--f-ge); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: rgba(var(--a1-rgb), 0.3); color: var(--ink); }

/* ---------- Background field ---------- */
.bg-field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 78% -5%, rgba(var(--a1-rgb), 0.16), transparent 60%),
    radial-gradient(700px 500px at 5% 18%, rgba(var(--a2-rgb), 0.09), transparent 55%);
  transition: opacity 0.5s var(--e-out);
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 30%, transparent 78%);
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
main { position: relative; z-index: 1; }
section { position: relative; }
.section-pad { padding: clamp(72px, 11vw, 150px) 0; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--a1); font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.6;
}
.eyebrow.no-line::before { display: none; }

/* ---------- Headings ---------- */
.h-xl { font-size: clamp(2.6rem, 6.2vw, 5.3rem); line-height: 0.98; font-weight: 700; letter-spacing: -0.02em; }
.h-lg { font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.04; font-weight: 700; letter-spacing: -0.018em; }
.h-md { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; }
:lang(ka).h-xl, [lang="ka"] .h-xl { line-height: 1.08; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.28rem); color: var(--ink-2); line-height: 1.55; max-width: 46ch; text-wrap: pretty; }
.grad-ink {
  background: linear-gradient(105deg, var(--a1), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 0.96rem; letter-spacing: 0.01em;
  padding: 14px 24px; border-radius: 12px;
  transition: transform 0.4s var(--e-out), box-shadow 0.4s var(--e-out), background 0.3s, border-color 0.3s;
  position: relative; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--a2); color: #04150b;
  box-shadow: 0 10px 30px -10px rgba(var(--a2-rgb), 0.6);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px rgba(var(--a2-rgb), 0.7); }
.btn-ghost {
  background: rgba(255,255,255,0.03); color: var(--ink);
  border: 1px solid var(--line-strong); backdrop-filter: blur(8px);
}
[data-theme="light"] .btn-ghost { background: rgba(10,18,30,0.02); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--a1); color: var(--a1); }
.btn-blue { background: var(--a1); color: #fff; box-shadow: 0 10px 30px -10px rgba(var(--a1-rgb), 0.6); }
.btn-blue:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px rgba(var(--a1-rgb), 0.75); }

/* ---------- Live badge ---------- */
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--a2); padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(var(--a2-rgb), 0.3); background: rgba(var(--a2-rgb), 0.08);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--a2); position: relative; }
.live-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--a2); opacity: 0.5;
  animation: ping calc(1.8s / var(--mo)) var(--e-out) infinite;
}
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.6; } 80%,100% { transform: scale(2.2); opacity: 0; } }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.glass {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line);
}

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--e-out), transform 0.9s var(--e-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
.reveal[data-d="5"] { transition-delay: 0.40s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* utility */
.mono { font-family: var(--f-mono); }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.center { text-align: center; }
.flex { display: flex; }
.fcol { display: flex; flex-direction: column; }
.aic { align-items: center; }
.jcb { justify-content: space-between; }
