/* Dark, starry single page. Accent is the logo tagline's light blue; the rocket's red is the faint warm glow below. */
:root {
    --bg: #04060b;
    --panel: rgb(255 255 255 / 0.035);
    --field: rgb(0 0 0 / 0.35);
    --line: rgb(255 255 255 / 0.1);
    --text: #e8edf4;
    --muted: #8c9aab;
    --accent: #95b9db;
    --glow: rgb(149 185 219 / 0.35);
    --navy: #103756;
    --font: var(--gh-font-body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100svh;
    display: grid;
    place-items: center;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font);
}

/* Sky: navy haze from above, ember glow from below, two star layers (the second slowly twinkles). Fixed, so it never scrolls. */
body::before, body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
body::before {
    background:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgb(16 55 86 / 0.75), transparent 70%),
        radial-gradient(ellipse 70% 40% at 50% 115%, rgb(224 68 46 / 0.12), transparent 70%),
        url(../img/stars.svg);
}
body::after {
    background: url(../img/stars.svg) 300px 170px / 420px 420px;
    opacity: 0.5;
    animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.15; } to { opacity: 0.9; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

main { width: min(720px, 100% - 32px); padding-block: 72px; }

/* Logo, with a soft glow and a fading hairline beneath */
h1 {
    margin: 0 0 56px;
    text-align: center;
    font: 300 34px var(--gh-font-heading, var(--font));
    letter-spacing: 0.3em;
    text-transform: uppercase;
    animation: rise 1.6s ease-out both;
}
h1 img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    filter: drop-shadow(0 0 28px rgb(149 185 219 / 0.22));
}
h1::after {
    content: "";
    display: block;
    width: min(260px, 60%);
    height: 1px;
    margin: 40px auto 0;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}
/* gscan requires these; this theme never renders editor content */
.kg-width-wide, .kg-width-full { width: 100%; }

/* Contact form: a glass panel */
main > form {
    max-width: 560px;
    margin-inline: auto;
    padding: 40px 36px 34px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 40px 100px -30px rgb(0 0 0 / 0.9), inset 0 1px 0 rgb(255 255 255 / 0.06);
    backdrop-filter: blur(8px);
    animation: rise 1.6s 0.35s ease-out both;
}
@media (max-width: 480px) { main > form { padding: 28px 20px 24px; } }
form p { margin: 0 0 22px; }
form p:last-child { margin: 0; }
label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
input, textarea {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    background: var(--field);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: 16px/1.5 var(--font);
    letter-spacing: normal;
    text-transform: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { resize: vertical; }
input:focus, textarea:focus {
    outline: 2px solid transparent; /* still shows in Windows high-contrast mode, which drops box-shadow */
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(149 185 219 / 0.15), 0 0 24px rgb(149 185 219 / 0.12);
}
/* Keep browser autofill from painting fields light */
input:-webkit-autofill { -webkit-text-fill-color: var(--text); caret-color: var(--text); transition: background-color 600000s; }

.button {
    padding: 14px 34px;
    border: 1px solid rgb(149 185 219 / 0.45);
    border-radius: 999px;
    background: linear-gradient(180deg, #1a4a73, var(--navy));
    color: var(--text);
    font: 600 13px var(--font);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    cursor: pointer;
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
}
.button:hover { border-color: var(--accent); box-shadow: 0 0 28px var(--glow); transform: translateY(-1px); }
.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Busy state (assets/js/contact.js): greyed Send button and a spinner beside it */
.form-spinner {
    display: none;
    width: 20px;
    height: 20px;
    margin-left: 14px;
    vertical-align: middle;
    border: 2px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
form.is-busy .form-spinner { display: inline-block; }
form.is-busy [type="submit"] { opacity: 0.45; pointer-events: none; cursor: default; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Result popup (assets/js/contact.js) */
.contact-dialog {
    width: min(420px, 100% - 32px);
    padding: 32px;
    background: #0a0e16;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 0 60px rgb(149 185 219 / 0.15);
    text-align: center;
}
.contact-dialog[open] { animation: rise 0.3s ease-out; }
.contact-dialog::backdrop { background: rgb(2 3 6 / 0.7); backdrop-filter: blur(4px); }
.contact-dialog h2 { margin: 0 0 10px; font-size: 20px; font-weight: 300; letter-spacing: 0.2em; text-transform: uppercase; }
.contact-dialog p { margin: 0 0 26px; color: var(--muted); }
.contact-dialog form { margin: 0; }

/* ALTCHA spam-check widget (assets/js/altcha.min.js) */
altcha-widget {
    display: block;
    margin: 4px 0 26px;
    --altcha-color-base: var(--field);
    --altcha-color-base-content: var(--text);
    --altcha-border-color: var(--line);
    --altcha-border-radius: 8px;
    --altcha-color-neutral: rgb(255 255 255 / 0.3);
    --altcha-color-primary: var(--accent);
    --altcha-color-primary-content: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
    h1, main > form, body::after, .contact-dialog[open] { animation: none; }
    .form-spinner { animation-duration: 2s; }
}
