:root {
    --pico-font-size: 100%;

    /* Warm tan palette (light, default). Dark mode redefines the same
       tokens below — automatically via prefers-color-scheme, or forced
       either way via data-theme, set by the toggle script in page.html. */
    --pico-background-color: #f5ecd9;
    --pico-color: #2b2117;
    --pico-muted-color: #8a7a63;
    --pico-muted-border-color: #e3d5b8;

    --pico-card-background-color: #fbf6ea;
    --pico-card-border-color: #e6d9bd;
    --pico-card-box-shadow: 0 1px 2px rgba(43, 33, 23, 0.06), 0 8px 24px rgba(43, 33, 23, 0.05);

    --pico-form-element-background-color: #fbf6ea;

    /* Deep forest green accent for buttons, links, and the wordmark. */
    --pico-primary: #3d6b4a;
    --pico-primary-background: #3d6b4a;
    --pico-primary-border: #3d6b4a;
    --pico-primary-underline: rgba(61, 107, 74, 0.5);
    --pico-primary-hover: #2e5439;
    --pico-primary-hover-background: #2e5439;
    --pico-primary-hover-border: #2e5439;
    --pico-primary-focus: rgba(61, 107, 74, 0.35);
    --pico-primary-inverse: #fbf6ea;

    --pico-h1-color: #221a10;
    --pico-h2-color: #221a10;

    --pico-border-radius: 0.5rem;

    --font-serif:
        "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

/* Dark mode: warm espresso background (not cool gray/black) with a
   brighter sage-green accent, so it reads as the same brand at night
   rather than a generic dark theme. Applies automatically when the OS
   prefers dark, unless overridden — either way — by the toggle. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --pico-background-color: #1e1811;
        --pico-color: #ecdfc4;
        --pico-muted-color: #a89579;
        --pico-muted-border-color: #3a3024;

        --pico-card-background-color: #282018;
        --pico-card-border-color: #3d3323;
        --pico-card-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);

        --pico-form-element-background-color: #282018;

        --pico-primary: #6fae7c;
        --pico-primary-background: #6fae7c;
        --pico-primary-border: #6fae7c;
        --pico-primary-underline: rgba(111, 174, 124, 0.5);
        --pico-primary-hover: #85c091;
        --pico-primary-hover-background: #85c091;
        --pico-primary-hover-border: #85c091;
        --pico-primary-focus: rgba(111, 174, 124, 0.35);
        --pico-primary-inverse: #16130d;

        --pico-h1-color: #f5ecd9;
        --pico-h2-color: #f5ecd9;
    }
}

:root[data-theme="dark"] {
    --pico-background-color: #1e1811;
    --pico-color: #ecdfc4;
    --pico-muted-color: #a89579;
    --pico-muted-border-color: #3a3024;

    --pico-card-background-color: #282018;
    --pico-card-border-color: #3d3323;
    --pico-card-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);

    --pico-form-element-background-color: #282018;

    --pico-primary: #6fae7c;
    --pico-primary-background: #6fae7c;
    --pico-primary-border: #6fae7c;
    --pico-primary-underline: rgba(111, 174, 124, 0.5);
    --pico-primary-hover: #85c091;
    --pico-primary-hover-background: #85c091;
    --pico-primary-hover-border: #85c091;
    --pico-primary-focus: rgba(111, 174, 124, 0.35);
    --pico-primary-inverse: #16130d;

    --pico-h1-color: #f5ecd9;
    --pico-h2-color: #f5ecd9;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
}

body > main {
    width: 100%;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    padding: 4rem 2rem 2rem;
}

/* Typography */

h1,
h2,
h3,
h4,
.site-logo {
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Hero */

.hero {
    text-align: center;
    padding: 3rem 0 4rem;
}

.hero h1 {
    font-size: 4.25rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.hero .tagline {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--pico-muted-color);
    margin-bottom: 2rem;
}

/* Sections */

.section {
    margin-top: 4rem;
}

/* Signup */

.signup {
    max-width: 560px;
    margin: 2.5rem auto 2rem;
    padding: 1.75rem 2rem;

    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-card-border-color);
    border-radius: var(--pico-border-radius);
    box-shadow: var(--pico-card-box-shadow);
}

#signup {
    scroll-margin-top: 5rem;
}

.signup-error {
    color: var(--pico-del-color);
    font-weight: 600;
}

.signup-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.signup-actions button {
    width: auto;
    flex: 1;
    margin-bottom: 0;
}

/* Buttons */

button,
[type="submit"],
[type="button"],
[role="button"] {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: var(--pico-background-color);
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.site-header nav {
    max-width: 900px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 1.5rem;
    text-decoration: none;
}

/* "SIM" as a lighter, tracked-out label against a bold,
   accent-colored "Gator". */
.logo-sim {
    font-weight: 500;
    color: var(--pico-color);
    letter-spacing: 0.06em;
}

.logo-gator {
    font-weight: 800;
    color: var(--pico-primary);
}

.header-cta {
    margin: 0;
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
}

/* Footer */

footer {
    margin-top: 6rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--pico-muted-color);
}

/* Dev toolbar — only rendered when SIMGATOR_DEV=1 (see cmd/site),
   never present in a production build. */

.dev-toolbar {
    max-width: 680px;
    margin: 0 auto;
    padding: 1rem 2rem 1.5rem;
    border-top: 1px dashed var(--pico-muted-border-color);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;

    font-size: 0.75rem;
    color: var(--pico-muted-color);
}

.dev-toolbar span {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 0.15rem 0.4rem;
}

.theme-toggle {
    width: auto;
    margin: 0;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;

    background: transparent;
    border: 1px solid var(--pico-muted-border-color);
    color: var(--pico-color);
    cursor: pointer;
}

.theme-toggle:hover {
    background: var(--pico-card-background-color);
}

/* Utility */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile */

@media (max-width: 600px) {
    main {
        padding: 2rem 1.25rem;
    }

    .dev-toolbar {
        padding: 1rem 1.25rem 1.5rem;
    }

    .hero {
        padding: 2rem 0 3rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero .tagline {
        font-size: 1.2rem;
    }
}
