/* FPL Now — shared site styles.
   Design language mirrors the app (docs/ui-patterns.md): system type, sparse surface,
   semantic colour — amber = derived from betting odds, slate = our model, green = live.
   No framework, no build step. */

:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1c1c1e;
  --text-secondary: #6e6e73;
  --hairline: rgba(60, 60, 67, 0.18);
  --accent-live: #1f9d4d;
  --accent-market: #b45309;   /* amber: derived from betting odds */
  --accent-model: #475569;    /* slate: derived from our model */
  --tint: #0a5c36;
  --radius: 14px;
  --max-copy: 41rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d;
    --surface: #17171a;
    --text: #f2f2f7;
    --text-secondary: #98989f;
    --hairline: rgba(84, 84, 88, 0.55);
    --accent-live: #35c065;
    --accent-market: #e8963c;
    --accent-model: #94a3b8;
    --tint: #4cc07e;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 1.0625rem;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--max-copy);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { display: block; }

/* ---------- Header / footer ---------- */

.site-header {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.site-footer p + p { margin-top: 0.6rem; }
.site-footer a { color: var(--text-secondary); }

/* ---------- Typography ---------- */

h1 {
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 2.2rem 0 0.8rem;
}

h2 {
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin: 2.4rem 0 0.6rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  margin: 1.6rem 0 0.35rem;
}

p { margin: 0.7rem 0; }

ul, ol { margin: 0.7rem 0 0.7rem 1.4rem; }
li { margin: 0.35rem 0; }

a { color: var(--tint); }

strong { font-weight: 650; }

.lede {
  font-size: 1.1875rem;
  color: var(--text-secondary);
}

.updated {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: -0.3rem;
}

/* The quiet footnote — ui-patterns.md §7: caption weight, no icon, no accent,
   no container, below the content it refers to. If it draws the eye, it is wrong. */
.footnote {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  opacity: 0.85;
}

/* ---------- Cards / panels for the two utility pages ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.2rem 0;
}

.panel h3:first-child { margin-top: 0.2rem; }

/* Definition-style FAQ */
details {
  border-bottom: 1px solid var(--hairline);
  padding: 0.85rem 0;
}

details summary {
  font-weight: 600;
  cursor: pointer;
  list-style-position: outside;
}

details summary:focus-visible {
  outline: 2px solid var(--tint);
  outline-offset: 3px;
  border-radius: 4px;
}

details p { color: var(--text-secondary); }
details p strong { color: var(--text); }

/* ---------- Landing page ---------- */

.hero {
  padding: 3rem 0 1rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 7vw, 3rem);
  margin: 0.8rem 0 0.6rem;
}

.hero .lede {
  max-width: 34rem;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-live);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
}

/* Phone mockups: our own CSS frame, no Apple hardware imagery. */
.phone {
  width: min(320px, 78vw);
  margin: 0 auto;
  border-radius: 44px;
  border: 1px solid var(--hairline);
  background: #000;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

@media (prefers-color-scheme: dark) {
  .phone { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); border-color: #333; }
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 34px;
}

.hero .phone { margin-top: 2.2rem; }

/* Feature sections: alternating copy + mockup */
.feature {
  padding: 3.2rem 0 0.5rem;
}

.feature .wrap {
  display: grid;
  gap: 2rem;
  align-items: center;
  max-width: 60rem;
}

@media (min-width: 720px) {
  .feature .wrap {
    grid-template-columns: 1fr 1fr;
  }
  .feature.flip .feature-copy { order: 2; }
}

.feature h2 { margin-top: 0; }

.feature .kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.kicker.live   { color: var(--accent-live); }
.kicker.market { color: var(--accent-market); }
.kicker.model  { color: var(--accent-model); }

.feature p { color: var(--text-secondary); }
.feature p strong { color: var(--text); }

/* ---------- CTA / install ---------- */

.cta {
  text-align: center;
  padding: 3.5rem 0 1rem;
}

.btn {
  display: inline-block;
  font-size: 1.0625rem;
  font-weight: 650;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover { opacity: 0.85; }

.btn-primary:focus-visible,
.btn:focus-visible,
input:focus-visible {
  outline: 3px solid var(--tint);
  outline-offset: 3px;
}

.btn[aria-disabled="true"] {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--hairline);
  cursor: default;
}

.cta .footnote { margin-top: 0.9rem; }

/* ---------- Email signup ---------- */

.signup {
  max-width: 26rem;
  margin: 2.2rem auto 0;
  text-align: left;
}

.signup[hidden] { display: none; }

.signup label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
}

.signup .row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.signup input[type="email"] {
  flex: 1 1 12rem;
  font: inherit;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  min-width: 0;
}

.signup .btn { padding: 0.65rem 1.2rem; font-size: 0.9375rem; }

.signup .consent {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.6rem;
}

/* ---------- Accessibility / motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

:target { scroll-margin-top: 1rem; }

/* At 200% zoom nothing may truncate; grids collapse naturally, and long code-ish
   strings (team IDs, emails) wrap instead of overflowing. */
code, .wrap { overflow-wrap: break-word; }
