@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;700&display=swap');


:root {
    --bg-color: #E0F7FA;
    --card-bg: #FFFFFF;
    --text-color: #263238;
    --border-color: #37474F;
    --accent-blue: #81D4FA;
    --accent-pink: #F48FB1;
    --accent-yellow: #FFF59D;

    --shadow-distance: 6px;
    --border-width: 3px;
    --radius: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    /* animation: driftBackground 30s infinite linear; */
    background-image:
        radial-gradient(circle at 50% 50%, white 2px, transparent 2.5px),
        radial-gradient(circle at 10% 20%, white 1.5px, transparent 2px);
    background-size: 400px 400px;
    transition: background-position 0.1s ease-out;
}

h1,
h2,
h3,
button {
    font-family: 'Fredoka One', cursive;
}

/* Utilities */
.cartoon-box {
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-distance) var(--shadow-distance) 0px var(--border-color);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cartoon-box:hover {
    transform: translate(-3px, -3px);
    box-shadow: calc(var(--shadow-distance) + 3px) calc(var(--shadow-distance) + 3px) 0px var(--border-color);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
    background: var(--accent-yellow);
}

.btn:active {
    transform: translate(3px, 3px);
    box-shadow: 0px 0px 0px var(--border-color);
}

/* Layout */
header {
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .video-background video {
        /* Cut max 200px from each side implies avoiding excessive zoom */
        /* object-fit: cover usually works best, but to respect constraints we keep it standard */
        /* Users might want to see more of the video, so we ensure centering */
        object-position: center;
    }
}

.title,
.btn {
    position: relative;
    z-index: 1;
}

h1.title {
    font-size: 4rem;
    color: var(--accent-blue);
    -webkit-text-stroke: 2px var(--border-color);
    text-shadow: 4px 4px 0 var(--border-color);
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}



.grid-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-pink);
    -webkit-text-stroke: 1px var(--border-color);
}

.card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    height: 30px;
    background: white;
    border-bottom: 3px solid var(--border-color);
    border-radius: 50%;
    transform: scaleX(1.5);
    z-index: 0;
}

footer {
    text-align: center;
    padding: 3rem;
    margin-top: 4rem;
    background: white;
    border-top: var(--border-width) solid var(--border-color);
    position: relative;
    z-index: 10;
}

/* Snow Container */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Animations */
@keyframes bounce {

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

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

@keyframes driftBackground {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 400px 400px;
    }
}

/* Train Section */
.train-section {
    position: relative;
    height: 80vh;
    /* Increased height for view */
    background-image: url('bg.png');
    background-size: cover;
    background-position: center bottom;
    overflow: hidden;
    margin-top: 4rem;
    border-top: var(--border-width) solid var(--border-color);
}

.train-title {
    position: absolute;
    top: 2rem;
    width: 100%;
    text-align: center;
    font-size: 4rem;
    color: var(--accent-yellow);
    z-index: 10;
    -webkit-text-stroke: 2px var(--border-color);
    text-shadow: 4px 4px 0 var(--border-color);
    animation: bounce 3s infinite ease-in-out;
}

/* Bridge */
.bridge {
    position: absolute;
    bottom: -10px;
    /* Slight overlap */
    width: 100%;
    height: 300px;
    /* Adjust based on bridge height needed */
    background-image: url('bridge.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    z-index: 1;
}

/* Tracks */
.tracks {
    position: absolute;
    bottom: 280px;
    width: 100%;
    height: 64px;
    /* Adjust based on image height */
    z-index: 2;
    background-image: url('track.png');
    background-repeat: repeat-x;
    background-size: contain;
}

/* Train */
.train-container {
    position: absolute;
    bottom: 280px;
    /* Aligned with track */
    left: -300px;
    width: 300px;
    /* Adjust based on image aspect ratio */
    height: auto;
    z-index: 5;
}

.train-image {
    width: 100%;
    height: auto;
    filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.3));
}