/* ==========================================================================
   Julepynt (pakke 162, Morten 30.11.2026)
   ==========================================================================

   Lenkes BARE når pynten skal vises (includes/julepynt.php). Utenfor
   perioden lastes ikke fila, og ingenting her gjelder.

   Topp og bunn på alle sider: snøbyge og nisselue i menylinja, girlander
   langs underkanten av menylinja, julescene over bunnfeltet. Hilsenen øverst
   i bunnfeltet skrives av PHP etter datoene.

   ⚠️ INGEN RELIGIØSE SYMBOLER (Mortens krav): ingen stjerner (heller ikke i
   tretoppen), engler, krybbe, kirker, kors (vinduer uten krysspost, gavebånd
   bare loddrett), stearinlys, adventsstake eller kirkeklokker. Ingen gull-
   eller okerkuler, blinkende lys, helrøde hjerter eller skråstilte røde
   merkelapper: de ligner nettstedets egne signaler. Se lista øverst i
   includes/julepynt.php før noe nytt tegnes.

   TEGNINGENE er data:-SVG med bare presentasjonsattributter (CSP-en stopper
   style= og <style>). %3C og %3E er < og >, %23 er #.

   BEVEGELSEN er kort med vilje: snøen faller én gang (under 5 s) og pynten
   svaier to ganger når en side åpnes, så står alt stille (WCAG 2.2.2). På
   objektsidene med budboks står alt stille fra start, og ingenting beveger
   seg for dem som har bedt om mindre bevegelse.

   Ingen vw-enheter (de har gitt vannrett rulling før), og ingen max-width på
   tekst (grunnregelen for mjf.no).
   ========================================================================== */


/* ---------- Menylinja ---------- */

.topp {
    position: relative;
    /* En egen stripe nederst til snora, så pynten henger høyst 1,25rem ned
       over siden: innenfor toppmargen til <main> (2rem) og heroen. */
    padding-bottom: 1rem;
}

.topp-inn {
    position: relative;
    z-index: 1;
}

/* Testbanneret står rett under menylinja (bare i testmodus). */
.topp + .testbanner {
    padding-top: calc(.65rem + 1.25rem);
}


/* ---------- Snøbygen ---------- */

.jul-sno {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Hvert <i> er like høyt som menylinja og flyttes sin egen høyde ned. Da
   faller fnugget (::before) hele veien, enten menyen er én rad på PC eller
   fire på en smal telefon. Én gang, og ferdig før 5 sekunder. */
.jul-sno i {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5px;
    animation: jul-sno 3.2s linear 1 both;
}

.jul-sno i::before {
    content: "";
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    opacity: .85;
}

.jul-sno i:nth-child(3n)::before     { width: 3px; height: 3px; }
.jul-sno i:nth-child(4n + 1)::before { width: 5px; height: 5px; }

.jul-sno i:nth-child(1)  { left: 3%;  animation-delay: 0s;   animation-duration: 3.2s; }
.jul-sno i:nth-child(2)  { left: 9%;  animation-delay: .7s;  animation-duration: 3.6s; }
.jul-sno i:nth-child(3)  { left: 15%; animation-delay: .3s;  animation-duration: 2.9s; }
.jul-sno i:nth-child(4)  { left: 21%; animation-delay: 1.1s; animation-duration: 3.3s; }
.jul-sno i:nth-child(5)  { left: 27%; animation-delay: .5s;  animation-duration: 3.5s; }
.jul-sno i:nth-child(6)  { left: 33%; animation-delay: 1.4s; animation-duration: 3s; }
.jul-sno i:nth-child(7)  { left: 39%; animation-delay: .2s;  animation-duration: 3.4s; }
.jul-sno i:nth-child(8)  { left: 45%; animation-delay: .9s;  animation-duration: 2.8s; }
.jul-sno i:nth-child(9)  { left: 51%; animation-delay: .4s;  animation-duration: 3.6s; }
.jul-sno i:nth-child(10) { left: 57%; animation-delay: 1.2s; animation-duration: 3.1s; }
.jul-sno i:nth-child(11) { left: 63%; animation-delay: .1s;  animation-duration: 3.3s; }
.jul-sno i:nth-child(12) { left: 69%; animation-delay: .8s;  animation-duration: 2.9s; }
.jul-sno i:nth-child(13) { left: 75%; animation-delay: .6s;  animation-duration: 3.5s; }
.jul-sno i:nth-child(14) { left: 81%; animation-delay: 1.3s; animation-duration: 3s; }
.jul-sno i:nth-child(15) { left: 87%; animation-delay: .3s;  animation-duration: 3.4s; }
.jul-sno i:nth-child(16) { left: 93%; animation-delay: 1s;   animation-duration: 3.2s; }

@keyframes jul-sno {
    from { transform: translate(0, -6px); }
    to   { transform: translate(-.6rem, 100%); }
}


/* ---------- Girlanderen ---------- */

/* Henger fra stripa nederst i menylinja. Over siden, men under chatten (90),
   bildeviseren (100) og budslutt-lagene (1000). Kan aldri klikkes på. */
.jul-girlander {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1.25rem;
    height: 2.25rem;
    z-index: 2;
    display: flex;
    overflow: hidden;
    pointer-events: none;
}

/* Like brede celler, hver med sin bue av granbar strukket til bredden, så
   snora henger sammen uansett hvor mange som vises. */
.jul-pynt {
    position: relative;
    flex: 1 1 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 2 Q50 18 100 2' fill='none' stroke='%233a8f58' stroke-width='3.4' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M0 2 Q50 18 100 2' fill='none' stroke='%23a6e2b1' stroke-width='1.3' stroke-dasharray='2 3' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center top / 100% .8rem no-repeat;
}

.jul-pynt::after {
    content: "";
    position: absolute;
    top: .65rem;
    left: 50%;
    width: 1.08rem;
    height: 1.55rem;
    margin-left: -.54rem;
    background: no-repeat center top / contain;
    transform-origin: 50% 0;
    animation: jul-sving 2.2s ease-in-out 2 both;
}

.jul-pynt:nth-child(2n)::after { animation-delay: .25s; }
.jul-pynt:nth-child(3n)::after { animation-delay: .5s; }

@keyframes jul-sving {
    0%   { transform: rotate(0deg); }
    25%  { transform: rotate(7deg); }
    75%  { transform: rotate(-7deg); }
    100% { transform: rotate(0deg); }
}

.jul-pynt-kule-rod::after         { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 26'%3E%3Cpath d='M9 0V5' stroke='%236b5a45' stroke-width='.8'/%3E%3Crect x='6.8' y='4.4' width='4.4' height='3.6' rx='.6' fill='%239aa4aa'/%3E%3Ccircle cx='9' cy='16.2' r='8.5' fill='%23c1272d'/%3E%3Ccircle cx='6.1' cy='12.8' r='2.3' fill='%23fff' fill-opacity='.55'/%3E%3C/svg%3E"); }
.jul-pynt-kule-solv::after        { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 26'%3E%3Cpath d='M9 0V5' stroke='%236b5a45' stroke-width='.8'/%3E%3Crect x='6.8' y='4.4' width='4.4' height='3.6' rx='.6' fill='%239aa4aa'/%3E%3Ccircle cx='9' cy='16.2' r='8.5' fill='%23cfd8de' stroke='%237f8c94' stroke-width='.7'/%3E%3Ccircle cx='6.1' cy='12.8' r='2.3' fill='%23fff' fill-opacity='.55'/%3E%3C/svg%3E"); }
.jul-pynt-kule-bla::after         { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 26'%3E%3Cpath d='M9 0V5' stroke='%236b5a45' stroke-width='.8'/%3E%3Crect x='6.8' y='4.4' width='4.4' height='3.6' rx='.6' fill='%239aa4aa'/%3E%3Ccircle cx='9' cy='16.2' r='8.5' fill='%23a8cfe0' stroke='%236fa6bf' stroke-width='.7'/%3E%3Ccircle cx='6.1' cy='12.8' r='2.3' fill='%23fff' fill-opacity='.55'/%3E%3C/svg%3E"); }
.jul-pynt-kule-gronn::after       { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 26'%3E%3Cpath d='M9 0V5' stroke='%236b5a45' stroke-width='.8'/%3E%3Crect x='6.8' y='4.4' width='4.4' height='3.6' rx='.6' fill='%239aa4aa'/%3E%3Ccircle cx='9' cy='16.2' r='8.5' fill='%232f6b45' stroke='%2386cf93' stroke-width='.7'/%3E%3Ccircle cx='6.1' cy='12.8' r='2.3' fill='%23fff' fill-opacity='.55'/%3E%3C/svg%3E"); }
.jul-pynt-hjerte::after           { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 26'%3E%3Cdefs%3E%3Cpattern id='r' width='6' height='6' patternUnits='userSpaceOnUse' patternTransform='rotate(45 9 16)'%3E%3Crect width='6' height='6' fill='%23fff'/%3E%3Crect width='3' height='3' fill='%23c1272d'/%3E%3Crect x='3' y='3' width='3' height='3' fill='%23c1272d'/%3E%3C/pattern%3E%3C/defs%3E%3Cpath d='M9 0V10' stroke='%236b5a45' stroke-width='.8'/%3E%3Cpath d='M9 25 C2.4 19.6 .6 15 1.3 11.6 C2 8.2 6.4 7 9 10.2 C11.6 7 16 8.2 16.7 11.6 C17.4 15 15.6 19.6 9 25 Z' fill='url(%23r)' stroke='%23c1272d' stroke-width='1'/%3E%3C/svg%3E"); }
.jul-pynt-pepperkakemann::after   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 26'%3E%3Cpath d='M9 0V5' stroke='%236b5a45' stroke-width='.8'/%3E%3Cg fill='%23b06a32'%3E%3Ccircle cx='9' cy='8' r='3.6'/%3E%3Crect x='5.3' y='10.6' width='7.4' height='9' rx='2.6'/%3E%3Crect x='1.6' y='11.8' width='6.4' height='3.4' rx='1.7' transform='rotate(-28 8 13.5)'/%3E%3Crect x='10' y='11.8' width='6.4' height='3.4' rx='1.7' transform='rotate(28 10 13.5)'/%3E%3Crect x='5.2' y='17.6' width='3.3' height='7.6' rx='1.6'/%3E%3Crect x='9.5' y='17.6' width='3.3' height='7.6' rx='1.6'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Ccircle cx='7.7' cy='7.4' r='.6'/%3E%3Ccircle cx='10.3' cy='7.4' r='.6'/%3E%3Ccircle cx='9' cy='13.8' r='.75'/%3E%3Ccircle cx='9' cy='16.6' r='.75'/%3E%3C/g%3E%3Cpath d='M7.6 9.3 Q9 10.4 10.4 9.3 M2.85 14.9 L3.97 17 M15.15 14.9 L14.03 17 M6.2 23.6 H7.6 M10.4 23.6 H11.8' fill='none' stroke='%23fff' stroke-width='.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.jul-pynt-pepperkakehjerte::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 26'%3E%3Cpath d='M9 0V10' stroke='%236b5a45' stroke-width='.8'/%3E%3Cpath d='M9 25 C2.4 19.6 .6 15 1.3 11.6 C2 8.2 6.4 7 9 10.2 C11.6 7 16 8.2 16.7 11.6 C17.4 15 15.6 19.6 9 25 Z' fill='%23b06a32'/%3E%3Cpath d='M9 22.6 C4 18.4 2.8 15 3.3 12.4 C3.8 10 6.8 9.2 9 11.9 C11.2 9.2 14.2 10 14.7 12.4 C15.2 15 14 18.4 9 22.6 Z' fill='none' stroke='%23fff' stroke-width='.8' stroke-dasharray='1.4 1'/%3E%3Ccircle cx='9' cy='16' r='.9' fill='%23fff'/%3E%3C/svg%3E"); }


/* ---------- Nisseluen på logoen ---------- */

.logo-merke {
    position: relative;
}

/* Innenfor toppfeltets polstring (.8rem), så toppen av vinduet aldri kapper
   den. Filteret som gjør logoen hvit, gjelder bare bildet, ikke luen. */
.logo-merke::after {
    content: "";
    position: absolute;
    left: -5px;
    top: -10px;
    width: 22px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 16'%3E%3Cpath d='M3.5 12.5 C4.5 6 9 2.2 17.5 3.4 C14.5 5.2 13.6 8.6 14 12.5 Z' fill='%23c1272d'/%3E%3Crect x='2' y='11.3' width='13.6' height='4.2' rx='2.1' fill='%23fff'/%3E%3Ccircle cx='18' cy='3.6' r='2.6' fill='%23fff'/%3E%3C/svg%3E") no-repeat center / contain;
    transform: rotate(-14deg);
    pointer-events: none;
}


/* ---------- Julescenen over bunnfeltet ---------- */

.jul-scene {
    position: relative;
    display: block;
    height: 7.5rem;
    margin-top: 3rem;
    overflow: hidden;
    pointer-events: none;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 224 42'%3E%3Cg fill='%23c3d6ca'%3E%3Cpolygon points='8,42 20,10 32,42'/%3E%3Cpolygon points='36,42 45,22 54,42'/%3E%3Cpolygon points='74,42 88,4 102,42'/%3E%3Cpolygon points='120,42 130,20 140,42'/%3E%3Cpolygon points='150,42 162,12 174,42'/%3E%3Cpolygon points='196,42 205,24 214,42'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Cpolygon points='20,10 17.8,15.6 22.2,15.6'/%3E%3Cpolygon points='88,4 85.5,10.6 90.5,10.6'/%3E%3Cpolygon points='162,12 159.8,17.6 164.2,17.6'/%3E%3C/g%3E%3C/svg%3E") left 0 bottom 1.1rem / 14rem 2.6rem repeat-x,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 72' preserveAspectRatio='none'%3E%3Cpath d='M0 40 Q50 18 110 34 T230 30 T340 24 T400 30 V72 H0 Z' fill='%23e3edf3'/%3E%3Cpath d='M0 56 Q70 40 150 52 T300 48 T400 50 V72 H0 Z' fill='%23eef4f8'/%3E%3C/svg%3E") left 0 bottom 0 / 100% 4.5rem no-repeat;
}

/* Scenen står rett på bunnfeltet; avstanden over den har den selv. */
.jul-scene + .bunn {
    margin-top: 0;
}

/* Snøfonnen foran føttene, helt ned til bunnfeltet (-1px: ingen søm). */
.jul-scene::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1.7rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 27' preserveAspectRatio='none'%3E%3Cpath d='M0 9 Q37 2 75 7 T150 8 T225 5 T300 9 V27 H0 Z' fill='%23fff'/%3E%3Cpath d='M0 9 Q37 2 75 7 T150 8 T225 5 T300 9' fill='none' stroke='%23cfe4ee' stroke-width='1.4' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M0 16 Q60 12 120 16 T240 15 T300 16' fill='none' stroke='%23e8f2f7' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") left 0 bottom 0 / 30rem 100% repeat-x;
}

.jul-fig {
    position: absolute;
    bottom: .8rem;
    display: block;
    background: no-repeat center bottom / contain;
}

/* Samme målestokk for alle figurene (ca. 0,075rem per tegneenhet). Trærne
   har sin egen tegning og er bare litt større enn resten. Plasseringen er
   regnet ut for 320–1920 px uten overlapp; gavene står ved foten av det siste
   treet, derfor calc() fra treets venstre kant. */
.jul-tre     { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 84'%3E%3Crect x='26' y='72' width='8' height='12' fill='%236b4423'/%3E%3Cpolygon points='30,40 2,78 58,78' fill='%232f6b45'/%3E%3Cpolygon points='30,40 30,78 58,78' fill='%23285c3b'/%3E%3Cpolygon points='30,22 7,57 53,57' fill='%232f6b45'/%3E%3Cpolygon points='30,22 30,57 53,57' fill='%23285c3b'/%3E%3Cpolygon points='30,5 12,35 48,35' fill='%232f6b45'/%3E%3Cpolygon points='30,5 30,35 48,35' fill='%23285c3b'/%3E%3Cg fill='%23fff'%3E%3Cpolygon points='30,5 26.2,11.5 33.8,11.5'/%3E%3Cpath d='M12 35 Q21 31 30 33 Q39 31 48 35 Q39 37 30 36 Q21 37 12 35 Z'/%3E%3Cpath d='M7 57 Q18 52.5 30 55 Q42 52.5 53 57 Q42 59.5 30 58.2 Q18 59.5 7 57 Z'/%3E%3Cpath d='M2 78 Q16 72.5 30 75.5 Q44 72.5 58 78 Q44 80.6 30 79.4 Q16 80.6 2 78 Z'/%3E%3C/g%3E%3Ccircle cx='30' cy='4.6' r='3.4' fill='%23c1272d'/%3E%3Ccircle cx='28.8' cy='3.4' r='1' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='23' cy='27' r='2.3' fill='%23c1272d'/%3E%3Ccircle cx='37' cy='25' r='2.3' fill='%23a8cfe0'/%3E%3Ccircle cx='19' cy='48' r='2.3' fill='%23e8eef2'/%3E%3Ccircle cx='41' cy='45' r='2.3' fill='%23c1272d'/%3E%3Ccircle cx='28' cy='41' r='2.3' fill='%23a8cfe0'/%3E%3Ccircle cx='13' cy='70' r='2.4' fill='%23c1272d'/%3E%3Ccircle cx='46' cy='68' r='2.4' fill='%23e8eef2'/%3E%3Ccircle cx='33' cy='63' r='2.4' fill='%23c1272d'/%3E%3Ccircle cx='22' cy='62' r='2.4' fill='%23a8cfe0'/%3E%3C/svg%3E"); }
.jul-tre-1   { left: 1%;    width: 4.29rem; height: 6rem; }
.jul-slede   { left: 9%;    width: 8.15rem; height: 4rem;   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='82 339 108 53'%3E%3Cpath d='M84 388 H128 Q137 388 136 380' fill='none' stroke='%238a4f24' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M92 388 V382 M122 388 V382' stroke='%238a4f24' stroke-width='1.5'/%3E%3Crect x='96' y='357' width='11' height='13' fill='%2321759b'/%3E%3Cpath d='M101.5 357 V370' stroke='%23fff' stroke-width='1.2'/%3E%3Crect x='108' y='361' width='9' height='9' fill='%23a8cfe0'/%3E%3Cpath d='M112.5 361 V370' stroke='%23c1272d' stroke-width='1.2'/%3E%3Crect x='102' y='349' width='8' height='8' fill='%232f6b45'/%3E%3Cpath d='M106 349 V357' stroke='%23c1272d' stroke-width='1'/%3E%3Cpath d='M86 382 H126 L131 367 L121 370 H96 Q86 370 86 378 Z' fill='%23c1272d'/%3E%3Cpath d='M96 370 H121' stroke='%23f3ece4' stroke-width='1.5'/%3E%3Cpath d='M130 370 L167 366' stroke='%238a4f24' stroke-width='1'/%3E%3Cellipse cx='146' cy='367' rx='2.5' ry='1.8' fill='%23f3ece4'/%3E%3Cg fill='%236e4529'%3E%3Crect x='147' y='374' width='2.5' height='16'/%3E%3Crect x='152' y='375' width='2.5' height='15'/%3E%3Crect x='164' y='375' width='2.5' height='15'/%3E%3Crect x='169' y='374' width='2.5' height='16'/%3E%3C/g%3E%3Cellipse cx='159' cy='371' rx='14' ry='7' fill='%238a5a3b'/%3E%3Cpath d='M167 367 L176 355 L180 358 L172 372 Z' fill='%238a5a3b'/%3E%3Cellipse cx='180' cy='354' rx='5.5' ry='3.6' fill='%238a5a3b'/%3E%3Ccircle cx='185.5' cy='355' r='1.7' fill='%23c1272d'/%3E%3Ccircle cx='179.5' cy='352.6' r='.7' fill='%23222'/%3E%3Cpath d='M177 351 L174 342 M175.6 346 L171 343 M181 350.5 L183 341 M182.2 345 L186.5 342' fill='none' stroke='%236e4529' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M160 364 V378' stroke='%23c1272d' stroke-width='2'/%3E%3Ccircle cx='160' cy='379' r='1.6' fill='%23c9d1d6'/%3E%3C/svg%3E"); }
.jul-tre-2   { left: 24.5%; width: 2.86rem; height: 4rem; }
.jul-nisse   { left: 32%;   width: 3.47rem; height: 4.9rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='273 328 46 65'%3E%3Cpath d='M300 348 Q318 344 316 362 Q314 376 300 372 Q296 360 300 348 Z' fill='%238a5a3b'/%3E%3Cpath d='M303 352 Q310 350.5 312.5 356' fill='none' stroke='%236e4529' stroke-width='1'/%3E%3Cg fill='%23222'%3E%3Cellipse cx='284' cy='390' rx='4' ry='2'/%3E%3Cellipse cx='296' cy='390' rx='4' ry='2'/%3E%3C/g%3E%3Cg fill='%23b02025'%3E%3Crect x='281' y='380' width='6' height='10'/%3E%3Crect x='293' y='380' width='6' height='10'/%3E%3C/g%3E%3Cpath d='M278 382 H302 L298 358 H282 Z' fill='%23c1272d'/%3E%3Crect x='278' y='380' width='24' height='3' fill='%23fff'/%3E%3Crect x='280' y='370' width='20' height='3' fill='%23222'/%3E%3Crect x='288' y='369.5' width='4' height='4' fill='%23c9d1d6'/%3E%3Cpath d='M282 360 L276 372 L280 373 L285 362 Z' fill='%23c1272d'/%3E%3Ccircle cx='277' cy='374' r='2.2' fill='%232f6b45'/%3E%3Cpath d='M298 360 L304 352 L307 354 L301 363 Z' fill='%23c1272d'/%3E%3Ccircle cx='290' cy='351' r='5' fill='%23f2c9a8'/%3E%3Cpath d='M284 352 Q290 367 296 352 Q290 356 284 352 Z' fill='%23dedbd4'/%3E%3Ccircle cx='290' cy='352.3' r='1.3' fill='%23e8a383'/%3E%3Ccircle cx='288.2' cy='349.6' r='.6' fill='%23222'/%3E%3Ccircle cx='291.8' cy='349.6' r='.6' fill='%23222'/%3E%3Cpath d='M285 344 Q288 330 300 332 Q296 336 296 344 Z' fill='%23c1272d'/%3E%3Crect x='283.5' y='343' width='13' height='3.5' rx='1.7' fill='%23fff'/%3E%3Ccircle cx='301' cy='332' r='2.2' fill='%23fff'/%3E%3C/svg%3E"); }
.jul-tre-3   { left: 44%;   width: 3.71rem; height: 5.2rem; }
.jul-hus     { left: 55%;   width: 5.21rem; height: 6.1rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='428 312 70 82'%3E%3Cg fill='%23d5dde2'%3E%3Ccircle cx='482' cy='333' r='2.6'/%3E%3Ccircle cx='486' cy='326' r='3.4'/%3E%3Ccircle cx='491' cy='318' r='4.2'/%3E%3C/g%3E%3Crect x='478' y='340' width='7' height='14' fill='%238a4f24'/%3E%3Cpath d='M477.2 340.2 H485.8' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3Crect x='436' y='362' width='52' height='30' fill='%23b06a32'/%3E%3Cpolygon points='430,364 462,338 494,364' fill='%238a4f24'/%3E%3Cpolyline points='430,364 462,338 494,364' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='440' cy='358' r='1.2'/%3E%3Ccircle cx='450' cy='350' r='1.2'/%3E%3Ccircle cx='474' cy='350' r='1.2'/%3E%3Ccircle cx='484' cy='358' r='1.2'/%3E%3C/g%3E%3Ccircle cx='452' cy='356' r='1.6' fill='%23c1272d'/%3E%3Ccircle cx='462' cy='348' r='1.6' fill='%232f6b45'/%3E%3Ccircle cx='472' cy='356' r='1.6' fill='%23a8cfe0'/%3E%3Cpath d='M456 392 V380 Q462 372 468 380 V392 Z' fill='%236b3a17' stroke='%23fff' stroke-width='1'/%3E%3Crect x='441' y='370' width='10' height='9' rx='1' fill='%23f6d27a' stroke='%23fff' stroke-width='1'/%3E%3Crect x='473' y='370' width='10' height='9' rx='1' fill='%23f6d27a' stroke='%23fff' stroke-width='1'/%3E%3Cg fill='%23c1272d'%3E%3Ccircle cx='441' cy='388.5' r='1.2'/%3E%3Ccircle cx='447' cy='388.5' r='1.2'/%3E%3Ccircle cx='477' cy='388.5' r='1.2'/%3E%3Ccircle cx='483' cy='388.5' r='1.2'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Ccircle cx='444' cy='388.5' r='1.2'/%3E%3Ccircle cx='480' cy='388.5' r='1.2'/%3E%3C/g%3E%3C/svg%3E"); }
.jul-snomann { left: 70%;   width: 3rem;    height: 4.05rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='532 340 40 54'%3E%3Cpath d='M545 365 L536 358 M559 365 L568 357' stroke='%236b4423' stroke-width='1.3' stroke-linecap='round'/%3E%3Cg fill='%23fff' stroke='%23c9d8e2' stroke-width='.8'%3E%3Ccircle cx='552' cy='382' r='10'/%3E%3Ccircle cx='552' cy='366' r='7.5'/%3E%3Ccircle cx='552' cy='353' r='5.5'/%3E%3C/g%3E%3Crect x='547' y='342' width='10' height='7' fill='%232b2b2b'/%3E%3Crect x='545' y='348' width='14' height='2' fill='%232b2b2b'/%3E%3Crect x='547' y='346.3' width='10' height='1.5' fill='%23c1272d'/%3E%3Cg fill='%23222'%3E%3Ccircle cx='550.2' cy='352.2' r='.7'/%3E%3Ccircle cx='553.8' cy='352.2' r='.7'/%3E%3Ccircle cx='552' cy='364' r='.9'/%3E%3Ccircle cx='552' cy='369' r='.9'/%3E%3C/g%3E%3Cpolygon points='552,354.5 560,355.5 552,356.5' fill='%23e8742a'/%3E%3Crect x='546' y='358' width='12' height='3' fill='%23c1272d'/%3E%3Crect x='554' y='359' width='3' height='8' fill='%23c1272d'/%3E%3C/svg%3E"); }
.jul-tre-4   { left: 84%;   width: 4.57rem; height: 6.4rem; }
.jul-gaver   { left: calc(84% + 4.3rem); width: 2.55rem; height: 1.65rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='626 372 34 22'%3E%3Crect x='628' y='379' width='13' height='13' fill='%23c1272d'/%3E%3Cpath d='M634.5 379 V392' stroke='%23fff' stroke-width='1.6'/%3E%3Cpath d='M634.5 379 Q630 374 631.5 373.5 Q634 374 634.5 379 Q635 374 637.5 373.5 Q639 374 634.5 379 Z' fill='%23fff'/%3E%3Crect x='643' y='384' width='11' height='8' fill='%2321759b'/%3E%3Cpath d='M648.5 384 V392' stroke='%23fff' stroke-width='1.3'/%3E%3Crect x='652' y='386.5' width='7' height='5.5' fill='%232f6b45'/%3E%3Cpath d='M655.5 386.5 V392' stroke='%23c1272d' stroke-width='1.1'/%3E%3C/svg%3E"); }

/* Gavene er så lave at fonnen ellers ville dekket dem; de står foran den. De
   andre figurene står med føttene i snøen. */
.jul-gaver { z-index: 1; }


/* ---------- Hilsenen øverst i bunnfeltet ---------- */

.jul-hilsen {
    margin: 0;
    padding: 1.5rem var(--sidemarg) 0;
    text-align: center;
    font-family: var(--overskrift);
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.2;
    color: #fff;
}


/* ---------- Smalere skjermer ---------- */

@media (max-width: 1100px) {
    .jul-pynt:nth-child(n + 11) { display: none; }
    .jul-tre-2 { display: none; }
}

@media (max-width: 860px) {
    .jul-pynt:nth-child(n + 9) { display: none; }

    .jul-snomann { display: none; }
    .jul-slede   { left: 13%; }
    .jul-nisse   { left: 37%; }
    .jul-tre-3   { left: 47.5%; }
    .jul-hus     { left: 59%; }
    .jul-tre-4   { left: 80%; }
    .jul-gaver   { left: calc(80% + 4.3rem); }
}

@media (max-width: 620px) {
    .topp { padding-bottom: .75rem; }
    .topp + .testbanner { padding-top: calc(.65rem + 1rem); }

    /* Pynten henger høyst 1rem ned: <main> har 1,5rem toppmarg her. */
    .jul-girlander { bottom: -1rem; height: 1.75rem; }
    .jul-pynt { background-size: 100% .6rem; }
    .jul-pynt::after { top: .5rem; width: .83rem; height: 1.2rem; margin-left: -.415rem; }
    .jul-pynt:nth-child(n + 7) { display: none; }

    .jul-scene { height: 5rem; }
    .jul-scene::after { height: 1.15rem; }
    .jul-fig { bottom: .5rem; }

    .jul-tre-3 { display: none; }
    .jul-tre-1 { left: 1%;   width: 2.86rem; height: 4rem; }
    .jul-slede { left: 16%;  width: 5.43rem; height: 2.66rem; }
    .jul-nisse { left: 44%;  width: 2.3rem;  height: 3.25rem; }
    .jul-hus   { left: 58%;  width: 3.5rem;  height: 4.1rem; }
    .jul-tre-4 { left: 78%;  width: 3rem;    height: 4.2rem; }
    .jul-gaver { left: calc(78% + 2.8rem); width: 1.7rem; height: 1.1rem; }

    .jul-hilsen { font-size: 1.25rem; padding-top: 1.25rem; }
}

@media (max-width: 380px) {
    .jul-pynt:nth-child(n + 6) { display: none; }

    .jul-tre-4 { left: 76%; }
    .jul-gaver { left: calc(76% + 2.8rem); }
}


/* ---------- Ro der folk byr, og for dem som har bedt om det ---------- */

/* Objektsiden med budboks: ingen snø, og pynten henger stille. PHP skriver
   heller ikke ut snøen der, og setter .jul-stille, for nettlesere uten :has(). */
body:has(.prisboks) .jul-sno { display: none; }
body:has(.prisboks) .jul-pynt::after { animation: none; }
.jul-stille .jul-pynt::after { animation: none; }

@media (prefers-reduced-motion: reduce) {
    .jul-sno { display: none; }
    .jul-pynt::after { animation: none; }
}


/* ---------- Høykontrast og utskrift: ingen pynt ---------- */

@media (forced-colors: active) {
    .jul-sno,
    .jul-girlander,
    .jul-scene { display: none; }
    .logo-merke::after { content: none; }
    .topp { padding-bottom: 0; }
    .topp + .testbanner { padding-top: .65rem; }
    .jul-scene + .bunn { margin-top: 3rem; }
}

@media print {
    .jul-sno,
    .jul-girlander,
    .jul-scene { display: none !important; }
    .logo-merke::after { content: none; }
    .topp { padding-bottom: 0; }
    .topp + .testbanner { padding-top: .65rem; }
    .jul-scene + .bunn { margin-top: 3rem; }
}
