/* Maesic Studio — Halloween 2026 seasonal theme (temporary).
   Every rule is scoped under html.hw, which /halloween/halloween.js only sets while the
   season is on, so this file is inert once the theme has switched itself off. */

/* ---- palette: lime accent becomes pumpkin, the rest of the brand stays ---- */
html.hw {
  --hw-orange: #FF8A1F;
  --hw-orange-deep: #E2620A;
  --hw-orange-soft: #FFB067;
  --hw-candle: #FFD66B;
  --lime: var(--hw-orange);
  --link-hover: var(--hw-orange-soft);
}
.hw ::selection { background: var(--hw-orange); color: #170A36; }

/* inline lime from the design (marquee, stats, "Spread" card, pills, labels…) */
.hw [style*="background:#C8FF2E"] { background: var(--hw-orange) !important; }
.hw [style*="color:#C8FF2E"] { color: var(--hw-orange) !important; }
.hw [style*="solid #C8FF2E"] { border-color: var(--hw-orange) !important; }
.hw [fill="#C8FF2E"] { fill: var(--hw-orange); }
.hw .ms-tab:focus-visible, .hw .ms-pill:focus-visible { outline-color: var(--hw-orange); }

/* ---- shared icons ---- */
.hw-pk { display: inline-block; flex: 0 0 auto; fill: currentColor; vertical-align: middle; }
.hw-pk .hw-pk-cut { fill: var(--hw-cut, var(--hw-candle)); }
.hw-batsvg { display: block; width: 100%; height: auto; fill: var(--hw-bat, #5A3BA6); overflow: visible; }
.hw-wing-l, .hw-wing-r { transform-box: view-box; animation: hw-flap-l .34s ease-in-out infinite alternate; }
.hw-wing-l { transform-origin: 30px 14px; }
.hw-wing-r { transform-origin: 34px 14px; animation-name: hw-flap-r; }
.hw-ghostsvg { display: block; width: 100%; height: auto; overflow: visible; }
.hw-ghost-body { fill: var(--hw-ghost-fill, #FAF1E6); }
.hw-ghost-eye { fill: var(--hw-ghost-eye, #170A36); }

@keyframes hw-flap-l { from { transform: rotate(24deg); } to { transform: rotate(-20deg); } }
@keyframes hw-flap-r { from { transform: rotate(-24deg); } to { transform: rotate(20deg); } }
@keyframes hw-wobble { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes hw-flicker {
  0%,100% { box-shadow: 0 0 6px 1px rgba(255,138,31,.55); }
  38% { box-shadow: 0 0 11px 3px rgba(255,166,64,.8); }
  52% { box-shadow: 0 0 4px 0 rgba(255,138,31,.4); }
  70% { box-shadow: 0 0 9px 2px rgba(255,150,50,.7); }
}

/* ---- logo dot → little pumpkin (header, footers) ---- */
.hw .ms-logo-dot, .hw .hw-dot {
  position: relative;
  background: radial-gradient(circle at 34% 30%, #FFC27A, var(--hw-orange) 45%, var(--hw-orange-deep)) !important;
  border-radius: 46% 46% 50% 50% / 42% 42% 58% 58%;
  animation: hw-flicker 3.4s ease-in-out infinite;
}
.hw .ms-logo-dot::before, .hw .hw-dot::before {
  content: ""; position: absolute; left: 43%; top: -30%; width: 22%; height: 38%;
  border-radius: 2px 2px 1px 1px; background: #C8FF2E; transform: rotate(16deg);
}
.hw .ms-logo-dot::after, .hw .hw-dot::after {
  content: ""; position: absolute; inset: 8% 30%; border-radius: 50%;
  border-inline: 1px solid rgba(140,50,0,.32);
}

/* ---- announcement strip (dismissible) ---- */
.hw-banner {
  position: relative; display: grid; grid-template-rows: 1fr;
  background: linear-gradient(90deg, #26093F, #3A1036 50%, #26093F);
  border-bottom: 1px solid rgba(255,138,31,.22); color: var(--cream);
  transition: grid-template-rows .42s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
}
.hw-banner[data-closing] { grid-template-rows: 0fr; opacity: 0; }
.hw-banner-clip { min-height: 0; overflow: hidden; }
.hw-banner-inner {
  max-width: 1200px; margin: 0 auto; padding: 9px 56px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.35; text-align: center;
}
.hw-banner-inner p { margin: 0; }
.hw-banner .hw-pk { width: 22px; height: 22px; color: var(--hw-orange); animation: hw-wobble 3s ease-in-out infinite; }
.hw-banner-hi { color: var(--hw-orange); font-weight: 800; }
.hw-banner-x {
  position: absolute; top: 50%; inset-inline-end: 10px; translate: 0 -50%;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.hw-banner-x:hover { background: rgba(250,241,230,.1); color: var(--cream); }
.hw-banner-x:focus-visible { outline: 2px solid var(--hw-orange); outline-offset: 2px; }
@media (max-width: 560px) {
  .hw-banner-inner { padding-inline: 16px 52px; justify-content: flex-start; text-align: start; }
  .hw-banner-rest { display: none; }
}

/* ---- spider dangling from the header ---- */
.hw .ms-header--plain { position: relative; }
.hw-spider {
  position: absolute; top: 100%; inset-inline-start: calc(max(0px, 50% - 600px) + 128px);
  width: 28px; height: 150px; overflow: hidden; pointer-events: none;
  transition: opacity .25s ease;
}
.ms-header[data-menu-open] .hw-spider { opacity: 0; }
.hw-spider-drop { position: absolute; left: 0; top: 0; width: 28px; animation: hw-drop 11s ease-in-out infinite; transform: translateY(42px); }
.hw-spider-thread { position: absolute; left: 13.5px; bottom: calc(100% - 9px); width: 1px; height: 200px; background: linear-gradient(rgba(250,241,230,.1), rgba(250,241,230,.55)); }
.hw-spidersvg { display: block; width: 28px; height: 30px; transform-origin: 50% 0; animation: hw-sway 3.6s ease-in-out infinite; }
.hw-spider-legs { fill: none; stroke: #CFC3EA; stroke-width: 1.3; stroke-linecap: round; }
.hw-spider-body { fill: #CFC3EA; }
.hw-spider-eye { fill: var(--hw-orange); }
@keyframes hw-drop {
  0%,100% { transform: translateY(14px); }
  40% { transform: translateY(98px); }
  52% { transform: translateY(86px); }
  62% { transform: translateY(92px); }
}
@keyframes hw-sway { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@media (max-width: 760px) {
  .hw-spider { inset-inline-start: 150px; height: 110px; }
  @keyframes hw-drop { 0%,100% { transform: translateY(10px); } 45% { transform: translateY(66px); } 60% { transform: translateY(58px); } }
}

/* ---- home: hero night sky (moon + bats behind the content) ---- */
.hw #top.hw-host { position: relative; isolation: isolate; }
.hw-sky { position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; z-index: -1; overflow: hidden; pointer-events: none; }
.hw-moon {
  position: absolute; top: 26px; right: max(20px, calc(50vw - 600px + 10px));
  width: clamp(140px, 17vw, 230px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 64% 62%, rgba(214,140,60,.22) 0 9%, transparent 10%),
    radial-gradient(circle at 38% 70%, rgba(214,140,60,.18) 0 6%, transparent 7%),
    radial-gradient(circle at 70% 32%, rgba(214,140,60,.16) 0 5%, transparent 6%),
    radial-gradient(circle at 34% 30%, #FFF7E2, #FFE2A6 48%, #F6B862);
  box-shadow: 0 0 60px 8px rgba(255,170,70,.28), 0 0 170px 50px rgba(255,120,30,.14);
  animation: hw-moon 7s ease-in-out infinite alternate;
}
[dir=rtl] .hw-moon { right: auto; left: max(20px, calc(50vw - 600px + 10px)); }
@keyframes hw-moon { from { box-shadow: 0 0 50px 6px rgba(255,170,70,.24), 0 0 150px 40px rgba(255,120,30,.12); } to { box-shadow: 0 0 70px 12px rgba(255,170,70,.34), 0 0 190px 60px rgba(255,120,30,.17); } }
.hw-bat { position: absolute; left: var(--x); top: var(--y); width: var(--s); animation: hw-fly var(--d) linear var(--delay) infinite; will-change: transform; }
.hw-bob { display: block; animation: hw-bob 2.6s ease-in-out infinite alternate; }
@keyframes hw-fly { from { transform: translateX(calc(-12vw - var(--x))); } to { transform: translateX(calc(112vw - var(--x))); } }
@keyframes hw-bob { from { transform: translateY(-14px) rotate(-7deg); } to { transform: translateY(14px) rotate(5deg); } }
.hw-bat-1 { --x: 18vw; --y: 70px;  --s: 46px; --d: 26s; --delay: -6s; }
.hw-bat-2 { --x: 55vw; --y: 200px; --s: 30px; --d: 34s; --delay: -20s; }
.hw-bat-3 { --x: 78vw; --y: 54px;  --s: 38px; --d: 30s; --delay: -13s; }
.hw-bat-4 { --x: 36vw; --y: 380px; --s: 24px; --d: 41s; --delay: -29s; }
@media (max-width: 760px) {
  .hw-moon { top: 10px; right: 16px; width: 76px; opacity: .85; box-shadow: 0 0 34px 4px rgba(255,170,70,.25); animation: none; }
  [dir=rtl] .hw-moon { left: 16px; }
  .hw-bat-2, .hw-bat-4 { display: none; }
}

/* ---- home: ghosts haunting the hero phones ---- */
.hw-ghost { position: absolute; pointer-events: none; }
.hw-ghost-a { left: -3%; bottom: 34px; width: 76px; z-index: 3; filter: drop-shadow(0 0 18px rgba(250,241,230,.32)); animation: hw-haunt 7s ease-in-out infinite; }
.hw-ghost-b { right: 6%; top: 38px; width: 42px; z-index: 1; opacity: .85; filter: drop-shadow(0 0 12px rgba(250,241,230,.25)); animation: hw-haunt 9s ease-in-out -3s infinite reverse; }
@keyframes hw-haunt {
  0%,100% { transform: translate(0,0) rotate(-6deg); opacity: .95; }
  35% { transform: translate(10px,-18px) rotate(4deg); opacity: .7; }
  70% { transform: translate(-6px,-6px) rotate(-2deg); opacity: 1; }
}

/* ---- home: marquee greeting ---- */
.hw-mq { display: inline-flex; align-items: center; gap: 14px; }
.hw-mq .hw-pk { width: .95em; height: .95em; color: #170A36; }

/* ---- home: cobwebs in the app cards' corners ---- */
.hw-webbed { position: relative; isolation: isolate; overflow: hidden; }
.hw-web { position: absolute; top: 0; inset-inline-end: 0; z-index: -1; width: 118px; height: 118px; fill: none; stroke: currentColor; stroke-width: 1; opacity: .3; pointer-events: none; }
.hw-web path { vector-effect: non-scaling-stroke; }
[dir=rtl] .hw-web { transform: scaleX(-1); }

/* ---- home: "coming soon" + its modal get a ghost instead of "?" ---- */
.hw-ghosted { --hw-ghost-fill: #170A36; --hw-ghost-eye: #38E4FF; }
.hw-ghosted .hw-ghostsvg { width: 58%; }

/* ---- home: globe glows like a harvest moon, a bat orbits it ---- */
.hw-globe { isolation: isolate; container-type: inline-size; }
.hw .hw-globe circle[stroke="#7C4DFF"] { stroke: var(--hw-orange); }
.hw-globe-glow {
  position: absolute; inset: -14%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,138,31,.30), rgba(255,138,31,.10) 62%, transparent);
  animation: hw-glow 5s ease-in-out infinite alternate;
}
@keyframes hw-glow { from { opacity: .65; transform: scale(.97); } to { opacity: 1; transform: scale(1.03); } }
/* x and y run a quarter period apart → an elliptical orbit; it slips behind the globe on the top arc */
.hw-orbit { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 4; pointer-events: none; animation: hw-oz 14s step-end infinite; }
.hw-orbit-x { animation: hw-ox 7s ease-in-out infinite alternate; }
.hw-orbit-y { animation: hw-oy 7s ease-in-out -3.5s infinite alternate; }
.hw-orbit .hw-batsvg { position: absolute; width: 12cqw; left: -6cqw; top: -3cqw; --hw-bat: #0B0420; filter: drop-shadow(0 0 1.5px rgba(255,166,64,.95)) drop-shadow(0 0 10px rgba(255,138,31,.6)); }
@keyframes hw-ox { from { transform: translateX(56cqw); } to { transform: translateX(-56cqw); } }
@keyframes hw-oy { from { transform: translateY(-15cqw) scale(.6); } to { transform: translateY(15cqw) scale(1); } }
@keyframes hw-oz { 0% { z-index: 4; } 50% { z-index: -1; } }
@media (max-width: 760px) {
  @keyframes hw-ox { from { transform: translateX(50cqw); } to { transform: translateX(-50cqw); } }
}

/* ---- 404: a ghost took the page ---- */
.hw .hw-nf-ghost { background: transparent !important; box-shadow: none !important; width: .66em !important; height: .66em !important; filter: drop-shadow(0 0 24px rgba(255,138,31,.45)); }
.hw .hw-nf-ghost .hw-ghostsvg { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .hw-orbit { display: none; }
}
