/* Night is a lighting state of the same desert. Day's source colours stay untouched. */
.theme-toggle{position:relative;flex:0 0 46px;width:46px;height:46px;display:grid;place-items:center;padding:0;border:0;background:none;cursor:pointer;order:3;color:#fff;isolation:isolate}
.theme-toggle:focus-visible{outline:2px solid #fff;outline-offset:4px;border-radius:50%}
.theme-sun{position:absolute;width:29px;height:29px;border-radius:50%;background:radial-gradient(circle at 35% 27%,#fffbd8 0%,#fff1a0 25%,#ffd553a8 59%,#f8bc316b 76%);border:1px solid #fff5bfba;box-shadow:inset 1px 1px 7px #ffffffb3,inset -3px -4px 8px #d28b32a1,0 0 17px #ffd35e66;backdrop-filter:blur(5px);transition:opacity .5s,transform .7s cubic-bezier(.2,.7,.2,1)}
.theme-sun::before{content:'';position:absolute;inset:-7px;background:repeating-conic-gradient(from 0deg,#fff1a3a3 0deg 5deg,transparent 5deg 45deg);border-radius:50%;mask:radial-gradient(transparent 0 18px,#000 18.6px 20px,transparent 21px)}
.theme-sun::after{content:'';position:absolute;inset:3px 6px 13px 5px;background:linear-gradient(#fff9,transparent);border-radius:50%;filter:blur(1.2px)}
.theme-moon{position:absolute;width:29px;height:29px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#fff,#e9eff9 58%,#a4b7d7);mask:radial-gradient(circle at 76% 26%,transparent 0 13px,#000 13.8px);filter:drop-shadow(0 0 7px #dceaff);opacity:0;transform:rotate(-35deg) scale(.7);transition:opacity .5s,transform .7s cubic-bezier(.2,.7,.2,1)}
.theme-toggle:hover .theme-sun{box-shadow:inset 1px 1px 7px #fff,inset -3px -4px 8px #d28b32a1,0 0 24px #ffd35e99}
html[data-theme=night] .theme-sun{opacity:0;transform:rotate(65deg) scale(.65)}
html[data-theme=night] .theme-moon{opacity:1;transform:rotate(-12deg) scale(1)}
/* Day keeps the original water. Night has a complete plate and new geometry. */
.stage .media{filter:none}
html[data-theme=night] .stage{background:#06101c}
html[data-theme=night] .stage .media{opacity:0!important}
html[data-theme=night] .stage .start{display:none}
.night-landscape{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;opacity:0;transition:opacity 1.1s}
html[data-theme=night] .night-landscape{opacity:1}
.night-atmosphere,.night-letters,.night-witness{opacity:0;pointer-events:none;transition:opacity 1.1s;position:absolute}
.night-atmosphere{z-index:0;background:radial-gradient(ellipse 25% 7% at 50% 74%,#ff8a2955 0%,#ed511c29 43%,transparent 100%);mix-blend-mode:screen}
html[data-theme=night] :is(.night-atmosphere,.night-letters,.night-witness){opacity:1}
.night-letters{z-index:0;mix-blend-mode:normal}
html[data-theme=night] .distant-witness{opacity:0}
.night-witness{z-index:0;filter:drop-shadow(0 1px 1px #0008);isolation:isolate}
.night-witness img{display:block;width:100%;height:100%;object-fit:contain}
html[data-theme=night] :is(.object-art,#telegramIce .ice-object) img,html[data-theme=night] .frost-action img{filter:none}
.ice-neon-light{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;mix-blend-mode:screen;opacity:0;transition:opacity 1.1s}
html[data-theme=night] .ice-neon-light{opacity:1}
/* Original wordmark geometry acts as the LED stencil. No duplicated typed logo. */
.logo{position:relative;isolation:isolate}
.logo::after{content:'';position:absolute;inset:0;mask:url('brand/humi-team.svg') center/100% 100% no-repeat;-webkit-mask:url('brand/humi-team.svg') center/100% 100% no-repeat;background:radial-gradient(circle,#ffb478 0 .55px,#ff3c20 .7px 1.05px,transparent 1.25px) 0 0/3.1px 3.1px;opacity:0;filter:drop-shadow(0 0 2px #ff3a20);transition:opacity .8s}
.logo img{transition:opacity .8s}
html[data-theme=night] .logo img{opacity:0}
html[data-theme=night] .logo::after{opacity:1}
.logo-led-scan{position:absolute;inset:-4px;pointer-events:none;opacity:0;mask:url('brand/humi-team.svg') center/calc(100% - 8px) calc(100% - 8px) no-repeat;background:linear-gradient(90deg,transparent 0 40%,#ff9c7266 48%,transparent 57%);background-size:220% 100%;animation:led-scan 5.5s linear infinite;animation-play-state:paused;filter:blur(.3px)}
html[data-theme=night] .logo-led-scan{opacity:1;animation-play-state:running}
html.scene-paused .logo-led-scan{animation-play-state:paused}
@keyframes led-scan{from{background-position:200% 0}to{background-position:-100% 0}}
html[data-theme=night]{--gold:#ff5a39;--line:#ffffff24}
html[data-theme=night] .logo-sub{color:#dfd6d3;text-shadow:0 1px 8px #000}
html[data-theme=night] .stage .dropdown,html[data-theme=night] .ice-dialog,html[data-theme=night] body .toast{color:#f0e5df;background:linear-gradient(130deg,#1e1418f7,#100e13fa);border-color:#e1624047;box-shadow:4px 5px 0 #5a1b1e50,0 25px 70px #0009;color-scheme:dark}
html[data-theme=night] .stage .dropdown a{color:#f0e5df}
html[data-theme=night] .ice-dialog{--dialog-ink:#f0e5df;scrollbar-color:#674044 transparent}
html[data-theme=night] .dialog-top{background:#171015ed;border-color:#fff2}
html[data-theme=night] :is(.dialog-close,.eyebrow,.panel-lead,.service-list p,.process-list p,.start-small p,.form-note,.direct-contact,.message-preview){color:#cbbfc2}
html[data-theme=night] :is(.service-list article,.process-list li::before,.direct-contact){border-color:#fff2}
html[data-theme=night] :is(.service-list article>span,.process-list li::before){color:#f27560}
html[data-theme=night] :is(.frost-action,.option-row button){color:#f9e5de;background:#3b1c23;border-color:#b65b494f;box-shadow:none}
html[data-theme=night] .option-row button[aria-pressed=true]{background:#74352e;border-color:#ff9675}
html[data-theme=night] #briefForm :is(input,textarea){color:#fff0e9;background:#ffffff08;border-color:#a87d725c;border-bottom-color:#b75a49}
html[data-theme=night] #briefForm :is(input,textarea)::placeholder,html[data-theme=night] #briefForm label span{color:#a98d92}
html[data-theme=night] :is(.direct-contact a,.text-action){color:#ffac92}
html[data-theme=night] .message-preview p{background:#fff1;border-color:#db7255}
html[data-theme=night] .start-small{border-color:#e3775d}
html[data-theme=night] .stage .start{color:#ffe3ce;background:#281e28;border-color:#c0866555;box-shadow:3px 4px 0 #632f3e55}
html[data-theme=night] .stage .start span{color:#ff775b}
html[data-theme=night] :is(.ice-dialog,.stage) :is(a,button,input,textarea,summary):focus-visible{outline-color:#ffad91}
@container(max-width:720px){.theme-toggle{flex-basis:44px;width:44px;height:44px}.stage .nav{gap:11px}.top .brand{max-width:calc(100% - 122px)}}
@container(max-width:370px){.stage .top{flex-wrap:nowrap;gap:6px}.stage .nav{gap:5px}.theme-toggle{flex-basis:44px;width:44px}.top .brand{max-width:calc(100% - 108px)}}
@media(prefers-reduced-motion:reduce){.theme-sun,.theme-moon,.stage .media,.night-atmosphere,.night-letters,.night-witness,.logo img,.logo::after,.object-art::after,#telegramIce .ice-object::before{transition:none}.logo-led-scan{animation:none!important;display:none}}
@media(forced-colors:active){.theme-toggle{border:1px solid ButtonText}.theme-sun,.theme-moon{background:ButtonText;box-shadow:none}.logo img{opacity:1!important}.logo::after,.logo-led-scan,.night-letters{display:none}}
/* A real marquee pass: two identical stencils, held for legibility, then traded
   across the LED window. Original SVG proportions and spacing are preserved. */
html[data-theme=night] .logo{overflow:hidden}
.logo::before{content:'';position:absolute;inset:0;mask:url('brand/humi-team.svg') center/100% 100% no-repeat;-webkit-mask:url('brand/humi-team.svg') center/100% 100% no-repeat;background:radial-gradient(circle,#ffb478 0 .55px,#ff3c20 .7px 1.05px,transparent 1.25px) 0 0/3.1px 3.1px;opacity:0;filter:drop-shadow(0 0 2px #ff3a20);transform:translateX(calc(100% + 20px))}
html[data-theme=night] .logo::after{animation:wordmark-out 10s linear infinite}
html[data-theme=night] .logo::before{opacity:1;animation:wordmark-in 10s linear infinite}
.logo-led-scan{display:none}
@keyframes wordmark-out{0%,58%{transform:translateX(0)}100%{transform:translateX(calc(-100% - 20px))}}
@keyframes wordmark-in{0%,58%{transform:translateX(calc(100% + 20px))}100%{transform:translateX(0)}}
html.scene-paused .logo::before,html.scene-paused .logo::after{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){html[data-theme=night] .logo::before{display:none}html[data-theme=night] .logo::after{animation:none}}
@media(prefers-reduced-motion:reduce){.night-landscape,.ice-neon-light{transition:none}}
@media(forced-colors:active){.ice-neon-light{display:none}}
html[data-theme=night] .logo::after,html[data-theme=night] .logo::before{animation-duration:17s}
@keyframes wordmark-out{0%,84%{transform:translateX(0)}100%{transform:translateX(calc(-100% - 20px))}}
@keyframes wordmark-in{0%,84%{transform:translateX(calc(100% + 20px))}100%{transform:translateX(0)}}

/* A separate low-resolution pass scatters heat around the molten geometry. */
.night-letters-bloom{position:absolute;pointer-events:none;opacity:0;filter:blur(12px);mix-blend-mode:screen;transition:opacity 1.1s;z-index:0}
html[data-theme=night] .night-letters-bloom{opacity:.85}
html[data-theme=night] .logo{filter:drop-shadow(0 0 3px #ff6b395e) drop-shadow(0 0 13px #ff350a47)}
html[data-theme=night] .theme-toggle.has-sculpted-glass{filter:drop-shadow(0 0 5px #e5eeff83) drop-shadow(0 0 15px #8cbcff3b)}
html[data-theme=night] .stage .nav a:hover{color:#fff1dd;text-shadow:0 0 8px #ff4b2670}
html[data-theme=night] .ice-dialog{background:linear-gradient(125deg,#242124f7,#111218fa 55%,#201416fa);border-color:#a0685259;box-shadow:0 0 0 1px #08090d,0 0 26px #d42e1517,0 30px 80px #000b}
@media(prefers-reduced-motion:reduce){.night-letters-bloom{transition:none}}
@media(forced-colors:active){.night-letters-bloom,.night-atmosphere{display:none}}
