:root {
    --primary-dark: #163A24;
    --primary-green: #2F7D32;
    --accent-lime: #7AC943;
    --accent-yellow: #FFD93D;
    --accent-coral: #FF7043;
    --accent-blue: #42C8F5;
    --light-background: #FFF9E8;
    --card-background: #FFFFFF;
    --dark-background: #163A24;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    background-color: var(--light-background);
    color: var(--primary-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Fredoka', cursive, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: inherit;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h3 {
    font-size: clamp(1.35rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a,
a:hover,
a:focus {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-lime);
    outline-offset: 2px;
}

button {
    font-family: 'Fredoka', cursive, sans-serif;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

img,
svg,
video,
iframe {
    display: block;
    max-width: 100%;
}

.cookie-consent-banner-wrapper {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: var(--primary-dark);
    color: #FFFFFF;
    padding: 1rem 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.cookie-consent-modal-wrapper {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background-color: rgba(22, 58, 36, 0.75);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.85rem;
        word-break: break-word;
    }

    h2 {
        font-size: 1.5rem;
        word-break: break-word;
    }

    h3 {
        font-size: 1.25rem;
        word-break: break-word;
    }

    h4,
    h5,
    h6 {
        font-size: 1.1rem;
        word-break: break-word;
    }

    a[href^="mailto:"],
    a[href^="tel:"],
    .break-words-mobile {
        font-size: 0.9rem;
        word-break: break-all;
    }
}

/* ===== header ===== */
#header {
    overflow: hidden;
}

/* Keep the play CTA balanced with the logo and menu on narrow screens. */
@media (max-width: 767px) {
    #header nav {
        height: 4.5rem;
        gap: 0.5rem;
    }

    #header nav > a:first-child {
        min-width: 0;
        gap: 0.5rem;
    }

    #header nav > a:first-child span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #header a[href$="#play"] {
        gap: 0.35rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        line-height: 1.1;
        white-space: nowrap;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    }

    #header a[href$="#play"] i {
        font-size: 0.65rem;
    }

    #header .js-mobile-toggle {
        padding: 0.5rem;
        flex-shrink: 0;
    }
}

.js-mobile-menu.open {
    display: block !important;
}

/* ===== hero_section ===== */
#hero {
    overflow: hidden;
}

#hero a {
    text-decoration: none;
}

/* ===== game_iframe_section ===== */
.game-iframe-section {
    width: 100%;
    box-sizing: border-box;
    hyphens: auto
}

.game-iframe-section iframe {
    width: 100%;
    height: 100%
}

/* ===== how_to_play_section ===== */
#how-to-play {
    overflow: hidden;
    hyphens: auto;
    width: 100%;
}

.js-step-card {
    width: 100%;
    box-sizing: border-box;
}

/* ===== features_section ===== */
#features {
    hyphens: auto;
}

#features h2,
#features h3 {
    line-height: 1.25;
}

/* ===== challenges_section ===== */
#challenges {
    background-color: #163A24;
    overflow: hidden;
    position: relative
}

#challenges .js-scroll-cta {
    cursor: pointer;
    text-decoration: none;
    transition: all .3s ease
}

/* ===== tips_section ===== */
#tips {
    overflow: hidden;
}

#tips .tips-card {
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    hyphens: auto;
}

#tips .tips-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.4);
}

/* ===== why_play_section ===== */
#why-play {
    hyphens: auto;
}

#why-play .js-scroll-link,
#why-play .js-scroll-link:hover,
#why-play .js-scroll-link:focus {
    color: #FFFFFF;
}

/* Legal pages use one clear document card instead of nested frames. */
.legal-content-container {
    max-width: 72rem;
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.legal-content-container > div {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.legal-content-container > div > section {
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.legal-content-container > div > section > div {
    max-width: 64rem;
}

@media (max-width: 640px) {
    .legal-content-container {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .legal-content-container > div > section > div > div {
        padding: 1.25rem !important;
        border-radius: 1.25rem !important;
    }
}

/* ===== faq_section ===== */
#faq {
    overflow: hidden;
}

#faq .js-faq-item.is-open {
    border-color: rgba(47, 125, 50, 0.4);
    box-shadow: 0 10px 25px -5px rgba(22, 58, 36, 0.08);
}

#faq .js-faq-item.is-open .js-faq-icon {
    transform: rotate(180deg);
    background-color: #2F7D32;
    color: #FFFFFF;
}

/* ===== final_cta_section ===== */
#final-cta {
    overflow: hidden;
}

#final-cta .js-cta-button {
    text-decoration: none;
}

/* ===== footer ===== */
#footer {
    width: 100%;
    box-sizing: border-box;
}

#footer a {
    text-decoration: none;
}
