/*
 * GambleZen Casino - Design System
 * Neon-waterfall maximalist aesthetic. Sora headings + Manrope body.
 * Dark-first: deep midnight-indigo with purple-turquoise zen palette + neon flashes.
 */

:root {
    /* Single dark-first zen theme (no light/dark switcher per brief) */
    --background: #0d0a1f;
    --foreground: #f4f1fa;
    --card: #171233;
    --card-foreground: #f4f1fa;
    --popover: #171233;
    --popover-foreground: #f4f1fa;
    --primary: #8b3ff0;
    --primary-foreground: #ffffff;
    --secondary: #14d0dd;
    --secondary-foreground: #05252a;
    --muted: #241d40;
    --muted-foreground: #b5abd0;
    --accent: #d10077;
    --accent-foreground: #ffffff;
    --destructive: #ea0d33;
    --destructive-foreground: #ffffff;
    --border: #302748;
    --input: #241d40;
    --ring: #8b3ff0;

    /* Accessible link color (>= 4.5:1 on --background and --card) */
    --link: #c79bff;

    /* Spacing rhythm - 8px base grid */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 56px;
    --space-2xl: 96px;

    --radius: 16px;
    --radius-sm: 10px;
    --max-w: 1200px;
    --header-h: 64px;

    --font-head: "Sora", system-ui, sans-serif;
    --font-body: "Manrope", system-ui, sans-serif;

    --glow-purple: 0 0 24px rgba(168, 85, 247, 0.45);
    --glow-cyan: 0 0 24px rgba(20, 184, 196, 0.4);
    --glow-pink: 0 0 28px rgba(245, 45, 158, 0.5);

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   OVERFLOW PREVENTION - Safety Net
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

img, video, iframe, embed, object, svg { max-width: 100%; height: auto; }

[class*="grid"] > *, [class*="flex"] > * { min-width: 0; }

pre, code, .code-block, [class*="code"] { max-width: 100%; overflow-x: auto; }
pre code, .code-block code { display: block; min-width: 0; }

.table-wrapper, [class*="table-"] { max-width: 100%; overflow-x: auto; }

p, li, td, th { overflow-wrap: break-word; }
input, textarea, select { max-width: 100%; }
section { overflow: clip; }

/* ============================================
   BASE / TYPOGRAPHY
   ============================================ */
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--foreground);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 var(--space-sm);
    color: var(--foreground);
}

h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }

p { margin: 0 0 var(--space-md); max-width: 70ch; }
small, .caption { font-size: 14px; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { padding-left: 1.25rem; }

@media (min-width: 1024px) {
    h1 { font-size: 44px; }
    h2 { font-size: 34px; }
    h3 { font-size: 26px; }
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 2000;
    background: var(--primary); color: var(--primary-foreground);
    padding: var(--space-sm); border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ============================================
   LAYOUT HELPERS
   ============================================ */
.container, .max-w-1200 { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--space-sm); }

.section { padding-block: var(--space-xl); }
@media (min-width: 1024px) { .section { padding-block: var(--space-2xl); } }

.eyebrow {
    display: inline-block; font-family: var(--font-head); font-weight: 700;
    font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--secondary); margin-bottom: var(--space-xs);
}

.text-glow {
    color: var(--foreground);
    text-shadow: 0 0 18px rgba(168,85,247,0.55), 0 0 32px rgba(20,208,221,0.35);
}

/* Zen falling coin-particle background wrapper */
.zen-particles { position: relative; }
.zen-particles::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(168,85,247,0.5) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(20,208,221,0.45) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(245,45,158,0.4) 0 1.5px, transparent 3px);
    background-size: 140px 220px, 200px 300px, 260px 260px;
    background-position: 0 0, 60px 40px, 120px 90px;
    opacity: 0.5;
    animation: coinFall 14s linear infinite;
}
.zen-particles > * { position: relative; z-index: 1; }

@keyframes coinFall {
    from { background-position: 0 0, 60px 40px, 120px 90px; }
    to   { background-position: 0 220px, 60px 340px, 120px 350px; }
}

/* ============================================
   BUTTONS
   .btn--primary neon purple | .btn--accent electric pink | .btn--ghost outline
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-md);
    font-family: var(--font-head); font-weight: 700; font-size: 16px;
    border-radius: 999px; border: 1px solid transparent; cursor: pointer;
    text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease);
    text-align: center;
}
.btn:hover { text-decoration: none; }

.btn--primary {
    background: var(--primary); color: var(--primary-foreground);
    box-shadow: var(--glow-purple);
}
.btn--primary:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 8px 28px rgba(168,85,247,0.6); }

.btn--accent {
    background: var(--accent); color: var(--accent-foreground);
    box-shadow: var(--glow-pink);
}
.btn--accent:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 10px 34px rgba(245,45,158,0.65); }

.btn--ghost {
    background: transparent; color: var(--foreground);
    border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--primary); color: var(--link); transform: translateY(-2px); }

.btn--lg { min-height: 56px; padding: 0 var(--space-lg); font-size: 18px; }

/* ============================================
   HEADER + NAV
   ============================================ */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: color-mix(in srgb, var(--background) 92%, transparent);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    max-width: var(--max-w); margin-inline: auto; min-height: var(--header-h);
    padding: 0 var(--space-sm);
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm);
}
@media (min-width: 1024px) {
    .site-header { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}

.site-brand { display: inline-flex; align-items: center; gap: var(--space-xs); text-decoration: none; }
.site-brand:hover { text-decoration: none; }
.site-brand__mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px;
    font-family: var(--font-head); font-weight: 800; font-size: 15px;
    color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: var(--glow-purple); flex-shrink: 0;
}
.site-brand__text { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--foreground); letter-spacing: -0.02em; }
.site-brand__accent { color: var(--secondary); }

.nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 48px; height: 48px; padding: 0 12px; z-index: 1001;
    background: transparent; border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--foreground); border-radius: 2px; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
    display: none;
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 999;
    background: var(--background);
    padding: var(--space-md) var(--space-sm) var(--space-xl);
    overflow-y: auto;
    flex-direction: column; gap: var(--space-md);
}
.primary-nav.is-open { display: flex; }

.primary-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: stretch; }
.primary-nav__list a {
    display: flex; align-items: center; min-height: 48px;
    font-family: var(--font-head); font-weight: 600; font-size: 18px; color: var(--foreground);
    border-bottom: 1px solid var(--border);
}
.primary-nav__list a:hover { color: var(--link); text-decoration: none; }

.primary-nav__actions { display: flex; flex-direction: column; gap: var(--space-sm); margin-top: var(--space-sm); }
.primary-nav__actions .btn { width: 100%; }

@media (min-width: 1024px) {
    .nav-toggle { display: none; }
    .primary-nav {
        display: flex; position: static; flex-direction: row; align-items: center;
        gap: var(--space-lg); padding: 0; background: transparent; overflow: visible;
    }
    .primary-nav__list { flex-direction: row; gap: var(--space-md); }
    .primary-nav__list a { min-height: auto; border-bottom: 0; font-size: 16px; }
    .primary-nav__list a:hover { text-decoration: none; }
    .primary-nav__actions { flex-direction: row; margin-top: 0; }
    .primary-nav__actions .btn { width: auto; }
}

/* ============================================
   HERO
   ============================================ */
.hero { position: relative; padding-block: var(--space-xl); }
@media (min-width: 1024px) { .hero { padding-block: var(--space-2xl); } }

.hero__inner {
    max-width: var(--max-w); margin-inline: auto; padding-inline: var(--space-sm);
    display: grid; gap: var(--space-lg); align-items: center;
}
@media (min-width: 768px) { .hero__inner { grid-template-columns: 1.1fr 1fr; } }

.hero__title { font-size: 30px; margin-bottom: var(--space-sm); }
@media (min-width: 1024px) { .hero__title { font-size: 44px; } }
.hero__lead { color: var(--muted-foreground); font-size: 18px; }

.hero__offer {
    display: inline-block; margin: var(--space-sm) 0; padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius); border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(168,85,247,0.16), rgba(20,208,221,0.14));
    font-family: var(--font-head); font-weight: 800; font-size: 22px;
    color: var(--foreground);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-md); }

.hero__media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 60px rgba(168,85,247,0.35); }
.hero__media img { width: 100%; display: block; }

/* ============================================
   INFO CARD (grid)
   ============================================ */
.card-grid {
    display: grid; gap: var(--space-md);
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 768px) { .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.card-grid--4 { }
@media (min-width: 1024px) { .card-grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); } }

.info-card {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; box-shadow: 0 0 0 1px rgba(168,85,247,0.08), 0 0 20px rgba(168,85,247,0.08);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.info-card:hover {
    transform: scale(1.03); border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(168,85,247,0.3), 0 0 32px rgba(168,85,247,0.35);
}
.info-card__media { aspect-ratio: 3 / 2; overflow: hidden; }
.info-card__media img { width: 100%; height: 100%; object-fit: cover; }
.info-card__body { padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-xs); }
.info-card__title { margin: 0; }
.info-card__text { color: var(--muted-foreground); margin: 0; }
.info-card__link {
    margin-top: auto; padding-top: var(--space-xs);
    font-family: var(--font-head); font-weight: 700; color: var(--link);
    text-shadow: 0 0 12px rgba(168,85,247,0.4);
}

/* ============================================
   STAT HIGHLIGHT
   ============================================ */
.stat-row {
    display: grid; gap: var(--space-md); grid-template-columns: minmax(0,1fr);
    text-align: center;
}
@media (min-width: 768px) { .stat-row { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .stat-row--3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .stat-row--4 { grid-template-columns: repeat(4, minmax(0,1fr)); } }

.stat-highlight { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--space-md); }
.stat-highlight__number {
    font-family: var(--font-head); font-weight: 800; font-size: 44px; line-height: 1;
    color: var(--foreground);
    text-shadow: 0 0 22px rgba(168,85,247,0.6), 0 0 40px rgba(20,208,221,0.35);
}
@media (min-width: 1024px) { .stat-highlight__number { font-size: 56px; } }
.stat-highlight__label { font-weight: 600; color: var(--foreground); }
.stat-highlight__caption { font-size: 14px; color: var(--muted-foreground); }

/* ============================================
   FAQ ACCORDION (native details/summary)
   ============================================ */
.faq-accordion { max-width: 820px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item__question {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm);
    min-height: 56px; padding: var(--space-sm) 0; cursor: pointer; list-style: none;
    font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--foreground);
    transition: color .25s var(--ease);
}
.faq-item__question::-webkit-details-marker { display: none; }
.faq-item:hover .faq-item__question { color: var(--link); }
.faq-item__chevron { flex-shrink: 0; color: var(--link); transition: transform .25s var(--ease); display: inline-flex; }
.faq-item[open] .faq-item__chevron { transform: rotate(180deg); }
.faq-item__answer { padding: 0 0 var(--space-md); }
.faq-item__answer p { color: var(--muted-foreground); margin: 0; }

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
    position: relative; text-align: center; overflow: clip;
    padding-block: var(--space-xl);
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 45%, #0e7490 100%);
    color: #fff;
}
@media (min-width: 1024px) { .cta-banner { padding-block: var(--space-2xl); } }
.cta-banner__particles {
    position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.6) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(20,208,221,0.6) 0 2px, transparent 3px);
    background-size: 120px 200px, 180px 260px;
    animation: coinFall 12s linear infinite;
}
.cta-banner__inner { position: relative; z-index: 1; max-width: 720px; margin-inline: auto; padding-inline: var(--space-sm); }
.cta-banner__title { color: #fff; text-shadow: 0 0 24px rgba(0,0,0,0.35); }
.cta-banner__text { color: rgba(255,255,255,0.92); max-width: 60ch; margin-inline: auto; }
.cta-banner__micro { margin-top: var(--space-sm); font-size: 14px; color: rgba(255,255,255,0.85); }

/* ============================================
   TRUST BADGES
   ============================================ */
.trust-badges {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-sm);
}
.trust-badge {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    min-width: 96px; padding: var(--space-sm);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: 0 0 16px rgba(168,85,247,0.1); transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.trust-badge:hover { transform: translateY(-2px); box-shadow: 0 0 22px rgba(168,85,247,0.3); }
.trust-badge img { width: 56px; height: 56px; object-fit: contain; }
.trust-badge__caption { font-size: 13px; color: var(--muted-foreground); text-align: center; }

/* ============================================
   ENGAGEMENT PATTERNS
   .tldr-box | .callout | .pull-quote | .tier-ladder | .icon-list
   ============================================ */
.tldr-box, .callout {
    border-radius: var(--radius); padding: var(--space-md);
    background: var(--muted); border: 1px solid var(--border);
    margin-block: var(--space-md); max-width: 75ch;
}
.tldr-box { border-left: 4px solid var(--secondary); }
.callout { border-left: 4px solid var(--accent); }
.tldr-box h3, .callout h3 { margin-top: 0; }
.tldr-box p:last-child, .callout p:last-child { margin-bottom: 0; }

.pull-quote {
    font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 1.4;
    color: var(--foreground); border-left: 4px solid var(--primary);
    padding: var(--space-sm) var(--space-md); margin-block: var(--space-lg); max-width: 60ch;
}
.pull-quote cite { display: block; margin-top: var(--space-xs); font-size: 15px; font-weight: 500; font-style: normal; color: var(--muted-foreground); }

.icon-list { list-style: none; padding: 0; margin: var(--space-md) 0; display: grid; gap: var(--space-sm); }
.icon-list li { position: relative; padding-left: 1.75rem; }
.icon-list li::before { content: "◆"; position: absolute; left: 0; color: var(--secondary); }

.tier-ladder { display: grid; gap: var(--space-sm); grid-template-columns: minmax(0,1fr); }
@media (min-width: 768px) { .tier-ladder { grid-template-columns: repeat(5, minmax(0,1fr)); } }
.tier-ladder__step {
    text-align: center; padding: var(--space-sm); border-radius: var(--radius-sm);
    background: var(--card); border: 1px solid var(--border);
}
.tier-ladder__step img { width: 64px; height: 64px; object-fit: contain; margin-inline: auto; }
.tier-ladder__name { font-family: var(--font-head); font-weight: 700; margin-top: 6px; }

/* Section intro helper */
.section-head { max-width: 720px; margin-bottom: var(--space-lg); }
.section-head--center { margin-inline: auto; text-align: center; }

/* Two-column split */
.split { display: grid; gap: var(--space-lg); align-items: center; }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; } }
.split__media { border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 40px rgba(168,85,247,0.25); }
.split__media img { width: 100%; display: block; }

/* Logo/badge strip */
.logo-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-md); align-items: center; }
.logo-strip img { max-height: 72px; width: auto; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: var(--card); border-top: 1px solid var(--border); margin-top: var(--space-2xl); }
.site-footer__inner {
    max-width: var(--max-w); margin-inline: auto; padding: var(--space-xl) var(--space-sm) var(--space-lg);
    display: grid; gap: var(--space-lg); grid-template-columns: minmax(0,1fr);
}
@media (min-width: 768px) { .site-footer__inner { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

.site-footer__heading { font-size: 16px; font-family: var(--font-head); font-weight: 700; margin-bottom: var(--space-sm); }
.site-footer__blurb { color: var(--muted-foreground); font-size: 15px; }
.site-footer__age {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; border: 2px solid #ff5cae;
    font-family: var(--font-head); font-weight: 800; color: #ff5cae;
}
.site-footer__links, .site-footer__pay { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-xs); }
.site-footer__links a { color: var(--muted-foreground); }
.site-footer__links a:hover { color: var(--link); }
.site-footer__pay li { color: var(--muted-foreground); font-size: 15px; }
.site-footer__bottom {
    border-top: 1px solid var(--border); padding: var(--space-md) var(--space-sm);
    text-align: center;
}
.site-footer__bottom p { max-width: var(--max-w); margin-inline: auto; color: var(--muted-foreground); font-size: 14px; }

/* ============================================
   SITEMAP LIST
   ============================================ */
.sitemap-list { list-style: none; padding: 0; margin: 0; max-width: 820px; }
.sitemap-list li { padding: var(--space-md) 0; border-bottom: 1px solid var(--border); }
.sitemap-list h3 { margin-bottom: 6px; }
.sitemap-list p { color: var(--muted-foreground); margin: 0; }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.animate-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.animate-on-scroll.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto !important; }
    .animate-on-scroll { opacity: 1; transform: none; transition: none; }
}

/* a11y-autofix: link-in-text-block */
/* axe link-in-text-block: inline links inside body copy must be
   distinguishable without relying on color. Scope to text containers so
   nav/button/card links (already visually distinct) keep their styling. */
:where(p, li, blockquote, figcaption, dd, .prose, .seo-text, article)
  a:not([class]) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
