/* Decorative page atmosphere. It stays behind every content layer. */
body { isolation: isolate; }

.site-atmosphere {
 position: fixed;
 inset: 0;
 z-index: -1;
 overflow: hidden;
 pointer-events: none;
 contain: strict;
}

.ambient-glow {
 position: absolute;
 border-radius: 50%;
 transform-origin: center;
 animation-play-state: paused;
}

.ambient-glow-mint {
 left: -42vw;
 top: -18vh;
 width: 96vw;
 height: 120vh;
 background: radial-gradient(ellipse at center, var(--season-glow, #29a58245) 0%, #226e6324 38%, #226e6300 70%);
 animation: ambient-mint-flow 30s ease-in-out infinite alternate;
 animation-delay: -7s;
 animation-play-state: paused;
}

.ambient-glow-blue {
 right: -34vw;
 top: 12vh;
 width: 90vw;
 height: 112vh;
 background: radial-gradient(ellipse at center, var(--season-sky, #3f8dbb3d) 0%, #265d8621 42%, #265d8600 71%);
 animation: ambient-blue-flow 43s ease-in-out infinite alternate;
 animation-delay: -19s;
 animation-play-state: paused;
}

.ambient-routes {
 position: absolute;
 inset: 0;
 width: 100%;
 height: 100%;
}

.ambient-route {
 stroke: #8ac4b0;
 stroke-width: 1;
 opacity: .14;
 vector-effect: non-scaling-stroke;
}

.ambient-trail {
 stroke: #b7f2d5;
 stroke-width: 2.1;
 stroke-linecap: round;
 stroke-dasharray: 12 1488;
 opacity: .52;
 vector-effect: non-scaling-stroke;
 animation: ambient-route-flow 35s linear infinite;
 animation-delay: -10s;
 animation-play-state: paused;
}

.ambient-trail-two {
 animation-duration: 44s;
 animation-delay: -27s;
 opacity: .42;
}

.ambient-speck {
 position: absolute;
 display: block;
 width: 3px;
 height: 3px;
 border-radius: 50%;
 background: var(--season-speck, #b8f2d5);
 box-shadow: 0 0 10px 2px #9ee5cb14;
 opacity: .3;
 animation: ambient-speck-drift 18s ease-in-out infinite alternate;
 animation-play-state: paused;
}

.ambient-speck:nth-of-type(1) { left: 10%; top: 23%; animation-delay: -3s; }
.ambient-speck:nth-of-type(2) { left: 29%; top: 81%; animation-duration: 23s; animation-delay: -14s; }
.ambient-speck:nth-of-type(3) { left: 45%; top: 52%; width: 2px; height: 2px; animation-duration: 20s; animation-delay: -7s; }
.ambient-speck:nth-of-type(4) { left: 64%; top: 13%; animation-duration: 26s; animation-delay: -18s; }
.ambient-speck:nth-of-type(5) { left: 80%; top: 76%; width: 2px; height: 2px; animation-duration: 21s; animation-delay: -10s; }
.ambient-speck:nth-of-type(6) { left: 94%; top: 43%; animation-duration: 25s; animation-delay: -21s; }

.site-atmosphere[data-running="true"] .ambient-glow,
.site-atmosphere[data-running="true"] .ambient-trail,
.site-atmosphere[data-running="true"] .ambient-speck {
 animation-play-state: running;
}

.atmosphere-toggle {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 9px;
 min-height: 40px;
 margin-top: 17px;
 padding: 8px 12px;
 border: 1px solid #53746b;
 border-radius: 10px;
 background: #0b202966;
 color: #c0dccf;
 font: inherit;
 font-size: .74rem;
 line-height: 1.4;
 cursor: pointer;
 transition: background .2s, border-color .2s;
}

.atmosphere-toggle[hidden] { display: none !important; }
.atmosphere-toggle:hover { border-color: #93bda8; background: #1a3b3b; }
.atmosphere-toggle:focus-visible { outline: 3px solid #48bfff; outline-offset: 4px; }
.atmosphere-toggle-icon { display: grid; place-items: center; width: 12px; height: 12px; flex: 0 0 12px; }
.atmosphere-toggle-icon::before { content: ""; width: 8px; height: 10px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.atmosphere-toggle[data-paused="true"] .atmosphere-toggle-icon::before { width: 0; height: 0; border: 5px solid transparent; border-left: 8px solid currentColor; border-right: 0; }

@keyframes ambient-mint-flow {
 from { transform: translate3d(-5%, -4%, 0) rotate(-14deg) scale(.96); opacity: .76; }
 to { transform: translate3d(24%, 10%, 0) rotate(12deg) scale(1.08); opacity: 1; }
}

@keyframes ambient-blue-flow {
 from { transform: translate3d(6%, 7%, 0) rotate(10deg) scale(1.05); opacity: .68; }
 to { transform: translate3d(-17%, -11%, 0) rotate(-14deg) scale(.95); opacity: .96; }
}

@keyframes ambient-route-flow {
 from { stroke-dashoffset: 0; }
 to { stroke-dashoffset: -1500; }
}

@keyframes ambient-speck-drift {
 from { transform: translate3d(-5px, 14px, 0); opacity: .15; }
 to { transform: translate3d(14px, -18px, 0); opacity: .52; }
}

@media (max-width: 700px) {
 .ambient-glow-mint { left: -74vw; width: 150vw; height: 100vh; top: -17vh; }
 .ambient-glow-blue { right: -80vw; width: 145vw; height: 100vh; top: 22vh; }
 .ambient-routes { opacity: .65; }
 .ambient-speck:nth-of-type(n+4) { display: none; }
 .atmosphere-toggle { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
 .site-atmosphere .ambient-glow,
 .site-atmosphere .ambient-trail,
 .site-atmosphere .ambient-speck {
  animation: none !important;
  transform: none !important;
 }
 .atmosphere-toggle { display: none !important; }
}

/* The same routes carry a different light through the year. */
[data-theme="winter"] { --season-glow: #89c9e44d; --season-sky: #758dcd45; --season-speck: #e7f7ff; }
[data-theme="spring"] { --season-glow: #72b57150; --season-sky: #8bbfbb3d; --season-speck: #c4e89e; }
[data-theme="summer"] { --season-glow: #e5ae5948; --season-sky: #36a6ab4a; --season-speck: #ffe6a3; }
[data-theme="autumn"] { --season-glow: #c7764054; --season-sky: #a5616240; --season-speck: #efb16c; }
[data-theme="christmas"] { --season-glow: #2d966352; --season-sky: #c4985147; --season-speck: #ffe2a3; }
[data-theme="easter"] { --season-glow: #e7c84b4f; --season-sky: #8bb87345; --season-speck: #ffdf78; }
[data-theme="autumn"] .ambient-speck, [data-theme="spring"] .ambient-speck { width: 8px; height: 5px; border-radius: 75% 0 75% 0; }
[data-theme="christmas"] .ambient-speck { width: 7px; height: 7px; clip-path: polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%); }
[data-theme="winter"] .ambient-speck { width: 4px; height: 4px; }
[data-theme="easter"] .ambient-speck { width: 5px; height: 7px; border-radius: 55% 55% 46% 46% / 65% 65% 40% 40%; }
/* December scenery is decorative; the foreground keeps its own contrast. */
.december-sky { display:none; position:absolute; inset:0; overflow:hidden; pointer-events:none; }
[data-theme="christmas"] .december-sky { display:block; }
.december-sky img { position:absolute; top:clamp(54px,9vh,100px); left:0; width:clamp(104px,14vw,205px); opacity:0; animation:december-flight 62s linear infinite paused; }
.december-sky i { position:absolute; top:-9px; width:3px; height:3px; background:#edf9ff; border-radius:50%; opacity:.38; animation:december-snow var(--fall-time) linear infinite paused; }
.december-sky i:nth-child(3n) { width:5px; height:5px; opacity:.23; }
[data-running="true"] .december-sky > * { animation-play-state:running; }
.christmas-season .hero h1 { text-shadow:0 -1px 0 #fffdf2, 0 -2px 1px #deefffc4; }
.christmas-season .hero h1 em { text-shadow:0 -1px 0 #f3ffff, 0 -2px 1px #d8f5f0aa; }
@keyframes december-flight {
 0% { transform:translate(-105%,8px) rotate(-4deg); opacity:0; }
 2% { opacity:.82; }
 27% { transform:translate(102vw,-12px) rotate(-2deg); opacity:.82; }
 28%,100% { transform:translate(105vw,-12px); opacity:0; }
}
@keyframes december-snow { to { transform:translate(26px,103vh); } }
@media (max-width:700px){ .december-sky i:nth-child(even){display:none;} }
@media (prefers-reduced-motion:reduce){
 .december-sky img { animation:none; left:auto; right:3%; opacity:.55; }
 .december-sky i { animation:none; display:none; }
}

.family-focus { margin:clamp(1rem,4vw,3rem) 0; padding:clamp(1.25rem,3.5vw,2.6rem); border-inline-start:4px solid #9edcc2; border-radius:0 1.2rem 1.2rem 0; background:#192d37; color:#f6f4eb; }
.family-focus h2 { margin:.3em 0; font-size:clamp(1.6rem,3vw,2.6rem); line-height:1.12; }
.family-focus .focus-tip { margin:0; max-width:64ch; line-height:1.55; color:#dde8e5; }

#manedens-fokus .family-focus { position:relative; isolation:isolate; overflow:hidden; border:1px solid #729489; border-radius:1.3rem; padding:clamp(1.5rem,4vw,3.5rem); background:linear-gradient(115deg,#112d33,#21473f); }
#manedens-fokus[data-month] .family-focus { color:#fff9e8; border-color:#b79359; box-shadow:0 15px 52px #06121770; padding:clamp(2rem,5vw,4.5rem); background:#12252b; }
#manedens-fokus[data-month] .family-focus::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#0b191ff5 0%,#0b191fea 28%,#0b191fc9 45%,transparent 72%),var(--focus-image) right 54% / cover no-repeat; }
#manedens-fokus[data-month] .eyebrow { color:#ffdb9a; display:flex; align-items:center; gap:.75rem; }
#manedens-fokus[data-month] .eyebrow::before { content:""; width:2rem; height:3px; background:#f6c276; }
#manedens-fokus[data-month] h2 { max-width:13ch; font-size:clamp(2.4rem,5.3vw,5rem); letter-spacing:-.045em; line-height:1.02; text-wrap:balance; }
#manedens-fokus[data-month] .focus-tip { max-width:min(43%,39ch); color:#faf1df; }
@media(max-width:720px){
 #manedens-fokus[data-month] .family-focus { padding:clamp(12rem,56vw,22rem) 1.4rem 1.6rem; }
 #manedens-fokus[data-month] .family-focus::before { background:linear-gradient(0deg,#12252b 0%,#12252b 34%,transparent 72%),var(--focus-image) center top / 100% auto no-repeat; }
 #manedens-fokus[data-month] .focus-tip { max-width:38ch; }
}
