/* Layout: navy hero band with a live scratch card, then light content sections on a 1120px grid.
   Palette and type follow the Digital Lottery app: ink navy, gold foil, Barlow. */
:root {
  --ink: #0B1533;
  --ink2: #14224D;
  --gold: #F5C542;
  --gold-deep: #8A6100;
  --gold-soft: #FFF4D6;
  --cash: #0F8F60;
  --bg: #F3F5FA;
  --bg-alt: #E8EDF6;
  --card: #FFFFFF;
  --line: #DCE3EF;
  --text: #0E1733;
  --muted: #56627E;
  --on-ink: #FFFFFF;
  --on-ink-muted: #A9B7DD;
  --shadow: 0 10px 30px rgba(11, 21, 51, .09);
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: Barlow, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080D20; --bg-alt: #0D1430; --card: #121B3B; --line: #223061;
    --text: #E8EEFF; --muted: #9AA8CF; --gold-soft: #2A2410; --gold-deep: #F5C542;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080D20; --bg-alt: #0D1430; --card: #121B3B; --line: #223061;
  --text: #E8EEFF; --muted: #9AA8CF; --gold-soft: #2A2410; --gold-deep: #F5C542;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.08; }
p { margin: 0; }
.in { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 820px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--ink); }
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(11, 21, 51, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.bar-in { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-ink); }
.brand-t { font: 600 19px var(--display); letter-spacing: .02em; }
.brand-t b { color: var(--gold); font-weight: 800; }
.ball { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 18px var(--display); color: var(--ink);
  background: radial-gradient(circle at 34% 30%, #FFF0B8, var(--gold) 52%, #D58F0E); box-shadow: 0 0 0 2px rgba(245, 197, 66, .25); }
.logo { height: 38px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.brand.small .logo { height: 30px; }
.brand.has-logo .ball { display: none; }
.brand.logo-named .brand-t { display: none; }
.brand.logo-named .logo { height: 44px; max-width: 220px; }
.nav { display: flex; gap: 22px; margin-left: 12px; }
.nav a { color: var(--on-ink-muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--on-ink); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: flex; background: rgba(255, 255, 255, .07); border-radius: 11px; padding: 3px; }
.lang button { border: 0; background: none; color: var(--on-ink-muted); font: 700 12.5px var(--body); letter-spacing: .06em; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.signin { color: var(--on-ink); text-decoration: none; font-weight: 700; font-size: 14px; border: 1.5px solid rgba(255, 255, 255, .22); border-radius: 11px; padding: 7px 12px; white-space: nowrap; }
.signin:hover { border-color: var(--gold); }

/* Hero */
.hero { background: radial-gradient(1000px 500px at 85% 10%, rgba(245, 197, 66, .16), transparent 60%), linear-gradient(180deg, var(--ink2), var(--ink)); color: var(--on-ink); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-block: 72px 84px; }
.hero-copy { min-width: 0; }
.eyebrow { font: 700 12.5px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.eyebrow.dark { color: var(--gold-deep); }
h1 { font: 800 clamp(42px, 6.4vw, 76px)/.98 var(--display); letter-spacing: -.01em; }
.lead { margin-top: 18px; max-width: 34em; color: var(--on-ink-muted); font-size: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; border-radius: 16px; padding: 13px 20px; font-weight: 700; font-size: 16px; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 24px; height: 24px; flex: none; }
.btn span { display: flex; flex-direction: column; line-height: 1.2; }
.btn small { font-weight: 600; font-size: 12.5px; opacity: .75; }
.btn small:empty { display: none; }
.gold { background: linear-gradient(135deg, #FFE08A, var(--gold) 55%, #E8A317); color: var(--ink); box-shadow: 0 10px 26px rgba(245, 197, 66, .3); }
.ghost { color: var(--on-ink); border: 1.5px solid rgba(255, 255, 255, .25); }
.ghost:hover { border-color: var(--gold); }
.inst-link { display: inline-block; margin-top: 16px; color: var(--gold); font-weight: 700; font-size: 15px; text-underline-offset: 4px; }
.ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 26px 0 0; color: var(--on-ink-muted); font-weight: 600; font-size: 14.5px; }
.ticks li::before { content: "✓"; color: var(--gold); font-weight: 800; margin-right: 7px; }

/* Scratch card */
.card-stage { display: grid; justify-items: center; gap: 14px; }
.scratch { position: relative; width: min(340px, 100%); aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden; background: #FFFDF5; color: #0B1533; box-shadow: 0 30px 60px rgba(0, 0, 0, .45), 0 0 0 6px rgba(245, 197, 66, .18); transform: rotate(-3deg); max-width: 100%; }
.scratch-under { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center;
  background: repeating-linear-gradient(135deg, #FFFDF5 0 14px, #FFF6DA 14px 28px); }
.sc-game { font: 800 15px var(--display); letter-spacing: .14em; text-transform: uppercase; color: #8A6100; }
.sc-row { display: flex; gap: 10px; }
.sc-row i { font-style: normal; width: 70px; height: 70px; border-radius: 18px; display: grid; place-items: center; font: 800 38px var(--display); background: #0B1533; color: #fff; }
.sc-row i.hit { background: radial-gradient(circle at 34% 30%, #FFF0B8, #F5C542 52%, #D58F0E); color: #0B1533; }
.sc-prize { font: 800 30px var(--display); }
.scratch-under small { color: #56627E; font-size: 13px; }
#foil { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; transition: opacity .5s ease; }
#foil.gone { opacity: 0; pointer-events: none; }
.stage-cap { color: var(--on-ink-muted); font-weight: 600; font-size: 14px; }

/* Sections */
.sec { padding-block: 84px; }
.sec.alt { background: var(--bg-alt); }
h2 { font: 800 clamp(32px, 4.4vw, 48px) var(--display); margin-bottom: 34px; }
.games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.game { background: var(--card); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); min-width: 0; }
.gi { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font: 800 22px var(--display); color: #fff; margin-bottom: 16px; }
.game h3 { font: 800 22px var(--display); margin-bottom: 6px; }
.game p { color: var(--muted); font-size: 15px; }
.g-scratch .gi { background: linear-gradient(135deg, #7C4DFF, #4527A0); }
.g-pickwin .gi { background: linear-gradient(135deg, #2457F5, #12308F); }
.g-box .gi { background: linear-gradient(135deg, #FF7A45, #C2410C); }
.g-spin .gi { background: linear-gradient(135deg, #14B8A6, #0F766E); }
.g-five .gi { background: linear-gradient(135deg, #F5C542, #B7791F); color: #0B1533; }
.g-cash .gi { background: linear-gradient(135deg, #22C55E, #0F8F60); }
.g-key .gi { background: linear-gradient(135deg, #E11D74, #9D174D); }
.games .game:last-child { grid-column: span 2; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps li { background: var(--card); border-radius: var(--r); padding: 24px; border: 1px solid var(--line); min-width: 0; }
.n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--gold); font: 800 20px var(--display); margin-bottom: 14px; }
:root[data-theme="dark"] .n { background: var(--gold); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .n { background: var(--gold); color: #0B1533; } }
.steps h3 { font: 800 23px var(--display); margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 15.5px; }
.pin-note { display: flex; align-items: center; gap: 18px; margin-top: 18px; background: var(--gold-soft); border-radius: var(--r); padding: 18px 22px; }
.pin-chip { flex: none; font: 800 22px var(--display); color: #0B1533; background: linear-gradient(135deg, #FFE08A, var(--gold) 55%, #E8A317); border-radius: 12px; padding: 7px 14px; white-space: nowrap; }
.pin-note p { min-width: 0; font-weight: 600; }

.install { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
.install > div { min-width: 0; }
.ins-steps { margin: 0 0 26px; padding: 0; list-style: none; counter-reset: i; display: grid; gap: 12px; }
.ins-steps li { counter-increment: i; position: relative; padding: 14px 16px 14px 60px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.ins-steps li::before { content: counter(i); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep); font: 800 18px var(--display); }
.fine { margin-top: 14px; color: var(--muted); font-size: 14px; }
.agent { background: linear-gradient(160deg, var(--ink2), var(--ink)); color: var(--on-ink); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); min-width: 0; }
.agent h3 { font: 800 32px var(--display); margin-bottom: 14px; }
.agent ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--on-ink-muted); }
.agent li { padding-left: 26px; position: relative; }
.agent li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }
.contact { margin-top: 22px; display: grid; gap: 8px; }
.contact:empty { display: none; }
.contact .c-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: rgba(255, 255, 255, .07); border-radius: 12px; padding: 10px 12px; }
.contact .c-row span { color: var(--on-ink-muted); font-size: 13px; }
.contact .c-row b { user-select: all; overflow-wrap: anywhere; text-align: right; }
.contact .hint { color: var(--on-ink-muted); font-size: 14px; }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; padding: 18px 30px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 13px; font: 700 26px var(--body); color: var(--gold-deep); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; }

.foot { background: var(--ink); color: var(--on-ink-muted); padding-block: 34px; font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.brand.small .ball { width: 28px; height: 28px; font-size: 15px; }
.brand.small { color: var(--on-ink); }
.foot a { color: var(--on-ink); }

@media (max-width: 960px) {
  .nav { display: none; }
  .hero-in { grid-template-columns: 1fr; gap: 40px; padding-block: 48px 64px; }
  .games { grid-template-columns: repeat(2, 1fr); }
  .games .game:last-child { grid-column: auto; }
  .games .game:nth-child(7) { grid-column: span 2; }
  .steps, .install { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .bar-in { gap: 10px; }
  .brand-t { display: none; }
  .brand { min-width: 0; flex-shrink: 1; }
  .logo, .brand.logo-named .logo { height: 30px; max-width: 110px; }
  .signin { padding: 6px 9px; font-size: 13px; }
  .lang button { padding: 6px 6px; }
  .games { grid-template-columns: 1fr; }
  .games .game:nth-child(7) { grid-column: auto; }
  .sec { padding-block: 60px; }
  .pin-note { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, #foil, .faq summary::after { transition: none; }
}
