/* =========================================================================
   FantaSign — single stylesheet. Self-hosted fonts, no external requests.
   Navy-first look, mirrored from the FantaSign app (app_theme.dart):
   navy field #1A2668 → #0A1130, coral-red accent #F0625B.
   ========================================================================= */

/* ---- Fonts (drop the .woff2 files in assets/fonts/ — see assets/fonts/README.md) */
@font-face {
  font-family: 'Sora';
  src: url('/assets/fonts/sora-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Sora';
  src: url('/assets/fonts/sora-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

/* ---- Design tokens ------------------------------------------------------- */
:root {
  color-scheme: dark;

  --font-display: 'Sora', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-text: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Navy field — the app's myleaguesBackgroundColors gradient */
  --navy-1: #1c2a72;
  --navy-2: #111c52;
  --navy-3: #0a1234;
  --navy-4: #060a22;

  --bg: var(--navy-3);
  --surface: rgba(255, 255, 255, .045);      /* navy "glass" panel */
  --surface-solid: #131e56;
  --surface-2: rgba(255, 255, 255, .07);
  --border: rgba(255, 255, 255, .12);
  --border-strong: rgba(255, 255, 255, .22);

  --text: #f2f4ff;
  --muted: #b3bce4;

  --accent: #f0625b;          /* app redAccent */
  --accent-hot: #ff5a52;      /* punchier red for fills/glows */
  --accent-ink: #f7a7a2;      /* light red — AA text/links on navy */
  --accent-contrast: #2a0d0b; /* text on red fills */

  --blue: #4f6fd4;
  --blue-ink: #9fb4f2;

  --focus: #9fb4f2;
  --shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 20px 50px rgba(0, 0, 0, .45);
  --glow: 0 0 0 1px rgba(240, 98, 91, .35), 0 12px 40px rgba(240, 98, 91, .28);

  --wrap: 70rem;
  --radius: 16px;
}

/* Users who force light still get the brand navy; nudge it a touch lighter. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #0c1540;
    --muted: #bcc4ea;
  }
}

/* ---- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  background-color: var(--navy-4);
  background-image:
    radial-gradient(1100px 620px at 78% -8%, rgba(240, 98, 91, .20), transparent 60%),
    radial-gradient(900px 600px at 10% 0%, rgba(79, 111, 212, .28), transparent 55%),
    linear-gradient(178deg, var(--navy-1) 0%, var(--navy-2) 34%, var(--navy-3) 66%, var(--navy-4) 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; font-weight: 800; color: var(--text); }
a { color: var(--accent-ink); text-underline-offset: .15em; text-decoration-thickness: from-font; }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface-solid);
  color: var(--text);
  padding: .75rem 1rem;
  border: 2px solid var(--focus);
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- Header ---------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--navy-3) 72%, transparent);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.01em;
}
.brand__mark { display: block; border-radius: 50%; }
.brand--footer { margin: 0 0 .6rem; }
.header-link { font-weight: 700; font-size: .95rem; text-decoration: none; color: var(--accent-ink); }
.header-link:hover { text-decoration: underline; }

/* ---- Hero ---------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -14% auto auto;
  width: 48rem;
  height: 48rem;
  border: 1.5px solid color-mix(in srgb, var(--blue-ink) 40%, transparent);
  border-radius: 50%;
  opacity: .45;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -45% -12%;
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, rgba(240, 98, 91, .30), transparent 68%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(2.75rem, 7vw, 6rem);
  align-items: center;
}
@media (min-width: 52rem) {
  .hero__inner { grid-template-columns: 1.05fr .95fr; gap: 3.5rem; }
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-contrast);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hot) 100%);
  border-radius: 999px;
  padding: .42rem .95rem;
  box-shadow: var(--glow);
}
.hero__eyebrow::before {
  content: "";
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--accent-contrast);
}
.hero__title {
  margin: 0 0 1.15rem;
  font-size: clamp(2.4rem, 6.5vw, 4.1rem);
  letter-spacing: -.025em;
}
.hero__title .hl {
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero__lede {
  margin: 0 0 2.25rem;
  font-size: clamp(1.1rem, 2.4vw, 1.28rem);
  color: var(--muted);
  max-width: 36ch;
}

/* ---- Store badges ------------------------------------------------- */
.stores { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.stores__badges { display: flex; flex-wrap: wrap; gap: .8rem; }
.store-badge { display: inline-block; border-radius: 11px; }
.store-badge img { display: block; height: 46px; width: auto; border-radius: 11px; }
.store-badge.is-disabled { opacity: .55; cursor: default; }
.stores__note {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
  max-width: 34ch;
  padding-left: .9rem;
  border-left: 2px solid var(--accent);
}

/* ---- Phone mockup ---------------------------------------------- */
.hero__media { display: flex; justify-content: center; }
.phone {
  position: relative;
  padding: .6rem;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 38px;
  box-shadow: var(--shadow), 0 0 60px rgba(240, 98, 91, .18);
  max-width: 300px;
}
.phone__shot { border-radius: 30px; width: 100%; height: auto; }

/* ---- Section shell -------------------------------------------- */
.features { padding-block: clamp(3.5rem, 9vw, 6rem); }
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -.02em;
  margin: 0 0 2.25rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 4px;
  margin-top: .9rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  border-radius: 2px;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--surface-2);
}
.feature__icon {
  color: #fff;
  margin-bottom: 1rem;
  padding: .6rem;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hot) 100%);
  box-sizing: content-box;
  box-shadow: 0 8px 20px rgba(240, 98, 91, .3);
}
.feature__title { margin: 0 0 .45rem; font-size: 1.1rem; font-weight: 800; }
.feature__text { margin: 0; font-size: .96rem; color: var(--muted); line-height: 1.55; }

/* ---- Prose / legal ------------------------------------------ */
.legal__wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal__doc { max-width: 44rem; margin-inline: auto; }
.legal__head { margin-bottom: 2rem; }
.legal__head h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); margin: 0 0 .6rem; letter-spacing: -.02em; }
.legal__head h1::after {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  margin-top: .8rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  border-radius: 2px;
}
.legal__meta { margin: 0; color: var(--muted); font-size: .92rem; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.toc__title { margin: 0 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }
.toc a { color: var(--text); }

.prose { font-size: 1.04rem; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.8rem;
  letter-spacing: -.01em;
  scroll-margin-top: 5.5rem;
}
.prose h2::before {
  content: "";
  display: inline-block;
  width: .7rem;
  height: .7rem;
  margin-right: .55rem;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: baseline;
}
.prose h3 { font-size: 1.15rem; margin-top: 1.9rem; scroll-margin-top: 5.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .4rem; }
.prose a { color: var(--accent-ink); }
.prose strong { color: var(--text); }
.prose code {
  background: var(--surface-2);
  padding: .12em .4em;
  border-radius: 5px;
  font-size: .9em;
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2.5rem; }
.prose blockquote {
  margin: 0;
  padding: .6rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
}
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: .55rem .7rem; text-align: left; }
.prose th { background: var(--surface-2); }

.prose-section { padding-block: 2rem 4rem; }
.prose-section .prose { max-width: 44rem; margin-inline: auto; }

/* ---- Footer ------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--navy-4) 60%, transparent);
  margin-top: 5rem;
}
.site-footer__inner {
  display: grid;
  gap: 2rem;
  padding-block: 3.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) { .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 64rem) { .site-footer__inner { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; } }
.site-footer__heading { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--accent-ink); margin: 0 0 .9rem; }
.site-footer__tagline { margin: 0; color: var(--text); font-size: .95rem; font-weight: 600; max-width: 32ch; }
.site-footer__fineprint { margin: .5rem 0 0; color: var(--muted); font-size: .85rem; max-width: 32ch; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer__links a { color: var(--text); text-decoration: none; font-size: .95rem; }
.site-footer__links a:hover { color: var(--accent-ink); text-decoration: underline; }

.lang-switcher__label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--accent-ink); margin-bottom: .9rem; }
.lang-switcher ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.lang-switcher a { color: var(--text); text-decoration: none; font-size: .92rem; }
.lang-switcher a:hover { color: var(--accent-ink); text-decoration: underline; }
.lang-switcher__current { font-weight: 800; color: var(--accent); font-size: .92rem; }

.site-footer__legal-line { padding-bottom: 2.5rem; }
.site-footer__legal-line p { margin: 0; color: var(--muted); font-size: .85rem; }
