/* =========================================
   FOLLOW SANTA ONLINE
   Magical Christmas Storybook Theme
   ========================================= */

:root {
    --christmas-red: #a91616;
    --christmas-red-dark: #720b0b;
    --christmas-gold: #ffd47b;
    --winter-blue: #102c58;
    --cream: #fff5df;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    background: var(--winter-blue);
    color: var(--white);
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--christmas-gold);
    outline-offset: 4px;
}

/* =========================================
   HEADER
   ========================================= */

.site-header {
    position: relative;
    z-index: 10;
    background: linear-gradient(
        180deg,
        #183b72 0%,
        #0a2349 100%
    );
    border-bottom: 3px solid #d8a34b;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Logo */

.site-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--cream);
    line-height: 0.85;
    text-shadow: 2px 3px 2px #481c0c;
    transform: rotate(-3deg);
}

.logo-small {
    font-size: 19px;
    font-weight: bold;
}

.logo-main {
    font-size: 42px;
    font-weight: bold;
}

/* Navigation */

.main-navigation {
    background: linear-gradient(
        180deg,
        #78401d 0%,
        #51260f 55%,
        #351607 100%
    );
    border: 2px solid #c48a48;
    border-radius: 16px;
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.15),
        0 5px 12px rgba(0,0,0,0.35);
}

.main-navigation ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 7px;
    gap: 4px;
}

.main-navigation a {
    display: block;
    padding: 12px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation a[aria-current="page"] {
    background: linear-gradient(
        180deg,
        #d72b1e,
        #8e0b0b
    );
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Music and Snow Controls */

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

.header-controls button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 4px;
    background: transparent;
    border: none;
    color: var(--white);
    font-family: inherit;
    font-size: 12px;
}

.header-controls button span:first-child {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    font-size: 28px;
    border: 2px solid var(--christmas-gold);
    border-radius: 50%;
    background: var(--christmas-red-dark);
    box-shadow: 0 0 12px rgba(255,211,105,0.4);
}

.header-controls button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Mobile menu will become interactive later */

.mobile-menu-toggle {
    display: none;
    background: var(--christmas-red);
    color: var(--white);
    border: 2px solid var(--christmas-gold);
    border-radius: 8px;
    font-size: 26px;
    padding: 6px 12px;
}

/* =========================================
   HERO
   ========================================= */

.hero {
    min-height: 720px;
    background-image:
        linear-gradient(
            90deg,
            rgba(5, 24, 55, 0.12),
            rgba(5, 24, 55, 0.15)
        ),
        url('/images/north-pole-hero.jpg');

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-overlay {
    min-height: 720px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 80px 30px 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    max-width: 650px;
    text-align: center;
    margin: 0 auto;
    text-shadow: 2px 3px 6px rgba(0,0,0,0.85);
}

.hero-welcome {
    margin: 0 0 12px;
    color: var(--cream);
    font-size: 21px;
    font-weight: bold;
}

.hero h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(38px, 4.5vw, 68px);
    line-height: 1.08;
}

.hero h1 span {
    display: block;
    margin-top: 10px;
    font-size: 0.6em;
    color: var(--christmas-gold);
}

.hero-description {
    max-width: 500px;
    margin: 22px auto 0;
    font-size: 21px;
    line-height: 1.5;
}

/* =========================================
   COUNTDOWN
   ========================================= */

.countdown-panel {
    width: min(100%, 480px);
    padding: 20px 24px;
    text-align: center;
    background: linear-gradient(
        180deg,
        #79421f,
        #48200d
    );
    border: 4px solid #c48a48;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.countdown-panel h2 {
    margin: 0 0 17px;
    color: var(--cream);
    font-size: 25px;
    text-shadow: 1px 2px 3px #271005;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.countdown-item {
    min-width: 0;
}

.countdown-number {
    display: block;
    padding: 13px 4px;
    background: var(--cream);
    border: 2px solid #b98542;
    border-radius: 8px;
    color: #17365e;
    font-size: clamp(24px, 3vw, 37px);
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
}

.countdown-label {
    display: block;
    margin-top: 8px;
    font-size: 13px;
}

.countdown-message {
    margin: 15px 0 0;
    color: var(--christmas-gold);
    font-size: 14px;
}

/* =========================================
   FOOTER
   ========================================= */

.site-footer {
    padding: 22px;
    text-align: center;
    background: linear-gradient(
        180deg,
        #8b1010,
        #570707
    );
    border-top: 3px solid #d8a34b;
    font-size: 14px;
}

.site-footer p {
    margin: 0;
}

/* =========================================
   SNOWFALL EFFECT
   ========================================= */

#snowfall-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* =========================================
   CHRISTMAS MUSIC VOLUME CONTROL
   ========================================= */

.music-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.music-volume {
    width: 75px;
    height: 12px;
    margin: 2px 0;
    cursor: pointer;
    accent-color: var(--christmas-gold);
}

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

/* Keep music and snowfall buttons aligned */

.header-controls {
    align-items: flex-start;
}

.snow-toggle {
    margin-top: 0;
}

/* =========================================
   EXPLORE THE NORTH POLE
   ========================================= */

.explore-section {
    padding: 75px 25px 90px;
    background:
        radial-gradient(
            ellipse at top,
            rgba(64, 117, 172, 0.35),
            transparent 65%
        ),
        linear-gradient(
            180deg,
            #123a6b 0%,
            #092347 100%
        );
    border-top: 4px solid #d8a34b;
}

.explore-container {
    max-width: 1280px;
    margin: 0 auto;
}

.explore-heading {
    max-width: 720px;
    margin: 0 auto 45px;
    text-align: center;
}

.section-eyebrow {
    margin: 0 0 12px;
    color: var(--christmas-gold);
    font-size: 17px;
    font-style: italic;
}

.explore-heading h2 {
    margin: 0 0 15px;
    color: var(--cream);
    font-size: clamp(32px, 4vw, 48px);
    text-shadow: 2px 3px 5px rgba(0,0,0,0.4);
}

.explore-heading > p:last-child {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: #e5edf8;
}

/* Card Grid */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

/* Individual Cards */

.feature-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 3px solid #d5a65b;
    border-radius: 18px;
    background: var(--cream);
    color: #26364a;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

/* Illustration Area */

.feature-art {
    display: grid;
    place-items: center;
    min-height: 170px;
    border-bottom: 3px solid #d5a65b;
}

.feature-art span {
    font-size: 75px;
    filter: drop-shadow(2px 5px 4px rgba(0,0,0,0.2));
}

.feature-art-santa {
    background: linear-gradient(135deg, #b8d8f2, #e5f4ff);
}

.feature-art-chat {
    background: linear-gradient(135deg, #f3c5a6, #ffe9cc);
}

.feature-art-ecards {
    background: linear-gradient(135deg, #e6c4d6, #fff0f3);
}

.feature-art-fun {
    background: linear-gradient(135deg, #b8dfc4, #ecf8dc);
}

/* Card Content */

.feature-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    padding: 25px 18px 28px;
    text-align: center;
}

.feature-content h3 {
    margin: 0 0 15px;
    color: #8d1717;
    font-size: 25px;
}

.feature-content p {
    flex: 1;
    margin: 0 0 25px;
    font-size: 16px;
    line-height: 1.6;
}

.feature-link {
    display: inline-block;
    padding: 12px 19px;
    border: 2px solid #d9a34d;
    border-radius: 25px;
    background: linear-gradient(
        180deg,
        #c62c21,
        #8d1010
    );
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background 0.2s ease;
}

.feature-link:hover,
.feature-link:focus-visible {
    background: linear-gradient(
        180deg,
        #e03a2c,
        #a71919
    );
}

/* Feature card illustrations */

.feature-art img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    object-position: center;
}

/* ==========================================
   Explore Santa's Latest Adventures
========================================== */

.adventures-section {
    width: 100%;
    background: #102b4c;
    
    background-image: url('/images/adventures-bg.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    
    padding: 30px 20px;
}

.adventures-layout {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

/* Left illustration */

.adventures-sign a {
    display: block;
}

.adventures-sign img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Right blog preview */

.adventures-blog {
    min-width: 0;
    background: #fff0d3;
    border: 3px solid #d6ad65;
    border-radius: 12px;
    padding: 24px;
}

.santa-blog-preview {
    color: #3b2517;
}

.santa-blog-preview h2 {
    font-family: Georgia, serif;
    font-size: 1.6rem;
    color: #65331f;
    margin-bottom: 12px;
}

.blog-preview-image {
    display: block;
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
}

.santa-blog-preview h3 {
    font-family: Georgia, serif;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.santa-blog-preview p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.blog-preview-link {
    color: #922525;
    font-weight: bold;
    text-decoration: underline;
}

/* =========================================
   TABLET
   ========================================= */

@media (max-width: 1100px) {

    .header-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-navigation {
        order: 3;
        width: 100%;
    }

    .main-navigation ul {
        justify-content: center;
    }

    .hero-content {
        margin-left: 0 auto;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px;
    }

}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 700px) {

    .header-container {
        padding: 12px 15px;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 10px;
    }

    .logo-small {
        font-size: 13px;
    }

    .logo-main {
        font-size: 30px;
    }

    .main-navigation {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-controls {
        gap: 6px;
    }

    .header-controls button {
        font-size: 10px;
    }

    .header-controls button span:first-child {
        width: 36px;
        height: 36px;
        font-size: 21px;
    }

    .hero,
    .hero-overlay {
        min-height: 680px;
    }

    .hero {
        background-position: 30% center;
    }

    .hero-overlay {
        padding: 50px 15px 35px;
    }

    .hero-content {
        max-width: 100%;
        padding: 18px 12px;
        border-radius: 14px;
        background: rgba(7, 28, 65, 0.55);
    }

    .hero-welcome {
        font-size: 16px;
    }

    .hero h1 {
        font-size: clamp(32px, 8vw, 45px);
    }

    .hero-description {
        font-size: 16px;
        margin-top: 14px;
    }

    .countdown-panel {
        padding: 16px 12px;
    }

    .countdown-panel h2 {
        font-size: 21px;
    }

    .countdown {
        gap: 6px;
    }

    .countdown-number {
        font-size: 25px;
        padding: 11px 2px;
    }

    .countdown-label {
        font-size: 11px;
    }
    
    .music-volume {
        width: 55px;
    }
    
    /* =========================================
       MOBILE NAVIGATION MENU
       ========================================= */
    
    .site-header {
        position: relative;
    }

    .main-navigation.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 12px;
        right: 12px;
        width: auto;
        z-index: 20;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    }

    .main-navigation.is-open ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px;
    }

    .main-navigation.is-open li {
        width: 100%;
    }

    .main-navigation.is-open a {
        display: block;
        padding: 14px 18px;
        text-align: center;
        font-size: 17px;
    }

    .mobile-menu-toggle {
        cursor: pointer;
    }

    .mobile-menu-toggle[aria-expanded="true"] {
        background: var(--christmas-red-dark);
    }
    
    .adventures-layout {
        grid-template-columns: 1fr;
    }

    .adventures-sign img {
        height: auto;
    }

    .adventures-blog {
        padding: 20px;
    }

}

@media (max-width: 380px) {

    .header-container {
        gap: 5px;
    }

    .header-controls button span:first-child {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .logo-main {
        font-size: 26px;
    }

    .countdown-number {
        font-size: 21px;
    }
    
    .music-volume {
        width: 45px;
    }

}

@media (max-width: 600px) {

    .explore-section {
        padding: 55px 18px 65px;
    }

    .explore-heading {
        margin-bottom: 30px;
    }

    .explore-heading > p:last-child {
        font-size: 16px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 22px;
        max-width: 420px;
        margin: 0 auto;
    }

    .feature-art {
        min-height: 150px;
    }

    .feature-content {
        padding: 22px 20px 25px;
    }

}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .feature-card,
    .feature-link {
        transition: none;
    }

    .feature-card:hover {
        transform: none;
    }
}
