/* ================================================================
   MENGXI TIMES - MAGICAL STORYBOOK JOURNEY
   Landing Page Specific Styles
   ================================================================ */

:root {
    /* Unified Color Palette - Soft, Warm, Playful */
    --sky-light: #E8F4FC;
    --sky-mid: #B8E0F7;
    --sky-deep: #7EC8E3;

    --grass-light: #C8E6C9;
    --grass-mid: #81C784;
    --grass-deep: #4CAF50;

    --sunset-yellow: #FFF9C4;
    --sunset-peach: #FFCCBC;
    --sunset-pink: #F8BBD9;

    --magic-purple: #CE93D8;
    --magic-lavender: #E1BEE7;
    --magic-deep: #9C27B0;

    --earth-brown: #A1887F;
    --door-wood: #8D6E63;
    --door-dark: #5D4037;

    --cream: #FFFDE7;
    --white: #FFFFFF;
    --text-dark: #37474F;
    --text-soft: #607D8B;
}

/* Base Overrides for Landing Page */
body {
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
    background: var(--sky-light);
    color: var(--text-dark);
    position: relative;
    /* Reset from generic style.css if needed */
    margin: 0;
    padding: 0;
}

/* Visual continuity: blurred background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('https://assets.codepen.io/204808/hobitton.jpg') center center/cover no-repeat;
    opacity: 0.05;
    filter: blur(4px);
    z-index: 0;
    pointer-events: none;
}

/* Hide scrollbar for cleaner experience */
body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: var(--sky-light);
}

body::-webkit-scrollbar-thumb {
    background: var(--magic-lavender);
    border-radius: 4px;
}

/* ================================================================
   SCENE 1: THE MEADOW - Welcoming Hillside with Magic Door
   ================================================================ */
.scene-meadow {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background: linear-gradient(180deg,
            var(--sky-light) 0%,
            var(--sky-mid) 40%,
            var(--sky-mid) 100%);
    overflow: hidden;
    z-index: 1;
}

/* Animated clouds */
.cloud {
    position: absolute;
    background: var(--white);
    border-radius: 100px;
    opacity: 0.9;
    filter: blur(1px);
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud-1 {
    width: 120px;
    height: 40px;
    top: 8%;
    left: 10%;
    animation: cloud-drift 25s linear infinite;
}

.cloud-1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 20px;
}

.cloud-1::after {
    width: 35px;
    height: 35px;
    top: -15px;
    left: 55px;
}

.cloud-2 {
    width: 150px;
    height: 45px;
    top: 15%;
    right: 15%;
    animation: cloud-drift 30s linear infinite reverse;
}

.cloud-2::before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 25px;
}

.cloud-2::after {
    width: 45px;
    height: 45px;
    top: -20px;
    left: 75px;
}

.cloud-3 {
    width: 100px;
    height: 35px;
    top: 5%;
    left: 50%;
    animation: cloud-drift 20s linear infinite;
}

.cloud-3::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 15px;
}

.cloud-3::after {
    width: 30px;
    height: 30px;
    top: -12px;
    left: 50px;
}

@keyframes cloud-drift {
    0% {
        transform: translateX(-100px);
    }

    100% {
        transform: translateX(100vw);
    }
}

/* Sun */
.sun {
    position: absolute;
    top: 5%;
    right: 10%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle,
            var(--sunset-yellow) 0%,
            var(--sunset-peach) 70%,
            transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 60px 20px rgba(255, 249, 196, 0.5);
    animation: sun-glow 4s ease-in-out infinite;
}

@keyframes sun-glow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Rolling hills */
.hills {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
}

.hill {
    position: absolute;
    bottom: 0;
    border-radius: 50% 50% 0 0;
}

.hill-back {
    width: 120%;
    height: 50%;
    left: -10%;
    background: linear-gradient(180deg, var(--grass-light) 0%, var(--grass-mid) 100%);
}

.hill-mid {
    width: 80%;
    height: 45%;
    left: 30%;
    background: linear-gradient(180deg, var(--grass-mid) 0%, var(--grass-deep) 100%);
}

.hill-front {
    width: 100%;
    height: 55%;
    left: -20%;
    background: linear-gradient(180deg, var(--grass-mid) 0%, var(--grass-deep) 100%);
}

/* Flowers */
.flower {
    position: absolute;
    font-size: 1.2rem;
    animation: flower-sway 3s ease-in-out infinite;
}

@keyframes flower-sway {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

/* The Magic Door */
.magic-door-area {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.door-frame {
    position: relative;
    width: 180px;
    height: 220px;
}

.door-mound {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 140px;
    background: linear-gradient(180deg,
            var(--grass-mid) 0%,
            var(--grass-deep) 50%,
            var(--earth-brown) 100%);
    border-radius: 50% 50% 0 0;
    z-index: -1;
}

.round-door {
    position: relative;
    width: 160px;
    height: 200px;
    margin: 0 auto;
    background: linear-gradient(135deg,
            var(--door-wood) 0%,
            var(--door-dark) 100%);
    border-radius: 80px 80px 10px 10px;
    border: 8px solid var(--door-dark);
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.door-plank {
    position: absolute;
    width: 2px;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
}

.door-plank:nth-child(1) {
    left: 25%;
}

.door-plank:nth-child(2) {
    left: 50%;
}

.door-plank:nth-child(3) {
    left: 75%;
}

.door-window {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle,
            var(--magic-lavender) 0%,
            var(--magic-purple) 50%,
            var(--magic-deep) 100%);
    border-radius: 50%;
    border: 6px solid var(--door-dark);
    box-shadow:
        0 0 20px var(--magic-purple),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: portal-glow 2s ease-in-out infinite;
}

@keyframes portal-glow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--magic-purple), inset 0 0 20px rgba(255, 255, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 40px var(--magic-purple), inset 0 0 30px rgba(255, 255, 255, 0.5);
    }
}

.door-handle {
    position: absolute;
    right: 25px;
    top: 55%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #FFD700 0%, #FFA000 100%);
    border-radius: 50%;
    border: 2px solid #FF8F00;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.brand-sign {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
    z-index: 11;
}

.brand-sign h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-dark);
    text-shadow:
        2px 2px 0 var(--white),
        -1px -1px 0 var(--white);
    letter-spacing: 1px;
}

.brand-sign p {
    font-size: 1rem;
    color: var(--text-soft);
    font-weight: 600;
}

.character {
    position: absolute;
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.2));
    animation: character-bounce 2s ease-in-out infinite;
}

.char-bunny {
    bottom: 100px;
    left: -60px;
    animation-delay: 0s;
}

.char-bird {
    top: -30px;
    right: -40px;
    animation-delay: 0.5s;
}

.char-butterfly {
    top: 50px;
    left: -50px;
    animation-delay: 1s;
}

@keyframes character-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.scroll-invite {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 20;
}

.scroll-invite p {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 3px solid var(--magic-purple);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    margin: 0 auto;
    animation: arrow-bounce 1.5s ease-in-out infinite;
}

@keyframes arrow-bounce {

    0%,
    100% {
        transform: rotate(45deg) translate(0, 0);
        opacity: 1;
    }

    50% {
        transform: rotate(45deg) translate(5px, 5px);
        opacity: 0.5;
    }
}

/* ================================================================
   SCENE 2: THE TUNNEL
   ================================================================ */
.scene-tunnel {
    position: relative;
    height: 250vh;
    background: linear-gradient(180deg,
            var(--grass-deep) 0%,
            var(--magic-purple) 5%,
            var(--magic-deep) 20%,
            #4A148C 50%,
            #311B92 70%,
            var(--magic-deep) 85%,
            var(--magic-lavender) 95%,
            var(--sunset-yellow) 100%);
    overflow: hidden;
}

.tunnel-content {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.tunnel-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.ring:nth-child(1) {
    width: 90vmin;
    height: 90vmin;
}

.ring:nth-child(2) {
    width: 75vmin;
    height: 75vmin;
    border-color: rgba(255, 255, 255, 0.2);
}

.ring:nth-child(3) {
    width: 60vmin;
    height: 60vmin;
    border-color: rgba(255, 255, 255, 0.25);
}

.ring:nth-child(4) {
    width: 45vmin;
    height: 45vmin;
    border-color: rgba(255, 255, 255, 0.3);
}

.ring:nth-child(5) {
    width: 30vmin;
    height: 30vmin;
    border-color: rgba(255, 255, 255, 0.35);
}

.ring:nth-child(6) {
    width: 15vmin;
    height: 15vmin;
    border-color: rgba(255, 255, 255, 0.4);
}

.float-item {
    position: absolute;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    opacity: 0;
    transform: scale(0.8);
}

.float-item .icon {
    font-size: 1.8rem;
}

.item-books {
    border-left: 4px solid var(--sky-deep);
}

.item-abc {
    border-left: 4px solid var(--sunset-peach);
}

.item-123 {
    border-left: 4px solid var(--grass-mid);
}

.item-art {
    border-left: 4px solid var(--sunset-pink);
}

.item-music {
    border-left: 4px solid var(--magic-purple);
}

.item-play {
    border-left: 4px solid var(--sunset-yellow);
}

.item-love {
    border-left: 4px solid var(--sunset-pink);
}

.item-star {
    border-left: 4px solid var(--sunset-yellow);
}

.tunnel-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    opacity: 0;
    z-index: 10;
}

.tunnel-message h2 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px var(--magic-purple);
}

.tunnel-message p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    opacity: 0.9;
}

.tunnel-end-light {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle,
            var(--sunset-yellow) 0%,
            var(--cream) 40%,
            transparent 70%);
    border-radius: 50%;
    opacity: 0;
}

/* ================================================================
   SCENE 3: THE LANDING
   ================================================================ */
.scene-landing {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(180deg,
            var(--sunset-yellow) 0%,
            var(--cream) 20%,
            var(--white) 100%);
    overflow: hidden;
    padding-top: 80px;
    z-index: 1;
}

.landing-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.rainbow-arc {
    position: absolute;
    top: -300px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    border-radius: 300px 300px 0 0;
    border: 30px solid transparent;
    border-top-color: #EF5350;
    box-shadow:
        0 -30px 0 #FF9800,
        0 -60px 0 #FFEB3B,
        0 -90px 0 #4CAF50,
        0 -120px 0 #2196F3,
        0 -150px 0 #9C27B0;
    opacity: 0.6;
}

.welcome-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(40px);
}

.welcome-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--magic-lavender), var(--sunset-pink));
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.welcome-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.2;
}

.welcome-title .highlight {
    background: linear-gradient(135deg, var(--grass-mid), var(--sky-deep));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-soft);
    font-weight: 600;
    max-width: 500px;
    margin: 0 auto;
}

.mascot-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    font-size: 3rem;
}

.mascot {
    animation: mascot-wave 1s ease-in-out infinite;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
}

.mascot:nth-child(2) {
    animation-delay: 0.2s;
}

.mascot:nth-child(3) {
    animation-delay: 0.4s;
}

.mascot:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes mascot-wave {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* ================================================================
   MAIN CONTENT SECTION
   ================================================================ */
.main-content {
    background: var(--white);
    padding: 0 20px 60px;
    position: relative;
}

/* Philosophy card */
.philosophy-card {
    max-width: 800px;
    margin: -40px auto 50px;
    background: linear-gradient(135deg, var(--cream), var(--white));
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--sunset-peach);
    position: relative;
    z-index: 10;
}

.philosophy-card .card-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
}

.philosophy-card p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: center;
}

.philosophy-card .source {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-top: 15px;
    font-style: italic;
}

/* Section header */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--text-dark);
}

/* Age cards grid */
.age-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.age-card {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.age-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--grass-mid), var(--sky-deep));
    opacity: 0;
    transition: opacity 0.3s;
}

.age-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border-color: var(--grass-light);
}

.age-card:hover::before {
    opacity: 1;
}

.age-card .icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.age-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.age-card .subtitle {
    font-size: 0.9rem;
    color: var(--grass-deep);
    font-weight: 700;
    margin-bottom: 8px;
}

.age-card .desc {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.5;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    background: linear-gradient(180deg, var(--grass-light), var(--grass-mid));
    padding: 50px 20px 30px;
    color: var(--text-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto 40px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.footer-col a {
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 5px 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-bottom p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 5px 0;
}

/* ================================================================
   HEADER (Fixed)
   ================================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 12px 20px;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
}

.site-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

/* Nav links */
.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--grass-deep);
}

/* Language toggle */
.lang-toggle {
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 5px 12px;
    border: 2px solid var(--grass-mid);
    background: transparent;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--grass-mid);
    color: white;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .door-frame {
        width: 140px;
        height: 170px;
    }

    .round-door {
        width: 130px;
        height: 160px;
    }

    .door-window {
        width: 60px;
        height: 60px;
        top: 25px;
    }

    .door-mound {
        width: 220px;
        height: 110px;
    }

    .brand-sign h1 {
        font-size: 1.4rem;
    }

    .float-item {
        padding: 10px;
        font-size: 0.8rem;
    }

    .float-item .icon {
        font-size: 1.4rem;
    }

    .philosophy-card {
        margin: -20px 15px 40px;
        padding: 20px;
    }

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

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}