/* Dark theme. Switched by js/theme.js, which sets data-theme="dark" on <html>.
   Most of the page follows from the few variables below; the rules after them
   cover colours that are written out literally in style.css and animations.css. */

html[data-theme="dark"]{
    color-scheme: dark;
    --bs-body-bg: #0c1618;
    --bs-body-color: #d5dfe1;
    --bs-secondary-color: rgba(213, 223, 225, .65);
    /* buttons, headings and outlines are drawn with these two, so swapping them inverts them */
    --bs-black: #ffffff;
    --bs-black-rgb: 255, 255, 255;
    --bs-white: #0c1618;
    --accent_dark: #ACCDD4;
    --grid_dot: #ACCDD4;
    --surface: #13232a;
}

/* these bands keep their own colours in both themes */
html[data-theme="dark"] :is(#ready_to_start, .footer){
    --bs-black: #000000;
    --bs-black-rgb: 0, 0, 0;
    --bs-white: #ffffff;
}

html[data-theme="dark"] ::selection{
    color: #000000;
}

html[data-theme="dark"] .txt_blue{
    color: var(--accent);
}

html[data-theme="dark"] .mark{
    background-image: linear-gradient(rgba(172, 205, 212, .38), rgba(172, 205, 212, .38));
}

html[data-theme="dark"] .site_nav{
    background: rgba(12, 22, 24, .82);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}

/* process */
html[data-theme="dark"] .process_box{
    background: var(--surface);
    border-color: rgba(255, 255, 255, .06);
    box-shadow: none;
}

html[data-theme="dark"] .process_box .process_num{
    color: #1b3138;
}

html[data-theme="dark"] .process_box.is-active .process_num,
html[data-theme="dark"] .process_box:hover .process_num{
    color: #2d5560;
}

html[data-theme="dark"] .process_line{
    background: rgba(172, 205, 212, .14);
}

html[data-theme="dark"] .process_node:not(.on),
html[data-theme="dark"] .process_node:not(.on)::before{
    border-color: #2a4148;
}

html[data-theme="dark"] .process_node:not(.on)::before{
    background: #2a4148;
}

/* services */
html[data-theme="dark"] .service_box{
    background: var(--surface);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .service_box::before{
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(172, 205, 212, .2), transparent 70%);
}

@media (hover: hover){
    html[data-theme="dark"] .process_box:hover,
    html[data-theme="dark"] .service_box:hover{
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 14px 30px rgba(0, 0, 0, .45);
    }
}

/* footer form stays a white field */
html[data-theme="dark"] .subscribe_form input{
    background: #ffffff;
    color: #000000;
}

/* blueprint easter egg */
html[data-theme="dark"].blueprint body{
    background-image:
        linear-gradient(rgba(172, 205, 212, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(172, 205, 212, .08) 1px, transparent 1px);
}

html[data-theme="dark"].blueprint body *{
    outline-color: rgba(172, 205, 212, .4);
}

/* ---------- theme switch: the new theme grows out of the toggle ---------- */
::view-transition-old(root),
::view-transition-new(root){
    animation: none;
    mix-blend-mode: normal;
}
