/* ============================================================================
   Affiliate Suite — modern SaaS design system. Mobile-first, no framework.
   Self-hosted Inter (GDPR-clean). Per-project landings override --brand / --brand-2.
   ========================================================================== */
@font-face {
  font-family: 'Inter var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/public/fonts/inter-var.woff2') format('woff2');
}

:root {
  /* brand — overridable per project */
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --brand-dark: #4f46e5;
  --brand-contrast: #ffffff;

  /* neutrals */
  --ink: #0b1020;
  --ink-soft: #1e2330;
  --muted: #64708b;
  --line: #e7eaf3;
  --bg: #ffffff;
  --bg-alt: #f7f8fc;
  --bg-dark: #0b1020;

  /* effects */
  --grad: linear-gradient(135deg, var(--brand), var(--brand-2));
  --grad-soft: linear-gradient(180deg, #f5f3ff 0%, #ffffff 60%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .18);
  --glow: 0 10px 30px -8px color-mix(in srgb, var(--brand) 55%, transparent);

  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1140px;
  --font: 'Inter var', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.025em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.22rem; color: var(--muted); max-width: 56ch; line-height: 1.6; }
.center .lead { margin-inline: auto; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* eyebrow pill */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, #fff);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px; font-weight: 650; font-size: 1rem;
  cursor: pointer; border: 1px solid transparent; text-decoration: none;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  will-change: transform;
}
.btn--primary { background: var(--grad); color: var(--brand-contrast); box-shadow: var(--glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px color-mix(in srgb, var(--brand) 65%, transparent); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; box-shadow: var(--shadow-sm); }
.btn--ghost:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); color: var(--ink); }
.btn--lg { padding: 17px 34px; font-size: 1.06rem; }
.btn--block { width: 100%; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, #fff 82%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand-mark { font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 9px; }
.brand-logo { width: 30px; height: 30px; display: block; }

/* ---- Hero ---- */
.hero { position: relative; padding: 104px 0 80px; background: var(--grad-soft); overflow: hidden; }
.hero::before { /* glow blob */
  content: ""; position: absolute; inset: -30% 30% auto -10%; height: 520px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 30%, transparent), transparent);
  filter: blur(20px); opacity: .55; z-index: 0; pointer-events: none;
}
.hero::after { /* subtle grid */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero .container { position: relative; z-index: 1; }
.hero-cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.center .hero-cta { justify-content: center; }
.hero-note { margin-top: 16px; font-size: .92rem; color: var(--muted); }
.hero-img { max-width: 920px; width: 100%; margin: 48px auto 0; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }

/* trust / social-proof bar */
.trustbar { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 40px; color: var(--muted); font-size: .92rem; }
.trustbar .pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); font-weight: 600; color: var(--ink); }

/* ---- Grids & cards ---- */
.grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 26%, var(--line)); }
.card h3 { margin-bottom: .4em; }
.icon-chip {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 16px;
  background: color-mix(in srgb, var(--brand) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, #fff);
}
.step-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); margin-bottom: 14px; box-shadow: var(--glow); }

/* lists */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { padding-inline-start: 34px; position: relative; }
.checklist li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: .8rem; font-weight: 800; color: #fff; background: var(--grad);
}

/* stats */
.statline { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-top: 8px; }
.statline .s { text-align: center; }
.statline .s b { display: block; font-size: 2.4rem; font-weight: 850; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.statline .s span { color: var(--muted); font-size: .92rem; }

/* pricing highlight */
.price-card { max-width: 460px; margin-inline: auto; text-align: center; border-radius: var(--radius-lg); padding: 36px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.price-card .price { font-size: 2.6rem; font-weight: 850; letter-spacing: -.03em; }

/* plan cards */
.plan { display: flex; flex-direction: column; position: relative; }
.plan-price { font-size: 2.1rem; font-weight: 850; letter-spacing: -.03em; }
.plan .checklist { flex: 1 1 auto; }
.plan--pop { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--glow); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: .74rem; font-weight: 700; padding: 5px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); white-space: nowrap; }

/* testimonials */
.quote { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.quote blockquote { margin: 0 0 16px; font-size: 1.05rem; }
.quote .who { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); font-size: .95rem; }
.stars { color: #f59e0b; letter-spacing: 2px; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.faq summary { font-weight: 650; cursor: pointer; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary::-webkit-details-marker { display: none; }

/* ---- Forms ---- */
.form { max-width: 580px; }
.center .form { margin-inline: auto; text-align: left; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: .95rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.field textarea { min-height: 130px; resize: vertical; }
.field .err { color: #dc2626; font-size: .88rem; margin-top: 5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* banners */
.banner { padding: 14px 18px; border-radius: 12px; margin-bottom: 22px; font-weight: 500; }
.banner--ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.banner--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: .92rem; background: var(--bg-alt); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* sticky mobile CTA */
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: none; }
.sticky-cta .btn { width: 100%; box-shadow: var(--shadow-lg); }
@media (max-width: 720px) { .sticky-cta { display: block; } }

/* cookie consent */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 720px; margin: 0 auto;
  background: color-mix(in srgb, var(--bg-dark) 92%, transparent); color: #e7eaf3;
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 16px 20px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); z-index: 9999;
}
.consent[hidden] { display: none; }
.consent__text { margin: 0; font-size: .92rem; flex: 1 1 280px; }
.consent__actions { display: flex; gap: 10px; }
.consent .btn { padding: 10px 18px; }
.consent .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); box-shadow: none; }

/* article prose */
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin: 0 0 .6em; }
.prose h2 { font-size: 1.6rem; margin: 1.4em 0 .5em; }
.prose h3 { font-size: 1.2rem; margin: 1.2em 0 .4em; }
.prose p { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 1.1em; }
.prose ul.checklist { margin: 0 0 1.3em; }
.prose a { font-weight: 600; }
.prose strong { color: var(--ink); }

/* scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
