/* ── Yuletide Academy Theme ───────────────────────────────────────────────────
   An old school of magic at Christmas: a starlit ceiling, candles floating in
   the air, snow on old stone, wax seals and gold leaf. Ink-blue night, candle
   gold, evergreen and burgundy. Part of the Christmas collection. Evokes the
   magic-school genre without borrowing from any one series.
   Fonts: Almendra (storybook calligraphic) / Alegreya / Alegreya Sans.
   Loaded on top of default.css — overrides variables plus a few signature touches.
   ─────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Almendra:ital,wght@0,400;0,700;1,400&family=Alegreya:ital,wght@0,400;0,500;0,700;1,400&family=Alegreya+Sans:wght@500;700&display=swap');

:root {
    color-scheme: dark;
    --t-bg:             #0c1224;
    --t-bg-alt:         #101830;
    --t-surface:        #16203b;
    --t-border:         #2a3760;
    --t-text:           #eee6d2;
    --t-text-muted:     #b3ab97;
    --t-accent:         #7d1e2c;
    --t-accent-hover:   #661723;
    --t-accent-light:   #2a1a2c;
    --t-on-accent:      #f6ecd6;
    --t-link:           #e6b85c;   /* candle gold: burgundy is too dark to read as text at night */
    --t-link-hover:     #f2cf85;
    --t-heading-font:   'Almendra', 'Palatino Linotype', Palatino, serif;
    --t-heading-weight: 700;
    --t-body-font:      'Alegreya', 'Palatino Linotype', Georgia, serif;
    --t-ui-font:        'Alegreya Sans', 'Gill Sans', system-ui, sans-serif;
    --t-radius:         4px;
    --t-radius-lg:      8px;
    --t-shadow:         0 2px 14px rgba(0, 0, 0, .5);
    --t-shadow-lg:      0 12px 36px rgba(0, 0, 0, .7);
    --t-cover-shadow:   0 4px 12px rgba(0, 0, 0, .55), 0 16px 36px rgba(0, 0, 0, .55);
    --t-hero-bg:        radial-gradient(ellipse at 50% 0%, rgba(230, 184, 92, .14) 0%, transparent 60%), linear-gradient(180deg, #060a18 0%, #0c1430 60%, #1a1f3d 100%);
    --t-hero-text:      #f6eedb;
    --t-hero-muted:     rgba(246, 238, 219, .82);
    --t-hero-accent:    #e6b85c;
    --t-on-hero-accent: #1a1408;
    --t-success:        #8fd19e;
    --t-error:          #ff8f8f;

    /* Theme-only colours */
    --ya-gold:          #e6b85c;
    --ya-evergreen:     #1f4a37;
}

/* Alegreya is a little small for its size */
body { font-size: 18.5px; line-height: 1.7; }

/* Storybook headings in candle gold */
.section-heading { color: var(--ya-gold); letter-spacing: .01em; }
.hero-name { font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: 1.04; }
.book-title, .post-title, .world-title, .product-title, .event-title { font-family: 'Alegreya', Georgia, serif; font-weight: 700; font-size: 1.18rem; }
.hero-genre, .hero-feature-label, .coming-soon-label, .age-gate-label { letter-spacing: .22em; }

/* Gold hairlines meeting at a little burgundy wax seal */
.section-heading::after {
    width: 120px;
    height: 20px;
    margin-top: .85rem;
    border-radius: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 20'%3E%3Cpath d='M0 10h46M74 10h46' stroke='%23e6b85c' stroke-width='1' opacity='.75'/%3E%3Cpath d='M60 1.5l2.4 1.6 2.9-.3 1.2 2.7 2.6 1.3-.4 2.9 1.6 2.4-2 2.1-.2 2.9-2.8.7-1.9 2.2-2.6-1.3-2.6 1.3-1.9-2.2-2.8-.7-.2-2.9-2-2.1 1.6-2.4-.4-2.9 2.6-1.3 1.2-2.7 2.9.3z' fill='%237d1e2c'/%3E%3Cpath d='M60 5.5l1.3 3.2 3.4.2-2.6 2.2.8 3.3-2.9-1.8-2.9 1.8.8-3.3-2.6-2.2 3.4-.2z' fill='%23e6b85c'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* A gold hairline under the navigation */
.site-nav { border-bottom-color: rgba(230, 184, 92, .35); }

/* Night-blue cards edged in gold leaf */
.post-card, .event-card, .review-card, .world-card, .product-card, .contact-block { border-color: rgba(230, 184, 92, .24); }
.book-card:hover .book-cover-wrap,
.post-card:hover,
.product-card:hover {
    box-shadow: 0 10px 34px rgba(230, 184, 92, .2), 0 2px 10px rgba(0, 0, 0, .6);
}
.book-detail-cover { box-shadow: 0 10px 40px rgba(230, 184, 92, .16), 0 2px 12px rgba(0, 0, 0, .7); }

/* "Coming Soon" pressed into a burgundy wax seal */
.book-badge--soon {
    background: radial-gradient(circle at 35% 30%, #9a2a3a, #6a1622 70%);
    color: var(--ya-gold);
    border: 1px solid rgba(230, 184, 92, .5);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(0, 0, 0, .15);
    transform: rotate(-6deg);
}

.review-stars { color: var(--ya-gold); }
.review-text { font-style: italic; }

.hero-cta, .age-gate-leave { border-color: rgba(230, 184, 92, .6); }
.hero-cta:hover, .age-gate-leave:hover { background: rgba(230, 184, 92, .14); border-color: var(--t-hero-accent); }

/* Newsletter band in deep evergreen, with a candle-gold button */
.site-section--newsletter {
    background: linear-gradient(160deg, #0d241a 0%, var(--ya-evergreen) 60%, #275a43 100%);
    box-shadow: inset 0 1px 0 rgba(230, 184, 92, .45), inset 0 -1px 0 rgba(230, 184, 92, .45);
}
.newsletter-cta, .newsletter-cta:hover { background: var(--ya-gold); color: var(--t-on-hero-accent); }

/* ── Signature touches (as shown in the theme demo) ──────────────────────────*/

/* A starlit ceiling, with snow drifting down from it */
.site-section--hero::before,
.age-gate::before {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='30' cy='50' r='1.8' opacity='.7'/%3E%3Ccircle cx='150' cy='20' r='1.2' opacity='.55'/%3E%3Ccircle cx='250' cy='110' r='2' opacity='.7'/%3E%3Ccircle cx='90' cy='190' r='1.3' opacity='.5'/%3E%3Ccircle cx='210' cy='240' r='1.8' opacity='.65'/%3E%3Ccircle cx='280' cy='290' r='1.1' opacity='.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='180'%3E%3Cg fill='%23f6e2b0'%3E%3Cpath d='M20 30l1 3 3 1-3 1-1 3-1-3-3-1 3-1z' opacity='.85'/%3E%3Ccircle cx='90' cy='14' r='.9' opacity='.8'/%3E%3Ccircle cx='140' cy='60' r='1.1' opacity='.7'/%3E%3Cpath d='M210 24l.8 2.4 2.4.8-2.4.8-.8 2.4-.8-2.4-2.4-.8 2.4-.8z' opacity='.75'/%3E%3Ccircle cx='60' cy='120' r='.8' opacity='.6'/%3E%3Ccircle cx='180' cy='150' r='1' opacity='.65'/%3E%3Ccircle cx='240' cy='100' r='.7' opacity='.6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 300px 300px, 260px 180px;
    background-repeat: repeat, repeat-x;
    animation: yuletide-snow 40s linear infinite;
}
@keyframes yuletide-snow {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 300px 600px, 0 0; }   /* whole tiles, so the loop doesn't jump */
}

/* Candles floating in the air above the hero, bobbing gently */
.site-section--hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    height: clamp(80px, 14vw, 190px);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 190'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23ffe3a0' stop-opacity='.75'/%3E%3Cstop offset='1' stop-color='%23ffe3a0' stop-opacity='0'/%3E%3C/radialGradient%3E%3ClinearGradient id='w' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23d8ccb0'/%3E%3Cstop offset='.5' stop-color='%23fbf3df'/%3E%3Cstop offset='1' stop-color='%23cbbd9e'/%3E%3C/linearGradient%3E%3Cg id='c'%3E%3Ccircle cx='0' cy='-6' r='16' fill='url(%23g)'/%3E%3Cpath d='M0-14c3 4 4 7 0 11-4-4-3-7 0-11z' fill='%23ffd27a'/%3E%3Cpath d='M0-9c1.4 2 1.6 3.4 0 5-1.6-1.6-1.4-3 0-5z' fill='%23fff6d8'/%3E%3Crect x='-6' y='0' width='12' height='46' rx='2' fill='url(%23w)'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23c' x='70' y='70'/%3E%3Cuse href='%23c' x='250' y='34' transform='translate(250 34) scale(.8) translate(-250 -34)'/%3E%3Cuse href='%23c' x='420' y='96' transform='translate(420 96) scale(.9) translate(-420 -96)'/%3E%3Cuse href='%23c' x='780' y='40' transform='translate(780 40) scale(.85) translate(-780 -40)'/%3E%3Cuse href='%23c' x='960' y='92' transform='translate(960 92) scale(.95) translate(-960 -92)'/%3E%3Cuse href='%23c' x='1130' y='46' transform='translate(1130 46) scale(.8) translate(-1130 -46)'/%3E%3C/svg%3E") center top / auto 100% no-repeat;
    animation: yuletide-float 5s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes yuletide-float {
    from { transform: translateY(-5px); }
    to   { transform: translateY(5px); }
}
@media (max-width: 900px) {
    .site-section--hero::after { opacity: .75; }
}

/* A gothic-window portrait, leaded in gold.
   The author can pick another shape in the dashboard; the frame follows it. */
.about-photo, .about-initials {
    width: 260px;
    height: 320px;
    border-radius: 50% 50% var(--t-radius-lg) var(--t-radius-lg) / 40.625% 40.625% var(--t-radius-lg) var(--t-radius-lg);
    box-shadow: 0 0 0 4px var(--t-bg-alt), 0 0 0 5px var(--ya-gold), 0 0 0 9px var(--t-bg-alt), 0 0 0 10px rgba(230, 184, 92, .45), 0 0 40px rgba(230, 184, 92, .18), var(--t-shadow-lg);
}
.about-initials { background: linear-gradient(160deg, #16203b, #2a1a2c); color: var(--ya-gold); }
@media (max-width: 768px) {
    .about-photo, .about-initials { width: 200px; height: 246px; }
}
