/* Actum Forge — the light theme, the hand-made part: loaded after light.css (the colours,
   generated by tools/theme/build_light_theme.py) and wins over it.

   White marble instead of obsidian, light stone cards, purple cracks and sparks, white-purple
   cursors (those are in forge.css, by the dark ones); the orange of the interface stays orange. The images: tools/theme/make_light_assets.py;
   the procedural cracks paint themselves purple (forge-cracks.js), the sparks too (forge-fx.js). */

:root[data-theme="light"] {
    color-scheme: light;
    --forge-obsidian: url("../images/forge/marble.05abf5b4a34c.jpg");
    --forge-stone: url("../images/forge/stone-light.a459c234ec1b.jpg");
    --fx-stone: url("../images/forge/stone-light.a459c234ec1b.jpg");
    --fx-cracks: url("../images/forge/cracks-light.92b3f671475a.png");
    --fx-cracks-pale: url("../images/forge/cracks-pale-light.a4dec409538e.png");
    /* the hot tip of the forge's bars: on white, a bright amber */
    --forge-white-hot: #ff9a3d;
}

/* ---------- the ground: marble, the forge's warm light from above, a cool one below ---------- */

:root[data-theme="light"] body {
    background-image:
        radial-gradient(ellipse 55% 38% at 50% 0%, rgba(255, 106, 26, 0.06), rgba(255, 106, 26, 0) 70%),
        radial-gradient(ellipse 45% 40% at 100% 100%, rgba(15, 116, 242, 0.05), rgba(15, 116, 242, 0) 70%),
        var(--forge-obsidian);
}

/* ---------- cracks: purple veins, blended normally ("screen" washes out on white) ---------- */

:root[data-theme="light"] .fx-ground {
    opacity: 0.16;
    mix-blend-mode: normal;
}

:root[data-theme="light"] .fx-edge {
    opacity: 0.2;
    mix-blend-mode: normal;
}

:root[data-theme="light"] .fx-rail {
    opacity: 0.16;
    mix-blend-mode: normal;
}

:root[data-theme="light"] .fx-spot {
    mix-blend-mode: normal;
}

/* ---------- stone surfaces: light stone, the faint cracks laid over it normally ---------- */

:root[data-theme="light"] .forge-surface,
:root[data-theme="light"] .tasks-list .card.forge-surface,
:root[data-theme="light"] .contact-form section.forge-surface,
:root[data-theme="light"] .contact-sections section.forge-surface,
:root[data-theme="light"] .social-layout > .forge-surface,
:root[data-theme="light"] .spending-summary article.forge-surface,
:root[data-theme="light"] .passport-grid section.forge-surface {
    border-color: #d5dbe4;
    background-color: #f7f8fa;
    background-image:
        var(--fx-cracks-pale),
        linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(236, 240, 246, 0.55)),
        var(--fx-stone);
    background-blend-mode: normal;
}

:root[data-theme="light"] .forge-surface {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(20, 40, 80, 0.06),
        0 10px 28px rgba(20, 40, 80, 0.08);
}

:root[data-theme="light"] .forge-pane {
    background-color: #f5f7fa;
    background-image:
        var(--fx-cracks-pale),
        linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(238, 242, 247, 0.6)),
        var(--fx-stone);
    background-blend-mode: normal;
}

@media (min-width: 761px) {
    :root[data-theme="light"] .sidebar {
        background-color: #f3f5f8;
        background-image:
            var(--fx-cracks-pale),
            linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(236, 240, 246, 0.7)),
            var(--fx-stone);
        background-blend-mode: normal;
        border-right-color: #d9dee6;
    }
}

@media (max-width: 760px) {
    :root[data-theme="light"] .sidebar {
        background-color: rgba(246, 248, 251, 0.96);
        background-image:
            var(--fx-cracks-pale),
            linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(236, 240, 246, 0.75)),
            var(--fx-stone);
        background-blend-mode: normal;
    }
}

/* ---------- the home hero: the white marble gods on white ---------- */

:root[data-theme="light"] .hero {
    background-color: #fff;
    box-shadow: 0 10px 28px rgba(20, 40, 80, 0.08);   /* no grey shading inside: plain white */
}

:root[data-theme="light"] .hero-art-dark {
    display: none;
}

:root[data-theme="light"] .hero-art-light {
    display: block;
}

/* ---------- the AI orb: purple and blue flowing in it (between blue and the system's purple) ---------- */

:root[data-theme="light"] .forge-orb {
    --orb-1: #7a5cec;
    --orb-2: #9a84f4;
    --orb-3: #8cb8ff;
    --orb-4: #f3efff;
    --orb-hot: #a996f6;
    --orb-glow: rgba(122, 92, 236, 0.12);
    --orb-opacity: 0.85;
    --orb-mute: none;
}

/* the light theme's orb: the same turning rock, but white marble with the interface's own
   cracks (--fx-cracks, purple-blue here) glowing in it - laid on normally, "screen" would
   vanish on white */
:root[data-theme="light"] .forge-orb-lava {
    background-color: #f4f4f8;
    background-image:
        var(--fx-cracks),
        var(--fx-cracks),
        radial-gradient(ellipse 38% 16% at 28% 66%, rgba(122, 92, 236, 0.28), rgba(122, 92, 236, 0) 100%),
        radial-gradient(ellipse 30% 12% at 70% 34%, rgba(90, 120, 240, 0.24), rgba(90, 120, 240, 0) 100%),
        radial-gradient(ellipse 22% 10% at 56% 82%, rgba(122, 92, 236, 0.22), rgba(122, 92, 236, 0) 100%),
        url("../images/forge/marble.05abf5b4a34c.jpg");
    background-blend-mode: normal, normal, normal, normal, normal, normal;
    filter: none;
}

:root[data-theme="light"] .forge-orb-lava::after {
    filter: blur(4px);
    mix-blend-mode: normal;
    opacity: 0.45;
}

/* the marble's roundness: a cool shade at its edge, a soft light on its upper left */
:root[data-theme="light"] .forge-orb-gloss {
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 40%),
        radial-gradient(circle closest-side at 50% 50%, rgba(80, 70, 140, 0) 58%, rgba(80, 70, 140, 0.16) 86%, rgba(60, 50, 120, 0.34) 100%);
}

/* ---------- details the generator can't know ---------- */

/* text on a solid accent stays white (the generator would darken it with the rest) */
:root[data-theme="light"] .desktop-window-controls [data-window-close]:hover {
    color: #fff;
}

/* the knob of a switch that is on: white on the accent, as it was in the dark theme */
:root[data-theme="light"] .toggle-row input.toggle-switch:checked::after {
    background: #fff;
}

/* Приём пищи: what lies on a photo stays dark-and-white in both themes - the "+2 photos" badge
   and the unpin button */
:root[data-theme="light"] .meals-meal-thumb em,
:root[data-theme="light"] .meals-photo-remove {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(10, 10, 14, 0.72);
    color: #fff;
}

:root[data-theme="light"] .meals-photo-remove:hover {
    border-color: rgba(248, 113, 113, 0.7);
    color: #fca5a5;
}
