/* Tokio Casino — styles
   Color tokens derived from Figma design
   --brown: #341D1A  --white: #FEFEFF  --blue: #7A85F4
   --red: #F7405E    --orange: #FFA826 --shadow-blue: #515795
*/
:root {
    --brown: #341D1A;
    --white: #FEFEFF;
    --blue: #7A85F4;
    --red: #F7405E;
    --orange: #FFA826;
    --yellow: #FCBF30;
    --yellow-deep: #F6B31A;
    --cream: #FFF7D9;
    --shadow-blue: #515795;
    --card-brown: #2A1714;
    --card-brown-2: #3B2019;
    --dark-bg: #1A0F0D;

    --font-brand: "Bungee", "Impact", system-ui, sans-serif;
    --font-display: "Sigmar One", "Bungee", system-ui, sans-serif;
    --font-retro: "Press Start 2P", "Courier New", monospace;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    --radius: 16px;
    --radius-lg: 24px;
    --max-width: 1200px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--brown);
    background: var(--yellow);
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

button { font: inherit; cursor: pointer; }

.visually-hidden {
    position: absolute !important;
    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;
    top: -40px; left: 8px;
    background: var(--brown);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 8px;
    z-index: 1000;
    text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ---------- Header / Wave banner ---------- */
.site-header {
    position: relative;
    padding-top: 20px;
    padding-bottom: 20px;
    background: var(--cream);
    isolation: isolate;
    z-index: 5;
}

.wave-banner { display: none; } /* reserved hook, not used */

/* Scalloped wavy bottom edge — cream-colored waves over the yellow hero */
.site-header::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -39px;
    height: 40px;
    background: url('/images/wave-bottom.svg') repeat-x left top / 140px 40px;
    pointer-events: none;
    z-index: 1;
}

.header-inner {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    text-decoration: none;
}
.logo img {
    width: clamp(110px, 13vw, 170px);
    height: auto;
    filter: drop-shadow(0 4px 0 rgba(52,29,26,0.15));
    transition: transform .2s ease;
}
.logo:hover img { transform: translateY(-2px) rotate(-2deg); }

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.balance {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-brand);
    font-size: clamp(22px, 2.4vw, 30px);
    letter-spacing: 1.5px;
    text-shadow: 0 4px 0 rgba(0,0,0,0.10);
}
.balance-coin {
    width: clamp(22px, 2vw, 26px);
    height: auto;
    filter: drop-shadow(0 3px 0 rgba(0,0,0,0.15));
}
.balance-amount .int { color: var(--red); }
.balance-amount .dot { color: rgba(52,29,26,0.4); }
.balance-amount .dec { color: rgba(52,29,26,0.4); }

.account-actions {
    display: flex;
    gap: 14px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    min-height: 54px;
    border: 2px solid var(--brown);
    border-radius: var(--radius);
    background: var(--white);
    font-family: var(--font-brand);
    font-size: 20px;
    letter-spacing: .5px;
    color: var(--brown);
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 7px 0 0 var(--shadow-blue);
    transition: transform .12s ease, box-shadow .12s ease;
    text-shadow: 0 3px 0 rgba(0,0,0,0.08);
}
.btn img { width: 20px; height: auto; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 0 0 var(--shadow-blue); }
.btn:active { transform: translateY(4px); box-shadow: 0 3px 0 0 var(--shadow-blue); }
.btn-white { background: var(--white); }

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-self: end;
}

.profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.profile-label {
    font-family: var(--font-retro);
    font-size: 13px;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.profile-avatar {
    width: 38px; height: 38px;
    border: 2px solid var(--brown);
    border-radius: 50%;
    overflow: hidden;
    display: block;
    background: #F2B26F;
    box-shadow: 0 3px 0 0 rgba(52,29,26,0.2);
}
.profile-avatar svg { width: 100%; height: 100%; display: block; }

.lang-switch {
    background: transparent;
    border: 2px solid var(--brown);
    border-radius: 6px;
    padding: 4px 6px;
    line-height: 0;
    box-shadow: 0 3px 0 0 rgba(52,29,26,0.2);
    transition: transform .12s ease, box-shadow .12s ease;
}
.lang-switch:hover { transform: translateY(-1px); }
.lang-switch:active { transform: translateY(2px); box-shadow: 0 1px 0 0 rgba(52,29,26,0.2); }

.primary-nav {
    position: relative;
    max-width: var(--max-width);
    margin: 16px auto 0;
    padding: 0 24px;
    z-index: 2;
}
.primary-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}
.primary-nav a {
    font-family: var(--font-retro);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--brown);
    text-decoration: none;
    text-transform: uppercase;
    padding: 6px 4px;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.primary-nav a:hover { color: var(--red); border-color: var(--red); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: linear-gradient(180deg, var(--yellow) 0%, var(--yellow-deep) 100%);
    overflow: hidden;
    min-height: 680px;
    padding: 40px 0 260px;
}

.hero-content {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
    z-index: 2;
}

.games {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
    margin-top: 40px;
}

/* ---------- Game cards ---------- */
.game-card {
    position: relative;
    width: min(560px, 94%);
    min-height: 150px;
    background: var(--card-brown);
    border-radius: 22px;
    padding: 24px 26px 24px 186px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    box-shadow:
      0 10px 0 rgba(0,0,0,0.22),
      0 24px 40px rgba(0,0,0,0.18);
    color: var(--white);
    margin-top: 24px;
    isolation: isolate;
}

/* "Total online:" pill that hangs off the top-right of the card */
.game-card__tab {
    position: absolute;
    top: -14px;
    right: 40px;
    background: var(--card-brown);
    color: var(--white);
    font-family: var(--font-retro);
    font-size: 9px;
    letter-spacing: .5px;
    padding: 8px 18px 10px;
    border-radius: 8px 8px 6px 6px;
    text-transform: none;
    white-space: nowrap;
    z-index: 3;
}
.game-card__tab b { font-weight: normal; }
.game-card__tab::before,
.game-card__tab::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 100% 0, transparent 14px, var(--card-brown) 14.5px);
}
.game-card__tab::before { left: -14px; transform: scaleX(-1); }
.game-card__tab::after  { right: -14px; }

/* Yellow rounded art box that sits INSIDE the brown card on the left */
.game-card__art {
    position: absolute;
    left: 12px;
    top: -20px;
    bottom: 6px;
    width: 164px;
    background: var(--yellow);
    border-radius: 18px;
    overflow: visible;
    z-index: 2;
    box-shadow: inset 0 -6px 0 rgba(0,0,0,0.04);
}

.game-card__char {
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 160%;
    height: auto;
    max-width: none;
    transform: translateX(-52%);
    filter: drop-shadow(0 6px 8px rgba(0,0,0,0.22));
    pointer-events: none;
}

/* lotto character has a coloured background baked into the PNG; mask it out */
.game-card__char--lotto {
    width: 108%;
    transform: translateX(-50%);
    -webkit-mask-image: radial-gradient(ellipse 58% 56% at 50% 44%, #000 60%, rgba(0,0,0,.9) 70%, transparent 86%);
            mask-image: radial-gradient(ellipse 58% 56% at 50% 44%, #000 60%, rgba(0,0,0,.9) 70%, transparent 86%);
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
}

/* The three 777 cards overlay on top of the SLOTS character */
.game-card__dice {
    position: absolute;
    width: 62px;
    height: auto;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.25));
    z-index: 3;
}
.game-card__dice--1 { left: -24px;  bottom: 4px;  transform: rotate(-10deg); }
.game-card__dice--2 { left: 24px;   bottom: 10px; transform: rotate(12deg); width: 62px; }
.game-card__dice--3 { left: 74px;   bottom: -6px; transform: rotate(29deg); width: 76px; }

/* Lotto balls */
.game-card__balls {
    position: absolute;
    left: -28px;
    bottom: -24px;
    width: 110px;
    height: auto;
    z-index: 3;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.22));
}

.game-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.game-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(26px, 3.4vw, 34px);
    line-height: 1;
    color: var(--orange);
    letter-spacing: 1px;
    text-shadow: 0 3px 0 rgba(255, 168, 38, 0.25);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}
.game-card__meta {
    margin: 0;
    font-family: var(--font-brand);
    font-size: 15px;
    color: #EDEDED;
    letter-spacing: .5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card__play {
    width: 66px; height: 56px;
    border-radius: 14px;
    background: var(--blue);
    border: 2px solid var(--brown);
    box-shadow: 0 5px 0 0 var(--shadow-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease;
    justify-self: end;
    flex-shrink: 0;
}
.game-card__play img { width: 20px; height: auto; }
.game-card__play:hover { transform: translateY(-1px); box-shadow: 0 6px 0 0 var(--shadow-blue); }
.game-card__play:active { transform: translateY(4px); box-shadow: 0 1px 0 0 var(--shadow-blue); }
.game-card__play--small { width: 58px; height: 46px; }

/* ---------- Decorative floating items ---------- */
.decor {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.12));
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-8px) rotate(3deg); }
}
.decor-coin-left { left: 2%;  top: 18%; width: 60px; background: url('/images/coin.svg') center/contain no-repeat; aspect-ratio: 1; animation-delay: .1s; }
.decor-smiley    { left: 3%;  top: 52%; width: 72px; background: url('/images/dsa-smiley.svg') center/contain no-repeat; aspect-ratio: 1; animation-delay: .8s; }
.decor-cherry    { left: 5%;  top: 72%; width: 80px; background: url('/images/decorations/cherry-small.svg') center/contain no-repeat; aspect-ratio: 1; animation-delay: 1.2s; }
.decor-lemon     { right: 4%; top: 72%; width: 70px; background: url('/images/decorations/lemon.svg') center/contain no-repeat; aspect-ratio: 1; animation-delay: 1.6s; }
.decor-crystal   { right: 3%; top: 40%; width: 60px; background: url('/images/decorations/diamond.svg') center/contain no-repeat; aspect-ratio: 1; animation-delay: .5s; }
.decor-7         { right: 8%; top: 18%; width: 46px; background: url('/images/decorations/small-coin.svg') center/contain no-repeat; aspect-ratio: 1; animation-delay: 2s; }
.decor-crown     { left: 48%; top: 8%;  width: 34px; background: url('/images/decorations/smiley-coin.svg') center/contain no-repeat; aspect-ratio: 1; animation-delay: 2.4s; }
.decor-coin-center { left: 49%; top: 38%; width: 40px; background: url('/images/coin.svg') center/contain no-repeat; aspect-ratio: 1; animation-delay: 1.8s; }

/* ---------- Cityline ---------- */
.cityline {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 260px;
    pointer-events: none;
    z-index: 1;
}
.cityline .city {
    position: absolute;
    left: 50%; bottom: 0;
    transform: translateX(-50%);
    width: min(1800px, 120%);
    max-width: none;
    opacity: 0.85;
}
.cityline .clouds {
    position: absolute;
    bottom: 0;
    width: min(500px, 35%);
    height: auto;
    opacity: 0.95;
}
.cityline .clouds-left  { left: -6%; }
.cityline .clouds-right { right: -8%; }

/* ---------- Sections ---------- */
.section {
    padding: 96px 24px;
    background: var(--cream);
    color: var(--brown);
}
.section-alt { background: #FFEFBF; }
.section-dark {
    background: var(--dark-bg);
    color: var(--cream);
}
.section-dark a { color: var(--orange); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}
.container--narrow { max-width: 760px; }
.container--split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 48px;
}

.section-head {
    text-align: center;
    margin-bottom: 56px;
}
.section h2 {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.05;
    margin: 0 0 16px;
    color: var(--brown);
    letter-spacing: .5px;
}
.section-dark h2 { color: var(--white); }
.section p { font-size: 17px; max-width: 58ch; margin-inline: auto; }
.container--split p { margin-inline: 0; }

.eyebrow {
    display: inline-block;
    font-family: var(--font-retro);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--red);
    text-transform: uppercase;
    margin: 0 0 12px;
}
.eyebrow--light { color: var(--orange); }

.lede { font-size: 19px; }

/* Promo grid */
.promo-grid {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}
.promo-card {
    background: var(--white);
    border: 2px solid var(--brown);
    border-radius: 20px;
    padding: 26px 22px;
    box-shadow: 0 8px 0 0 rgba(52,29,26,0.15);
    transition: transform .15s ease, box-shadow .15s ease;
}
.promo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 0 0 rgba(52,29,26,0.15);
}
.promo-icon {
    display: inline-flex;
    width: 62px; height: 62px;
    background: var(--yellow);
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border: 2px solid var(--brown);
}
.promo-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    margin: 0 0 8px;
    letter-spacing: .5px;
}
.promo-card p { margin: 0; font-size: 15.5px; }

/* Feature list */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: grid;
    gap: 10px;
}
.feature-list li {
    padding-left: 28px;
    position: relative;
    font-size: 16px;
}
.feature-list li::before {
    content: "";
    position: absolute;
    left: 0; top: .4em;
    width: 18px; height: 18px;
    background: url('/images/coin.svg') center/contain no-repeat;
}

/* Feature grid */
.feature-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}
.feature-card {
    background: var(--cream);
    border: 2px solid var(--brown);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 6px 0 0 rgba(52,29,26,0.12);
}
.feature-card h3 {
    font-family: var(--font-brand);
    font-size: 18px;
    margin: 0 0 8px;
    color: var(--red);
    letter-spacing: .5px;
}
.feature-card p { margin: 0; font-size: 15px; }

/* About art */
.about-art {
    display: grid;
    place-items: center;
}
.about-art__frame {
    width: 320px; max-width: 100%;
    aspect-ratio: 320/260;
    background: var(--yellow);
    border: 3px solid var(--brown);
    border-radius: 28px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 0 0 rgba(52,29,26,0.2);
    overflow: hidden;
}
.about-art__frame img {
    width: 86%;
    height: auto;
    filter: drop-shadow(0 8px 10px rgba(0,0,0,0.2));
}

/* FAQ */
.faq {
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
}
.faq details {
    background: var(--white);
    border: 2px solid var(--brown);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 5px 0 0 rgba(52,29,26,0.1);
}
.faq summary {
    font-family: var(--font-brand);
    font-size: 17px;
    letter-spacing: .3px;
    cursor: pointer;
    list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "＋";
    font-family: var(--font-brand);
    color: var(--red);
    transition: transform .2s;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; font-size: 16px; }

.tiny {
    font-size: 13px;
    opacity: 0.75;
    margin-top: 18px;
}

/* Footer */
.site-footer {
    background: var(--brown);
    color: var(--cream);
    padding: 64px 24px 28px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer-logo {
    width: 120px;
    margin-bottom: 16px;
    filter: drop-shadow(0 3px 0 rgba(0,0,0,0.3));
}
.footer-tag { font-size: 14.5px; max-width: 40ch; margin: 0; opacity: .85; }
.site-footer h3 {
    font-family: var(--font-brand);
    font-size: 14px;
    letter-spacing: 1.5px;
    color: var(--orange);
    text-transform: uppercase;
    margin: 0 0 14px;
}
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a {
    color: var(--cream);
    text-decoration: none;
    font-size: 15px;
    opacity: .85;
    transition: opacity .12s, color .12s;
}
.site-footer a:hover { opacity: 1; color: var(--orange); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    margin-top: 40px;
    font-size: 13.5px;
    opacity: .7;
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .header-inner {
        grid-template-columns: auto auto;
        grid-template-areas:
            "logo right"
            "center center";
        row-gap: 14px;
    }
    .logo { grid-area: logo; }
    .header-center { grid-area: center; }
    .header-right { grid-area: right; }

    .container--split { grid-template-columns: 1fr; }
    .about-art { order: -1; }

    .footer-grid { grid-template-columns: 1fr 1fr; }

    .section { padding: 72px 24px; }
    .hero { padding-bottom: 220px; }
}

@media (max-width: 640px) {
    .game-card {
        padding: 130px 18px 22px;
        grid-template-columns: 1fr auto;
        text-align: left;
        margin-top: 70px;
    }
    .game-card__art {
        left: 50%;
        top: -70px;
        bottom: auto;
        height: 148px;
        width: 160px;
        transform: translateX(-50%);
    }
    .game-card__tab { right: 16px; }
    .game-card__title { font-size: 26px; }
    .game-card__balls { left: -20px; bottom: -18px; width: 84px; }
    .game-card__dice--1 { left: -20px; }
    .game-card__dice--3 { left: 70px; }

    .account-actions { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .btn { padding: 10px 16px; min-height: 46px; font-size: 16px; box-shadow: 0 5px 0 0 var(--shadow-blue); }

    .primary-nav ul { gap: 16px; }
    .primary-nav a { font-size: 10px; }

    .decor { transform: scale(.75); }
    .cityline { height: 180px; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .decor { animation: none; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
