/* =============================================================================
   Diamond Sports — marketing site design system
   Dependency-free CSS. Translates the iOS app's visual language to the web:
   - Field-lights background (BackgroundGlow.swift): #121A1F -> #05080A + slate glow
   - Brand slate-blue (DiamondPrimary): #334C5C light / #667B8B dark
   - Secondary amber (DiamondSecondary): #EB8E38 (sparing accent)
   - Faceted silver/slate gem logo (app icon), SF Pro type, 8pt grid, glass surfaces
   Light + dark via prefers-color-scheme. The hero is dark in BOTH modes, mirroring
   the app's onboarding, which is intentionally dark in either appearance.
   ============================================================================= */

/* ----------------------------------------------------------------------------
   Design tokens
   ---------------------------------------------------------------------------- */
:root {
  /* Brand — slate-blue family (from DiamondPrimary + the app-icon facets) */
  --brand: #334c5c;            /* DiamondPrimary (light, contrast-safe) — button fill */
  --brand-2: #3e5a6e;          /* gradient highlight */
  --brand-ink: #2a4150;        /* gradient shadow */
  --brand-accent: #8fb3cc;     /* accessible link/accent on dark surfaces */
  --brand-accent-strong: #aecbe0;
  --silver: #d6e2ec;           /* icon top-facet highlight */
  --steel: #5b7488;            /* icon mid facet */
  --navy: #2c4053;             /* icon deep facet */
  --amber: #eb8e38;            /* DiamondSecondary — warm accent, used sparingly */

  /* Form-feedback status colors (waitlist) — tuned for the dark hero. */
  --status-success: #5fcf8e;
  --status-danger: #e8836f;

  /* Dark "field-lights" stage (hero + dark mode) */
  --field-top: #121a1f;
  --field-bottom: #05080a;

  /* Light-mode surface palette (defaults) */
  --bg: #f5f7f9;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --text: #0e1216;
  --text-secondary: #54616e;
  --text-tertiary: #67707b; /* AA on both --bg (#f5f7f9) and white --bg-elevated */
  --border: rgba(15, 22, 30, 0.10);
  --hairline: rgba(15, 22, 30, 0.08);
  --link: #2f5d77;
  --link-hover: #224a60;

  /* Glass (feature cards) — adapts per scheme below */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(15, 22, 30, 0.08);
  --glass-shadow: 0 12px 32px -8px rgba(15, 22, 30, 0.16);

  /* Spacing — 8pt grid (4pt fine steps), mirrors Theme.Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius — mirrors Theme.CornerRadius */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1080px;
  --maxw-text: 720px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 0.3s;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07090b;
    --bg-elevated: #0d1115;
    --surface: #11161b;
    --surface-2: #161c22;
    --text: #f3f6f8;
    --text-secondary: rgba(243, 246, 248, 0.64);
    --text-tertiary: rgba(243, 246, 248, 0.55); /* AA on --bg #07090b and --bg-elevated #0d1115 */
    --border: rgba(255, 255, 255, 0.10);
    --hairline: rgba(255, 255, 255, 0.08);
    --link: var(--brand-accent);
    --link-hover: var(--brand-accent-strong);

    --glass-bg: rgba(255, 255, 255, 0.045);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  }
}

/* ----------------------------------------------------------------------------
   Reset / base
   ---------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Offset in-page anchor jumps (e.g. "Join waitlist" → #waitlist) by the
     sticky header height + a little breathing room, so the target isn't tucked
     behind the 64px header. */
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--link-hover); }

h1, h2, h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}

:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Visually-hidden honeypot wrapper (bot trap) — kept out of the layout and the
   tab order without inline styles, so the CSP can forbid inline styles. */
.hp {
  position: absolute;
  left: -5000px;
}

/* Removes the top padding from a section that follows another with no gap. */
.section--flush-top { padding-top: 0; }

.skip-link {
  position: absolute;
  left: 50%;
  top: -64px;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-2); }

/* ----------------------------------------------------------------------------
   Layout helpers
   ---------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--space-24);
}
@media (max-width: 640px) {
  .section { padding-block: var(--space-16); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-accent);
}
/* The one deliberate use of DiamondSecondary amber — a small "live" status dot
   on the hero eyebrow, where the warm tone reads best against the dark stage. */
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--amber);
  box-shadow: 0 0 8px color-mix(in srgb, var(--amber) 60%, transparent);
}

/* ----------------------------------------------------------------------------
   Header / nav
   ---------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--hairline);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 64px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.0625rem;
  color: var(--text);
  white-space: nowrap;
}
.brand-lockup img { width: 30px; height: 30px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}
/* Plain text links only — the CTA is a .btn and keeps its own styling, so it's
   excluded here to avoid a specificity war with .btn / the mobile hide. */
.nav-links a:not(.nav-cta) {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }

.nav-cta { margin-left: var(--space-2); }

/* Compact the header on phones (no hamburger needed for a 3-page site).
   The waitlist button is redundant on mobile — the hero form sits right below —
   so it drops away; under 410px the wordmark collapses to just the gem (the
   link keeps its aria-label, so the accessible name is preserved). */
@media (max-width: 600px) {
  .nav { gap: var(--space-2); }
  /* Scoped above `.btn { display: inline-flex }` (same specificity, later in the
     file) so the hide actually wins. */
  .nav-links .nav-cta { display: none; }
  .nav-links { gap: 0; }
  /* min-height guarantees a 44px tap target regardless of inherited line-height. */
  .nav-links a:not(.nav-cta) {
    padding: var(--space-2);
    font-size: 0.875rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .brand-lockup { font-size: 1rem; }
  .brand-lockup img { width: 26px; height: 26px; }
  /* Loosen footer density and give links a tappable height on phones. */
  .footer-inner { gap: var(--space-6); }
  .footer-nav { gap: var(--space-6); }
  .footer-col ul { gap: var(--space-3); }
  .footer-col a { display: inline-block; padding-block: var(--space-2); }
}
@media (max-width: 410px) {
  .brand-lockup span { display: none; }
}

/* ----------------------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 var(--space-6);
  height: 52px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(160deg, var(--brand-2), var(--brand-ink));
  box-shadow: 0 10px 26px -8px rgba(51, 76, 92, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 14px 32px -8px rgba(51, 76, 92, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }

.btn-sm { height: 40px; font-size: 0.9375rem; padding: 0 var(--space-4); }

/* ----------------------------------------------------------------------------
   Hero — dark field-lights stage (both color schemes)
   ---------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  text-align: center;
  padding-block: clamp(72px, 12vw, 140px);
  overflow: hidden;
  background:
    radial-gradient(120% 92% at 50% 6%,
      rgba(78, 106, 128, 0.46) 0%,
      rgba(51, 76, 92, 0.14) 34%,
      transparent 64%),
    linear-gradient(180deg, var(--field-top) 0%, var(--field-bottom) 78%);
}
/* Soft "stadium light" bloom flares, very subtle, behind content. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 30% at 18% 12%, rgba(143, 179, 204, 0.10), transparent 70%),
    radial-gradient(36% 28% at 84% 16%, rgba(143, 179, 204, 0.08), transparent 70%);
  pointer-events: none;
}
/* Fade the bottom edge into the page background for a seamless seam. */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
}

.hero-logo {
  width: 96px;
  height: 96px;
  margin-inline: auto;
  margin-bottom: var(--space-6);
  filter: drop-shadow(0 10px 30px rgba(143, 179, 204, 0.35));
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 800;
  margin-bottom: var(--space-4);
  color: #fff;
}
.hero h1 .accent {
  background: linear-gradient(180deg, var(--silver), var(--brand-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand-accent);
}
.hero-lead {
  font-size: clamp(1.0625rem, 2.4vw, 1.3125rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.74);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

/* ----------------------------------------------------------------------------
   Waitlist form
   ---------------------------------------------------------------------------- */
.waitlist {
  max-width: 480px;
  margin-inline: auto;
}
.waitlist-form {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.waitlist-form .field {
  flex: 1 1 220px;
  height: 52px;
  padding: 0 var(--space-4);
  font-family: inherit;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.waitlist-form .field::placeholder { color: rgba(255, 255, 255, 0.55); }
/* Mouse focus gets the subtle tint; keyboard focus also gets the strong global
   ring (don't suppress it with outline:none — that hides focus for AT users). */
.waitlist-form .field:focus {
  border-color: var(--brand-accent);
  background: rgba(255, 255, 255, 0.09);
}
.waitlist-form .field:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}
/* :user-invalid covers native typing; [aria-invalid] covers the state waitlist.js
   sets on submit, so the error border shows consistently across browsers. */
.waitlist-form .field:user-invalid,
.waitlist-form .field[aria-invalid="true"] {
  border-color: var(--status-danger);
}
.waitlist-form .btn { flex: 0 0 auto; }
@media (max-width: 480px) {
  .waitlist-form { flex-direction: column; }
  /* In a column the row flex-basis (220px) would apply to HEIGHT and balloon the
     input — reset to auto so the field/button keep their own 52px height. */
  .waitlist-form .field,
  .waitlist-form .btn { width: 100%; flex: 0 0 auto; }
  .cta-band { padding-inline: var(--space-4); }
}

.waitlist-note {
  margin-top: var(--space-3);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.54);
}

.waitlist-status {
  margin-top: var(--space-4);
  min-height: 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
}
.waitlist-status[data-state="success"] { color: var(--status-success); }
.waitlist-status[data-state="error"] { color: var(--status-danger); }

/* ----------------------------------------------------------------------------
   Feature cards ("what it is")
   ---------------------------------------------------------------------------- */
.section-head {
  text-align: center;
  max-width: var(--maxw-text);
  margin-inline: auto;
  margin-bottom: var(--space-12);
}
.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-block: var(--space-3);
}
.section-head p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}
.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px -12px rgba(15, 22, 30, 0.22);
}
.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
@media (prefers-color-scheme: dark) {
  .feature-icon { color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 14%, transparent); }
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.96875rem;
}

/* ----------------------------------------------------------------------------
   CTA band (closing)
   ---------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(40px, 7vw, 72px) var(--space-6);
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(78, 106, 128, 0.45), transparent 60%),
    linear-gradient(180deg, var(--field-top), var(--field-bottom));
  box-shadow: var(--glass-shadow);
}
.cta-band h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  margin-bottom: var(--space-3);
  color: #fff;
}
.cta-band p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

/* ----------------------------------------------------------------------------
   Page header (support / privacy) — compact dark band
   ---------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  color: #fff;
  text-align: center;
  padding-block: clamp(56px, 9vw, 96px);
  background:
    radial-gradient(110% 120% at 50% 0%, rgba(78, 106, 128, 0.36), transparent 58%),
    linear-gradient(180deg, var(--field-top), var(--field-bottom));
}
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: #fff;
  margin-bottom: var(--space-3);
}
.page-hero p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.125rem;
  max-width: var(--maxw-text);
  margin-inline: auto;
}

/* ----------------------------------------------------------------------------
   Prose (privacy) + contact card + FAQ (support)
   ---------------------------------------------------------------------------- */
.prose {
  max-width: var(--maxw-text);
  margin-inline: auto;
}
.prose h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: var(--space-12);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}
.prose h2:first-of-type { margin-top: 0; }
.prose p { margin-bottom: var(--space-4); color: var(--text); }
.prose ul { margin: 0 0 var(--space-4) var(--space-6); }
.prose li { margin-bottom: var(--space-2); }
.prose .meta { color: var(--text-secondary); font-size: 0.9375rem; }

.contact-card {
  max-width: var(--maxw-text);
  margin: 0 auto var(--space-12);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
}
.contact-card h2 { font-size: 1.375rem; margin-bottom: var(--space-2); }
.contact-card p { color: var(--text-secondary); margin-bottom: var(--space-6); }
/* The CTA shows the full email address, which is wide — let it wrap (and grow
   taller) on narrow screens instead of overflowing the card. */
.contact-card .btn {
  max-width: 100%;
  white-space: normal;
  height: auto;
  min-height: 52px;
  padding-block: var(--space-3);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.faq {
  max-width: var(--maxw-text);
  margin-inline: auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-1);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item .faq-body {
  padding: 0 var(--space-1) var(--space-6);
  color: var(--text-secondary);
}
.faq-item .faq-body a { font-weight: 600; }

/* ----------------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  background: var(--bg-elevated);
  padding-block: var(--space-12);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  align-items: flex-start;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 320px;
}
.footer-brand .brand-lockup { color: var(--text); }
.footer-brand p { color: var(--text-secondary); font-size: 0.9375rem; }
.footer-nav {
  display: flex;
  gap: var(--space-16);
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
  font-weight: 700;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a { color: var(--text-secondary); font-size: 0.9375rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--hairline);
  color: var(--text-tertiary);
  font-size: 0.875rem;
}
