/*
 * Shared palette and motion for the 2D illustrations (Components/Illustrations).
 * Every fill uses these tokens, so the drawings switch between day and night with the theme.
 */
:root {
    --ill-sky-top: #b9dbe4;
    --ill-sky-bottom: #f6e8d3;
    --ill-sun: #f6b54a;
    --ill-sun-glow: rgb(246 181 74 / 0.25);
    --ill-sea: #3f8f9c;
    --ill-sea-deep: #2c6f7c;
    --ill-sea-line: rgb(255 255 255 / 0.45);
    --ill-far: #a5c7c6;
    --ill-far-2: #8db8b8;
    --ill-hill: #86b06f;
    --ill-hill-dark: #6a9a5b;
    --ill-hill-light: #a3c784;
    --ill-sand: #ecd8b0;
    --ill-trunk: #6d5242;
    --ill-trunk-dark: #563f33;
    --ill-flame-1: #f6a25a;
    --ill-flame-2: #f07a3a;
    --ill-flame-3: #e2512a;
    --ill-flame-4: #c2401c;
    --ill-flame-5: #9e3011;
    --ill-leaf: #4f8a4a;
    --ill-leaf-dark: #3b6e3c;
    --ill-ink: #0e1a24;
    --ill-ink-soft: #33414f;
    --ill-paper: #f4f1ea;
    --ill-white: #fffdf8;
    --ill-wall: #f1e5d3;
    --ill-wall-shade: #e3d2ba;
    --ill-wall-dark: #d4bfa2;
    --ill-wood: #c0925f;
    --ill-wood-dark: #9b7350;
    --ill-teal: #3f8a8f;
    --ill-teal-dark: #2f7277;
    --ill-teal-light: #5aa3a6;
    --ill-glass: #d7e9ea;
    --ill-window: #a9cdd4;
    --ill-cloud: rgb(255 255 255 / 0.85);
    --ill-shadow: rgb(14 26 36 / 0.12);
    --ill-skin-1: #e0b899;
    --ill-skin-2: #a8714f;
    --ill-hair: #2a211c;
    --ill-shirt-1: #f4f1ea;
    --ill-shirt-2: #2f4c63;
    --ill-pants: #2f3540;
    --ill-lamp: #ffe2a8;
    --ill-lamp-glow: rgb(255 214 140 / 0);
    --ill-screen: #1b2733;
    --ill-star: rgb(255 255 255 / 0);
}

:root[data-theme="dark"] {
    --ill-sky-top: #08111f;
    --ill-sky-bottom: #1d2a48;
    --ill-sun: #e9eff4;
    --ill-sun-glow: rgb(200 220 255 / 0.12);
    --ill-sea: #13283f;
    --ill-sea-deep: #0c1c2e;
    --ill-sea-line: rgb(200 220 255 / 0.18);
    --ill-far: #1c2d45;
    --ill-far-2: #18273c;
    --ill-hill: #25402d;
    --ill-hill-dark: #1b3223;
    --ill-hill-light: #2d4b35;
    --ill-sand: #3b3a3a;
    --ill-trunk: #3e3029;
    --ill-trunk-dark: #2f241f;
    --ill-flame-1: #c9663a;
    --ill-flame-2: #b94f2a;
    --ill-flame-3: #a2401f;
    --ill-flame-4: #86331a;
    --ill-flame-5: #6a2814;
    --ill-leaf: #2c4f2f;
    --ill-leaf-dark: #213d25;
    --ill-ink: #0a121b;
    --ill-ink-soft: #24303d;
    --ill-paper: #0a121b;
    --ill-white: #dfe3e8;
    --ill-wall: #1d2838;
    --ill-wall-shade: #18212f;
    --ill-wall-dark: #141c28;
    --ill-wood: #6b5039;
    --ill-wood-dark: #523d2c;
    --ill-teal: #24525a;
    --ill-teal-dark: #1b4148;
    --ill-teal-light: #2e6168;
    --ill-glass: #1f3346;
    --ill-window: #ffd28a;
    --ill-cloud: rgb(160 180 210 / 0.18);
    --ill-shadow: rgb(0 0 0 / 0.3);
    --ill-shirt-1: #c8ccd2;
    --ill-shirt-2: #2a4256;
    --ill-pants: #1c222b;
    --ill-lamp: #ffd28a;
    --ill-lamp-glow: rgb(255 200 120 / 0.35);
    --ill-screen: #2b4b66;
    --ill-star: rgb(230 238 255 / 0.85);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --ill-sky-top: #08111f; --ill-sky-bottom: #1d2a48; --ill-sun: #e9eff4; --ill-sun-glow: rgb(200 220 255 / 0.12);
        --ill-sea: #13283f; --ill-sea-deep: #0c1c2e; --ill-sea-line: rgb(200 220 255 / 0.18); --ill-far: #1c2d45; --ill-far-2: #18273c;
        --ill-hill: #25402d; --ill-hill-dark: #1b3223; --ill-hill-light: #2d4b35; --ill-sand: #3b3a3a; --ill-trunk: #3e3029; --ill-trunk-dark: #2f241f;
        --ill-flame-1: #c9663a; --ill-flame-2: #b94f2a; --ill-flame-3: #a2401f; --ill-flame-4: #86331a; --ill-flame-5: #6a2814;
        --ill-leaf: #2c4f2f; --ill-leaf-dark: #213d25; --ill-ink: #0a121b; --ill-ink-soft: #24303d; --ill-paper: #0a121b; --ill-white: #dfe3e8;
        --ill-wall: #1d2838; --ill-wall-shade: #18212f; --ill-wall-dark: #141c28; --ill-wood: #6b5039; --ill-wood-dark: #523d2c;
        --ill-teal: #24525a; --ill-teal-dark: #1b4148; --ill-teal-light: #2e6168; --ill-glass: #1f3346; --ill-window: #ffd28a;
        --ill-cloud: rgb(160 180 210 / 0.18); --ill-shadow: rgb(0 0 0 / 0.3); --ill-shirt-1: #c8ccd2; --ill-shirt-2: #2a4256; --ill-pants: #1c222b;
        --ill-lamp: #ffd28a; --ill-lamp-glow: rgb(255 200 120 / 0.35); --ill-screen: #2b4b66; --ill-star: rgb(230 238 255 / 0.85);
    }
}

.ill { display: block; width: 100%; height: auto; overflow: visible; }
.ill * { transition: fill 600ms ease, stop-color 600ms ease, opacity 600ms ease; }

/* Gentle ambient motion; nothing moves for reduced-motion visitors. */
@media (prefers-reduced-motion: no-preference) {
    .ill-sway { animation: ill-sway 7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
    .ill-drift { animation: ill-drift 40s ease-in-out infinite alternate; }
    .ill-bob { animation: ill-bob 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
    .ill-fall { animation: ill-fall 9s linear infinite; }
    .ill-blink { animation: ill-blink 3.2s ease-in-out infinite; }
    .ill-twinkle { animation: ill-blink 4.5s ease-in-out infinite; }
    .ill-d1 { animation-delay: -1.5s; } .ill-d2 { animation-delay: -3s; } .ill-d3 { animation-delay: -4.5s; } .ill-d4 { animation-delay: -6s; }
}

@keyframes ill-sway { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }
@keyframes ill-drift { from { transform: translateX(-30px); } to { transform: translateX(40px); } }
@keyframes ill-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ill-fall {
    0% { transform: translate(0, -40px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(-120px, 260px) rotate(320deg); opacity: 0; }
}
@keyframes ill-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: no-preference) {
    .ill-spin { animation: ill-spin 14s linear infinite; }
    .ill-conveyor { animation: ill-conveyor 6s linear infinite; }
}
@keyframes ill-spin { to { transform: rotate(360deg); } }
@keyframes ill-conveyor { from { transform: translateX(-90px); } to { transform: translateX(0); } }

@media (prefers-reduced-motion: no-preference) {
    .ill-swing { animation: ill-swing 3.4s ease-in-out infinite alternate; }
}
@keyframes ill-swing { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }

/* Paint and motion utilities. The drawings use these classes instead of inline style attributes so the
   Content-Security-Policy can keep style-src 'self'. They stay last: the duration and direction modifiers must
   win over the animation shorthands above, which reset those longhands. */
.ill-fill-cloud { fill: var(--ill-cloud); }
.ill-fill-far { fill: var(--ill-far); }
.ill-fill-far-2 { fill: var(--ill-far-2); }
.ill-fill-flame-1 { fill: var(--ill-flame-1); }
.ill-fill-flame-2 { fill: var(--ill-flame-2); }
.ill-fill-flame-3 { fill: var(--ill-flame-3); }
.ill-fill-flame-4 { fill: var(--ill-flame-4); }
.ill-fill-flame-5 { fill: var(--ill-flame-5); }
.ill-fill-glass { fill: var(--ill-glass); }
.ill-fill-hair { fill: var(--ill-hair); }
.ill-fill-hill { fill: var(--ill-hill); }
.ill-fill-hill-dark { fill: var(--ill-hill-dark); }
.ill-fill-hill-light { fill: var(--ill-hill-light); }
.ill-fill-ink { fill: var(--ill-ink); }
.ill-fill-ink-soft { fill: var(--ill-ink-soft); }
.ill-fill-lamp { fill: var(--ill-lamp); }
.ill-fill-lamp-glow { fill: var(--ill-lamp-glow); }
.ill-fill-leaf { fill: var(--ill-leaf); }
.ill-fill-leaf-dark { fill: var(--ill-leaf-dark); }
.ill-fill-pants { fill: var(--ill-pants); }
.ill-fill-sand { fill: var(--ill-sand); }
.ill-fill-screen { fill: var(--ill-screen); }
.ill-fill-sea-line { fill: var(--ill-sea-line); }
.ill-fill-shadow { fill: var(--ill-shadow); }
.ill-fill-shirt-1 { fill: var(--ill-shirt-1); }
.ill-fill-shirt-2 { fill: var(--ill-shirt-2); }
.ill-fill-skin-1 { fill: var(--ill-skin-1); }
.ill-fill-skin-2 { fill: var(--ill-skin-2); }
.ill-fill-star { fill: var(--ill-star); }
.ill-fill-sun { fill: var(--ill-sun); }
.ill-fill-teal { fill: var(--ill-teal); }
.ill-fill-teal-dark { fill: var(--ill-teal-dark); }
.ill-fill-teal-light { fill: var(--ill-teal-light); }
.ill-fill-trunk { fill: var(--ill-trunk); }
.ill-fill-trunk-dark { fill: var(--ill-trunk-dark); }
.ill-fill-wall { fill: var(--ill-wall); }
.ill-fill-wall-dark { fill: var(--ill-wall-dark); }
.ill-fill-wall-shade { fill: var(--ill-wall-shade); }
.ill-fill-white { fill: var(--ill-white); }
.ill-fill-window { fill: var(--ill-window); }
.ill-fill-wood { fill: var(--ill-wood); }
.ill-fill-wood-dark { fill: var(--ill-wood-dark); }
.ill-stroke-flame-3 { stroke: var(--ill-flame-3); }
.ill-stroke-ink-soft { stroke: var(--ill-ink-soft); }
.ill-stroke-leaf { stroke: var(--ill-leaf); }
.ill-stroke-sea-line { stroke: var(--ill-sea-line); }
.ill-stroke-shirt-1 { stroke: var(--ill-shirt-1); }
.ill-stroke-shirt-2 { stroke: var(--ill-shirt-2); }
.ill-stroke-teal { stroke: var(--ill-teal); }
.ill-stroke-teal-dark { stroke: var(--ill-teal-dark); }
.ill-stroke-trunk { stroke: var(--ill-trunk); }
.ill-stroke-wall-dark { stroke: var(--ill-wall-dark); }
.ill-stroke-white { stroke: var(--ill-white); }
.ill-stroke-wood-dark { stroke: var(--ill-wood-dark); }
.ill-stop-flame-1 { stop-color: var(--ill-flame-1); }
.ill-stop-sea { stop-color: var(--ill-sea); }
.ill-stop-sea-deep { stop-color: var(--ill-sea-deep); }
.ill-stop-sky-bottom { stop-color: var(--ill-sky-bottom); }
.ill-stop-sky-top { stop-color: var(--ill-sky-top); }
.ill-stop-sun-glow { stop-color: var(--ill-sun-glow); }
.ill-origin-1120-230 { transform-origin: 1120px 230px; }
.ill-origin-1212-330 { transform-origin: 1212px 330px; }
.ill-origin-300-96 { transform-origin: 300px 96px; }
.ill-duration-10 { animation-duration: 10s; }
.ill-duration-12 { animation-duration: 12s; }
.ill-duration-14 { animation-duration: 14s; }
.ill-duration-8 { animation-duration: 8s; }
.ill-reverse { animation-direction: reverse; }
