/* ==========================================================================
   Cohen Industries — Christmas theme (shared, public pages only)
   Pure CSS: snow-capped header + logo, layered background trees, blue
   presents, generated snowfall (see xmas.js), premium discount banner.
   All motion respects prefers-reduced-motion. Decorative only.
   ========================================================================== */

/* ---------- Scene container (behind page content, never blocks clicks) ---- */
.xmas-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    --ts: 1;
    --gs: 1;
}
.xmas-scene::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 620px at -5% -10%, rgba(22, 163, 74, .12), transparent 60%),
        radial-gradient(1000px 560px at 105% -5%, rgba(190, 24, 93, .10), transparent 60%),
        radial-gradient(900px 700px at 50% 115%, rgba(34, 211, 238, .07), transparent 65%);
}
@media (max-width: 640px) {
    .xmas-scene { --ts: .58; --gs: .72; }
}
@media (max-width: 400px) {
    .xmas-scene { --ts: .5; --gs: .62; }
}

/* ---------- Falling snow (flakes generated by xmas.js) -------------------- */
.xmas-snow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.xmas-snow--back { z-index: 0; }
.xmas-snow--front { z-index: 60; }
.xmas-flake {
    position: absolute;
    top: -24px;
    left: var(--x, 50%);
    width: var(--s, 4px);
    height: var(--s, 4px);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff, rgba(219, 234, 254, .85));
    opacity: 0;
    will-change: transform;
    animation: xmas-fall var(--d, 20s) linear var(--delay, 0s) infinite;
}
.xmas-flake.is-soft { filter: blur(var(--blur, 1px)); }
@keyframes xmas-fall {
    0%   { transform: translate3d(0, -6vh, 0); opacity: 0; }
    8%   { opacity: var(--o, .7); }
    90%  { opacity: var(--o, .7); }
    100% { transform: translate3d(var(--drift, 40px), 108vh, 0); opacity: 0; }
}

/* ---------- Snow along the top edge of the header ------------------------- */
.xmas-hdr-snow {
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 15px;
    z-index: 1;
    pointer-events: none;
    background-image:
        radial-gradient(11px 13px at 11px 0, #ffffff 96%, rgba(255, 255, 255, 0) 97%),
        linear-gradient(#ffffff, #f1f5f9);
    background-size: 22px 15px, 100% 8px;
    background-repeat: repeat-x, no-repeat;
    background-position: top left, top left;
    filter: drop-shadow(0 2px 3px rgba(15, 23, 42, .35));
    opacity: .96;
}

/* ---------- Snow piled on the logo tile ---------------------------------- */
.xmas-logo { position: relative; }
.xmas-logo-snow {
    position: absolute;
    top: -7px;
    left: -7px;
    right: -7px;
    height: 15px;
    pointer-events: none;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 70%, #e2e8f0 100%);
    border-radius: 62% 38% 54% 46% / 100% 100% 34% 34%;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .4), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.xmas-logo-snow::after {
    content: "";
    position: absolute;
    top: 9px;
    right: 7px;
    width: 5px;
    height: 9px;
    background: linear-gradient(180deg, #ffffff, #dbeafe);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    border-radius: 0 0 2px 2px;
    opacity: .95;
}

/* ---------- Background Christmas tree (pure CSS) -------------------------- */
.xmas-tree {
    position: absolute;
    bottom: 0;
    width: calc(var(--tw, 150px) * var(--ts));
    height: calc(var(--th, 232px) * var(--ts));
    transform-origin: bottom center;
    animation: xmas-sway var(--swd, 7s) ease-in-out infinite alternate;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .5));
}
.xmas-tree--l { left: 2vw; --tw: 154px; --th: 236px; --swd: 7s; }
.xmas-tree--r { right: 2.5vw; --tw: 132px; --th: 204px; --swd: 8.5s; animation-direction: alternate-reverse; }
@keyframes xmas-sway {
    from { transform: rotate(-1.3deg); }
    to   { transform: rotate(1.3deg); }
}
.xmas-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 17%;
    height: 15%;
    background: linear-gradient(90deg, #4a2f1a, #8b5a2b 45%, #6b4423);
    border-radius: 3px 3px 2px 2px;
}
.xmas-tier {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    background: linear-gradient(180deg, #1fae54 0%, #17924a 42%, #147a3e 100%);
}
.xmas-tier::after {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    background: linear-gradient(180deg, rgba(255, 255, 255, .95) 0 22%, rgba(255, 255, 255, 0) 23%);
}
.xmas-tier--1 { top: 1%;  width: 56%; height: 35%; z-index: 3; }
.xmas-tier--2 { top: 25%; width: 79%; height: 37%; z-index: 2; }
.xmas-tier--3 { top: 51%; width: 100%; height: 41%; z-index: 1; }
.xmas-star {
    position: absolute;
    top: -9%;
    left: 50%;
    transform: translateX(-50%);
    width: calc(30px * var(--ts));
    height: calc(30px * var(--ts));
    z-index: 4;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    background: linear-gradient(160deg, #fde68a, #f59e0b 60%, #d97706);
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, .85));
    animation: xmas-twinkle 2.2s ease-in-out infinite alternate;
}
@keyframes xmas-twinkle {
    from { filter: drop-shadow(0 0 5px rgba(251, 191, 36, .6)); }
    to   { filter: drop-shadow(0 0 13px rgba(253, 230, 138, .95)); }
}
.xmas-bauble {
    position: absolute;
    width: calc(11px * var(--ts));
    height: calc(11px * var(--ts));
    border-radius: 50%;
    z-index: 3;
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .9) 0 12%, var(--c1) 38%, var(--c2) 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .45), 0 0 7px var(--c1);
    animation: xmas-bauble-glow 2.6s ease-in-out infinite alternate;
}
@keyframes xmas-bauble-glow {
    from { box-shadow: 0 2px 4px rgba(0, 0, 0, .45), 0 0 4px var(--c1); }
    to   { box-shadow: 0 2px 4px rgba(0, 0, 0, .45), 0 0 11px var(--c1); }
}
/* Soft snow mound at the base of each tree */
.xmas-tree::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: -16%;
    right: -16%;
    height: calc(30px * var(--ts));
    background: radial-gradient(52% 100% at 50% 100%, rgba(255, 255, 255, .8) 0 62%, rgba(255, 255, 255, 0) 100%);
    z-index: 0;
}

/* ---------- Blue presents (pure CSS) -------------------------------------- */
.xmas-gift {
    position: absolute;
    width: calc(var(--gw, 62px) * var(--gs));
    height: calc(var(--gh, 50px) * var(--gs));
    border-radius: 5px;
    background: var(--g1, linear-gradient(160deg, #60a5fa, #2563eb));
    box-shadow: inset 0 -10px 16px rgba(0, 0, 0, .28), 0 10px 20px rgba(0, 0, 0, .4);
    animation: xmas-gift-bob var(--gbd, 5s) ease-in-out infinite alternate;
}
.xmas-gift::before {
    content: "";
    position: absolute;
    top: calc(-11px * var(--gs));
    left: calc(-5px * var(--gs));
    right: calc(-5px * var(--gs));
    height: calc(13px * var(--gs));
    border-radius: 4px;
    background: var(--g2, linear-gradient(160deg, #93c5fd, #3b82f6));
    box-shadow: 0 3px 6px rgba(0, 0, 0, .35);
}
.xmas-gift-ribbon {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(#f0f9ff, #bae6fd) center / 100% calc(9px * var(--gs)) no-repeat,
        linear-gradient(90deg, #f0f9ff, #bae6fd) center / calc(11px * var(--gs)) 100% no-repeat;
    opacity: .95;
}
.xmas-gift-bow {
    position: absolute;
    top: calc(-24px * var(--gs));
    left: 50%;
    transform: translateX(-50%);
    width: calc(26px * var(--gs));
    height: calc(14px * var(--gs));
}
.xmas-gift-bow::before,
.xmas-gift-bow::after {
    content: "";
    position: absolute;
    top: 0;
    width: 52%;
    height: 100%;
    background: linear-gradient(180deg, #e0f2fe, #7dd3fc);
    border: 1.5px solid #bae6fd;
}
.xmas-gift-bow::before {
    left: 0;
    border-radius: 70% 30% 60% 40%;
    transform: rotate(-14deg);
}
.xmas-gift-bow::after {
    right: 0;
    border-radius: 30% 70% 40% 60%;
    transform: rotate(14deg);
}
@keyframes xmas-gift-bob {
    from { transform: translateY(0); }
    to   { transform: translateY(-5px); }
}
.xmas-gift--1 { left: calc(2vw + 96px); bottom: 5px;  --g1: linear-gradient(160deg, #60a5fa, #1d4ed8); --g2: linear-gradient(160deg, #93c5fd, #3b82f6); --gbd: 4.4s; z-index: 2; }
.xmas-gift--2 { left: calc(2vw + 34px); bottom: 2px;  --gw: 50px; --gh: 41px; --g1: linear-gradient(160deg, #38bdf8, #0284c7); --g2: linear-gradient(160deg, #7dd3fc, #0ea5e9); --gbd: 5.2s; animation-delay: .8s; z-index: 3; }
.xmas-gift--3 { right: calc(2.5vw + 24px); bottom: 3px; --gw: 56px; --gh: 46px; --g1: linear-gradient(160deg, #818cf8, #3730a3); --g2: linear-gradient(160deg, #a5b4fc, #4f46e5); --gbd: 4.8s; animation-delay: .4s; z-index: 3; }
.xmas-gift--4 { right: calc(2.5vw + 82px); bottom: 6px; --g1: linear-gradient(160deg, #22d3ee, #0e7490); --g2: linear-gradient(160deg, #67e8f9, #06b6d4); --gbd: 5.6s; animation-delay: 1.2s; z-index: 2; }
@media (max-width: 640px) {
    .xmas-gift--1 { left: calc(2vw + 62px); }
    .xmas-gift--2 { left: calc(2vw + 22px); }
    .xmas-gift--3 { right: calc(2.5vw + 16px); }
    .xmas-gift--4 { right: calc(2.5vw + 52px); }
}

/* ---------- Discount banner ------------------------------------------------ */
.xmas-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: .95rem;
    margin: 1.5rem auto;
    max-width: min(46rem, 100%);
    padding: 1rem 1.3rem;
    border-radius: 1rem;
    overflow: hidden;
    text-align: left;
    background:
        linear-gradient(135deg, rgba(6, 78, 59, .55) 0%, rgba(15, 23, 42, .62) 55%, rgba(30, 64, 175, .4) 100%),
        rgba(13, 15, 30, .78);
    border: 1px solid rgba(52, 211, 153, .38);
    box-shadow:
        0 20px 46px -20px rgba(16, 185, 129, .55),
        inset 0 1px 0 rgba(255, 255, 255, .14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
/* Snow settled along the banner's top edge */
.xmas-banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 9px;
    background-image: radial-gradient(8px 9px at 8px 0, rgba(255, 255, 255, .92) 96%, rgba(255, 255, 255, 0) 97%);
    background-size: 16px 9px;
    background-repeat: repeat-x;
    pointer-events: none;
}
.xmas-banner-flake {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    background: linear-gradient(#a5f3fc, #a5f3fc) center / 100% 2.5px no-repeat;
    filter: drop-shadow(0 0 6px rgba(165, 243, 252, .8));
    animation: xmas-flake-spin 14s linear infinite;
}
.xmas-banner-flake::before,
.xmas-banner-flake::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(#a5f3fc, #a5f3fc) center / 100% 2.5px no-repeat;
    border-radius: 2px;
}
.xmas-banner-flake::before { transform: rotate(60deg); }
.xmas-banner-flake::after  { transform: rotate(120deg); }
@keyframes xmas-flake-spin {
    to { transform: rotate(360deg); }
}
.xmas-banner-body { min-width: 0; }
.xmas-banner-title {
    margin: 0;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.4;
    color: #f8fafc;
}
.xmas-banner-title span { color: #fcd34d; }
.xmas-banner-code {
    display: inline-block;
    margin-top: .45rem;
    padding: .22rem .6rem;
    border-radius: .55rem;
    font-family: "JetBrains Mono", "Courier New", monospace;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: #fde68a;
    background: rgba(251, 191, 36, .14);
    border: 1px solid rgba(251, 191, 36, .5);
    box-shadow: 0 0 14px rgba(251, 191, 36, .2);
}
/* Floating variant used on the fullscreen ad board */
.xmas-banner--float {
    position: fixed;
    bottom: 1.1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 70;
    margin: 0;
    max-width: min(92vw, 560px);
    padding: .75rem 1rem;
    border-radius: .9rem;
}
.xmas-banner--float .xmas-banner-flake { width: 26px; height: 26px; }
.xmas-banner--float .xmas-banner-title { font-size: .9rem; }
.xmas-banner--float .xmas-banner-code { margin-top: .3rem; font-size: .75rem; }

/* ---------- Reduced motion: freeze all decoration ------------------------- */
@media (prefers-reduced-motion: reduce) {
    .xmas-snow { display: none !important; }
    .xmas-tree,
    .xmas-star,
    .xmas-bauble,
    .xmas-gift,
    .xmas-banner-flake { animation: none !important; }
}
