:root {
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-900: #312e81;
  --violet-400: #c084fc;
  --cyan-400: #22d3ee;
  --emerald-50: #ecfdf5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --ink: #0f172a;
  --dark: #0b0f2a;
  --dark-surface: #12163a;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --line: #e2e8f0;
  --surface: #f8fafc;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 4px 16px rgba(15,23,42,.06);
  --shadow-lg: 0 16px 40px rgba(49,46,129,.14);
  --glow-brand: 0 8px 24px rgba(79,70,229,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Reveal-on-scroll (progressive enhancement — see nav.js; content is fully
   visible with no JS, .reveal just starts faded/offset and .in-view undoes it) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Nav */
header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
nav.wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; flex: none; letter-spacing: -0.01em; }
.brand .mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 4px 10px rgba(79,70,229,.28)); }
.footer-grid .brand .mark { width: 28px; height: 28px; filter: none; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a.link { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; position: relative; }
.nav-links a.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px;
  background: linear-gradient(90deg, var(--brand-500), var(--violet-400)); border-radius: 2px;
  transform: scaleX(0); transition: transform .15s ease;
}
.nav-links a.link:hover, .nav-links a.link.active { color: var(--ink); }
.nav-links a.link.active::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; border: none; background: none; padding: 8px; margin: -8px -8px -8px 4px; cursor: pointer;
}
.nav-toggle svg { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 14px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff; box-shadow: var(--glow-brand);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(79,70,229,.42); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-ghost:hover { background: var(--surface); border-color: var(--muted-light); transform: translateY(-1px); }
.btn-lg { padding: 15px 28px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }

/* Hero */
.hero { padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 620px;
  background:
    radial-gradient(38% 45% at 18% 20%, rgba(192,132,252,.22), transparent 70%),
    radial-gradient(45% 50% at 60% 15%, rgba(79,70,229,.20), transparent 70%),
    radial-gradient(35% 40% at 85% 40%, rgba(34,211,238,.16), transparent 70%);
  filter: blur(4px);
  z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 620px;
  background-image: radial-gradient(circle, rgba(79,70,229,.16) 1.4px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 30%, #000, transparent 75%);
  mask-image: radial-gradient(60% 60% at 50% 30%, #000, transparent 75%);
  z-index: -1;
}
.hero-grid { display: flex; align-items: center; gap: 48px; text-align: left; }
.hero-copy { flex: 1; min-width: 0; }
.hero-illustration { flex: none; width: 420px; max-width: 40vw; }
.hero-illustration svg { width: 100%; height: auto; display: block; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px 7px 8px; border-radius: 999px;
  background: linear-gradient(0deg, #fff, #fff) padding-box, linear-gradient(120deg, var(--brand-400), var(--violet-400)) border-box;
  border: 1px solid transparent;
  color: var(--brand-700); font-size: 13px; font-weight: 700;
  margin-bottom: 26px; box-shadow: var(--shadow-sm);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-500), var(--violet-400)); flex: none; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.08; margin: 0 0 22px; letter-spacing: -0.025em; font-weight: 800; }
h1 .accent { background: linear-gradient(120deg, var(--brand-600), var(--violet-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--muted); max-width: 520px; margin: 0 0 36px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* Badge row (under hero) */
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 48px; }
.badge-row .pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px;
  border: 1px solid rgba(226,232,240,.9); background: rgba(255,255,255,.7);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow-sm);
}
.badge-row .pill svg { color: var(--emerald-600); flex: none; }

/* Sections */
section { padding: 76px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 14px; letter-spacing: -0.015em; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 16px; margin: 0; }
.section-alt { background: var(--surface); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card {
  position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 30px 26px; background: #fff;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, var(--brand-400), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card .icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); color: var(--brand-600);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
  box-shadow: inset 0 0 0 1px rgba(79,70,229,.08);
}
.card h3 { font-size: 16.5px; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.01em; }
.card p { font-size: 14px; color: var(--muted); margin: 0; }

/* Audience cards (Publishers / Advertisers) */
.audience-card {
  position: relative; border: 1px solid var(--line); border-radius: 22px; padding: 38px 34px; background: #fff;
  text-align: left; transition: box-shadow .2s ease, transform .2s ease;
}
.audience-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.audience-card .icon {
  width: 50px; height: 50px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-bottom: 24px;
  box-shadow: var(--glow-brand);
}
.audience-card h3 { font-size: 22px; margin: 0 0 10px; font-weight: 800; letter-spacing: -0.015em; }
.audience-card > p { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.audience-card ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; }
.audience-card li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink); }
.audience-card li svg { flex: none; margin-top: 2px; color: var(--emerald-600); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.step { text-align: center; padding: 0 12px; position: relative; }
.step .num {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
  margin: 0 auto 22px; box-shadow: var(--glow-brand); position: relative; z-index: 1;
}
.step h3 { font-size: 17px; margin: 0 0 8px; font-weight: 700; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }
@media (min-width: 861px) {
  .steps::before {
    content: ""; position: absolute; top: 22px; left: calc(16.66% + 22px); right: calc(16.66% + 22px); height: 2px;
    background: repeating-linear-gradient(90deg, var(--brand-200) 0 8px, transparent 8px 16px);
  }
}

.band { background: var(--brand-900); color: #fff; text-align: center; border-radius: 24px; margin: 0 24px; padding: 64px 24px; }
.band h2 { font-size: 30px; margin: 0 0 14px; }
.band p { color: var(--brand-200); margin: 0 0 32px; font-size: 16px; }
.band .btn-primary { background: #fff; color: var(--brand-700); }
.band .btn-primary:hover { background: var(--brand-100); }

/* Page header (About / Contact) */
.page-hero { padding: 64px 0 56px; text-align: center; }
.page-hero h1 { font-size: 42px; }
.page-hero .lead { margin-bottom: 0; }

/* Values grid (About) */
.value {
  display: flex; gap: 16px; padding: 4px 0;
}
.value .icon {
  width: 40px; height: 40px; border-radius: 11px; background: var(--brand-50); color: var(--brand-600);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.value h3 { font-size: 16px; margin: 0 0 6px; }
.value p { font-size: 14px; color: var(--muted); margin: 0; }

/* FAQ — two-column: sticky gradient side card + accordion, native <details>/<summary> (no JS needed) */
.faq-grid { display: grid; grid-template-columns: 0.85fr 1.4fr; gap: 44px; align-items: start; }
.faq-side {
  position: sticky; top: 96px; border-radius: 26px; padding: 42px 36px; color: #fff;
  background: linear-gradient(160deg, var(--brand-600) 0%, var(--brand-900) 100%);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.faq-side::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(50% 60% at 100% 0%, rgba(192,132,252,.35), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(34,211,238,.22), transparent 70%);
}
.faq-side * { position: relative; }
.faq-side .icon {
  width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center; margin-bottom: 22px;
  backdrop-filter: blur(6px);
}
.faq-side h3 { font-size: 23px; margin: 0 0 10px; font-weight: 800; letter-spacing: -0.015em; }
.faq-side p { color: var(--brand-200); font-size: 14.5px; margin: 0 0 26px; line-height: 1.6; }
.faq-side .btn-primary { background: #fff; color: var(--brand-700); box-shadow: none; }
.faq-side .btn-primary:hover { background: var(--brand-50); box-shadow: 0 10px 24px rgba(0,0,0,.18); }

.faq-list { display: grid; gap: 12px; }
.faq-item {
  border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 4px 22px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item[open] { border-color: var(--brand-200); box-shadow: var(--shadow-md); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 19px 0; font-weight: 700; font-size: 15.5px; color: var(--ink);
  display: flex; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .q-num {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; background: var(--brand-50); color: var(--brand-600);
  transition: background .2s ease, color .2s ease;
}
.faq-item[open] summary .q-num { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; }
.faq-item summary .q-text { flex: 1; }
.faq-item summary .chev { flex: none; color: var(--muted-light); transition: transform .2s ease; }
.faq-item[open] summary .chev { transform: rotate(180deg); color: var(--brand-600); }
.faq-item .a-wrap { padding: 0 0 22px 46px; }
.faq-item p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.65; }
@media (max-width: 860px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-side { position: static; }
}

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.contact-info h2 { font-size: 24px; margin: 0 0 12px; }
.contact-info p { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.contact-detail { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 14px; }
.contact-detail .icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand-600);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.contact-detail a { font-weight: 600; text-decoration: none; }
.contact-detail a:hover { color: var(--brand-600); }

.form-card { border: 1px solid var(--line); border-radius: 20px; padding: 32px; background: #fff; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
  font-family: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 14px; margin-top: 14px; display: none; }
.form-status.show { display: block; }
.form-status.ok { color: var(--emerald-600); }
.form-status.err { color: #dc2626; }

footer { border-top: 1px solid var(--line); padding: 56px 0 32px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
.footer-grid .brand { margin-bottom: 12px; }
.footer-grid p.muted-sm { font-size: 13px; color: var(--muted); max-width: 240px; margin: 0; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-light); margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-bottom .muted { color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { flex-direction: column; text-align: center; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-ctas, .badge-row { justify-content: center; }
  .hero-illustration { width: 100%; max-width: 420px; }
}

@media (max-width: 860px) {
  /* absolute (not fixed) — header's backdrop-filter creates a containing
     block for fixed-position descendants, which would confine this to
     header's own small box instead of the viewport */
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - 68px); overflow-y: auto;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 20px 24px; gap: 4px; border-top: 1px solid var(--line); transform: translateY(-8px); opacity: 0;
    pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a.link { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-links .nav-actions { flex-direction: column; align-items: stretch; margin-top: 8px; gap: 8px; }
  .nav-toggle { display: block; }
  h1 { font-size: 34px; }
  .page-hero h1 { font-size: 30px; }
  .lead { font-size: 16px; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .band { margin: 0 16px; padding: 44px 20px; }
  .badge-row { margin-top: 32px; }
}
