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

html {
    overflow: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── TOP BAR ────────────────────────────────── */
.top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    /* Replaced backdrop-filter blur with solid semi-transparent bg —
       blur is expensive on Android Chrome and not GPU-accelerated */
    background: rgba(0, 0, 0, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 1rem;
}

.top-bar-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
    text-align: center;
}

.top-bar-title span {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
}

.lang-btn {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
    transition: background 0.25s, border-color 0.25s;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* ── SPLIT LAYOUT ───────────────────────────── */
.split {
    display: flex;
    min-height: 100vh;
    padding-top: 48px;
    position: relative;
    overflow: hidden;
}

.panel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    /* Removed box-shadow transition — triggers repaint */
    isolation: isolate;
}

/* ── YOUTH PANEL ────────────────────────────── */
.panel-youth {
    background: #0c1a22;
}

.panel-youth .panel-bg {
    position: absolute;
    inset: 0;
    background: url('ymitp_bg_final.webp') center/cover no-repeat;
}

.panel-youth .panel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg,
        rgba(33, 181, 222, 0.55) 0%,
        rgba(12, 26, 34, 0.65) 50%,
        rgba(222, 37, 80, 0.35) 100%);
}

/* ── FAMILY PANEL ───────────────────────────── */
.panel-family {
    background: #fdf8ff;
}

.panel-family .panel-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* SVG sunburst — single GPU texture, transform:rotate only.
   The SVG is inline in the HTML so the browser rasterises it
   once; spinning it is a cheap matrix multiply on the GPU. */
.sunburst-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    /* keep square so rotation stays centred */
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    animation: spinSlow 40s linear infinite;
    will-change: transform;
}

@keyframes spinSlow {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.panel-family .panel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(253, 248, 255, 0.30);
}

/* ── DIVIDER LINE ───────────────────────────── */
.divider {
    position: fixed;
    top: 48px; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: linear-gradient(to bottom,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.6) 20%,
        rgba(255,255,255,0.6) 80%,
        rgba(255,255,255,0) 100%);
    z-index: 50;
    pointer-events: none;
}

@media (max-width: 699px) { .divider { display: none; } }

/* ── PANEL CONTENT ──────────────────────────── */
.panel-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2rem 3rem;
    max-width: 420px;
}

/* ── YOUTH CONTENT ──────────────────────────── */
.panel-youth .event-label {
    font-family: 'Barriecito', cursive;
    font-size: clamp(3.5rem, 7vw, 5.5rem);
    color: white;
    line-height: 0.9;
    text-shadow: 0 4px 20px rgba(33, 181, 222, 0.5);
}

.panel-youth .event-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: white;
    line-height: 1.05;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    margin-top: 0.3rem;
}

.panel-youth .event-subtitle {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(0.75rem, 1.6vw, 0.95rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.75);
    background: rgba(33, 181, 222, 0.25);
    border: 1px solid rgba(33, 181, 222, 0.4);
    padding: 5px 14px;
    border-radius: 3px;
    margin: 0.8rem 0 1.2rem;
}

.panel-youth .event-date {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    color: #f5d22e;
    line-height: 1;
    text-shadow: 0 4px 16px rgba(245,210,46,0.4);
}

.panel-youth .event-venue,
.panel-youth .event-day-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.85);
    margin-top: 0.3rem;
}

.panel-youth .event-day-label { letter-spacing: 0.1em; }

.panel-youth .enter-btn {
    margin-top: 1.8rem;
    display: inline-block;
    background: #21b5de;
    color: white;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 13px 46px 13px 36px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
    transition: background 0.25s;
    /* Replaced pulseCta box-shadow animation with outline pulse —
       outline/opacity animates on compositor; box-shadow does not */
    box-shadow: 0 6px 20px rgba(33, 181, 222, 0.5);
}

.panel-youth:hover .enter-btn {
    background: #de2550;
    box-shadow: 0 6px 20px rgba(222, 37, 80, 0.5);
}

/* ── MUSICAL NOTES ──────────────────────────── */
/* All notes share ONE animation + position:fixed layer.
   will-change removed — 14 separate layers was the problem. */
.music-note {
    position: fixed;
    pointer-events: none;
    animation: noteFall linear infinite;
    opacity: 0;
    top: -8%;
    z-index: 10;
}

@keyframes noteFall {
    0%   { transform: translateY(0)      rotate(0deg);  opacity: 0; }
    8%   { opacity: 0.7; }
    80%  { opacity: 0.55; }
    100% { transform: translateY(108vh)  rotate(22deg); opacity: 0; }
}

/* ── FAMILY CONTENT ─────────────────────────── */
.panel-family .event-label {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    font-weight: 600;
    color: #4a2060;
    letter-spacing: 0.04em;
    background: rgba(255,255,255,0.7);
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.panel-family .event-logo {
    width: clamp(140px, 20vw, 200px);
    height: auto;
    display: block;
    margin: 0 auto 0.8rem;
    filter: drop-shadow(0 6px 20px rgba(123,45,139,0.3));
    /* Removed floatF animation — saved a compositor layer */
}

.panel-family .event-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.8vw, 3rem);
    color: #7b2d8b;
    line-height: 1.05;
    text-shadow:
        0 0 20px rgba(255,255,255,0.9),
        0 0 40px rgba(255,255,255,0.6);
}

.panel-family .event-subtitle {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(0.75rem, 1.6vw, 0.95rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #7b2d8b;
    background: rgba(247, 232, 78, 0.7);
    padding: 5px 14px;
    border-radius: 20px;
    margin: 0.7rem 0 1.2rem;
}

.panel-family .event-date {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    color: #7b2d8b;
    line-height: 1;
    text-shadow:
        0 0 20px rgba(255,255,255,0.4),
        0 0 40px rgba(255,255,255,0.6);
}

.panel-family .event-venue {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a2060;
    margin-top: 0.3rem;
    text-shadow:
        0 0 20px rgba(255,255,255,0.2),
        0 0 40px rgba(255,255,255,0.2);
}

.panel-family .enter-btn {
    margin-top: 1.8rem;
    display: inline-block;
    background: #7b2d8b;
    color: white;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 13px 36px;
    border-radius: 24px;
    transition: background 0.25s;
    box-shadow: 0 6px 20px rgba(123,45,139,0.4);
    /* Removed pulseCtaF box-shadow animation */
}

.panel-family:hover .enter-btn {
    background: #559020;
    box-shadow: 0 6px 20px rgba(85,144,32,0.5);
}

/* ── WEEKEND BADGE ──────────────────────────── */
.weekend-badge {
    position: fixed;
    top: calc(50% + 24px);
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    width: 72px;
    height: 72px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 3px rgba(255,255,255,0.5);
    pointer-events: none;
    /* Removed badgePop scale animation — saved a compositor layer */
}

.weekend-badge span {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.1;
    text-align: center;
}

.weekend-badge .badge-line1 { color: #21b5de; }
.weekend-badge .badge-line2 { color: #7b2d8b; font-size: 0.5rem; }
.weekend-badge .badge-amp   { font-size: 1.1rem; color: #333; line-height: 1; }

@media (max-width: 699px) { .weekend-badge { display: none; } }

/* ═══════════════════════════════════════════════
   MOBILE LAYOUT  ≤ 699px
   ═══════════════════════════════════════════════ */
@media (max-width: 699px) {

    html, body {
        height: 100%;
        height: 100dvh;
        overflow: hidden;
    }

    .page-wrapper {
        position: fixed;
        inset: 0;
        display: flex;
        flex-direction: column;
        padding-top: 48px;
    }

    .split {
        flex: 1 1 0;
        min-height: 0;
        padding-top: 0;
        flex-direction: column;
        overflow: hidden;
    }

    .panel {
        flex: 1 1 0;
        min-height: 0;
        height: auto;
    }

    #cookieBanner {
        position: relative !important;
        bottom: auto !important;
        flex-shrink: 0;
        padding: 8px 4% calc(8px + env(safe-area-inset-bottom, 0px));
        border-top: 2px solid rgba(255,255,255,0.15);
        overflow: hidden;
        max-height: 140px;
        transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
        opacity: 1;
    }

    #cookieBanner.hiding {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
    }

    .cookie-inner {
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
    }

    .cookie-inner p {
        font-size: 0.72rem;
        line-height: 1.3;
        min-width: 0;
    }

    .cookie-btns { flex-shrink: 0; }

    .cookie-accept {
        padding: 6px 14px;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .panel-content {
        padding: 0.7rem 1rem 0.8rem;
        max-width: 100%;
    }

    .panel-youth .event-label   { font-size: 2.2rem; line-height: 0.9; }
    .panel-youth .event-title   { font-size: 1.4rem; }
    .panel-youth .event-subtitle {
        font-size: 0.68rem;
        padding: 3px 8px;
        margin: 0.3rem 0 0.4rem;
    }
    .panel-youth .event-date    { font-size: 2.2rem; }
    .panel-youth .event-day-label { font-size: 0.72rem; }
    .panel-youth .enter-btn {
        margin-top: 0.6rem;
        padding: 8px 28px 8px 18px;
        font-size: 0.88rem;
    }

    .panel-family .event-logo   { width: 160px; margin-bottom: 0.3rem; }
    .panel-family .event-title  { font-size: 1.4rem; }
    .panel-family .event-subtitle {
        font-size: 0.68rem;
        padding: 3px 8px;
        margin: 0.3rem 0 0.4rem;
    }
    .panel-family .event-date   { font-size: 2.2rem; }
    .panel-family .event-venue  { font-size: 0.72rem; }
    .panel-family .enter-btn {
        margin-top: 0.6rem;
        padding: 8px 22px;
        font-size: 0.88rem;
    }
}

/* extra-small phones */
@media (max-width: 380px) {
    .panel-youth .event-label   { font-size: 1.8rem; }
    .panel-youth .event-title   { font-size: 1.2rem; }
    .panel-family .event-logo   { width: 140px; }
    .panel-family .event-title  { font-size: 1.2rem; }
    .panel-youth .event-date,
    .panel-family .event-date   { font-size: 1.8rem; }
    .panel-youth .enter-btn,
    .panel-family .enter-btn    { font-size: 0.8rem; margin-top: 0.4rem; }
}

/* ── COOKIE BANNER (desktop) ────────────────── */
#cookieBanner {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 2000;
    background: rgba(20, 10, 30, 0.97);
    border-top: 2px solid rgba(255,255,255,0.12);
    padding: 16px 5%;
    transition: opacity 0.3s ease;
    opacity: 1;
}

#cookieBanner.hiding { opacity: 0; }

.cookie-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.cookie-inner p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.5;
    flex: 1;
    min-width: 220px;
}

.cookie-inner a { color: #21b5de; }

.cookie-btns {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-accept {
    background: #21b5de;
    color: white;
    border: none;
    padding: 9px 22px;
    border-radius: 20px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-accept:hover { background: #7b2d8b; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
