/*
 * Jack Casino Design System
 * Dark crypto-noir foundation for all templates and reusable components.
 */

:root {
    --background: #0B0F1A;
    --foreground: #E8ECF4;
    --card: #141B2E;
    --card-foreground: #E8ECF4;
    --popover: #101627;
    --popover-foreground: #E8ECF4;
    --primary: #22E584;
    --primary-foreground: #07130C;
    --secondary: #3B9DFF;
    --secondary-foreground: #071120;
    --muted: #1C2438;
    --muted-foreground: #B2BCD0;
    --accent: #F5C542;
    --accent-foreground: #1A1300;
    --destructive: #ea1414;
    --destructive-foreground: #FFFFFF;
    --border: #2A3550;
    --input: #121A2C;
    --ring: #22E584;
    --space-xs: .5rem;
    --space-sm: .75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3.5rem;
    --space-3xl: 6rem;
    --radius-sm: .75rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --shadow-glow: 0 20px 70px rgba(34, 229, 132, .18);
    --header-height: 72px;
    --container: 1180px;
}

.dark {
    --background: #0B0F1A;
    --foreground: #E8ECF4;
    --card: #141B2E;
    --card-foreground: #E8ECF4;
    --popover: #101627;
    --popover-foreground: #E8ECF4;
    --primary: #22E584;
    --primary-foreground: #07130C;
    --secondary: #3B9DFF;
    --secondary-foreground: #071120;
    --muted: #1C2438;
    --muted-foreground: #B2BCD0;
    --accent: #F5C542;
    --accent-foreground: #1A1300;
    --destructive: #ea1414;
    --destructive-foreground: #FFFFFF;
    --border: #2A3550;
    --input: #121A2C;
    --ring: #22E584;
}

/* ============================================
   RESET AND OVERFLOW SAFETY - predictable layout
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    background: radial-gradient(circle at 20% 0%, rgba(34, 229, 132, .12), transparent 28rem), radial-gradient(circle at 85% 12%, rgba(59, 157, 255, .12), transparent 26rem), var(--background);
    color: var(--foreground);
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    overflow-x: clip;
}
img, video, iframe, embed, object, svg { max-width: 100%; height: auto; }
[class*="grid"] > *, [class*="flex"] > *, .card, .promo-card, .stat-block__item { 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; white-space: pre; }
.table-wrapper, [class*="table-"] { min-width: 0; max-width: 100%; overflow-x: auto; }
p, li, td, th { overflow-wrap: break-word; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
a[href^="http"], a[href*="//"] { word-break: break-word; }
input, textarea, select, button { font: inherit; max-width: 100%; }
section, .hero, .cta-banner { overflow: clip; }

/* ============================================
   TYPOGRAPHY - Space Grotesk headings, Manrope body
   ============================================ */
h1, h2, h3, h4 {
    margin: 0 0 var(--space-md);
    color: var(--foreground);
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.12;
    letter-spacing: -.02em;
}
h1 { font-size: clamp(1.75rem, calc(4vw + .8rem), 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, calc(2.3vw + .7rem), 2.125rem); font-weight: 650; }
h3 { font-size: clamp(1.25rem, calc(1vw + 1rem), 1.5rem); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 var(--space-lg); max-width: 75ch; }
small, figcaption { font-size: .875rem; color: var(--muted-foreground); }
.lead { font-size: clamp(1.0625rem, calc(.6vw + .95rem), 1.25rem); color: var(--muted-foreground); }
.text-gradient { color: var(--primary); }
.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: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 2000;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--primary-foreground);
    font-weight: 800;
    transform: translateY(-200%);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s ease, opacity .25s ease, visibility .25s;
}
.skip-link:focus, .skip-link:focus-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* ============================================
   LAYOUT SHELL - header, main, footer, containers
   ============================================ */
.container, .site-header__inner, .site-footer__inner {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}
main { padding-top: var(--header-height); }
section { padding-block: var(--space-2xl); }
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    min-height: var(--header-height);
    border-bottom: 1px solid rgba(42, 53, 80, .8);
    background: rgba(11, 15, 26, .96);
}
.site-header__inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    min-height: 44px;
    flex-shrink: 0;
    color: var(--foreground);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    letter-spacing: -.02em;
}
.site-brand__mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(34, 229, 132, .5);
    border-radius: .85rem;
    background: linear-gradient(135deg, rgba(34, 229, 132, .2), rgba(245, 197, 66, .16));
    color: var(--primary);
    box-shadow: 0 0 24px rgba(34, 229, 132, .25);
}
.mobile-menu-toggle {
    position: relative;
    z-index: 1001;
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--foreground);
    cursor: pointer;
}
.mobile-menu-toggle span:not(.sr-only) {
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: var(--foreground);
    transition: transform .25s ease, opacity .25s ease;
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-of-type(3) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }
.primary-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    overflow-y: auto;
    padding: var(--space-lg);
    background: var(--background);
}
.primary-nav.is-open { display: flex; flex-direction: column; }
.primary-nav__list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.primary-nav__list a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--foreground);
    font-weight: 700;
}
.primary-nav__list a:hover, .primary-nav__list a:focus { background: var(--muted); color: var(--primary); }
.primary-nav__actions { display: grid; gap: .75rem; margin-top: var(--space-lg); }
.site-footer {
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(20, 27, 46, .35), rgba(11, 15, 26, 1));
    padding: var(--space-2xl) 0 var(--space-xl);
}
.site-footer__brand p { color: var(--muted-foreground); }
.site-footer__grid { display: grid; gap: var(--space-xl); margin-top: var(--space-xl); }
.site-footer h2 { font-size: 1rem; color: var(--accent); }
.site-footer ul { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--muted-foreground); }
.site-footer a:hover { color: var(--primary); }
.site-footer__bottom {
    display: grid;
    gap: .5rem;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
}
.payment-icons { color: var(--foreground); font-family: "Space Grotesk", sans-serif; }

/* ============================================
   BUTTONS AND LINKS - conversion-focused controls
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .8rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn--primary {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 0 26px rgba(34, 229, 132, .28);
}
.btn--primary:hover { color: var(--primary-foreground); transform: translateY(-2px) scale(1.02); box-shadow: 0 0 38px rgba(34, 229, 132, .42); }
.btn--secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn--ghost { border-color: var(--border); background: rgba(20, 27, 46, .7); color: var(--foreground); }
.btn--ghost:hover { border-color: var(--secondary); color: var(--foreground); }
.btn--large { min-height: 52px; padding-inline: 1.6rem; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }
.text-link::after { content: "→"; margin-left: .45rem; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

/* ============================================
   HERO AND SECTION UTILITIES - reusable page scaffolding
   ============================================ */
.hero {
    position: relative;
    padding-block: clamp(4rem, calc(8vw + 2rem), 7.5rem) var(--space-2xl);
}
.hero::before, .cta-banner::before {
    content: "";
    position: absolute;
    inset: auto -8rem 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}
.hero__grid { display: grid; gap: var(--space-xl); align-items: center; }
.hero__media img, .feature-image {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
}
.section-heading { margin-bottom: var(--space-xl); }
.section-heading::after {
    content: "";
    display: block;
    width: 96px;
    height: 3px;
    margin-top: .85rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.content-grid { display: grid; gap: var(--space-lg); }
.two-column { display: grid; gap: var(--space-xl); align-items: start; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: var(--space-sm); }
.hero__media { position: relative; }
.hero__media::after {
    content: "";
    position: absolute;
    inset: auto 8% -1.25rem 8%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

/* ============================================
   CARDS - content containers and promotion grids
   ============================================ */
.card, .info-card, .promo-card, .summary-box, .callout-box, .review-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), var(--card);
    box-shadow: 0 16px 45px rgba(0, 0, 0, .22);
}
.card, .info-card, .summary-box, .callout-box, .review-card { padding: var(--space-lg); }
.card-featured { border-color: rgba(34, 229, 132, .55); box-shadow: var(--shadow-glow); }
.promo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
.promo-card {
    position: relative;
    padding: var(--space-lg);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.promo-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.promo-card:hover { transform: translateY(-4px); border-color: rgba(34, 229, 132, .55); box-shadow: 0 24px 60px rgba(34, 229, 132, .14); }
.promo-card__image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-md); margin-bottom: var(--space-md); }
.promo-card__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: var(--space-md);
    border-radius: 1rem;
    background: rgba(34, 229, 132, .12);
    color: var(--primary);
    font-size: 1.6rem;
}
.promo-card__value { margin-bottom: .55rem; color: var(--accent); font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; font-weight: 700; }

/* ============================================
   STATS - quotable numeric proof blocks
   ============================================ */
.stat-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
}
.stat-block__item { padding: var(--space-lg); border-bottom: 1px solid var(--border); }
.stat-block__item:last-child { border-bottom: 0; }
.stat-block__number {
    display: block;
    color: var(--primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2rem, calc(4vw + 1rem), 3.5rem);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.stat-block__label { display: block; margin-top: .45rem; color: var(--foreground); font-weight: 800; }
.stat-block small { display: block; margin-top: .35rem; }

/* ============================================
   ENGAGEMENT PATTERNS - TLDR, callouts, quotes, social proof
   ============================================ */
.summary-box {
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, rgba(34, 229, 132, .11), rgba(59, 157, 255, .06)), var(--card);
}
.summary-box h2, .summary-box h3 { color: var(--primary); }
.callout-box {
    border-left: 4px solid var(--accent);
    background: linear-gradient(135deg, rgba(245, 197, 66, .12), rgba(20, 27, 46, .9));
}
.pull-quote {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    border-left: 4px solid var(--secondary);
    color: var(--foreground);
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.25rem, calc(1.5vw + 1rem), 1.85rem);
    line-height: 1.3;
}
.pull-quote cite { display: block; margin-top: var(--space-md); color: var(--muted-foreground); font: 700 1rem/1.5 "Manrope", sans-serif; }
.trust-badges, .social-proof-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
}
.trust-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(20, 27, 46, .72);
    color: var(--muted-foreground);
    font-weight: 800;
    text-align: center;
}
.review-card p { color: var(--muted-foreground); }

/* ============================================
   TABLES - comparison and data presentation
   ============================================ */
table { width: 100%; border-collapse: collapse; color: var(--foreground); }
th, td { padding: .9rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--accent); font-family: "Space Grotesk", sans-serif; }
tr.is-recommended, td.is-recommended, th.is-recommended { background: rgba(34, 229, 132, .09); }
.comparison-table { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); }

/* ============================================
   ACCORDIONS AND STEPS - FAQ and how-to components
   ============================================ */
details, .faq-accordion__item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
}
details + details, .faq-accordion__item + .faq-accordion__item { margin-top: .85rem; }
summary {
    min-height: 56px;
    padding: 1rem 3rem 1rem 1rem;
    color: var(--foreground);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
    content: "+";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.4rem;
}
details[open] { border-left: 4px solid var(--primary); }
details[open] summary::after { content: "−"; }
.faq-accordion__content { padding: 0 1rem 1rem; color: var(--muted-foreground); }
.how-to-steps { display: grid; gap: var(--space-lg); margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.how-to-steps__item {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-md);
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
}
.how-to-steps__number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
}
.how-to-steps__item p { color: var(--muted-foreground); margin-bottom: 0; }

/* ============================================
   CTA BANNER - full-width conversion band
   ============================================ */
.cta-banner {
    position: relative;
    padding-block: var(--space-2xl);
    background: radial-gradient(circle at 50% 0%, rgba(34, 229, 132, .16), transparent 28rem), var(--background);
}
.cta-banner__inner { display: grid; justify-items: center; text-align: center; }
.cta-banner h2 { max-width: 760px; }
.cta-banner p { color: var(--muted-foreground); }
.cta-banner small { display: block; margin-top: .75rem; }

/* ============================================
   PROMO CODE BADGE - bonus code highlight chip
   ============================================ */
.promo-code-badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 48px;
    padding: .55rem 1.1rem;
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    background: rgba(245, 197, 66, .08);
    color: var(--accent);
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .12em;
}
.promo-code-badge small {
    color: var(--muted-foreground);
    font-family: "Manrope", sans-serif;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: 0;
}

/* ============================================
   MEDIA GRIDS AND COIN UI - common page patterns
   ============================================ */
.coin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.coin-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--foreground);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

/* ============================================
   MOTION - subtle reveal and hover behavior
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s ease;
}
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    .animate-on-scroll { opacity: 1; transform: none; }
}

/* ============================================
   RESPONSIVE ENHANCEMENTS - tablet and desktop
   ============================================ */
@media (min-width: 768px) {
    body { font-size: 17px; }
    .site-header { background: rgba(11, 15, 26, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
    .mobile-menu-toggle { display: none; }
    .primary-nav {
        position: static;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex: 1;
        gap: var(--space-lg);
        padding: 0;
        overflow: visible;
        background: transparent;
    }
    .primary-nav__list { flex-direction: row; align-items: center; overflow-x: auto; }
    .primary-nav__list a { min-height: 44px; padding: .45rem .65rem; white-space: nowrap; }
    .primary-nav__actions { display: flex; align-items: center; margin-top: 0; }
    .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer__bottom { grid-template-columns: 1fr 1fr; }
    .hero__grid, .two-column { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .promo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-block__item { border-bottom: 1px solid var(--border); }
    .stat-block__item:nth-child(odd) { border-right: 1px solid var(--border); }
    .trust-badges, .social-proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .coin-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .site-footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .promo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat-block { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat-block__item { border-bottom: 0; border-right: 1px solid var(--border); }
    .stat-block__item:last-child { border-right: 0; }
    .trust-badges { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .social-proof-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .content-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
    .container, .site-header__inner, .site-footer__inner { width: min(100% - 3rem, var(--container)); }
}
