/* ============================================================
   Mathic — brand theme (blue → purple → pink, light)
   Tokens sampled from the Mathic logo:
   blue #149DF6 · purple #8532F9 · pink #FB3186 · navy #2D4256
   ============================================================ */

:root {
  --blue:   #149DF6;
  --purple: #8532F9;
  --pink:   #FB3186;
  --navy:   #2D4256;
  --navy-2: #46586b;
  --muted:  #6f8194;
  --faint:  #9aa8b6;

  --bg:    #ffffff;
  --bg-2:  #f6f8fc;
  --bg-3:  #eef3fb;
  --line:  #e7edf5;
  --line-strong: #d8e1ee;

  --grad:  linear-gradient(120deg, #149DF6 0%, #8532F9 52%, #FB3186 100%);
  --grad-soft: linear-gradient(120deg, rgba(20,157,246,0.12), rgba(133,50,249,0.10) 52%, rgba(251,49,134,0.12));

  --font-display: "Poppins", system-ui, sans-serif;
  --font-body:    "Plus Jakarta Sans", system-ui, sans-serif;

  --maxw: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 50px -20px rgba(45, 66, 86, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--bg);
  line-height: 1.62;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background-image:
    radial-gradient(680px 420px at 88% -6%, rgba(251, 49, 134, 0.10), transparent 60%),
    radial-gradient(620px 420px at 4% 2%, rgba(20, 157, 246, 0.10), transparent 58%);
  background-attachment: fixed;
}

::selection { background: rgba(133, 50, 249, 0.18); color: var(--navy); }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---- gradient helpers ---- */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.spark { color: var(--pink); display: inline-block; }

/* ---- eyebrow ---- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: "✦"; color: var(--pink); font-size: 11px; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 21px;
  color: var(--navy); letter-spacing: -0.01em;
}
.brand img.logo { width: 32px; height: 32px; object-fit: contain; display: block; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14.5px; font-weight: 500; }
.nav a { color: var(--muted); transition: color 0.2s var(--ease); }
.nav a:hover { color: var(--navy); }
.nav .pill {
  color: #fff; background: var(--grad); padding: 9px 18px; border-radius: 999px;
  box-shadow: 0 8px 20px -8px rgba(133, 50, 249, 0.55);
}
.nav .pill:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }
@media (max-width: 680px) { .nav .hide-sm { display: none; } }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding: 86px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }

.hero .eyebrow { opacity: 0; animation: rise 0.7s var(--ease) 0.05s forwards; }
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(42px, 6.4vw, 76px); line-height: 1.02;
  letter-spacing: -0.025em; margin: 20px 0 0; color: var(--navy);
}
.hero h1 span { display: inline-block; opacity: 0; animation: rise 0.85s var(--ease) forwards; }
.hero h1 span:nth-child(1) { animation-delay: 0.10s; }
.hero h1 span:nth-child(2) { animation-delay: 0.18s; }
.hero h1 span:nth-child(3) { animation-delay: 0.26s; }
.hero .lede {
  margin-top: 22px; max-width: 48ch; font-size: clamp(16px, 1.8vw, 19px);
  color: var(--muted); opacity: 0; animation: rise 0.85s var(--ease) 0.40s forwards;
}
.hero .cta-row { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 13px; opacity: 0; animation: rise 0.85s var(--ease) 0.52s forwards; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 14px 24px; border-radius: 13px; border: 1.5px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 14px 30px -12px rgba(133, 50, 249, 0.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 38px -14px rgba(133, 50, 249, 0.7); }
.btn-ghost { border-color: var(--line-strong); color: var(--navy); background: #fff; }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); transform: translateY(-2px); }

/* hero logo card */
.hero-card {
  position: relative; border-radius: 28px; padding: 44px;
  background: var(--bg); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  opacity: 0; animation: rise 0.9s var(--ease) 0.30s forwards;
}
.hero-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 28px; padding: 1.5px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.5; pointer-events: none;
}
.hero-card img { width: 100%; max-width: 320px; height: auto; display: block; }
.hero-card .blob {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.5; z-index: -1;
}
.hero-card .blob.b1 { width: 180px; height: 180px; background: var(--blue);  top: -30px; left: -30px; }
.hero-card .blob.b2 { width: 180px; height: 180px; background: var(--pink);  bottom: -30px; right: -30px; }
.hero-card .star { position: absolute; color: var(--pink); font-size: 22px; animation: twinkle 3s ease-in-out infinite; }
.hero-card .star.s1 { top: 26px; right: 34px; }
.hero-card .star.s2 { bottom: 30px; left: 30px; font-size: 15px; animation-delay: 1s; }

/* ============================================================
   Marquee
   ============================================================ */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 15px 0; margin-top: 30px; background: var(--bg-2);
}
.marquee-track {
  display: flex; gap: 50px; width: max-content; animation: scroll 38s linear infinite;
  font-family: var(--font-display); font-weight: 500; font-size: 15px; color: var(--faint); white-space: nowrap;
}
.marquee-track span b { font-weight: 600; }
.marquee-track span b { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ============================================================
   Sections
   ============================================================ */
section { padding: 84px 0; }
.section-head { max-width: 60ch; margin-bottom: 50px; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(28px, 4.2vw, 44px); line-height: 1.08; letter-spacing: -0.02em; margin-top: 14px; color: var(--navy);
}
.section-head p { margin-top: 14px; color: var(--muted); font-size: 18px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; border: 1px solid var(--line); border-radius: 20px;
  padding: 30px 26px 32px; background: var(--bg);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.step:hover { border-color: transparent; transform: translateY(-5px); box-shadow: var(--shadow); }
.step .ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  font-size: 24px; color: #fff; background: var(--grad); margin-bottom: 18px;
  box-shadow: 0 10px 22px -10px rgba(133, 50, 249, 0.6);
}
.step .num { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; letter-spacing: 0.12em; color: var(--blue); margin-bottom: 8px; }
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin-bottom: 9px; color: var(--navy); }
.step p { color: var(--muted); font-size: 15.5px; }

/* features */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--bg); padding: 34px 30px; transition: background 0.3s; }
.feature:hover { background: var(--bg-2); }
.feature h3 { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin-bottom: 8px; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.feature h3 .tick { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; color: #fff; background: var(--grad); flex: none; }
.feature p { color: var(--muted); font-size: 15px; }

/* channels */
.channels { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; }
.channel {
  font-family: var(--font-display); font-weight: 500; font-size: 14.5px;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 20px; color: var(--muted); background: var(--bg);
}
.channel b { color: var(--navy); font-weight: 600; }

/* CTA band */
.cta-band {
  position: relative; border-radius: 28px; padding: 60px 44px; text-align: center; overflow: hidden;
  background: var(--grad); color: #fff; box-shadow: 0 30px 60px -28px rgba(133, 50, 249, 0.6);
}
.cta-band::after { content: "✦"; position: absolute; top: 24px; right: 40px; font-size: 26px; opacity: 0.6; }
.cta-band::before { content: "✦"; position: absolute; bottom: 28px; left: 44px; font-size: 18px; opacity: 0.5; }
.cta-band .eyebrow { color: rgba(255,255,255,0.92); }
.cta-band .eyebrow::before { color: #fff; }
.cta-band h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(27px, 4vw, 42px); letter-spacing: -0.02em; }
.cta-band p { color: rgba(255,255,255,0.9); margin: 14px auto 28px; max-width: 48ch; }
.cta-band .btn-primary { background: #fff; color: var(--purple); box-shadow: 0 14px 30px -12px rgba(0,0,0,0.3); }
.cta-band .btn-primary:hover { color: var(--pink); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 44px; margin-top: 26px; background: var(--bg-2); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
.footer-brand { max-width: 34ch; }
.footer-brand p { color: var(--faint); font-size: 14.5px; margin-top: 14px; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 15px; }
.footer-col a { display: block; color: var(--muted); font-size: 15px; margin-bottom: 11px; transition: color 0.2s; }
.footer-col a:hover { color: var(--purple); }
.footer-bottom { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--faint); font-size: 13.5px; font-weight: 500; }

/* ============================================================
   Legal pages
   ============================================================ */
.legal { padding: 60px 0 40px; }
.legal .wrap { max-width: 760px; }
.legal .back { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; margin-bottom: 32px; }
.legal .back:hover { color: var(--purple); }
.legal h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 5.5vw, 56px); letter-spacing: -0.025em; line-height: 1.04; color: var(--navy); }
.legal .updated { color: var(--faint); font-weight: 500; font-size: 13.5px; margin-top: 14px; }
.legal .doc { margin-top: 42px; }
.legal .doc h2 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin: 38px 0 14px; letter-spacing: -0.01em; padding-top: 18px; border-top: 1px solid var(--line); color: var(--navy); }
.legal .doc h2 .n { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; margin-right: 12px; }
.legal .doc h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: 24px 0 8px; color: var(--navy); }
.legal .doc p { color: var(--navy-2); margin: 12px 0; }
.legal .doc ul { color: var(--navy-2); margin: 12px 0 12px 4px; padding-left: 22px; }
.legal .doc li { margin: 8px 0; }
.legal .doc li::marker { color: var(--purple); }
.legal .doc a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.legal .doc strong { color: var(--navy); font-weight: 700; }
.legal .doc code { font-family: ui-monospace, "SFMono-Regular", monospace; font-size: 0.85em; background: var(--bg-3); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; color: var(--purple); }
.legal .callout { border: 1px solid var(--line-strong); border-left: 3px solid transparent; border-image: var(--grad) 1; background: var(--bg-2); border-radius: 12px; padding: 20px 22px; margin: 24px 0; }
.legal .callout p { margin: 6px 0; color: var(--navy); }

/* ============================================================
   Animations
   ============================================================ */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 0.9; } 50% { transform: scale(1.25) rotate(15deg); opacity: 0.5; } }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
