/*
Purpose:
    Provide shared structural styling for all normal FlipOut DTSP pages.

Inputs:
    Markup rendered through templates/base.html.

Outputs:
    Shared colors, page shell, typography, navigation, and responsive behavior.

Requirements:
    Modern browser CSS support.

Goal:
    Keep the normal website visually consistent from one shared stylesheet.

Section:
    Main-site global styling.
*/

:root {
    color-scheme: dark;
    --bg: #0d0d10;
    --panel: #19191e;
    --panel2: #222228;
    --text: #f3efe7;
    --muted: #aaa69e;
    --red: #d63a3a;
    --red-bright: #e13b47;
    --red-dark: #8d2020;
    --gold: #e0aa44;
    --green: #53b66d;
    --border: rgba(255,255,255,.10);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(
            circle at 15% 5%,
            rgba(214,58,58,.19),
            transparent 28rem
        ),
        linear-gradient(
            150deg,
            #09090b,
            #15151a 55%,
            #09090b
        );
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-page {
    width: min(
        900px,
        calc(100% - 24px)
    );
    margin: 0 auto;
    padding: 22px 0 48px;
}

.site-header {
    margin-bottom: 38px;
}

.site-brand {
    margin-bottom: 14px;
    font-size: .88rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.site-nav {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    width: 100%;
    border-top:
        1px solid var(--border);
    border-bottom:
        1px solid var(--border);
    background:
        rgba(18,18,22,.82);
}

.site-nav a {
    min-width: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 5px 10px;
    border-bottom:
        3px solid transparent;
    color: var(--text);
    text-align: center;
    text-decoration: none;
    font-size:
        clamp(
            .8rem,
            3.4vw,
            .95rem
        );
    font-weight: 800;
    white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--gold);
    background:
        rgba(255,255,255,.035);
}

.site-nav a.active {
    border-bottom-color:
        var(--red-bright);
    background:
        rgba(255,255,255,.025);
    color: #fff;
}

.eyebrow,
.section-label {
    color: var(--gold);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.page-title {
    margin: 6px 0 0;
    font-size:
        clamp(
            3rem,
            11vw,
            5.5rem
        );
    line-height: .94;
    letter-spacing: -.055em;
    text-transform: uppercase;
}

@media (max-width: 430px) {
    .site-page {
        width:
            min(
                100% - 20px,
                900px
            );
    }

    .site-brand {
        font-size: .8rem;
    }

    .site-nav a {
        padding-inline: 3px;
    }
}

/*
Section:
    Shared public account controls.
*/

.site-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.site-header-top .site-brand {
    min-width: 0;
}

.site-account {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin: 0;
}

.site-account-link,
.site-account-button {
    -webkit-appearance: none;
    appearance: none;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 6px 10px;
    border:
        1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    font: inherit;
    font-size: .76rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.site-account-link.admin {
    border-color:
        rgba(224,170,68,.48);
    color: var(--gold);
}

.site-account-link.login {
    border-color:
        rgba(214,58,58,.48);
}

.site-account-link:hover,
.site-account-button:hover {
    border-color:
        rgba(224,170,68,.6);
    color: var(--gold);
}

.site-account-form {
    margin: 0;
    padding: 0;
}

@media (max-width: 560px) {
    .site-header-top {
        align-items: flex-start;
        gap: 8px;
    }

    .site-header-top .site-brand {
        max-width:
            calc(100% - 120px);
        line-height: 1.2;
    }

    .site-account {
        gap: 5px;
    }

    .site-account-link,
    .site-account-button {
        min-height: 32px;
        padding: 6px 8px;
        font-size: .7rem;
    }
}

/*
Section:
    Home landing page cleanup.
*/

.home-page .site-brand {
    display: none;
}

.home-page .site-header-top {
    justify-content: flex-end;
    margin-bottom: 8px;
}

.home-page .home-hero {
    margin-top: 0;
    padding-top: 40px;
}

.home-page .home-title {
    margin-top: 0;
}

@media (max-width: 560px) {
    .home-page .home-hero {
        padding-top: 32px;
    }
}

/*
Section:
    Home hero spacing adjustment.
*/

.home-page .site-header {
    margin-bottom: 8px;
}

.home-page .home-hero {
    margin-top: 0;
    padding-top: 0;
}

