/* =====================================================================
   ESP Champ — public site (landing + legal pages).
   Aurora-Light theme, shared with css/auth.css. No inline styles
   anywhere (strict CSP: style-src 'self'); everything is class-driven.
   ===================================================================== */

:root {
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --surface-2: #FBFCFE;
  --text: #0F1729;
  --muted: #5B6679;
  --line: #E5EAF2;
  --primary: #8B5CF6;
  --accent: #14B8A6;
  --danger: #DC2626;
  --radius: 14px;
  --radius-lg: 22px;
  --gradient: linear-gradient(100deg, #8B5CF6, #14B8A6);
  --gradient-soft: linear-gradient(160deg, #F3EEFF 0%, #E8FBF6 100%);
  --shadow: 0 10px 30px rgba(15, 23, 41, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 41, 0.10);
  --maxw: 1080px;
  --font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--muted); }

/* ---- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--gradient); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.28); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(139, 92, 246, 0.36); }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 16px 28px; font-size: 1.08rem; }

/* ---- Header / nav -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 249, 252, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.02em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-size: 1.08rem; }
.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-links a.nav-link { color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 9px; }
.nav-links a.nav-link:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-links a { flex: none; white-space: nowrap; }   /* never shrink/wrap nav items (e.g. "Log in") */
.t-short { display: none; }                          /* desktop shows the full CTA label */

/* ---- Hero ---------------------------------------------------------- */
.hero { background: var(--gradient-soft); border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 80px;
}
.hero h1 { font-size: 3rem; font-weight: 800; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 14px;
}
.hero-sub { font-size: 1.18rem; color: var(--muted); margin: 0 0 26px; max-width: 34ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 0.9rem; color: var(--muted); }
.hero-art { position: relative; display: flex; justify-content: center; align-items: center; }
/* Near-square art: cap the height so it sits balanced beside the copy instead of
   towering over it. width:auto keeps the true aspect ratio (no distortion). */
.hero-art img { width: auto; max-width: 100%; max-height: 396px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ---- Sections ------------------------------------------------------ */
.section { padding: 78px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 60ch; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: 2.1rem; font-weight: 800; }
.section-head p { font-size: 1.1rem; color: var(--muted); margin: 0; }

/* Split (text + image) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.split.reverse .split-media { order: -1; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--line); }
.split h2 { font-size: 2rem; }
.split p { color: var(--muted); font-size: 1.06rem; }

/* How it works */
.how-media { max-width: 780px; margin: 0 auto 38px; }
.how-media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.step-num {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--gradient); color: #fff; font-weight: 800;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.18rem; }
.step p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* Cards (best practices) */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.card .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gradient); flex: none; }
.card p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* Chance / honest callout */
.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}
.chance-row { display: flex; gap: 14px; }
.chance {
  flex: 1; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 10px;
}
.chance .pct { font-size: 1.7rem; font-weight: 800; }
.chance .lbl { font-size: 0.82rem; color: var(--muted); }

/* CTA band */
.cta-band { background: var(--gradient); color: #fff; border-radius: var(--radius-lg); padding: 54px; text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { font-size: 2.1rem; font-weight: 800; margin-bottom: 10px; }
.cta-band p { font-size: 1.12rem; opacity: 0.95; margin: 0 0 26px; }
.cta-band .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 10px 24px rgba(0,0,0,0.16); }

/* ---- Footer -------------------------------------------------------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 12px; }
.footer-grid a { display: block; color: var(--text); padding: 4px 0; font-size: 0.95rem; }
.footer-about p { color: var(--muted); font-size: 0.95rem; margin: 12px 0 0; }
.footer-legal { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.footer-legal address { font-style: normal; }

/* ---- Legal pages --------------------------------------------------- */
.legal { padding: 54px 0 72px; }
.legal-col { max-width: 760px; margin: 0 auto; }
.legal-breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.legal h1 { font-size: 2.3rem; font-weight: 800; }
.legal .updated { color: var(--muted); font-size: 0.92rem; margin: 0 0 30px; }
.legal h2 { font-size: 1.35rem; font-weight: 700; margin: 38px 0 10px; padding-top: 8px; }
.legal h3 { font-size: 1.08rem; font-weight: 700; margin: 24px 0 8px; color: #283043; }
.legal p, .legal li { color: #2c3446; font-size: 1rem; }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal strong { color: var(--text); }
.legal .lead { font-size: 1.08rem; color: var(--muted); }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--surface-2); font-weight: 700; }
.legal .contact-block {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px; margin: 18px 0;
}
.legal .contact-block address { font-style: normal; color: #2c3446; }
.legal .toc { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 30px; }
.legal .toc strong { display: block; margin-bottom: 8px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.legal .toc a { font-size: 0.95rem; }

/* ---- Responsive ---------------------------------------------------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; padding: 40px 0 44px; }
  .hero h1 { font-size: 2.3rem; }
  .hero-sub { max-width: none; }
  .hero-art { order: -1; }
  .hero-art img { max-height: 280px; }
  .split, .callout { grid-template-columns: 1fr; gap: 24px; }
  .split.reverse .split-media { order: 0; }
  .steps { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 30px; }
  .cta-band { padding: 36px 22px; }
  .nav-links .nav-hide { display: none; }
  /* Cap section imagery so it doesn't dominate the scroll. */
  .how-media img, .split-media img { max-height: 240px; width: auto; margin: 0 auto; }
  /* Center the hero + step copy when stacked (reads better than left-aligned on a phone). */
  .hero-copy { text-align: center; }
  .hero-cta { justify-content: center; }
  .step { text-align: center; }
  .step-num { margin-left: auto; margin-right: auto; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }

  /* Compact, single-line mobile header: tighter spacing + a short CTA label. */
  .nav { height: 56px; }
  .nav-links { gap: 6px; }
  .nav-links a.nav-link { padding: 7px 8px; font-size: 0.95rem; }
  .nav-links .btn-primary { padding: 9px 13px; font-size: 0.9rem; }
  .brand span { font-size: 1rem; }
  .t-full { display: none; }
  .t-short { display: inline; }   /* "Sign up" instead of "Create free account" */

  /* Smaller hero + denser spacing so more fits with less scrolling. */
  .hero-grid { padding: 26px 0 32px; gap: 18px; }
  .hero h1 { font-size: 1.9rem; }
  .hero-sub { font-size: 1rem; margin-bottom: 18px; }
  .hero-art img { max-height: 188px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta .btn { width: 100%; }
  .hero-note { font-size: 0.85rem; }

  /* Tighter sections + smaller headings (no 3-line heading wraps). */
  .section { padding: 36px 0; }
  .section-head { margin-bottom: 22px; }
  .section-head h2, .split h2, .cta-band h2 { font-size: 1.7rem; }
  .section-head p { font-size: 1rem; }
  .how-media img, .split-media img { max-height: 200px; }

  /* Keep the chance figures in ONE compact row (no stacked rows). */
  .chance-row { gap: 8px; }
  .chance { padding: 12px 6px; }
  .chance .pct { font-size: 1.25rem; }
  .chance .lbl { font-size: 0.72rem; }

  .callout { padding: 22px 20px; }
  .step { padding: 20px; }
  .card { padding: 18px; }
  .cta-band { padding: 30px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
}
