/* ==========================================================================
   겨울·크리스마스 시즌 테마 (html.season-xmas 일 때만 적용)
   켜고 끄기: 관리자 > 시스템 설정 > 시즌 테마  /  미리보기: ?season=xmas
   이 파일만 빼면 기존 디자인 그대로 — front.css·saas.css 는 수정하지 않음
   ========================================================================== */

html.season-xmas {
    --xm-red: #b4232c;
    --xm-red-dark: #8f1a22;
    --xm-green: #1f6b4a;
    --xm-pine: #143d2e;
    --xm-gold: #e2b857;
    --xm-gold-dark: #c99a35;
    --xm-sky: #eaf3fa;
}

/* ---------- 상단 띠배너 ---------- */
html.season-xmas .front-announcement {
    background: linear-gradient(90deg, var(--xm-red-dark), var(--xm-red) 50%, var(--xm-red-dark));
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

html.season-xmas .front-announcement-badge {
    background: var(--xm-gold);
    color: #3a1f08;
}

html.season-xmas .front-announcement-item.is-cta {
    color: #ffe3a3;
}

html.season-xmas .front-announcement-dot {
    color: rgba(255, 255, 255, 0.5);
}

/* ---------- 헤더: 로고 산타모자 + 전구 줄 ---------- */
html.season-xmas .saas-logo {
    position: relative;
}

.xmas-hat {
    display: none;
}

html.season-xmas .xmas-hat {
    display: block;
    position: absolute;
    left: -9px;
    top: -9px;
    width: 34px;
    height: auto;
    transform: rotate(-18deg);
    transform-origin: 60% 80%;
    pointer-events: none;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.12));
}

html.season-xmas .saas-header.scrolled .xmas-hat {
    width: 30px;
}

html.season-xmas .saas-header .saas-btn-primary {
    background: var(--xm-red);
}

html.season-xmas .saas-header .saas-btn-primary:hover {
    background: var(--xm-red-dark);
}

.xmas-garland {
    display: none;
}

html.season-xmas .xmas-garland {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 26px;
    pointer-events: none;
    background-repeat: repeat-x;
    background-size: 160px 26px;
    background-position: 0 -1px;
    /* 전선 + 소켓 + 전구 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26' viewBox='0 0 160 26'%3E%3Cpath d='M0 3 Q20 13 40 3 T80 3 T120 3 T160 3' fill='none' stroke='%232b3a33' stroke-width='1.4'/%3E%3Cg fill='%23555d63'%3E%3Crect x='17.5' y='7' width='5' height='4' rx='1'/%3E%3Crect x='57.5' y='7' width='5' height='4' rx='1'/%3E%3Crect x='97.5' y='7' width='5' height='4' rx='1'/%3E%3Crect x='137.5' y='7' width='5' height='4' rx='1'/%3E%3C/g%3E%3Cellipse cx='20' cy='16' rx='4' ry='5.5' fill='%23e23b3b'/%3E%3Cellipse cx='60' cy='16' rx='4' ry='5.5' fill='%23f2c14e'/%3E%3Cellipse cx='100' cy='16' rx='4' ry='5.5' fill='%232fa36b'/%3E%3Cellipse cx='140' cy='16' rx='4' ry='5.5' fill='%235fb6f5'/%3E%3Cg fill='%23fff' opacity='.7'%3E%3Cellipse cx='18.6' cy='14' rx='1.1' ry='1.8'/%3E%3Cellipse cx='58.6' cy='14' rx='1.1' ry='1.8'/%3E%3Cellipse cx='98.6' cy='14' rx='1.1' ry='1.8'/%3E%3Cellipse cx='138.6' cy='14' rx='1.1' ry='1.8'/%3E%3C/g%3E%3C/svg%3E");
}

/* 반짝임: 홀수·짝수 전구 빛무리를 번갈아 켬 */
html.season-xmas .xmas-garland::before,
html.season-xmas .xmas-garland::after {
    content: '';
    position: absolute;
    inset: 0;
    background-repeat: repeat-x;
    background-size: 160px 26px;
    background-position: 0 -1px;
    animation: xmasTwinkle 2.4s ease-in-out infinite;
}

html.season-xmas .xmas-garland::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26' viewBox='0 0 160 26'%3E%3Cdefs%3E%3CradialGradient id='a'%3E%3Cstop offset='0' stop-color='%23ff6b6b' stop-opacity='.75'/%3E%3Cstop offset='1' stop-color='%23ff6b6b' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='b'%3E%3Cstop offset='0' stop-color='%2348d18f' stop-opacity='.7'/%3E%3Cstop offset='1' stop-color='%2348d18f' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='20' cy='16' r='10' fill='url(%23a)'/%3E%3Ccircle cx='100' cy='16' r='10' fill='url(%23b)'/%3E%3C/svg%3E");
}

html.season-xmas .xmas-garland::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26' viewBox='0 0 160 26'%3E%3Cdefs%3E%3CradialGradient id='c'%3E%3Cstop offset='0' stop-color='%23ffd76a' stop-opacity='.8'/%3E%3Cstop offset='1' stop-color='%23ffd76a' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='d'%3E%3Cstop offset='0' stop-color='%237cc8ff' stop-opacity='.75'/%3E%3Cstop offset='1' stop-color='%237cc8ff' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='60' cy='16' r='10' fill='url(%23c)'/%3E%3Ccircle cx='140' cy='16' r='10' fill='url(%23d)'/%3E%3C/svg%3E");
    animation-delay: -1.2s;
}

@keyframes xmasTwinkle {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 1; }
}

/* 스크롤로 띠배너가 접히거나 모바일 메뉴가 열리면 전구 줄도 숨김 */
html.season-xmas.front-announcement-hidden .xmas-garland,
html.season-xmas .saas-header.nav-open ~ .xmas-garland {
    display: none;
}

/* ---------- 히어로 ---------- */
html.season-xmas .fr-hero {
    position: relative;
    background: linear-gradient(180deg, var(--xm-sky) 0%, #f6fafd 45%, #fff 85%);
}

html.season-xmas .fr-hero-inner {
    position: relative;
    z-index: 1;
}

.xmas-snow {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

html.season-xmas .fr-hero .fr-label {
    color: var(--xm-green);
}

html.season-xmas .fr-hero .fr-label .fa-snowflake {
    color: #7fb2d6;
    font-size: 0.85rem;
}

html.season-xmas .fr-hero-title em {
    color: var(--xm-red);
}

html.season-xmas .fr-hero .fr-btn--primary {
    background: var(--xm-red);
}

html.season-xmas .fr-hero .fr-btn--primary:hover {
    background: var(--xm-red-dark);
}

/* 트리 + 큰 선물상자 (아이맥 받침대 앞) */
.xmas-tree {
    display: none;
}

html.season-xmas .xmas-tree {
    display: block;
    position: absolute;
    left: 33%;
    bottom: 0;
    width: 52%;
    height: auto;
    z-index: 6;
    pointer-events: none;
    transform-origin: 50% 100%;
    overflow: visible;
    filter: drop-shadow(0 16px 12px rgba(14, 57, 43, .22));
}

/* Holiday campaign: layered product stage, metallic materials and soft light. */
html.season-xmas .fr-hero {
    isolation: isolate;
    background: radial-gradient(ellipse at 78% 35%, #e1eee3 0%, transparent 48%),
        radial-gradient(ellipse at 12% 10%, #fff1d4 0%, transparent 52%), #faf9f3;
}
html.season-xmas .fr-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 85% 14%, #e4bd6566 0 3px, transparent 5px),
        radial-gradient(circle at 57% 20%, #fff 0 4px, transparent 7px),
        radial-gradient(circle at 92% 68%, #e4bd6570 0 5px, transparent 9px);
    animation: xmAmbient 6s ease-in-out infinite alternate;
}
html.season-xmas .fr-hero .fr-label {
    letter-spacing: .15em;
    color: #6f5425;
}
html.season-xmas .fr-hero-title em { color: #185640; }
html.season-xmas .fr-hero .fr-btn--primary {
    background: linear-gradient(135deg, #ba3444, #811d30);
    box-shadow: 0 10px 25px -10px #811d3066, inset 0 1px 0 #ffffff55;
}
html.season-xmas .fr-hero-stage {
    padding-bottom: clamp(130px, 13vw, 175px);
    isolation: isolate;
    perspective: 1000px;
}
html.season-xmas .fr-hero-stage::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 75%;
    left: 0;
    top: -8%;
    border-radius: 50%;
    border: 1px solid #b6954c35;
    background: radial-gradient(ellipse, #ffffffa0, #d7e8dc50 60%, transparent 72%);
    box-shadow: 0 0 65px #f3d99135;
    pointer-events: none;
}
html.season-xmas .fr-hero-stage::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 9%;
    width: 90%;
    height: 65px;
    border-radius: 50%;
    background: radial-gradient(ellipse, #b9cfc180, #ffffffb0 55%, transparent 72%);
    pointer-events: none;
    z-index: 1;
}
html.season-xmas .fr-device--imac {
    filter: drop-shadow(0 18px 18px #103b2820);
}
html.season-xmas .fr-device--phone {
    bottom: 90px;
    right: 0;
    transform: rotate(5deg);
    box-shadow: 8px 20px 30px -12px #103b2845;
}
html.season-xmas .fr-hero-illust { bottom: 45px; width: 36%; }
html.season-xmas .xmas-tree > ellipse { fill: #edf3e6; stroke: none; opacity: .7; }
html.season-xmas .xmas-pine > path:first-of-type { fill: url(#xmPineMaterial); stroke: #0b4635; stroke-width: 1; }
html.season-xmas .xmas-pine > path:nth-of-type(2) { stroke: #f9df9a; stroke-width: 2; }
html.season-xmas .xmas-pine circle {
    fill: url(#xmBaubleMaterial);
    stroke: #f5dfaa;
    stroke-width: .5;
    animation: xmOrnament 3s ease-in-out infinite alternate;
}
html.season-xmas .xmas-pine circle:nth-child(3n) { animation-delay: -1.5s; }
html.season-xmas .xmas-tree .xmas-star {
    fill: url(#xmGoldMaterial);
    stroke: #f9e0a0;
    stroke-width: .7;
    filter: drop-shadow(0 0 6px #ffc957);
}
html.season-xmas .xmas-gifts rect[fill="#c62f36"] { fill: url(#xmRedMaterial); }
html.season-xmas .xmas-gifts rect[fill="#f2c14e"] { fill: url(#xmGoldMaterial); }
html.season-xmas .xmas-gifts rect[fill="#2f8a5f"] { fill: url(#xmPineMaterial); }
html.season-xmas .xmas-gifts rect[stroke] { stroke: #815e3740; stroke-width: 1; }
html.season-xmas .xmas-gifts path { stroke: #d8b35c; }
html.season-xmas .fr-hero-meta { border-color: #9a865d30; }
@keyframes xmAmbient { from { opacity: .35; } to { opacity: 1; } }
@keyframes xmOrnament { from { filter: drop-shadow(0 0 1px #ffdf88); } to { filter: drop-shadow(0 0 4px #ffdf88); } }
@media (max-width: 720px) {
    html.season-xmas .fr-hero-stage { padding-bottom: 125px; }
    html.season-xmas .xmas-tree { width: 57%; left: 28%; bottom: 0; }
    html.season-xmas .fr-device--phone { bottom: 110px; right: 0; }
    html.season-xmas .fr-hero-illust { bottom: 55px; width: 33%; }
    html.season-xmas .fr-hero .fr-label { font-size: .65rem; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
    html.season-xmas .fr-hero::before,
    html.season-xmas .xmas-pine circle { animation: none; }
}

html.season-xmas .xmas-tree .xmas-star {
    transform-box: fill-box;
    transform-origin: center;
    animation: xmasStar 3s ease-in-out infinite;
}

@keyframes xmasStar {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.18); opacity: 0.85; }
}

/* ---------- 최종 CTA: 진녹색 겨울밤 밴드 ---------- */
html.season-xmas .fr-cta {
    position: relative;
    overflow: hidden;
    background-color: var(--xm-pine);
    background-image:
        radial-gradient(circle at 12% 30%, rgba(255, 255, 255, 0.9) 0 1.6px, transparent 2.4px),
        radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.7) 0 1.2px, transparent 2px),
        radial-gradient(circle at 42% 72%, rgba(255, 255, 255, 0.8) 0 1.4px, transparent 2.2px),
        radial-gradient(circle at 90% 64%, rgba(255, 255, 255, 0.6) 0 1px, transparent 1.8px),
        radial-gradient(circle at 25% 88%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.8px),
        radial-gradient(ellipse at 50% 120%, rgba(226, 184, 87, 0.18), transparent 60%);
    background-size: 180px 160px, 220px 200px, 260px 210px, 200px 230px, 240px 170px, 100% 100%;
}

html.season-xmas .fr-cta .fr-label {
    color: var(--xm-gold);
}

html.season-xmas .fr-cta-title {
    color: #fff;
}

html.season-xmas .fr-cta-desc {
    color: rgba(255, 255, 255, 0.72);
}

html.season-xmas .fr-cta .fr-btn--ink {
    background: var(--xm-gold);
    color: #2a1a06;
}

html.season-xmas .fr-cta .fr-btn--ink:hover {
    background: #f0c96a;
}

/* ---------- 캐롤 버튼 (좌하단, TOP 버튼과 겹치지 않게) ---------- */
.xmas-music-btn {
    position: fixed;
    left: 24px;
    bottom: 28px;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px 0 14px;
    border: 1.5px solid #121417;
    border-radius: 999px;
    background: #fff;
    color: #121417;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.35);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.xmas-music-btn:hover {
    transform: translateY(-2px);
}

.xmas-music-btn:focus-visible {
    outline: 3px solid var(--xm-gold, #e2b857);
    outline-offset: 2px;
}

.xmas-music-btn i {
    font-size: 0.95rem;
    color: var(--xm-red, #b4232c);
}

.xmas-music-btn.is-playing {
    background: var(--xm-red, #b4232c);
    border-color: var(--xm-red, #b4232c);
    color: #fff;
}

.xmas-music-btn.is-playing i {
    color: #ffe3a3;
    animation: xmasNote 1.2s ease-in-out infinite;
}

@keyframes xmasNote {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-2px) rotate(-8deg); }
}

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
    html.season-xmas .xmas-hat {
        width: 28px;
        left: -7px;
        top: -7px;
    }
}

@media (max-width: 720px) {
    .xmas-music-btn {
        left: 16px;
        bottom: 18px;
        height: 42px;
        padding: 0 14px 0 12px;
        font-size: 0.8rem;
    }

    html.season-xmas .xmas-garland {
        height: 22px;
        background-size: 128px 21px;
    }

    html.season-xmas .xmas-garland::before,
    html.season-xmas .xmas-garland::after {
        background-size: 128px 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.season-xmas .xmas-garland::before,
    html.season-xmas .xmas-garland::after,
    html.season-xmas .xmas-tree .xmas-star,
    .xmas-music-btn.is-playing i {
        animation: none;
        opacity: 0.8;
    }
}
