:root {
    --bg-paper: #f6f0e6;
    --panel-white: rgba(255, 255, 255, 0.85); /* UNUSED now */
    --black: #ff0000;
    --comic-white: #ffffff;
    --rage-yellow: #ff0c0c;
    --outline: 4px solid var(--black);
    --shadow: 4px 4px 0 var(--black);
    --radius: 16px;
    --gap: 24px;
    --mobile-padding: 20px;
    --stroke: 2px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
/* Gallery */
#gallery {
    background: transparent !important;
    backdrop-filter: none !important;
    border-top: none !important;   /* removed top border */
    border-bottom: none !important; /* removed bottom border */
}

body {
    font-family: 'Comic Neue', cursive;
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    background: none !important; /* Remove direct gif */
}
/* FULL-PAGE BLURRED BACKGROUND */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, #87ceeb, #ffffff);
    background-size: cover;
    filter: blur(6px) brightness(1.05);
    z-index: -2;
}

/* Cartoon text helpers */
.comic-title {
    color: var(--comic-white);
    -webkit-text-stroke: var(--stroke) var(--black);
    text-transform: uppercase;
    font-weight: 900;
    font-family: 'Bangers', cursive;
}
.comic-ink {
    color: var(--black);
    -webkit-text-stroke: 0.5px var(--black);
    font-weight: 700;
    font-family: 'Poppins', sans-serif; /* Premium font mix */
}
.comic-outline-white {
    color: var(--comic-white);
    -webkit-text-stroke: var(--stroke) var(--black);
    font-weight: 900;
}
h1, h2, h3, h4 {
    font-family: 'Bangers', cursive;
    letter-spacing: 1.2px;
    margin: 0;
}
/* Header - Glassy */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.7); /* Glassy */
    backdrop-filter: blur(10px);
    border-bottom: var(--outline);
    padding: var(--mobile-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: background 0.3s ease; /* Smoother hover/transitions */
}
header .logo img {
    height: 60px;
    border: 6px solid var(--black);
    border-radius: 10px;
    background: var(--panel-white);
    padding: 8px;
    object-fit: contain;
    transform: rotate(-4deg);
    transition: transform 0.3s ease;
}
header .logo img:hover {
    transform: rotate(0deg) scale(1.05);
}
.menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--black);
    transition: transform 0.3s ease;
}
.menu-toggle:hover {
    transform: scale(1.1);
}
nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: var(--outline);
    flex-direction: column;
}
nav.active {
    display: flex;
}
nav a {
    color: var(--black);
    font-family: 'Bangers', cursive;
    font-size: 1.3rem;
    padding: 16px var(--mobile-padding);
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: background 0.3s ease, color 0.3s ease;
}
nav a:hover {
    background: var(--rage-yellow);
    color: var(--black);
}
@media (min-width: 768px) {
    header {
        padding: 16px 5%;
    }
    header .logo img {
        height: 70px;
    }
    .menu-toggle {
        display: none;
    }
    nav {
        display: flex;
        position: static;
        flex-direction: row;
        border: none;
        gap: 24px;
        background: transparent;
        backdrop-filter: none;
    }
    nav a {
        font-size: 1.4rem;
        padding: 8px 16px;
        border: none;
        border-radius: 6px;
    }
    nav a:hover {
        background: var(--rage-yellow);
        color: var(--black);
    }
}
/* Hero */
.hero {
    height: 100vh;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 var(--mobile-padding);
    margin-top: 120px;
    overflow: hidden;
    background: transparent !important;
    backdrop-filter: none !important;
}
.hero-canvas {
    position: absolute;
    inset: 0;
    z-index: -2;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent !important;
    z-index: -1;
}
.hero img#main-logo {
    max-width: 78%;
    height: auto;
    max-height: 42vh;
    border: var(--outline);
    border-radius: 12px;
    margin-bottom: 20px;
    background: var(--panel-white);
    padding: 8px;
    transform: rotate(-4deg) translateY(-4px);
    box-shadow: var(--shadow);
    object-fit: contain;
    transition: transform 0.4s ease;
}
.hero img#main-logo:hover {
    transform: rotate(0deg) translateY(0) scale(1.05);
}
.hero h1 {
    font-size: clamp(2.4rem, 8vw, 5rem);
    color: var(--comic-white);
    -webkit-text-stroke: var(--stroke) var(--black);
    margin: 12px 0;
}
.hero p {
    font-size: clamp(1.1rem, 3.5vw, 1.6rem);
    max-width: 90%;
    margin: 8px auto;
    font-weight: 700;
    color: var(--black);
    -webkit-text-stroke: 0.8px var(--black);
}
.hero button {
    background: var(--panel-white);
    color: var(--black);
    border: var(--outline);
    padding: 12px 28px;
    font-family: 'Bangers', cursive;
    font-size: clamp(1rem, 2.6vw, 1.4rem);
    cursor: pointer;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
    margin-top: 18px;
}
.hero button:hover {
    transform: translateY(-3px);
    box-shadow: 6px 6px 0 var(--black);
}
/* CA box */
.copy-box {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent !important;
    backdrop-filter: none !important;
    border: var(--outline);
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-family: 'Comic Neue', cursive;
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}
.copy-box:hover {
    transform: scale(1.02);
}
.copy-text {
    font-weight: 700;
    letter-spacing: 0.6px;
    word-break: break-all;
    max-width: 80vw;
}
.copy-btn {
    border: none;
    padding: 8px 12px;
    background: var(--black);
    color: var(--comic-white);
    font-weight: 900;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 3px 3px 0 var(--black);
    transition: background 0.3s ease;
}
.copy-btn:hover {
    background: var(--rage-yellow);
    color: var(--black);
}
/* Sections */
section {
    padding: 90px var(--mobile-padding);
    max-width: 1400px;
    margin: 0 auto;
    background: transparent !important;
    backdrop-filter: none !important;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

@media (min-width: 1024px) and (max-width: 1366px) {
    .container, .panel, .wrapper {
        transform: scale(0.985);
    }
}

/* FIX: Prevent hero logo + CA box from being cut on laptop screens */
@media (min-width: 1366px) and (max-width: 1920px) {
    .hero {
        padding-top: 40px;
        margin-top: 100px;
    }
    .hero img#main-logo {
        max-width: 62%;
        max-height: 36vh;
    }
    .copy-box {
        transform: scale(1.05);
    }
}

@media (min-width: 768px) {
    section {
        padding: 110px 5%;
    }
}

/* Gallery */
#gallery {
    background: transparent !important;
    backdrop-filter: none !important;
    border-top: var(--outline);
    border-bottom: var(--outline);
}
#gallery h2 {
    font-size: clamp(2.2rem, 6.5vw, 4.4rem);
    text-align: center;
    margin-bottom: 36px;
    color: var(--black);
    -webkit-text-stroke: 2px var(--black);
    background: var(--comic-white);
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Masonry-like auto-fill */
    gap: var(--gap);
    grid-auto-rows: minmax(150px, auto); /* Variable heights for masonry effect */
}
.comic-card {
    background: var(--panel-white);
    border: var(--outline);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    aspect-ratio: unset; /* Allow variable aspect for masonry */
}
.comic-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 var(--black);
}
.comic-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}
.comic-card:hover img {
    opacity: 0.9;
}
/* Tales Book */
#tales {
    background: transparent !important;
    backdrop-filter: none !important;
}
#tales h2 {
    font-size: clamp(2.4rem, 7vw, 5rem);
    text-align: center;
    margin-bottom: 40px;
    color: var(--black);
    -webkit-text-stroke: 2px var(--black);
}
.book-container {
    max-width: 100%;
    padding: 0 var(--mobile-padding);
}
.swiper.book-swiper {
    --swiper-navigation-color: var(--black);
    --swiper-pagination-color: var(--rage-yellow);
    width: 100%;
    height: 70vh;
    max-height: 800px;
}
.swiper-slide.page {
    background: var(--panel-white);
    border: var(--outline);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    text-align: center;
    font-size: 1.3rem;
    gap: 16px;
    transition: transform 0.3s ease;
}
.swiper-slide.page:hover {
    transform: scale(1.02);
}
.page img {
    max-width: 70%;
    max-height: 40vh;
    border: 6px solid var(--black);
    border-radius: 6px;
    transition: transform 0.3s ease;
}
.page img:hover {
    transform: scale(1.05);
}
.page h3 {
    font-size: clamp(1.6rem, 4.5vw, 2.6rem);
    color: var(--black);
}
.page p {
    font-size: clamp(1.0rem, 3.2vw, 1.4rem);
    max-width: 90%;
}
.page .burst {
    font-family: 'Bangers', cursive;
    font-size: clamp(2.6rem, 7vw, 4.6rem);
    color: var(--rage-yellow);
    -webkit-text-stroke: 2px var(--black);
    animation: pulse 2s infinite;
}
/* Footer - Glassy */
footer {
    background: rgba(0,128,0,0.7);
    backdrop-filter: blur(10px);
    color: var(--comic-white);
    text-align: center;
    padding: 40px var(--mobile-padding);
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    border-top: var(--outline);
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
/* MOBILE OPTIMIZATION: max-width 480px */
@media (max-width: 480px) {
    /* MOBILE BACKGROUND OVERRIDE — ONLY CHANGE */
    body::before {
        background: linear-gradient(to bottom, #87ceeb, #ffffff) !important;
        filter: none !important;
    }

    /* HEADER */
    header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        padding: 12px !important;
        box-shadow: var(--shadow) !important;
        z-index: 1000;
    }
    .menu-toggle {
        display: block !important;
    }
    /* MOBILE MENU FIX */
    nav {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        height: 100vh;
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(255,255,255,0.9);
        backdrop-filter: blur(10px);
        border: none;
        padding: 0;
        z-index: 2000;
    }
    nav.active {
        display: flex;
    }
    nav a {
        font-size: 1.6rem !important;
        padding: 14px 0 !important;
        border: none !important;
        width: 100%;
        text-align: center;
    }
    /* HERO SECTION */
    .hero {
        margin-top: 64px !important; /* leave space for fixed header */
        padding: 16px !important;
        gap: 24px !important;
        min-height: auto !important;
    }
    #main-logo {
        max-width: 85% !important;
        max-height: 28vh !important;
        margin: 0 auto !important;
        transform: rotate(-4deg) translateY(0) !important;
    }
    .hero h1 {
        font-size: 2rem !important;
        margin: 6px 0 !important;
        line-height: 1.2 !important;
    }
    .hero p {
        font-size: 1rem !important;
        max-width: 95% !important;
        margin: 4px auto 12px auto !important;
        line-height: 1.4 !important;
    }
    .hero > div {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 14px !important;
    }
    .hero button,
    .hero a {
        width: 100% !important;
        text-align: center !important;
        padding: 12px 0 !important;
        font-size: 1rem !important;
    }
    /* CA BOX */
    .copy-box {
        margin-top: 24px !important;
        padding: 16px !important;
        width: 100% !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    .copy-text {
        font-size: 14px !important;
        line-height: 1.5 !important;
        word-break: break-word;
    }
    /* SECTIONS */
    section {
        padding: 60px 16px 40px 16px !important;
        margin-bottom: 32px !important;
    }
    /* GALLERY */
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .comic-card {
        width: 100% !important;
        aspect-ratio: auto 3 / 4 !important;
    }
    /* TALES SECTION */
    #tales .book-container {
        padding: 0 12px !important;
    }
    .swiper.book-swiper {
        height: 60vh !important;
    }
    .swiper-slide.page img {
        max-width: 80% !important;
        max-height: 35vh !important;
    }
    /* FOOTER */
    footer {
        padding: 28px 16px !important;
        font-size: 1.05rem !important;
    }
}
body::after {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='25' cy='25' r='2' fill='%23ffffff' opacity='0.8' /%3E%3Ccircle cx='75' cy='15' r='3' fill='%23ffffff' opacity='0.9' /%3E%3Ccircle cx='50' cy='50' r='2' fill='%23ffffff' opacity='0.7' /%3E%3Ccircle cx='15' cy='85' r='4' fill='%23ffffff' opacity='0.6' /%3E%3Ccircle cx='85' cy='75' r='3' fill='%23ffffff' opacity='0.8' /%3E%3C/svg%3E");
  background-repeat: repeat;
  animation: snow-fall 15s linear infinite;
}
@keyframes snow-fall {
  0% {
    background-position: 0px 0px;
  }
  100% {
    background-position: 100px 1000px;
  }
}