:root {
    --navy: #031b57;
    --blue: #075fd4;
    --sky: #09b9ef;
    --cyan: #45e1ff;
    --red: #e3132d;
    --red-dark: #9f0920;
    --gold: #ffd83d;
    --gold-deep: #e39400;
    --cream: #fffdf5;
    --ink: #14213f;
    --muted: #65728e;
    --line: #dce7f6;
    --page: #f5f9ff;
    --shadow: 0 22px 60px rgba(3, 27, 87, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: Inter, ui-rounded, "Avenir Next", system-ui, -apple-system, sans-serif; background: var(--page); }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; color: white; border-radius: 8px; background: var(--navy); }
.skip-link:focus { top: 16px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: .74rem; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
.section { padding: 100px 24px; }
.section-heading { max-width: 690px; margin-bottom: 45px; }
.section-heading.centered { margin-right: auto; margin-left: auto; text-align: center; }
.section-heading h2, .feature-copy h2, .series-copy h2, .play-card h2 { margin: 0; color: var(--navy); font-size: clamp(2.15rem, 4.5vw, 4rem); line-height: 1.02; letter-spacing: -.055em; }
.section-heading > p:last-child, .feature-copy > p, .series-copy > p { color: var(--muted); font-size: 1.05rem; line-height: 1.75; }

.site-header { position: absolute; top: 0; right: 0; left: 0; z-index: 20; }
.nav-shell { display: flex; align-items: center; justify-content: space-between; max-width: 1220px; min-height: 88px; margin: auto; padding: 14px 24px; color: white; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 950; text-decoration: none; }
.brand img { width: 54px; height: 54px; border: 2px solid var(--gold); border-radius: 15px; box-shadow: 0 8px 20px rgba(0,0,0,.22); }
.site-menu { display: flex; align-items: center; gap: 29px; }
.site-menu a { color: #e8f6ff; font-size: .89rem; font-weight: 800; text-decoration: none; }
.site-menu a:hover { color: var(--gold); }
.site-menu .nav-cta { padding: 11px 17px; color: var(--navy); border: 2px solid #e59a00; border-radius: 10px; background: var(--gold); box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.menu-button { display: none; padding: 9px 13px; color: white; font-weight: 800; border: 1px solid rgba(255,255,255,.38); border-radius: 9px; background: rgba(255,255,255,.12); }

.hero { position: relative; overflow: hidden; min-height: 780px; display: grid; align-items: center; color: white; background: radial-gradient(circle at 87% 20%, rgba(69,225,255,.85), transparent 19%), radial-gradient(circle at 18% 76%, rgba(9,185,239,.45), transparent 28%), linear-gradient(125deg, #02164c 0%, #0756c6 52%, #00aee9 100%); }
.hero::after { content: ""; position: absolute; right: -7%; bottom: -230px; width: 650px; height: 650px; border: 110px solid rgba(255,255,255,.06); border-radius: 50%; }
.hero-rays { position: absolute; inset: 0; opacity: .48; background: repeating-conic-gradient(from 255deg at 77% 52%, rgba(255,255,255,.13) 0 7deg, transparent 7deg 18deg); }
.hero-shell { position: relative; z-index: 2; width: min(1220px, calc(100% - 48px)); margin: 88px auto 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 510px); align-items: center; gap: clamp(45px, 7vw, 105px); padding: 70px 0 74px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { margin: 0; font-size: clamp(4rem, 8.5vw, 7.5rem); line-height: .82; letter-spacing: -.075em; text-shadow: 0 7px 0 rgba(1,30,94,.28); }
.hero h1 span { display: inline-block; margin-top: 15px; color: var(--gold); }
.hero-lead { max-width: 650px; margin: 30px 0 0; color: #dcf6ff; font-size: clamp(1.05rem, 1.8vw, 1.28rem); line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 33px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; padding: 15px 20px; font-size: .88rem; font-weight: 950; text-decoration: none; border-radius: 11px; transition: transform .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-gold { color: #653a00; border: 2px solid #e79b00; background: linear-gradient(#fff47b, var(--gold)); box-shadow: 0 10px 22px rgba(0,0,0,.19); }
.button-blue { color: white; background: linear-gradient(120deg, var(--blue), #0ba9ec); box-shadow: 0 10px 22px rgba(7,95,212,.24); }
.text-link { color: white; font-weight: 850; text-underline-offset: 5px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; color: #bfeaff; font-size: .78rem; font-weight: 800; }
.hero-art { position: relative; }
.ticket-frame { position: relative; padding: 14px; border: 6px solid var(--gold); border-radius: 28%; background: linear-gradient(135deg, #ffe76a, #e79b00); box-shadow: 0 45px 70px rgba(0,18,74,.38); transform: rotate(4deg); }
.ticket-frame::before, .ticket-frame::after { content: ""; position: absolute; top: 45%; width: 44px; height: 88px; border-radius: 50%; background: #0680d9; }
.ticket-frame::before { left: -30px; }
.ticket-frame::after { right: -30px; }
.ticket-frame img { position: relative; z-index: 1; display: block; border-radius: 22%; }
.spark { position: absolute; z-index: 4; color: white; font-size: 3.2rem; text-shadow: 0 0 18px white; }
.spark-one { right: 4%; top: 4%; }
.spark-two { left: 2%; bottom: 14%; font-size: 2.2rem; }
.win-badge { position: absolute; z-index: 5; right: -28px; bottom: -22px; display: grid; place-items: center; width: 145px; height: 145px; color: #6a3500; text-align: center; border: 8px double #d97800; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff5a1, var(--gold) 58%, #e99500); box-shadow: 0 15px 28px rgba(0,0,0,.28); transform: rotate(-9deg); }
.win-badge strong, .win-badge span { display: block; }
.win-badge strong { font-size: 2rem; line-height: 1; }
.win-badge span { font-size: .64rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.floating-coin { position: absolute; z-index: 1; display: grid; place-items: center; width: 74px; height: 74px; color: #9b5200; font-size: 1.7rem; border: 6px double #d97800; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff396, var(--gold) 60%, #df8300); box-shadow: 0 15px 28px rgba(0,0,0,.25); }
.coin-one { left: 3%; top: 24%; transform: rotate(-22deg); }
.coin-two { left: 47%; bottom: 9%; width: 52px; height: 52px; font-size: 1.1rem; transform: rotate(14deg); }
.coin-three { right: 2%; top: 18%; width: 58px; height: 58px; font-size: 1.2rem; transform: rotate(31deg); }

.intro-strip { position: relative; z-index: 4; width: min(1120px, calc(100% - 48px)); display: grid; grid-template-columns: repeat(4, 1fr); margin: -38px auto 0; color: var(--navy); border: 3px solid var(--gold); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.intro-strip > div { padding: 24px 20px; text-align: center; border-right: 1px solid var(--line); }
.intro-strip > div:last-child { border-right: 0; }
.intro-strip strong, .intro-strip span { display: block; }
.intro-strip strong { color: var(--red); font-size: 2rem; font-weight: 950; }
.intro-strip span { margin-top: 4px; color: var(--muted); font-size: .75rem; font-weight: 850; }

.how-section { max-width: 1220px; margin: auto; padding-top: 130px; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card { position: relative; min-height: 330px; padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 14px 40px rgba(3,27,87,.07); }
.step-card.featured { color: white; border-color: #f9b000; background: linear-gradient(150deg, var(--red), var(--red-dark)); transform: translateY(-12px); }
.step-number { position: absolute; top: 24px; right: 26px; color: #dbe6f5; font-size: 2rem; font-weight: 950; }
.featured .step-number { color: rgba(255,255,255,.22); }
.step-icon { display: grid; place-items: center; width: 72px; height: 72px; color: var(--blue); font-size: 2rem; border: 2px solid #bce7ff; border-radius: 20px; background: #eaf9ff; }
.featured .step-icon { color: #754100; border-color: #e39a00; background: var(--gold); }
.step-card h3 { margin: 28px 0 10px; color: var(--navy); font-size: 1.35rem; }
.step-card.featured h3 { color: white; }
.step-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.step-card.featured p { color: #ffdfe3; }

.feature-section { color: white; background: radial-gradient(circle at 92% 13%, rgba(69,225,255,.34), transparent 20%), linear-gradient(130deg, var(--navy), #0749ad); }
.feature-shell { max-width: 1160px; margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: 95px; }
.feature-copy .eyebrow { color: var(--gold); }
.feature-copy h2 { color: white; }
.feature-copy > p { color: #cceaff; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 35px; }
.feature-list article { display: flex; gap: 13px; }
.feature-list article > span { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; color: #714000; border-radius: 10px; background: var(--gold); }
.feature-list h3 { margin: 0 0 5px; font-size: .95rem; }
.feature-list p { margin: 0; color: #b9dcfb; font-size: .8rem; line-height: 1.55; }
.bank-card { position: relative; padding: 28px; color: var(--ink); border: 5px solid var(--gold); border-radius: 26px; background: white; box-shadow: 0 30px 60px rgba(0,0,0,.28); transform: rotate(2deg); }
.bank-card::before { content: ""; position: absolute; inset: 12px; pointer-events: none; border: 1px dashed #e7b933; border-radius: 15px; }
.bank-top { position: relative; display: flex; justify-content: space-between; padding-bottom: 17px; color: var(--navy); font-weight: 950; border-bottom: 1px solid var(--line); }
.status-dot { color: #0b9b61; font-size: .72rem; }
.status-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #16c97b; }
.balance { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f7fbff; }
.main-balance { margin-top: 18px; background: linear-gradient(110deg, #eaf8ff, #fffbea); }
.balance span, .balance strong { display: block; }
.balance span { color: var(--muted); font-size: .71rem; font-weight: 900; text-transform: uppercase; }
.balance strong { margin-top: 5px; color: var(--navy); font-size: 2rem; }
.balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.balance-grid strong { font-size: 1.45rem; }
.reward-ticket { position: relative; overflow: hidden; margin-top: 15px; padding: 18px; color: white; border-radius: 14px; background: linear-gradient(110deg, var(--red-dark), var(--red)); }
.reward-ticket span, .reward-ticket strong { display: block; }
.reward-ticket span { color: #ffd7de; font-size: .7rem; font-weight: 900; text-transform: uppercase; }
.reward-ticket strong { margin-top: 4px; }
.reward-ticket i { position: absolute; right: 15px; top: 7px; color: rgba(255,216,61,.32); font-size: 3.5rem; font-style: normal; }

.series-section { background: var(--cream); }
.series-shell { max-width: 1120px; margin: auto; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 95px; }
.series-card { position: relative; overflow: hidden; min-height: 455px; border: 10px solid var(--gold); border-radius: 35px; background: repeating-conic-gradient(from 220deg at 50% 50%, rgba(255,255,255,.12) 0 9deg, transparent 9deg 20deg), linear-gradient(145deg, #f31d32, #9b071e); box-shadow: var(--shadow); transform: rotate(-3deg); }
.series-card::after { content: ""; position: absolute; right: -20%; bottom: -23%; width: 120%; height: 58%; background: #f2f4f8; transform: rotate(-12deg); box-shadow: 0 -12px 0 rgba(255,255,255,.32); }
.series-star { position: absolute; z-index: 2; color: var(--gold); text-shadow: 0 7px 0 #c17b00; }
.star-large { left: 28%; top: 14%; font-size: 10rem; transform: rotate(-8deg); }
.star-small { left: 10%; top: 45%; font-size: 4rem; }
.scratch-swipe { position: absolute; z-index: 3; right: -10%; top: 44%; width: 105%; height: 65px; background: repeating-linear-gradient(168deg, #d5d9df 0 8px, #fff 8px 14px, #b8bec6 14px 22px); transform: rotate(-12deg); box-shadow: 0 0 16px rgba(255,255,255,.7); }
.school-icons { position: absolute; z-index: 4; right: 7%; bottom: 5%; display: flex; gap: 25px; color: #0981df; font-size: 3.4rem; transform: rotate(-7deg); }
.series-copy ul { margin: 25px 0 30px; padding: 0; list-style: none; }
.series-copy li { position: relative; margin: 12px 0; padding-left: 28px; color: var(--ink); font-weight: 750; }
.series-copy li::before { content: "★"; position: absolute; left: 0; color: var(--gold-deep); }

.play-section { padding-top: 80px; padding-bottom: 80px; background: linear-gradient(#f5f9ff, #eaf4ff); }
.play-card { position: relative; overflow: hidden; max-width: 1120px; margin: auto; display: grid; grid-template-columns: 125px 1fr auto; align-items: center; gap: 32px; padding: 30px 38px; color: white; border: 4px solid var(--gold); border-radius: 24px; background: repeating-conic-gradient(from 250deg at 90% 50%, rgba(255,255,255,.06) 0 7deg, transparent 7deg 17deg), linear-gradient(115deg, var(--red-dark), var(--red)); box-shadow: var(--shadow); }
.play-card img { width: 125px; border: 2px solid var(--gold); border-radius: 27px; }
.play-card .eyebrow { color: var(--gold); }
.play-card h2 { color: white; font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.play-card p:last-child { margin-bottom: 0; color: #ffdce2; }

.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 25px; padding: 30px max(24px, calc((100vw - 1160px) / 2)); color: #b8d9fb; background: var(--navy); }
.footer-brand { display: flex; align-items: center; gap: 11px; color: white; }
.footer-brand img { width: 44px; border: 1px solid var(--gold); border-radius: 11px; }
.footer-brand strong, .footer-brand small { display: block; }
.footer-brand small { color: #9fc9f0; font-size: .68rem; }
.site-footer p { font-size: .75rem; text-align: center; }
.site-footer nav { display: flex; justify-content: flex-end; gap: 20px; }
.site-footer nav a { font-size: .75rem; font-weight: 800; text-decoration: none; }
.site-footer nav a:hover { color: var(--gold); }

@media (max-width: 1000px) {
    .hero { min-height: auto; }
    .hero-shell { grid-template-columns: 1.05fr .8fr; }
    .feature-shell, .series-shell { gap: 50px; }
    .feature-shell { grid-template-columns: 1fr 360px; }
    .play-card { grid-template-columns: 95px 1fr; }
    .play-card img { width: 95px; }
    .play-card .button { grid-column: 2; justify-self: start; }
}
@media (max-width: 780px) {
    .nav-shell { min-height: 76px; }
    .brand img { width: 47px; height: 47px; }
    .menu-button { display: block; }
    .site-menu { position: absolute; top: 72px; right: 18px; left: 18px; display: none; align-items: stretch; flex-direction: column; gap: 3px; padding: 12px; color: var(--navy); border: 1px solid rgba(255,255,255,.35); border-radius: 14px; background: white; box-shadow: var(--shadow); }
    .site-menu.is-open { display: flex; }
    .site-menu a { padding: 10px; color: var(--navy); }
    .site-menu .nav-cta { text-align: center; }
    .hero-shell { grid-template-columns: 1fr; margin-top: 75px; padding-top: 60px; }
    .hero-copy { text-align: center; }
    .hero h1 { font-size: clamp(3.7rem, 17vw, 6rem); }
    .hero-lead { margin-right: auto; margin-left: auto; }
    .hero-actions, .hero-points { justify-content: center; }
    .hero-art { width: min(420px, 86vw); margin: 10px auto 35px; }
    .floating-coin { display: none; }
    .intro-strip { grid-template-columns: 1fr 1fr; margin-top: -25px; }
    .intro-strip > div:nth-child(2) { border-right: 0; }
    .intro-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .section { padding: 75px 20px; }
    .step-grid { grid-template-columns: 1fr; }
    .step-card { min-height: 0; }
    .step-card.featured { transform: none; }
    .feature-shell, .series-shell { grid-template-columns: 1fr; }
    .bank-card { width: min(440px, 100%); margin: auto; transform: none; }
    .series-card { width: min(480px, 100%); min-height: 400px; margin: auto; }
    .series-copy { text-align: center; }
    .series-copy li { display: inline-block; margin-right: 16px; text-align: left; }
    .play-card { grid-template-columns: 80px 1fr; padding: 26px; }
    .play-card img { width: 80px; }
    .site-footer { grid-template-columns: 1fr; text-align: center; }
    .footer-brand, .site-footer nav { justify-content: center; }
}
@media (max-width: 520px) {
    .hero-shell { width: min(100% - 34px, 1220px); }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .button { justify-content: center; }
    .intro-strip { width: calc(100% - 30px); }
    .intro-strip > div { padding: 18px 8px; }
    .feature-list { grid-template-columns: 1fr; }
    .series-card { min-height: 330px; }
    .star-large { font-size: 7rem; }
    .school-icons { font-size: 2.2rem; }
    .play-card { grid-template-columns: 1fr; text-align: center; }
    .play-card img { margin: auto; }
    .play-card .button { grid-column: auto; justify-self: stretch; }
    .site-footer nav { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* The public background is selected by the active entry in card_catalog.php. */
body.series-theme-chalkboard-green {
    --series-background: #214d3a;
    --series-background-dark: #12382b;
    --series-background-deep: #092b22;
    background-color: var(--series-background);
    background-image:
        radial-gradient(circle at 18% 16%, rgba(255,255,255,.045), transparent 22%),
        radial-gradient(circle at 82% 66%, rgba(255,255,255,.035), transparent 28%),
        repeating-linear-gradient(174deg, transparent 0 19px, rgba(255,255,255,.012) 19px 20px);
}
body.series-theme-chalkboard-green .hero {
    background:
        radial-gradient(circle at 87% 20%, rgba(74, 190, 146, .55), transparent 20%),
        radial-gradient(circle at 16% 80%, rgba(255,255,255,.08), transparent 30%),
        linear-gradient(125deg, var(--series-background-deep), var(--series-background) 58%, #2d7054);
}
body.series-theme-chalkboard-green .ticket-frame::before,
body.series-theme-chalkboard-green .ticket-frame::after {
    background: var(--series-background);
}
body.series-theme-chalkboard-green .how-section .section-heading h2,
body.series-theme-chalkboard-green .series-copy h2 {
    color: white;
}
body.series-theme-chalkboard-green .how-section .section-heading > p:last-child,
body.series-theme-chalkboard-green .series-copy > p {
    color: #d5e9df;
}
body.series-theme-chalkboard-green .how-section .eyebrow,
body.series-theme-chalkboard-green .series-copy .eyebrow {
    color: var(--gold);
}
body.series-theme-chalkboard-green .feature-section {
    background:
        radial-gradient(circle at 92% 13%, rgba(74, 190, 146, .25), transparent 21%),
        linear-gradient(130deg, var(--series-background-deep), var(--series-background-dark));
}
body.series-theme-chalkboard-green .series-section {
    background: rgba(7, 38, 29, .42);
}
body.series-theme-chalkboard-green .series-copy li {
    color: white;
}
body.series-theme-chalkboard-green .play-section {
    background: transparent;
}
body.series-theme-chalkboard-green .site-footer {
    background: var(--series-background-deep);
}
