/* Frexima Christmas dressing. Decorative only: no UI copy.
   Shared chrome keeps the existing rose/cream palette and control colours.
   Linked by the marketing and workspace HTML helpers; remove those links to
   return to the regular presentation without changing any page templates. */

body:has(> .marketing-header) {
    background:
        radial-gradient(ellipse at 96% 4%, rgb(198 163 99 / 15%), transparent 35rem),
        radial-gradient(ellipse at 4% 15%, rgb(164 95 87 / 9%), transparent 34rem),
        #fffaf6;
}

body > .marketing-header {
    position: relative;
    border-bottom-color: #d7bd8d;
}

body > .marketing-header::after {
    position: absolute;
    inset-inline: 0;
    bottom: -14px;
    height: 26px;
    background: url("../images/christmas/frexima-lights.svg?v=20261104") center top / 320px 26px repeat-x;
    content: "";
    pointer-events: none;
    filter: drop-shadow(0 1px 5px rgb(226 178 76 / 45%));
    animation: frexima-lights-glow 5.8s ease-in-out infinite;
}

body .marketing-hero {
    position: relative;
    isolation: isolate;
}

body .marketing-hero::before {
    position: absolute;
    z-index: -1;
    inset: 0 -8px;
    background: url("../images/christmas/frexima-sparkles.svg?v=20261104") center / 100% 100% no-repeat;
    content: "";
    pointer-events: none;
    animation: frexima-star-glow 6.6s ease-in-out infinite;
}

body .marketing-hero::after {
    position: absolute;
    top: 22px;
    inset-inline-end: -2px;
    width: clamp(130px, 16vw, 190px);
    height: 150px;
    background: url("../images/christmas/frexima-pine.svg?v=20261104") right top / contain no-repeat;
    content: "";
    pointer-events: none;
    filter: drop-shadow(0 3px 9px rgb(209 163 85 / 22%));
}

body .marketing-preview {
    border-color: #cfaf72;
    box-shadow: 0 24px 65px rgb(99 67 43 / 12%), 0 0 0 5px rgb(255 249 229 / 80%), 0 0 36px rgb(222 183 107 / 22%);
}

body .marketing-preview::before {
    background:
        radial-gradient(circle at 14% 19%, #fff8e8 0 2px, transparent 3px),
        radial-gradient(circle at 87% 70%, #fff8e8 0 2px, transparent 3px),
        linear-gradient(145deg, #dce5dc, #e8ddd2 72%);
    border: 1px solid #d1c9b8;
}

body .marketing-preview .marketing-preview-badge {
    background: #416551;
}

body .marketing-kicker::before {
    width: 15px;
    height: 18px;
    background: #416551;
    border-radius: 0;
    clip-path: polygon(50% 0, 83% 33%, 69% 33%, 100% 68%, 60% 68%, 60% 100%, 40% 100%, 40% 68%, 0 68%, 31% 33%, 17% 33%);
}

body .marketing-cta {
    border-color: #d7bd8d;
    background:
        radial-gradient(circle at 88% 15%, rgb(198 163 99 / 19%), transparent 15rem),
        linear-gradient(120deg, #f1e5de, #f7eee4);
}

html[data-ui-theme="workspace"] body :is(.topbar, .brand-topbar) {
    border-bottom-color: #cfb990;
    /* A background preserves sticky/static positioning and all dropdowns. */
    background-image: url("../images/christmas/frexima-lights.svg?v=20261104") !important;
    background-position: center bottom !important;
    background-repeat: repeat-x !important;
    background-size: 270px 22px;
}

html[data-ui-theme="workspace"] .auth-body {
    background:
        radial-gradient(ellipse at 15% 0, rgb(65 101 81 / 12%), transparent 34rem),
        radial-gradient(ellipse at 90% 75%, rgb(198 163 99 / 14%), transparent 30rem),
        var(--workspace-page);
}

html[data-ui-theme="workspace"] .auth-body .auth-card {
    position: relative;
    border-color: #cdb080;
    box-shadow: 0 16px 55px rgb(92 62 41 / 8%), 0 0 0 4px rgb(255 248 227 / 75%), 0 0 42px rgb(213 173 100 / 21%);
}

html[data-ui-theme="workspace"] .auth-body .auth-card::after {
    position: absolute;
    inset: -20px -16px;
    background: url("../images/christmas/frexima-sparkles.svg?v=20261104") center / 100% 100% no-repeat;
    mask: linear-gradient(#000 0 0) top / 100% 26px no-repeat,
        linear-gradient(#000 0 0) bottom / 100% 26px no-repeat,
        linear-gradient(#000 0 0) left / 26px 100% no-repeat,
        linear-gradient(#000 0 0) right / 26px 100% no-repeat;
    content: "";
    pointer-events: none;
    animation: frexima-star-glow 6.6s ease-in-out -2s infinite;
}

html[data-ui-theme="workspace"] .auth-body .auth-card::before {
    position: absolute;
    top: -16px;
    inset-inline-end: -1px;
    width: 95px;
    height: 81px;
    background: url("../images/christmas/frexima-pine.svg?v=20261104") right top / contain no-repeat;
    content: "";
    pointer-events: none;
}

html[data-ui-theme="workspace"] body :is(.sidebar, .brand-sidebar) > .sidebar-brand {
    border-bottom: 1px solid #d5c3a6;
    padding-bottom: 18px;
    margin-bottom: 6px;
    background: url("../images/christmas/frexima-lights.svg?v=20261104") center bottom / 260px 17px repeat-x;
}

@media (max-width: 940px) {
    body .marketing-hero::after {
        top: auto;
        bottom: 38px;
        width: 125px;
        height: 105px;
        opacity: .8;
    }
}

@media (max-width: 600px) {
    body > .marketing-header::after {
        height: 22px;
        bottom: -12px;
        background-size: 270px 22px;
    }

    body .marketing-hero::after {
        bottom: 38px;
        width: 92px;
        height: 78px;
    }

    html[data-ui-theme="workspace"] .auth-body .auth-card::before {
        width: 73px;
        height: 62px;
        top: -11px;
    }
}

/* Slow, gentle changes in brightness never flash or move across the text. */
@keyframes frexima-lights-glow {
    0%, 100% { opacity: .78; }
    50% { opacity: 1; }
}

@keyframes frexima-star-glow {
    0%, 100% { opacity: .58; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    body > .marketing-header::after,
    body .marketing-hero::before,
    html[data-ui-theme="workspace"] .auth-body .auth-card::after {
        animation: none;
        opacity: .9;
    }
}

@media (forced-colors: active), print {
    body > .marketing-header::after,
    body .marketing-hero::before,
    body .marketing-hero::after,
    html[data-ui-theme="workspace"] .auth-body .auth-card::before,
    html[data-ui-theme="workspace"] .auth-body .auth-card::after {
        display: none;
    }

    html[data-ui-theme="workspace"] body :is(.topbar, .brand-topbar),
    html[data-ui-theme="workspace"] body :is(.sidebar, .brand-sidebar) > .sidebar-brand {
        background-image: none !important;
    }

    body .marketing-preview,
    html[data-ui-theme="workspace"] .auth-body .auth-card {
        box-shadow: none;
    }
}
