/* ============================================================================
   WonYet design system — "the quiet confidence of a well-kept ledger"
   Warm paper, deep clover green, editorial serif display (Fraunces, self-
   hosted). No casino gold, no SaaS blue. Contrast measured: ink/paper 15.7:1,
   brand-deep/paper 7.8:1, accent/paper 5.9:1; dark tokens re-measured ≥ AA.
   ========================================================================== */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-wght-italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #FAF8F4;        /* warm off-white background */
  --surface: #FFFFFF;
  --ink: #1A2622;          /* near-black green */
  --muted: #5A6B63;        /* 5.6:1 on paper */
  --line: #E2DDD2;
  --brand: #0E7C5B;        /* clover — large text & UI components */
  --brand-deep: #0A5C44;   /* body-size brand text */
  --brand-tint: #EAF3EE;
  --accent: #B45309;       /* warm amber for jackpots — 5.9:1 on paper */
  --accent-soft: #FCF4EA;
  --accent-ink: #6B4A12;
  --danger: #B3261E;
  --win: #0E7C5B;
  --focus: #1457D0;
  --radius: 14px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --shadow: 0 1px 2px rgba(26, 38, 34, .06), 0 8px 24px rgba(26, 38, 34, .07);
  color-scheme: light;
}

/* Dark mode: same warmth, lights off. Token swap only — components inherit. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111714;
    --surface: #1A211D;
    --ink: #E9EFEA;        /* 14.6:1 on paper */
    --muted: #A3B3AA;      /* 7.1:1 */
    --line: #2E3833;
    --brand: #4CC39A;      /* brightened for dark — 8.2:1 on paper */
    --brand-deep: #6FD0AC; /* body-size brand text on dark */
    --brand-tint: #1C2B24;
    --accent: #E0A864;     /* 8.0:1 on paper */
    --accent-soft: #2A2118;
    --accent-ink: #E8C89A;
    --danger: #F2867E;
    --focus: #7EB1FF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
  .btn-primary { background: #0E7C5B; }
  .btn-primary:hover { background: #129268; }
  .btn-secondary { background: #E9EFEA; color: #111714; }
  .btn-secondary:hover { background: #FFFFFF; color: #111714; }
  .nav-cta { color: #fff !important; }
  .cta-band, .site-footer { background: #0B0F0D; }
  .calc input, .calc select, .f-field input, .f-field select { background: var(--surface); }
  .badge-pending { color: #E5D58A; background: #2B2715; border-color: #574F22; }
  .badge-checked { color: #C2CCC6; background: #242B27; border-color: #3A453F; }
  .badge-winner { color: #7FE0BA; background: #163026; border-color: #2C5B49; }
  .badge-expired { color: #AFAFAD; background: #262623; border-color: #3F3F3B; }
  .badge-needs_review { color: #ECBE92; background: #2D2114; border-color: #5C432A; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, .plan-price, .footer-word {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.45rem, 3.5vw, 2rem); margin: 1.4em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
h1 em { font-style: italic; color: var(--brand-deep); }
p { margin: 0 0 1em; }
a { color: var(--brand-deep); text-underline-offset: 3px; }
a:hover { color: var(--brand); }

/* Focus — always visible, never removed */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.2rem; border-radius: 0 0 10px 10px;
  z-index: 100; transition: top .15s;
}
.skip-link:focus { top: 0; color: var(--paper); }

/* --- Buttons (min 44px targets) ------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.4rem;
  border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand-deep); color: #fff; }
.btn-primary:hover { background: var(--brand); color: #fff; }
.btn-secondary { background: var(--ink); color: var(--paper); }
.btn-secondary:hover { background: #2C3B35; color: var(--paper); }
.btn-ghost { background: transparent; color: var(--brand-deep); border-color: var(--brand-deep); }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-lg { font-size: 1.1rem; padding: .85rem 1.8rem; }
.linklike {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--brand-deep); text-decoration: underline; cursor: pointer;
  text-underline-offset: 3px;
}

/* --- Header ---------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-nav {
  max-width: 72rem; margin: 0 auto; padding: .8rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-word { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; color: var(--ink); }
.brand-accent { color: var(--brand-deep); font-style: italic; }
.nav-toggle {
  margin-left: auto; display: none; background: none; border: 1px solid var(--line);
  border-radius: 10px; padding: .55rem .7rem; min-height: 44px; min-width: 44px; cursor: pointer; color: var(--ink);
}
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.nav-links a { text-decoration: none; font-weight: 500; color: var(--ink); }
.nav-links a:hover { color: var(--brand-deep); }
.nav-cta { color: #fff !important; }
@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: .25rem; padding: .5rem 0 1rem; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem .5rem; border-radius: 8px; }
}

/* --- Jackpot ticker — the "this site is alive" strip ----------------------- */
.ticker {
  display: flex; gap: .75rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-width: 72rem; margin: 0 auto; padding: .9rem 1.25rem 0;
}
.ticker-item {
  display: inline-flex; align-items: baseline; gap: .55rem; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem 1.1rem; text-decoration: none; color: var(--ink); min-height: 44px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ticker-item:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.ticker-game { font-weight: 700; font-size: .92rem; }
.ticker-jackpot { color: var(--accent); font-weight: 700; font-size: .92rem; }
.ticker-when { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }

/* --- Scroll reveal: sections ease in as you arrive (JS adds .reveal-init
       only when motion is allowed, so no-JS and reduced-motion users see
       everything immediately). ------------------------------------------------ */
.reveal-init { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal-init.revealed { opacity: 1; transform: none; }

/* --- Hero ------------------------------------------------------------------ */
.hero {
  max-width: 72rem; margin: 0 auto; padding: 3.5rem 1.25rem 3rem;
  display: grid; gap: 2.5rem; align-items: center;
}
@media (min-width: 880px) { .hero { grid-template-columns: 1.25fr 1fr; padding-top: 5rem; } }
.hero-kicker {
  color: var(--brand-deep); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; font-size: .8rem; margin-bottom: .75rem;
}
.hero-sub { font-size: 1.2rem; color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin: 1.6rem 0 1rem; }
.hero-proof { color: var(--muted); font-size: .95rem; }
.hero-card { display: flex; justify-content: center; }
.ticket-demo {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.4rem 1.6rem; width: min(20rem, 100%);
  transform: rotate(-2deg);
}
.ticket-demo-head { font-size: .75rem; letter-spacing: .12em; color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: .6rem; }
.ticket-demo-nums { font-family: var(--font-display); font-size: 1.35rem; padding: .9rem 0; color: var(--ink); }
.ticket-demo-result {
  display: flex; align-items: center; gap: .5rem; background: var(--brand-tint);
  color: var(--brand-deep); font-weight: 700; border-radius: 10px; padding: .6rem .9rem;
}

/* --- Hero scan demo: a 7s self-playing loop of the product moment.
       Defaults below ARE the finished frame; motion is additive and only
       runs for users who haven't asked for reduced motion. ----------------- */
.demo-live { position: relative; overflow: hidden; }
.demo-caption {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-deep); margin-bottom: .55rem;
}
.demo-num.demo-pb { color: var(--accent); font-weight: 700; }
.demo-scanline { display: none; }
.demo-status { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .demo-scanline {
    display: block; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    box-shadow: 0 0 14px 3px rgba(14, 124, 91, .35);
    animation: demo-scan 7s ease-in-out infinite;
  }
  .demo-status {
    display: block; font-size: .82rem; color: var(--muted); min-height: 1.2em;
    animation: demo-status 7s infinite;
  }
  .demo-num { animation: demo-read 7s infinite; }
  .demo-num:nth-child(2) { animation-delay: .12s; }
  .demo-num:nth-child(3) { animation-delay: .24s; }
  .demo-num:nth-child(4) { animation-delay: .36s; }
  .demo-num:nth-child(5) { animation-delay: .48s; }
  .demo-num.demo-pb { animation-name: demo-read-pb; animation-delay: .6s; }
  .ticket-demo-result { animation: demo-result 7s infinite; }

  @keyframes demo-scan {
    0%, 8% { top: 0; opacity: 0; }
    12% { opacity: 1; }
    38% { top: calc(100% - 3px); opacity: 1; }
    44%, 100% { top: calc(100% - 3px); opacity: 0; }
  }
  @keyframes demo-read {
    0%, 10% { opacity: .25; }
    45%, 100% { opacity: 1; }
  }
  @keyframes demo-read-pb {
    0%, 10% { opacity: .25; }
    48%, 100% { opacity: 1; }
  }
  @keyframes demo-status { /* swap copy via content is unreliable; fade out instead */
    0%, 8% { opacity: 0; }
    14%, 40% { opacity: 1; }
    50%, 100% { opacity: 0; }
  }
  @keyframes demo-result {
    0%, 52% { opacity: 0; transform: translateY(6px) scale(.96); }
    60%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; }
  }
}

/* --- Sections --------------------------------------------------------------- */
.section { max-width: 72rem; margin: 0 auto; padding: 2.75rem 1.25rem; }
.section-tinted { background: var(--brand-tint); max-width: none; }
.section-tinted > * { max-width: 72rem; margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.steps { display: grid; gap: 1.5rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.steps h3 { margin-top: 0; color: var(--brand-deep); }
.game-pills { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 1rem 1.25rem; margin: 0 auto; max-width: 72rem; }
.game-pills a {
  display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1.1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; font-weight: 500;
}
.game-pills a:hover { border-color: var(--brand); }
.why-grid { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
@media (min-width: 720px) { .why-grid { grid-template-columns: 1fr 1fr; } }
.why-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.why-card h3 { margin-top: 0; }
.faq dt { font-weight: 700; margin-top: 1.25rem; font-size: 1.05rem; }
.faq dd { margin: .4rem 0 0; color: var(--ink); }
.cta-band {
  text-align: center; background: var(--ink); color: var(--paper);
  padding: 3rem 1.25rem; margin-top: 3rem;
}
.cta-band h2 { color: var(--paper); margin-top: 0; }

/* --- Pages / prose ----------------------------------------------------------- */
.page { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
.page-head { margin-bottom: 2rem; }
.lede { font-size: 1.2rem; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .5em; }
.muted { color: var(--muted); }
.disclaimer {
  max-width: 46rem; margin: 2rem auto 0; padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent); background: #FCF4EA;
  color: #6B4A12; font-size: .95rem; border-radius: 0 8px 8px 0;
}
.legal h2 { font-size: 1.3rem; }

/* --- Balls / results --------------------------------------------------------- */
.balls { display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; padding: 0; margin: .75rem 0; }
.ball {
  width: 3rem; height: 3rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid var(--ink);
  font: 700 1.15rem var(--font-display);
}
.ball-special { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 1rem 0; box-shadow: var(--shadow); }
.result-date { margin: 0 0 .25rem; font-size: 1.05rem; color: var(--muted); font-family: var(--font-body); font-weight: 600; }
.result-jackpot strong, .result-multiplier strong { color: var(--accent); }
.numbers-card { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 1.5rem; }

/* --- Tables -------------------------------------------------------------------- */
.data-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .98rem; }
.data-table th, .data-table td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); }
.data-table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.data-table tbody th { font-weight: 600; }
@media (max-width: 600px) { .data-table { display: block; overflow-x: auto; } }

/* --- Forms / calculator ----------------------------------------------------------- */
.calc { display: grid; gap: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0; }
.calc-row { display: grid; gap: .35rem; }
.calc label { font-weight: 600; font-size: .95rem; }
.calc input, .calc select {
  font: inherit; padding: .7rem .8rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); min-height: 44px; width: 100%;
}
.calc input:focus, .calc select:focus { border-color: var(--brand); }
.calc-result { background: var(--brand-tint); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1rem 0; }
.calc-result h3 { margin-top: 0; }
.calc-result table { width: 100%; }

/* --- Checklists, plans ---------------------------------------------------------- */
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.8rem; position: relative; margin-bottom: .55rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35rem; width: 1.05rem; height: 1.05rem;
  background: var(--brand-deep);
  -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round" d="M4 13l5 5L20 7"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round" d="M4 13l5 5L20 7"/></svg>') center / contain no-repeat;
}
.plans { display: grid; gap: 1.5rem; margin: 2rem 0; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.plan-featured { border: 2px solid var(--brand-deep); box-shadow: var(--shadow); }
.plan-price { font-size: 2.4rem; margin: .25rem 0; }
.plan-price span { font-size: 1rem; color: var(--muted); font-family: var(--font-body); }
.plan-annual { color: var(--brand-deep); font-weight: 600; }

/* --- Blog ---------------------------------------------------------------------- */
.blog-card { border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
.blog-card h2 { margin: 0 0 .25rem; }
.blog-card h2 a { text-decoration: none; }
.blog-card h2 a:hover { text-decoration: underline; }
.changelog-entry { border-left: 3px solid var(--brand); padding-left: 1.25rem; margin: 2rem 0; }
.changelog-entry h2 { margin: 0; }

/* --- Footer ---------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #C9D4CE; margin-top: 4rem; }
.footer-grid {
  max-width: 72rem; margin: 0 auto; padding: 3rem 1.25rem 1rem;
  display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}
.footer-word { font-size: 1.5rem; color: var(--paper); margin: 0; }
.footer-tag { font-style: italic; }
.footer-counter { font-size: .9rem; }
.footer-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #8FA39A; margin: 0 0 .75rem; font-family: var(--font-body); }
.site-footer nav { display: flex; flex-direction: column; gap: .45rem; }
.site-footer a, .site-footer .linklike { color: #C9D4CE; text-align: left; }
.site-footer a:hover, .site-footer .linklike:hover { color: #fff; }
.footer-legal {
  max-width: 72rem; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid #34433C; font-size: .85rem; color: #9FB0A8;
}
.footer-legal a { color: #C9D4CE; }

/* --- Cookie consent + age gate (shared component styles) ------------------------- */
.consent-banner, .age-gate-backdrop {
  position: fixed; z-index: 200;
}
.consent-banner {
  inset: auto 0 0 0; background: var(--surface); border-top: 2px solid var(--ink);
  padding: 1.25rem; box-shadow: 0 -6px 30px rgba(26,38,34,.15);
}
.consent-inner { max-width: 60rem; margin: 0 auto; }
.consent-inner h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
.consent-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: .9rem; }
.consent-cats { display: grid; gap: .6rem; margin: .9rem 0; }
.consent-cats label { display: flex; gap: .6rem; align-items: flex-start; }
.consent-cats input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; }
.age-gate-backdrop {
  inset: 0; background: rgba(26,38,34,.55); display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.age-gate {
  background: var(--surface); border-radius: var(--radius); max-width: 26rem;
  padding: 2rem; text-align: center; box-shadow: var(--shadow);
}
.age-gate h2 { margin-top: 0; }
.age-gate .consent-actions { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
