/* ════════════════════════════════════════════════════════════════
   BowlersDash — Shared stylesheet
   BowlTheme tokens are a direct port from BowlersDash/Theme/Theme.swift
   so the website matches the iOS/macOS app exactly.

   Compliance pages (privacy, support, terms, delete-account) and the
   marketing landing all share this stylesheet.
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ── Backgrounds (appBackground gradient stops) ── */
  --bowl-bg-1: #080A14;
  --bowl-bg-2: #0D0F1C;
  --bowl-bg-3: #0F0D17;

  /* ── Surfaces ── */
  --bowl-surface:           #141A29;
  --bowl-surface-elevated:  #1F2436;
  --bowl-surface-highlight: #292E42;

  /* ── Accents ── */
  --bowl-accent:  #3399FF;
  --bowl-amber:   #FFB833;
  --bowl-success: #33D675;
  --bowl-danger:  #FF6161;
  --bowl-gold:    #C9A96E;

  /* ── Text ── */
  --bowl-text-primary:   #EBEDF5;
  --bowl-text-secondary: #7A8599;
  --bowl-text-muted:     #5A6478;

  /* ── Card / Field tokens ── */
  --bowl-card-border:  rgba(255, 255, 255, 0.06);
  --bowl-card-stroke:  rgba(255, 255, 255, 0.08);
  --bowl-field-bg:     rgba(255, 255, 255, 0.06);
  --bowl-field-stroke: rgba(255, 255, 255, 0.10);

  /* ── Layout / radii / shadows ── */
  --radius-card:       22px;
  --radius-card-hero:  26px;
  --radius-pill:       999px;
  --radius-button:     14px;
  --pad-card:          20px;
  --pad-card-hero:     24px;
  --pad-screen-h:      24px;
  --max-primary:       1080px;
  --max-prose:         720px;

  --shadow-card:  0 8px 20px rgba(0, 0, 0, 0.35);
  --shadow-hero:  0 14px 40px rgba(51, 153, 255, 0.18);
  --shadow-btn:   0 8px 22px rgba(51, 153, 255, 0.28);

  /* ── Typography ── */
  --type-display: clamp(44px, 6.4vw, 76px);
  --type-h1:      clamp(32px, 4.2vw, 52px);
  --type-h2:      clamp(24px, 2.8vw, 32px);
  --type-h3:      clamp(18px, 1.6vw, 22px);
  --type-body:    18px;
  --type-small:   15px;
  --type-meta:    13px;
  --type-tiny:    12px;
}

/* ────────────────────────────────────────────────────────────────
   Reset
   ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss03';
  color: var(--bowl-text-primary);
  background: var(--bowl-bg-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-size: var(--type-body);
  line-height: 1.55;
}
a { color: var(--bowl-accent); text-decoration: none; transition: color 200ms ease; }
a:hover { color: #66B3FF; }
img, svg { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 2px solid var(--bowl-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -10000px; top: 0;
  z-index: 1000;
  background: var(--bowl-accent);
  color: #061122;
  padding: 10px 16px;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ────────────────────────────────────────────────────────────────
   Atmospheric background — appBackground + aurora + vignette
   ──────────────────────────────────────────────────────────────── */
.app-bg {
  position: fixed; inset: 0; z-index: -2;
  background: linear-gradient(135deg, var(--bowl-bg-1) 0%, var(--bowl-bg-2) 50%, var(--bowl-bg-3) 100%);
}
.aurora {
  position: fixed; inset: -10%;
  pointer-events: none; z-index: -1;
  background:
    radial-gradient(ellipse 50% 40% at 72% 22%, rgba(51, 153, 255, 0.16),  transparent 60%),
    radial-gradient(ellipse 45% 35% at 18% 78%, rgba(255, 184, 51, 0.07),  transparent 60%),
    radial-gradient(ellipse 35% 30% at 50% 50%, rgba(51, 153, 255, 0.05),  transparent 70%);
  filter: blur(0.5px);
  animation: aurora-drift 28s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1.00); }
  to   { transform: translate3d( 2%,  1%, 0) scale(1.04); }
}
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, transparent 60%, rgba(0,0,0,0.45) 100%);
}

/* ────────────────────────────────────────────────────────────────
   Header — wordmark + nav
   ──────────────────────────────────────────────────────────────── */
.site-header {
  position: relative;
  z-index: 4;
  max-width: var(--max-primary);
  margin: 0 auto;
  padding: 28px var(--pad-screen-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--bowl-text-primary);
}
.wordmark__mark {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #3a4564 0%, #1a2138 50%, #0a0e1a 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.10), 0 0 16px rgba(51,153,255,0.20);
  position: relative;
  flex-shrink: 0;
}
.wordmark__mark::before,
.wordmark__mark::after {
  content: '';
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #050810;
  top: 6px;
}
.wordmark__mark::before { left: 7px; }
.wordmark__mark::after  { right: 7px; }
.wordmark__mark > span {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #050810;
  top: 13px; left: 50%; transform: translateX(-50%);
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  color: var(--bowl-text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 200ms ease, background 200ms ease;
}
.nav a:hover { color: var(--bowl-text-primary); background: rgba(255,255,255,0.04); }
.nav a[aria-current="page"] { color: var(--bowl-text-primary); background: rgba(51, 153, 255, 0.08); }

/* ────────────────────────────────────────────────────────────────
   Buttons
   ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 150ms ease, box-shadow 200ms ease, background 200ms ease;
  will-change: transform;
}
.btn--accent {
  background: var(--bowl-accent);
  color: #061122;
  box-shadow: var(--shadow-btn);
}
.btn--accent:hover {
  background: #4DA6FF;
  color: #061122;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(51, 153, 255, 0.42);
}
.btn--accent:active { transform: translateY(0); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--bowl-text-primary);
  border: 0.5px solid var(--bowl-field-stroke);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.10); }
.btn--small { padding: 10px 16px; font-size: 14px; }

/* ────────────────────────────────────────────────────────────────
   Eyebrow pill
   ──────────────────────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(51, 153, 255, 0.08);
  border: 0.5px solid rgba(51, 153, 255, 0.22);
  color: var(--bowl-accent);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--bowl-accent);
  box-shadow: 0 0 10px rgba(51,153,255,0.7);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

/* ────────────────────────────────────────────────────────────────
   Hero (marketing) — kept compatible with hero-proof.html
   ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  max-width: var(--max-primary);
  margin: clamp(40px, 6vh, 80px) auto 0;
  padding: 0 var(--pad-screen-h);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
  min-height: 70vh;
}
.hero__copy { max-width: 580px; }
.hero__headline {
  font-size: var(--type-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  color: var(--bowl-text-primary);
}
.hero__headline em {
  font-style: normal;
  background: linear-gradient(135deg, #66B3FF 0%, var(--bowl-accent) 50%, #4080CC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__subhead {
  font-size: var(--type-body);
  line-height: 1.55;
  color: var(--bowl-text-secondary);
  margin: 0 0 40px;
  max-width: 520px;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  color: var(--bowl-text-secondary);
  font-size: var(--type-meta);
}
.hero__meta-pip {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
}

/* ────────────────────────────────────────────────────────────────
   Page header (smaller hero, used on prose pages)
   ──────────────────────────────────────────────────────────────── */
.page-header {
  position: relative;
  max-width: var(--max-prose);
  margin: clamp(40px, 6vh, 80px) auto clamp(28px, 4vh, 48px);
  padding: 0 var(--pad-screen-h);
  text-align: center;
}
.page-header__title {
  font-size: var(--type-h1);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--bowl-text-primary);
}
.page-header__lead {
  font-size: var(--type-body);
  color: var(--bowl-text-secondary);
  line-height: 1.55;
  margin: 0 auto;
  max-width: 540px;
}
.page-header__lead a { color: var(--bowl-accent); }

/* ────────────────────────────────────────────────────────────────
   Section + container utilities
   ──────────────────────────────────────────────────────────────── */
.section {
  position: relative;
  padding: clamp(48px, 8vh, 96px) var(--pad-screen-h);
}
.container {
  max-width: var(--max-primary);
  margin: 0 auto;
}
.container--prose {
  max-width: var(--max-prose);
  margin: 0 auto;
}

/* ────────────────────────────────────────────────────────────────
   Prose (long-form content — privacy, terms, delete-account)
   ──────────────────────────────────────────────────────────────── */
.prose {
  font-size: 17px;
  line-height: 1.7;
  color: var(--bowl-text-secondary);
}
.prose h2 {
  color: var(--bowl-text-primary);
  font-size: var(--type-h2);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 48px 0 14px;
}
.prose h3 {
  color: var(--bowl-text-primary);
  font-size: var(--type-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
}
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 12px 0 18px 24px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--bowl-text-primary); font-weight: 600; }
.prose a { color: var(--bowl-accent); text-decoration: underline; text-decoration-color: rgba(51, 153, 255, 0.3); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--bowl-accent); }
.prose__effective {
  font-size: var(--type-small);
  color: var(--bowl-text-muted);
  margin-bottom: 32px;
}
.prose__callout {
  background: rgba(51, 153, 255, 0.06);
  border-left: 2px solid var(--bowl-accent);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 24px 0;
  color: var(--bowl-text-primary);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: var(--type-small);
}
.prose th, .prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bowl-card-stroke);
}
.prose th {
  color: var(--bowl-text-primary);
  font-weight: 600;
  background: rgba(255,255,255,0.02);
}

/* ────────────────────────────────────────────────────────────────
   Callout card (used on landing + pages)
   ──────────────────────────────────────────────────────────────── */
.callout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bowl-surface);
  border: 0.5px solid var(--bowl-card-stroke);
  border-radius: var(--radius-card);
  padding: var(--pad-card);
  box-shadow: var(--shadow-card);
}
.callout__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 153, 255, 0.10);
  border-radius: 10px;
  color: var(--bowl-accent);
  font-size: 20px;
}
.callout__title {
  color: var(--bowl-text-primary);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.callout__body {
  color: var(--bowl-text-secondary);
  font-size: var(--type-small);
  line-height: 1.6;
  margin: 0;
}
.callout__body a { color: var(--bowl-accent); }

/* ────────────────────────────────────────────────────────────────
   FAQ accordion
   ──────────────────────────────────────────────────────────────── */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq__item {
  background: var(--bowl-surface);
  border: 0.5px solid var(--bowl-card-stroke);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 200ms ease;
}
.faq__item:has(.faq__btn[aria-expanded="true"]) {
  border-color: rgba(51, 153, 255, 0.3);
}
.faq__btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 22px;
  color: var(--bowl-text-primary);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq__btn::after {
  content: '+';
  color: var(--bowl-accent);
  font-size: 22px;
  font-weight: 400;
  transition: transform 250ms ease;
  flex-shrink: 0;
}
.faq__btn[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms ease;
}
.faq__panel-inner {
  padding: 0 22px 18px;
  color: var(--bowl-text-secondary);
  font-size: 15px;
  line-height: 1.7;
}
.faq__panel-inner a { color: var(--bowl-accent); }
.faq__btn[aria-expanded="true"] + .faq__panel { max-height: 800px; }

/* ────────────────────────────────────────────────────────────────
   Footer
   ──────────────────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max-primary);
  margin: 80px auto 0;
  padding: 48px var(--pad-screen-h) 32px;
  border-top: 0.5px solid var(--bowl-card-stroke);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.site-footer__brand {
  font-size: 14px;
  color: var(--bowl-text-secondary);
  line-height: 1.6;
}
.site-footer__brand .wordmark { margin-bottom: 12px; }
.site-footer__col h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bowl-text-muted);
  margin: 0 0 14px;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; }
.site-footer__col li { margin-bottom: 10px; }
.site-footer__col a {
  color: var(--bowl-text-secondary);
  font-size: 14px;
  text-decoration: none;
}
.site-footer__col a:hover { color: var(--bowl-text-primary); }
.site-footer__bar {
  padding-top: 24px;
  border-top: 0.5px solid var(--bowl-card-stroke);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--bowl-text-muted);
}
.site-footer__bar a { color: var(--bowl-text-muted); margin-left: 16px; }
.site-footer__bar a:hover { color: var(--bowl-text-secondary); }

/* ────────────────────────────────────────────────────────────────
   Reduce motion
   ──────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .aurora,
  .eyebrow::before {
    animation: none !important;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ────────────────────────────────────────────────────────────────
   Responsive
   ──────────────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
  }
  .hero__visual { order: -1; }
  .nav a:not(.btn) { display: none; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__bar { flex-direction: column; align-items: flex-start; }
  .site-footer__bar a { margin: 0 16px 0 0; }
  .prose th, .prose td { padding: 10px 8px; font-size: 14px; }
}
