/*
 * OnlySpins Casino - Design System
 * Tropical island luxury: turquoise-to-gold on deep ocean night.
 * Fonts: Sora (headings), Manrope (body).
 */

:root {
    --background: #eefaf7;
    --foreground: #0d3b3a;
    --card: #f4e9d6;
    --card-foreground: #0d3b3a;
    --popover: #ffffff;
    --popover-foreground: #0d3b3a;
    --primary: #0b7d73;
    --primary-foreground: #ffffff;
    --secondary: #f4e9d6;
    --secondary-foreground: #0d3b3a;
    --muted: #dfe9e8;
    --muted-foreground: #43605d;
    --accent: #a86a12;
    --accent-foreground: #000000;
    --destructive: #dc2626;
    --destructive-foreground: #ffffff;
    --border: #c9dbd8;
    --input: #c9dbd8;
    --ring: #0d9488;

    --gold: #a86a12;
    --gold-strong: #8a5610;
    --hero-bg: #0a2c35;
    --on-hero: #f5ecdc;
    --footer-chip-bg: rgba(255, 255, 255, 0.08);
    --footer-chip-border: rgba(245, 236, 220, 0.28);

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

    --radius: 8px;
    --radius-lg: 16px;
    --header-h: 64px;
    --maxw: 1200px;

    --shadow-glow: 0 12px 40px rgba(245, 183, 49, 0.18);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.dark {
    --background: #08262e;
    --foreground: #f5ecdc;
    --card: #0f3540;
    --card-foreground: #f5ecdc;
    --popover: #0f3540;
    --popover-foreground: #f5ecdc;
    --primary: #2dd4bf;
    --primary-foreground: #04232b;
    --secondary: #123a44;
    --secondary-foreground: #f5ecdc;
    --muted: #1a4650;
    --muted-foreground: #bcd6d3;
    --accent: #f5b731;
    --accent-foreground: #04232b;
    --destructive: #ea0d33;
    --destructive-foreground: #ffffff;
    --border: #1f5560;
    --input: #1f5560;
    --ring: #2dd4bf;

    --gold: #f5b731;
    --gold-strong: #d99a1a;
    --hero-bg: #061e25;
    --on-hero: #f5ecdc;
    --footer-chip-bg: rgba(255, 255, 255, 0.06);
    --footer-chip-border: rgba(245, 236, 220, 0.22);
}

/* ============================================
   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 { 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; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--foreground);
    background: var(--background);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

p { margin: 0 0 var(--space-md); }
p:last-child { margin-bottom: 0; }

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

img { display: block; }

@media (min-width: 1024px) {
    h1 { font-size: 40px; }
    h2 { font-size: 32px; }
    h3 { font-size: 24px; }
}

.max-w-1200 { max-width: var(--maxw); }
.mx-auto { margin-inline: auto; }

.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(--accent); color: var(--accent-foreground);
    padding: var(--space-xs) var(--space-sm); border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* ============================================
   BUTTONS
   .btn base; --gold primary CTA; --ghost secondary; --lg larger
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--space-xs);
    min-height: 44px; padding: 0 var(--space-md);
    font-family: "Sora", sans-serif; font-weight: 600; font-size: 16px;
    border-radius: var(--radius); border: 1px solid transparent;
    cursor: pointer; text-align: center;
    transition: transform 250ms var(--ease), box-shadow 250ms var(--ease),
                background 250ms var(--ease), filter 250ms var(--ease);
}
.btn:hover { text-decoration: none; }

.btn--gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-strong));
    color: var(--accent-foreground);
}
a.btn--gold, a.btn--gold:hover { color: var(--accent-foreground); }
.btn--gold:hover { filter: brightness(1.08); box-shadow: var(--shadow-glow); transform: translateY(-2px); }

.btn--ghost {
    background: transparent; color: var(--foreground);
    border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }

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

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--hero-bg);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    max-width: var(--maxw); margin-inline: auto;
    min-height: var(--header-h);
    display: flex; align-items: center; gap: var(--space-md);
    padding: 0 var(--space-sm);
}

.site-brand { display: flex; align-items: center; gap: var(--space-xs); }
.site-brand:hover { text-decoration: none; }
.site-brand__mark {
    width: 24px; height: 24px; border-radius: 50%;
    background: radial-gradient(circle at 50% 30%, var(--gold), transparent 70%),
                linear-gradient(180deg, transparent 55%, var(--primary) 55%);
}
.site-brand__text {
    font-family: "Sora", sans-serif; font-weight: 800; font-size: 22px;
    letter-spacing: -0.03em; color: var(--on-hero);
}

.primary-nav {
    display: flex; flex: 1; align-items: center; gap: var(--space-md); min-width: 0;
}
.primary-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-sm); }
.primary-nav__list a {
    display: flex; align-items: center; min-height: 44px;
    color: var(--on-hero); font-weight: 600; font-size: 15px;
    padding: 0 var(--space-xs);
    opacity: 1;
}
.primary-nav__list a:hover { color: var(--gold); text-decoration: none; }
.primary-nav__actions { display: flex; align-items: center; gap: var(--space-xs); margin-left: auto; }
.primary-nav__actions .btn--ghost { color: var(--on-hero); }

/* High-contrast header links in dark theme */
.dark .primary-nav__list a { color: #f5ecdc; }
.dark .primary-nav__actions .btn--ghost { color: #f5ecdc; }
.dark .primary-nav__list a:hover { color: var(--gold); }

.theme-toggle {
    margin-left: auto;
    width: 44px; height: 44px; flex-shrink: 0;
    background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer;
    color: var(--on-hero); font-size: 18px;
    display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--gold); }

.menu-toggle {
    display: none;
    width: 44px; height: 44px; flex-shrink: 0;
    background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    z-index: 1001;
}
.menu-toggle span {
    display: block; width: 22px; height: 2px; background: var(--on-hero);
    transition: transform 250ms var(--ease), opacity 250ms var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
@media (max-width: 1023px) {
    .theme-toggle { margin-left: auto; }
    .menu-toggle { display: flex; }
    .primary-nav {
        display: none;
        position: fixed;
        top: var(--header-h); left: 0; right: 0; bottom: 0;
        z-index: 999;
        flex: initial;
        flex-direction: column;
        background: var(--background);
        padding: var(--space-md) var(--space-sm) var(--space-2xl);
        overflow-y: auto;
    }
    .primary-nav.is-open { display: flex; }
    .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .primary-nav__list a {
        min-height: 48px; color: var(--foreground);
        border-bottom: 1px solid var(--border); font-size: 18px;
    }
    .dark .primary-nav__list a { color: var(--foreground); }
    .primary-nav__actions {
        margin-left: 0; margin-top: var(--space-lg);
        flex-direction: column; align-items: stretch; gap: var(--space-sm);
    }
    .primary-nav__actions .btn { width: 100%; }
    .primary-nav__actions .btn--ghost { color: var(--foreground); }
    .dark .primary-nav__actions .btn--ghost { color: var(--foreground); }
}

@media (min-width: 1024px) {
    .theme-toggle { margin-left: 0; }
}

/* ============================================
   HORIZON LINE (signature shimmer)
   ============================================ */
.horizon-line {
    display: block; height: 2px; width: 100%;
    background: linear-gradient(90deg, transparent, var(--primary) 20%, var(--gold) 50%, var(--primary) 80%, transparent);
    background-size: 200% 100%;
    animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .horizon-line { animation: none; } }

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: var(--space-xl) var(--space-sm); }
.section__inner { max-width: var(--maxw); margin-inline: auto; }
.section__head { max-width: 780px; margin-bottom: var(--space-lg); }
.section__head p { color: var(--muted-foreground); }
.section--alt { background: var(--secondary); }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--muted-foreground); }
.prose a { color: var(--primary); font-weight: 600; text-decoration: underline; }
.prose a.btn, .prose a.btn:hover { color: var(--accent-foreground); text-decoration: none; }

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

/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
    position: relative;
    background: var(--hero-bg);
    color: var(--on-hero);
    padding: var(--space-xl) var(--space-sm);
}
.page-hero__glow {
    position: absolute; inset: 0;
    background:
        radial-gradient(120% 80% at 80% 20%, rgba(245,183,49,0.16), transparent 60%),
        radial-gradient(100% 90% at 10% 90%, rgba(45,212,191,0.14), transparent 60%);
    pointer-events: none;
}
.page-hero__inner {
    position: relative;
    display: grid; gap: var(--space-lg);
    align-items: center;
}
.page-hero__title { color: var(--on-hero); }
.page-hero__subtitle { color: var(--on-hero); opacity: 0.88; font-size: 18px; max-width: 46ch; }
.page-hero .horizon-line { position: absolute; bottom: 0; left: 0; }
.page-hero__media img { border-radius: var(--radius-lg); width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }

@media (min-width: 1024px) {
    .page-hero { padding: var(--space-2xl) var(--space-md); }
    .page-hero__inner { grid-template-columns: 1.1fr 1fr; }
}

/* ============================================
   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--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.info-card {
    min-width: 0;
    background: var(--card); color: var(--card-foreground);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: var(--space-md);
    display: flex; flex-direction: column; gap: var(--space-sm);
    transition: transform 250ms var(--ease), box-shadow 250ms var(--ease);
}
.info-card:hover { transform: scale(1.03); box-shadow: var(--shadow-glow); }
.info-card__media img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.info-card__media--icon { display: flex; justify-content: center; }
.info-card__media--icon img { width: auto; max-height: 96px; object-fit: contain; }
.info-card__icon { font-size: 40px; }
.info-card__title { color: var(--card-foreground); }
.info-card__text { color: var(--muted-foreground); margin: 0; }
.info-card__link { font-weight: 600; color: var(--primary); }
.info-card--wide { grid-column: 1 / -1; }
@media (min-width: 768px) {
    .info-card--wide { flex-direction: row; align-items: center; gap: var(--space-lg); }
    .info-card--wide .info-card__media { flex: 0 0 42%; }
    .info-card--wide .info-card__body { flex: 1; }
}

/* ============================================
   STAT HIGHLIGHT
   ============================================ */
.stat-row {
    background: var(--hero-bg); color: var(--on-hero);
    position: relative;
}
.stat-row__inner {
    max-width: var(--maxw); margin-inline: auto;
    display: grid; gap: var(--space-md);
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-xl) var(--space-sm);
    text-align: center;
}
@media (min-width: 768px) { .stat-row__inner { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .stat-row__inner { grid-template-columns: repeat(4, minmax(0,1fr)); padding: var(--space-2xl) var(--space-md); } }
.stat-highlight { display: flex; flex-direction: column; gap: var(--space-xs); }
.stat-highlight__number {
    font-family: "Sora", sans-serif; font-weight: 800; font-size: 48px;
    color: var(--gold); line-height: 1;
}
.stat-highlight__label { font-size: 15px; color: var(--on-hero); font-weight: 600; }
.stat-highlight__caption { font-size: 14px; color: var(--on-hero); opacity: 0.82; }

/* ============================================
   FAQ ACCORDION (native details)
   ============================================ */
.faq-list { max-width: 820px; margin-inline: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item__question {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm);
    padding: var(--space-md);
    font-family: "Sora", sans-serif; font-weight: 600; font-size: 18px;
    color: var(--card-foreground);
}
.faq-item__question::-webkit-details-marker { display: none; }
.faq-item__icon {
    flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    background: var(--gold); color: var(--accent-foreground);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    transition: transform 250ms var(--ease);
}
.faq-item[open] .faq-item__icon { transform: rotate(45deg); }
.faq-item__answer { padding: 0 var(--space-md) var(--space-md); }
.faq-item__answer p { color: var(--muted-foreground); margin: 0; }

/* ============================================
   HOW-TO STEPS
   ============================================ */
.how-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-md); max-width: 820px; }
.how-step {
    display: flex; gap: var(--space-md); align-items: flex-start;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: var(--space-md);
}
.how-step__badge {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-strong));
    color: var(--accent-foreground);
    display: flex; align-items: center; justify-content: center;
    font-family: "Sora", sans-serif; font-weight: 800; font-size: 20px;
}
.how-step__title { margin: 0 0 var(--space-xs); color: var(--card-foreground); }
.how-step__text { margin: 0; color: var(--muted-foreground); }

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
    position: relative; background: var(--hero-bg); color: var(--on-hero);
    padding: var(--space-xl) var(--space-sm); text-align: center;
}
.cta-banner__glow {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(90% 120% at 50% 0%, rgba(245,183,49,0.18), transparent 60%);
}
.cta-banner__inner { position: relative; }
.cta-banner__title { color: var(--on-hero); }
.cta-banner__subtitle { color: var(--on-hero); opacity: 0.88; max-width: 52ch; margin-inline: auto; margin-bottom: var(--space-lg); }
.cta-banner__microcopy { font-size: 14px; color: var(--on-hero); opacity: 0.75; margin-top: var(--space-sm); }
.cta-banner .horizon-line { position: absolute; top: 0; left: 0; }
@media (min-width: 1024px) { .cta-banner { padding: var(--space-2xl) var(--space-md); } }

/* ============================================
   ENGAGEMENT PATTERNS
   TL;DR box, callout, pull quote, comparison table
   ============================================ */
.tldr {
    background: var(--secondary); border-left: 4px solid var(--gold);
    border-radius: var(--radius); padding: var(--space-md);
    margin-bottom: var(--space-lg);
}
.tldr h2, .tldr h3 { font-size: 18px; margin-bottom: var(--space-xs); }
.tldr p { color: var(--muted-foreground); margin: 0; }

.callout {
    background: var(--secondary); border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius); padding: var(--space-md);
    margin: var(--space-md) 0;
}
.callout p { color: var(--muted-foreground); margin: 0; }
.callout strong { color: var(--foreground); }

.pull-quote {
    font-family: "Sora", sans-serif; font-size: 22px; font-weight: 600;
    line-height: 1.4; color: var(--foreground);
    border-left: 4px solid var(--gold); padding: var(--space-sm) var(--space-md);
    margin: var(--space-lg) 0;
}
.pull-quote cite { display: block; font-family: "Manrope", sans-serif; font-size: 15px; font-weight: 500; color: var(--muted-foreground); margin-top: var(--space-xs); font-style: normal; }

.comparison-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.comparison-table th, .comparison-table td { padding: var(--space-sm); text-align: left; border-bottom: 1px solid var(--border); }
.comparison-table thead th { font-family: "Sora", sans-serif; color: var(--foreground); background: var(--secondary); }
.comparison-table td { color: var(--muted-foreground); }
.comparison-table .is-recommended { background: rgba(245,183,49,0.10); }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--secondary); border: 1px solid var(--border);
    border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600;
    color: var(--foreground);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: var(--hero-bg); color: var(--on-hero); border-top: 2px solid var(--border); }
.site-footer__inner {
    max-width: var(--maxw); margin-inline: auto;
    display: grid; gap: var(--space-lg);
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-xl) var(--space-sm);
}
.site-footer__brand { font-size: 24px; }
.site-footer__tagline { color: var(--on-hero); opacity: 0.82; margin-top: var(--space-xs); font-size: 15px; }
.site-footer__heading { font-size: 16px; color: var(--gold); margin-bottom: var(--space-sm); }
.site-footer__links, .payment-logos, .trust-badges { list-style: none; margin: 0; padding: 0; }
.site-footer__links li { margin-bottom: var(--space-xs); }
.site-footer__links a { color: var(--on-hero); font-size: 15px; }
.site-footer__links a:hover { color: var(--gold); }
.payment-logos { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.payment-logos li {
    background: var(--footer-chip-bg); border: 1px solid var(--footer-chip-border);
    border-radius: var(--radius); padding: 4px 10px; font-size: 13px; font-weight: 600;
    color: var(--on-hero);
}
.trust-badges { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.trust-badge {
    background: var(--footer-chip-bg); border: 1px solid var(--footer-chip-border);
    border-radius: var(--radius); padding: 4px 10px; font-size: 13px; font-weight: 600;
    color: var(--on-hero);
}
.trust-badge--age { background: var(--gold); color: var(--accent-foreground); border-color: var(--gold); }
.site-footer__mini { font-size: 14px; color: var(--on-hero); opacity: 0.82; margin-top: var(--space-sm); }
.site-footer__mini a { color: var(--on-hero); text-decoration: underline; }
.site-footer__bottom {
    border-top: 1px solid var(--border); padding: var(--space-md) var(--space-sm);
    text-align: center;
}
.site-footer__bottom p { font-size: 14px; color: var(--on-hero); opacity: 0.82; margin: 0; max-width: var(--maxw); margin-inline: auto; }

@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: 2fr 1fr 1fr 1fr; padding: var(--space-2xl) var(--space-md) var(--space-xl); }
}

/* ============================================
   SITEMAP LIST
   ============================================ */
.sitemap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-md); }
.sitemap-list li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-md); }
.sitemap-list h3 { margin-bottom: var(--space-xs); }
.sitemap-list p { color: var(--muted-foreground); margin: 0; }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.animate-on-scroll {
    opacity: 0; transform: translateY(24px);
    transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.animate-on-scroll.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* 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;
}
