/* 01. Shared Planet XO Christmas colours and defaults */
:root {
    color-scheme: dark;
    --night: #130d22;
    --panel: #221832;
    --gold: #edcf91;
    --cream: #fff7e9;
    --red: #cb3453;
    --muted: #c7bed1;
    --line: #ffffff20;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--night);
    color: var(--cream);
    font:
        16px / 1.6 system-ui,
        sans-serif;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font: inherit;
    cursor: pointer;
    touch-action: manipulation;
}
button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 5px;
}
.wrap {
    width: min(1160px, calc(100% - 40px));
    margin-inline: auto;
}
.skip-link {
    position: absolute;
    top: -100px;
}
.skip-link:focus {
    top: 10px;
    z-index: 20;
    background: var(--night);
    padding: 15px;
}

/* 02. Network bar and station navigation */
.network {
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}
.network .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-block: 10px;
}
header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #130d22f5;
    border-bottom: 1px solid var(--line);
}
.navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    min-height: 90px;
}
.brand img {
    display: block;
    width: 108px;
    height: 66px;
    object-fit: contain;
}
.navigation-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
    font-weight: 650;
}
.listen,
.done,
.action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 23px;
    border: 1px solid transparent;
    border-radius: 100px;
    background: var(--red);
    color: white;
    font-weight: 750;
}
.listen:hover,
.done:hover,
.action:hover {
    filter: brightness(1.12);
}

/* 03. Hero: midnight purple, gold lettering and warm festive lights */
.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 75px 20px 65px;
    background:
        radial-gradient(ellipse at 80% 40%, #65314b77, transparent 55%),
        linear-gradient(135deg, #231430, #130d22);
}
.lights {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 28px;
    border-top: 1px solid #d6b87555;
    display: flex;
    justify-content: space-around;
}
.lights i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 18px 4px #edcf9166;
    margin-top: 6px;
}
.lights i:nth-child(2n) {
    margin-top: 14px;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 11px;
    font-weight: 800;
    color: var(--gold);
}
h1 {
    margin: 22px 0;
    font:
        400 clamp(46px, 6vw, 76px) / 1.06 Georgia,
        serif;
    letter-spacing: -2px;
}
h1 em {
    color: var(--gold);
    font-weight: 400;
}
.intro {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}
.count {
    display: inline-block;
    padding: 12px 23px;
    margin-top: 18px;
    border: 1px solid #edcf9140;
    border-radius: 100px;
    background: #ffffff08;
    font-size: 13px;
    color: var(--gold);
}

/* 04. Advent calendar panel and progress */
.calendar {
    width: min(1160px, calc(100% - 40px));
    margin: 48px auto 0;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
}
.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
h2 {
    margin: 10px 0;
    font:
        400 32px / 1.2 Georgia,
        serif;
}
#progress {
    padding: 9px 15px;
    border: 1px solid #edcf9140;
    border-radius: 100px;
    color: var(--gold);
    font-size: 12px;
    white-space: nowrap;
}
.help {
    margin: 12px 0 28px;
    color: var(--muted);
    font-size: 13px;
}
.doors {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

/* 05. Numbered doors: cranberry, purple and warm cream */
.door {
    position: relative;
    min-height: 175px;
    overflow: hidden;
    border: 1px solid #edcf9140;
    border-radius: 16px;
    background: linear-gradient(145deg, #452445, #302039);
    color: var(--cream);
    transition:
        transform 0.2s,
        filter 0.2s;
}
.door:nth-child(3n) {
    background: linear-gradient(145deg, #a82c48, #692039);
}
.door:nth-child(4n) {
    background: var(--cream);
    color: #302039;
}
.door::before {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid currentColor;
    border-radius: 10px;
    opacity: 0.17;
    pointer-events: none;
}
.door:hover {
    transform: translateY(-4px);
    filter: brightness(1.1);
}
.ornament {
    display: block;
    font-size: 24px;
    opacity: 0.65;
}
.number {
    display: block;
    font:
        400 52px / 1.3 Georgia,
        serif;
}
.state {
    display: block;
    font-size: 9px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    opacity: 0.85;
}
.door.opened {
    background: #382943;
    color: var(--gold);
    border-style: dashed;
}
.door.opened .number {
    font-style: italic;
}
.door.today {
    box-shadow: 0 0 24px #edcf912e;
    border-color: var(--gold);
}
.door:last-child {
    grid-column: 1 / -1;
    min-height: 155px;
    background: radial-gradient(ellipse at center, #edcf9120, transparent), #79233f;
}
.door:last-child .number {
    display: inline;
    margin: 0 22px;
    font-size: 65px;
}
.door:last-child .ornament {
    display: inline;
    font-size: 32px;
}
.door:last-child .state {
    margin-top: 5px;
}
.note {
    min-height: 24px;
    margin-bottom: 0;
    text-align: center;
    color: var(--gold);
    font-size: 13px;
}

/* 06. Closing message and footer */
.bottom {
    padding: 65px 20px;
    text-align: center;
}
.bottom > span {
    font-size: 30px;
    color: var(--gold);
}
.bottom p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}
footer {
    width: min(1160px, calc(100% - 40px));
    margin: auto;
    padding: 25px 0 35px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--muted);
    font-size: 12px;
}
footer button {
    border: 1px solid var(--line);
    border-radius: 100px;
    background: transparent;
    color: inherit;
    padding: 7px 14px;
    font-size: 12px;
}

/* 07. Door reveal dialog, quizzes, polls and media */
dialog {
    width: min(540px, calc(100% - 30px));
    max-height: 85vh;
    padding: 45px 30px 30px;
    border: 1px solid #edcf9160;
    border-radius: 24px;
    background: var(--panel);
    color: var(--cream);
    text-align: center;
    box-shadow: 0 25px 100px #0008;
}
dialog::backdrop {
    background: #130d22d9;
    backdrop-filter: blur(7px);
}
dialog h2 {
    font-size: 34px;
}
dialog p {
    color: var(--muted);
    line-height: 1.8;
}
.modal-icon {
    color: var(--gold);
    font-size: 40px;
    margin: 15px;
}
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: 0;
    color: var(--cream);
    font-size: 30px;
}
.done,
.action {
    margin-top: 18px;
}
.option {
    display: block;
    width: 100%;
    padding: 12px 18px;
    margin-top: 15px;
    border: 1px solid #edcf9140;
    border-radius: 12px;
    background: #ffffff08;
    color: var(--cream);
}
.option:hover:not(:disabled) {
    background: #ffffff15;
}
.option:disabled {
    cursor: default;
    opacity: 0.65;
}
dialog .feedback {
    color: var(--gold);
    min-height: 24px;
}
audio,
video {
    width: 100%;
    margin-top: 15px;
}
.content-image {
    max-width: 100%;
    border-radius: 12px;
}

/* 08. Subtle snow; visitors can disable it in the footer */
.snow {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 0.4;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #ffffff80 50%, transparent),
        radial-gradient(1px 1px at 90px 110px, #ffffff80 50%, transparent);
    background-size: 200px 230px;
    animation: snow 25s linear infinite;
}
.no-snow .snow {
    display: none;
}
@keyframes snow {
    to {
        background-position:
            100px 460px,
            100px 460px;
    }
}

/* 09. Tablet, mobile and accessibility preferences */
@media (max-width: 800px) {
    .navigation-links {
        gap: 14px;
    }
    .navigation-links .optional {
        display: none;
    }
    .doors {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .hero {
        padding-block: 48px;
    }
}
@media (max-width: 480px) {
    .wrap,
    .calendar,
    footer {
        width: calc(100% - 28px);
    }
    .network {
        font-size: 10px;
    }
    .navigation {
        gap: 10px;
    }
    .brand img {
        width: 80px;
    }
    .navigation-links {
        font-size: 12px;
        gap: 12px;
    }
    .listen {
        padding: 10px 14px;
    }
    .calendar {
        padding: 20px 12px;
        margin-top: 28px;
    }
    .doors {
        gap: 9px;
    }
    .door {
        min-height: 135px;
    }
    .number {
        font-size: 40px;
    }
    .bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }
    .bar h2 {
        font-size: 27px;
    }
    #progress {
        margin-top: 5px;
    }
    .eyebrow {
        letter-spacing: 2px;
        font-size: 10px;
    }
    .help {
        line-height: 1.7;
    }
    .bottom h2 {
        font-size: 27px;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    .snow {
        display: none;
    }
}
