/* Christmas 2026, homepage only: a dark winter night with a touch of Santa red, snow and lights,
   warming into the usual pink as you scroll. Pieces: this file, js/home-snow.js, images/christmas/
   and the snow-sky and canvas in templates/index.html. Remove those to go back. */

/* ── Sky ── flat colour (no hazy glows): mostly dark, with a wine-red tint at the very top. Part of
   the page, so scrolling carries it from red through plum into the pink theme's dark. */
.snow-sky {
    position: absolute; top: 0; left: 0; right: 0; height: 1500px; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, #420c17 0%, #2c0b15 18%, #190c13 38%, #190b1c 56%, #1b0a1f 70%, #110912 86%, rgba(9, 9, 13, 0) 100%);
}

/* ── Snowfall ── above the backgrounds, behind everything you can read or click */
.snow-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: 1; pointer-events: none; }

/* ══ Navbar ══ candy-cane edge on top, twinkling lights underneath */
/* No live blur on this page: it would be re-computed for every snowfall frame */
html:root body.home-snow .nav-container.nav-container {
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background-image: repeating-linear-gradient(135deg, #e81c36 0 9px, #ffffff 9px 18px);
    background-size: 100% 5px; background-repeat: no-repeat; background-position: top left;
}
html:root body.home-snow .nav-container.nav-container:not(.nav-scrolled) { background-color: #1d080e; border-color: rgba(255, 209, 102, .22); }
html:root body.home-snow .nav-container:not(.nav-scrolled) .nav-item { color: #cdbfc3; }
html:root body.home-snow .nav-container:not(.nav-scrolled) .nav-item:is(:hover, .active) { color: #fff; }
html:root body.home-snow .nav-container:not(.nav-scrolled) .nav-item.active::after { background: #ffd166; }
html:root body.home-snow .nav-container:not(.nav-scrolled) .nav-cta:not(#_) {
    background: #d4142f; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 8px 18px -10px rgba(212, 20, 47, .9);
}
html body.home-snow .nav-container.nav-container::before,
html body.home-snow .nav-container.nav-container::after {
    content: ''; display: block; position: absolute; left: 0; right: 0; top: calc(100% - 4px); bottom: auto;
    height: 30px; opacity: 1; pointer-events: none;
    background: url('../images/christmas/lights-a.svg?v=1') left top / 200px 30px repeat-x;
    animation: xmas-twinkle 1.5s ease-in-out infinite alternate;
}
html body.home-snow .nav-container.nav-container::after {
    background-image: url('../images/christmas/lights-b.svg?v=1');
    animation-delay: -1.5s;   /* half a cycle behind, so the two sets take turns */
}
@keyframes xmas-twinkle { from { opacity: 1; } to { opacity: .55; } }
html.page-hidden body.home-snow .nav-container::before, html.page-hidden body.home-snow .nav-container::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    html body.home-snow .nav-container.nav-container::before, html body.home-snow .nav-container.nav-container::after { animation: none; }
}

/* ══ Hero ══ snow white and gold, red on the main button only */
body.v2.home-snow .v2-hero {
    --ink: #ffffff; --text: #e6dde0; --muted: #c3b5ba; --dim: #b8a9ae; --teal: #ffd166; --mint: #fff;
    --aura-ink: #fff; --aura-dim: #b8a9ae;
}
body.home-snow .v2-hero .hero-rot-track > span {
    background-image: linear-gradient(100deg, #fff6d6 0%, #ffe08a 45%, #ffc23c 100%);
}
html:root body.home-snow #main .v2-hero .v2-btn-primary {
    background: #d4142f; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 12px 24px -12px rgba(212, 20, 47, .9);
}
@media (hover: hover) {
    html:root body.home-snow #main .v2-hero .v2-btn-primary:hover { background: #ec1c39; color: #fff; }
}
body.home-snow .v2-hero .hero-search-box { position: relative; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .2); }
body.home-snow .v2-hero .hero-search-box:focus-within { background: rgba(255, 255, 255, .1); border-color: #ffd166; }
body.home-snow .v2-hero .hero-search-box::before {   /* snow settled on the search box */
    content: ''; position: absolute; left: 4px; right: 4px; bottom: calc(100% - 5px); height: 14px; pointer-events: none;
    background: url('../images/christmas/snow-heap.svg?v=1') center bottom / 100% 100% no-repeat;
}
body.home-snow .v2-hero .hero-search-box i, body.home-snow .v2-hero .hero-search-box input::placeholder { color: #b8a9ae; }
body.home-snow .v2-hero .hero-search-box input { color: #fff; }
body.home-snow .v2-hero .v2-trust .star { color: #ffd166; }

/* The pinned features screen starts below the hanging lights */
body.v2.home-snow .lt.is-pinned { padding-top: 24px; }

/* ══ Section dividers become snowflakes ══ */
body.home-snow.home-v2 #main > .v2-section::after {
    width: 24px; height: 24px; border-radius: 0; box-shadow: none;
    background: url('../images/christmas/snowflake.svg?v=1') center / contain no-repeat;
}

/* ══ Product cards ══ snow on top, candy-cane edge, red and green covers */
body.v2.home-snow #products .new-product-card {
    background: linear-gradient(180deg, #1a1218 0%, #120d12 100%); border-color: rgba(255, 255, 255, .14);
}
body.v2.home-snow #products .new-product-card::after {
    content: ''; position: absolute; z-index: 4; left: 0; right: 0; top: -1px; height: 22px; pointer-events: none;
    background: url('../images/christmas/snow-cap.svg?v=1') left top / 160px 22px repeat-x;
}
@media (hover: hover) and (pointer: fine) {
    body.v2.home-snow #products .new-product-card:hover { border-color: rgba(255, 209, 102, .7); box-shadow: 0 22px 40px -22px rgba(212, 20, 47, .55); }
}
body.v2.home-snow #products .pcard-img-wrap { border-bottom: 0; }
body.v2.home-snow #products .pcard-img-wrap::after {
    content: ''; position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 4px; pointer-events: none;
    background: repeating-linear-gradient(135deg, #d4142f 0 8px, #ffffff 8px 16px);
}
body.v2.home-snow #products .pcard-badge { top: 24px; background: rgba(12, 8, 11, .82); }
body.v2.home-snow #products .mb { --acc: #ffd166; --acc-rgb: 255, 209, 102; --hi: #fff1c1; --bg-a: #3e0a14; --bg-b: #5a0e1d; }
body.v2.home-snow #products .new-product-card:nth-child(even) .mb { --bg-a: #08261b; --bg-b: #0c3b28; }
body.v2.home-snow #products .pcard-price .sym { color: #ffd166; }
body.v2.home-snow #products .pcard-price .num { color: #fff; }
body.v2.home-snow #products .pcard-footer { border-top: 1px dashed rgba(255, 255, 255, .18); }
html:root body.v2.home-snow #products .tc-buy-btn { background: #d4142f; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 8px 18px -10px rgba(212, 20, 47, .85); }
@media (hover: hover) {
    html:root body.v2.home-snow #products .new-product-card:hover .tc-buy-btn { background: #ec1c39; }
}
