/* ============================================================
   SPHERE — core stylesheet
   A near-black studio, glass panels, and a spectral accent that
   splits violet to rose. The token is a position; the art is a
   one-of-one sphere.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #0a0912;
  --bg-2: #0e0c17;
  --panel: rgba(22, 18, 38, 0.55);
  --panel-solid: #14111f;
  --raise: rgba(30, 25, 50, 0.5);

  --ink: #f3f0fb;
  --soft: #bbb5cf;
  --muted: #837d99;
  --dim: #565072;

  --violet: #8b7bff;
  --indigo: #6c8cff;
  --cyan: #4fe0e0;
  --mint: #5be3a6;
  --gold: #ffcf6b;
  --rose: #ff7eb0;

  --accent: #7aa2ff;     /* periwinkle */
  --accent-2: #4fe0e0;   /* spectral cyan */
  --good: #5be3a6;       /* flood / positive */
  --bad: #ff7eb0;        /* ebb / negative */

  --spectrum: linear-gradient(90deg, #8b7bff 0%, #6c8cff 22%, #4fe0e0 44%, #5be3a6 62%, #ffcf6b 82%, #ff7eb0 100%);
  --spectrum-soft: linear-gradient(120deg, rgba(139,123,255,.16), rgba(79,224,224,.14), rgba(255,126,176,.14));

  --edge: rgba(150, 140, 210, 0.18);
  --edge-soft: rgba(150, 140, 210, 0.10);
  --edge-hair: rgba(150, 140, 210, 0.14);

  --shadow: 0 2px 8px rgba(0,0,0,0.5), 0 28px 70px -30px rgba(0,0,0,0.9);
  --shadow-lift: 0 6px 14px rgba(0,0,0,0.5), 0 40px 90px -32px rgba(0,0,0,0.95);
  --glow-accent: 0 0 0 1px rgba(122,162,255,0.3), 0 0 40px -8px rgba(122,162,255,0.55);

  --ff-display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --ff-body: 'Inter', system-ui, -apple-system, sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1200px;
  --maxw-wide: 1340px;
  --gut: clamp(18px, 4.5vw, 56px);
  --nav-h: 72px;
  --r: 14px;
  --r-lg: 20px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1000px 560px at 82% -120px, rgba(139,123,255,0.14), transparent 60%),
    radial-gradient(900px 620px at 8% 6%, rgba(79,224,224,0.08), transparent 55%),
    radial-gradient(700px 560px at 60% 100%, rgba(255,126,176,0.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
::selection { background: rgba(122,162,255,0.32); color: #fff; }

/* ambient spectral motes */
.motes { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.motes i { position: absolute; border-radius: 50%; opacity: 0; animation: drift linear infinite; }
@keyframes drift { 0% { transform: translateY(10px); opacity: 0; } 14% { opacity: .7; } 86% { opacity: .5; } 100% { transform: translateY(-110vh); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .motes { display: none; } }

/* ---------- layout ---------- */
.wrap { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.wrap-wide { max-width: var(--maxw-wide); }
section { position: relative; z-index: 1; }
.section-pad { padding-block: clamp(56px, 8vw, 116px); }
.center { text-align: center; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 700; line-height: 1.03; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
.display { font-size: clamp(44px, 7vw, 96px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 800; }
h1.title { font-size: clamp(38px, 5.8vw, 72px); }
h2.title { font-size: clamp(30px, 4.4vw, 56px); }
h3 { font-size: clamp(20px, 2.4vw, 27px); }
.spectrum-text { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.em { color: var(--accent); }
.em-good { color: var(--good); } .em-bad { color: var(--bad); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 2.1vw, 22px); line-height: 1.55; color: var(--soft); }
.measure { max-width: 60ch; }
.muted { color: var(--muted); } .soft { color: var(--soft); }

.kick { font-family: var(--ff-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--spectrum); box-shadow: 0 0 12px rgba(122,162,255,0.6); }
.eyebrow.plain::before { display: none; }
.label { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--ff-mono); }
.fig { font-family: var(--ff-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.heading-block { display: flex; flex-direction: column; gap: 14px; }
.heading-block.center { align-items: center; text-align: center; }
.rule { height: 1px; background: var(--edge-hair); border: 0; margin: 0; }
.spectrum-rule { height: 2px; border: 0; margin: 0; background: var(--spectrum); opacity: .6; border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
  --bg-btn: var(--ink); --fg: #0a0912;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--ff-display); font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em;
  padding: 13px 26px; border-radius: 999px;
  background: var(--bg-btn); color: var(--fg);
  border: 1px solid transparent;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s, filter .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgba(122,162,255,0.6); filter: brightness(1.03); }
.btn:active { transform: translateY(0); }
.btn-spectrum { --bg-btn: var(--spectrum); --fg: #0a0912; box-shadow: 0 0 30px -8px rgba(122,162,255,0.5); }
.btn-accent { --bg-btn: var(--accent); --fg: #0a0912; }
.btn-ghost { --bg-btn: transparent; --fg: var(--ink); border-color: var(--edge); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(122,162,255,0.06); box-shadow: none; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 9px 17px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-block { width: 100%; }

/* ---------- panels / cards (glass) ---------- */
.panel, .card {
  position: relative;
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(40,33,66,0.32), rgba(12,10,22,0.5));
  backdrop-filter: blur(7px);
  box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s, border-color .3s;
}
.card.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--accent); }
/* spectral top-edge accent on featured cards */
.card.facet::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--spectrum); opacity: .7; }
.pad { padding: clamp(20px, 3vw, 30px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--edge-soft); font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.panel-head .live { color: var(--accent-2); display: inline-flex; align-items: center; gap: 7px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; color: var(--accent-2); background: rgba(79,224,224,0.08); border: 1px solid var(--edge); }
.chip--good { color: var(--good); background: rgba(91,227,166,0.08); border-color: rgba(91,227,166,0.22); }
.chip--bad { color: var(--bad); background: rgba(255,126,176,0.08); border-color: rgba(255,126,176,0.22); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.chip--live .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); display: inline-block; animation: pulse 1.6s infinite; }

/* ---------- navigation ---------- */
.nav { position: sticky; top: 0; z-index: 1000; height: var(--nav-h); display: flex; align-items: center; transition: background .3s, box-shadow .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.stuck { background: rgba(10,9,18,0.72); backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1); border-bottom-color: var(--edge-soft); }
.nav-inner { width: 100%; max-width: var(--maxw-wide); margin-inline: auto; padding-inline: var(--gut); display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand .name { font-family: var(--ff-display); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--soft); transition: color .2s, background .2s; }
.nav-link:hover { color: var(--ink); background: rgba(122,162,255,0.06); }
.nav-link.active { color: var(--accent-2); }
.nav-cta { display: inline-flex; gap: 10px; align-items: center; }
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--edge); border-radius: 12px; background: var(--panel); position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s, opacity .3s; }
.burger span:nth-child(1) { top: 15px; } .burger span:nth-child(2) { top: 20px; } .burger span:nth-child(3) { top: 25px; }
.burger.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0 0 0 auto; width: min(84vw, 340px); z-index: 1200; background: var(--panel-solid); border-left: 1px solid var(--edge); box-shadow: -24px 0 60px -28px rgba(0,0,0,0.7); transform: translateX(100%); transition: transform .35s cubic-bezier(.3,.8,.3,1); padding: calc(var(--nav-h) + 14px) 26px 26px; display: flex; flex-direction: column; gap: 2px; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { padding: 13px 8px; border-radius: 10px; font-size: 17px; font-weight: 600; color: var(--ink); }
.mobile-menu a:hover { background: rgba(122,162,255,0.06); color: var(--accent-2); }
.scrim { position: fixed; inset: 0; background: rgba(6,5,12,0.6); z-index: 1100; opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--edge-hair); margin-top: 50px; background: linear-gradient(180deg, transparent, rgba(6,5,12,0.5)); }
.footer a { color: var(--muted); transition: color .2s; }
.footer a:hover { color: var(--accent-2); }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 38px; padding-block: 56px 30px; }
.footer-col h4 { color: var(--soft); font-size: 13px; font-family: var(--ff-mono); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a { display: block; padding: 5px 0; font-size: 15px; }
.footer-bottom { border-top: 1px solid var(--edge-soft); padding-block: 18px 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--dim); }

/* ---------- utilities ---------- */
.flex { display: flex; } .between { justify-content: space-between; } .items-center { align-items: center; } .wrap-flex { flex-wrap: wrap; }
.gap-s { gap: 10px; } .gap-m { gap: 16px; } .gap-l { gap: 26px; }
.grid { display: grid; gap: clamp(16px, 2.4vw, 26px); }
.glow-num { text-shadow: 0 0 26px rgba(122,162,255,0.45); }
.tac { text-align: center; }

@media (max-width: 920px) {
  .nav-links, .nav-cta .btn { display: none; }
  .burger { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
