﻿/* ================================================================
   Goathead Software — Second in Command
   Shared styles for auth (login/register) and legal pages
   ================================================================ */


/* ================================================================
   1. Design tokens
   ================================================================ */

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg-1);
    -webkit-font-smoothing: antialiased;
    line-height: 1.65;
}

/* Blazor's error UI is hidden by the app shell's stylesheet, which
   standalone pages (home, auth, legal) don't load. Hide it here. */
#blazor-error-ui {
    display: none;
}

:root {
    /* Backgrounds */
    --bg-1: #0f172a;
    --bg-2: #1e293b;
    --bg-3: #334155;
    /* Surfaces */
    --card-bg: rgba(30, 41, 59, 0.75);
    --card-border: rgba(148, 163, 184, 0.15);
    --code-bg: rgba(15, 23, 42, 0.6);
    /* Text */
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    /* Accent */
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.35);
    /* Semantic */
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.08);
    /* Inputs */
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(148, 163, 184, 0.2);
    --input-focus: #6366f1;
}


/* ================================================================
   2. Reset & base
   ================================================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg-1);
    -webkit-font-smoothing: antialiased;
    line-height: 1.65;
}


/* ================================================================
   3. Shared page shell (gradient + floating orbs)
   ================================================================ */

.auth-page,
.legal-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: radial-gradient(1200px 800px at 15% 10%, rgba(99, 102, 241, 0.18), transparent 60%), radial-gradient(1000px 700px at 85% 90%, rgba(14, 165, 233, 0.15), transparent 60%), linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

    .auth-page::before,
    .auth-page::after,
    .legal-page::before,
    .legal-page::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        filter: blur(80px);
        opacity: 0.35;
        pointer-events: none;
    }

    .auth-page::before,
    .legal-page::before {
        width: 400px;
        height: 400px;
        background: #6366f1;
        top: -120px;
        left: -120px;
        animation: float1 14s ease-in-out infinite;
    }

    .auth-page::after,
    .legal-page::after {
        width: 500px;
        height: 500px;
        background: #0ea5e9;
        bottom: -180px;
        right: -180px;
        animation: float2 18s ease-in-out infinite;
    }

@keyframes float1 {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(40px, 60px);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-50px, -40px);
    }
}


/* ================================================================
   4. Brand mark
   ================================================================ */

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px -6px var(--accent-glow);
    flex-shrink: 0;
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text);
}


/* ================================================================
   5. Auth pages — login & register card
   ================================================================ */

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    padding: 2.75rem 2.5rem 2.25rem;
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.2);
    animation: cardIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-card--narrow {
    max-width: 420px;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card h1 {
    margin: 0 0 0.35rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--text);
}

.subtitle {
    margin: 0 0 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-dim);
}


/* -------- Form fields -------- */

.field {
    margin-bottom: 1.1rem;
}

    .field label {
        display: block;
        margin-bottom: 0.45rem;
        font-size: 0.82rem;
        font-weight: 500;
        color: var(--text-dim);
        letter-spacing: 0.01em;
    }

        .field label .optional {
            color: var(--text-muted);
            font-weight: 400;
        }

    .field input[type="text"],
    .field input[type="email"],
    .field input[type="password"] {
        width: 100%;
        padding: 0.8rem 0.95rem;
        font-size: 0.95rem;
        font-family: inherit;
        color: var(--text);
        background: var(--input-bg);
        border: 1px solid var(--input-border);
        border-radius: 10px;
        outline: none;
        transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }

    .field input::placeholder {
        color: var(--text-muted);
    }

    .field input:hover {
        border-color: rgba(148, 163, 184, 0.35);
    }

    .field input:focus {
        border-color: var(--input-focus);
        background: rgba(15, 23, 42, 0.85);
        box-shadow: 0 0 0 4px var(--accent-glow);
    }

.field-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--danger);
}


/* -------- Remember me / forgot password row -------- */

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.25rem 0 1.5rem;
    gap: 1rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
}

    .checkbox input {
        width: 16px;
        height: 16px;
        accent-color: var(--accent);
        cursor: pointer;
    }

.forgot-link {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

    .forgot-link:hover {
        color: var(--accent);
    }


/* -------- Primary button -------- */

.btn-primary {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 8px 20px -8px var(--accent-glow);
    transition: transform 0.08s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

    .btn-primary:hover:not(:disabled) {
        filter: brightness(1.08);
        box-shadow: 0 12px 28px -10px var(--accent-glow);
    }

    .btn-primary:active:not(:disabled) {
        transform: translateY(1px);
    }

    .btn-primary:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }


/* -------- Alerts -------- */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 10px;
    animation: shake 0.35s ease;
}

    .alert svg {
        flex-shrink: 0;
        margin-top: 1px;
    }

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}


/* -------- Divider -------- */

.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

    .divider::before,
    .divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--card-border);
    }


/* -------- Footer links -------- */

.footer-links {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

    .footer-links a {
        color: var(--text-dim);
        text-decoration: none;
        font-weight: 500;
        transition: color 0.15s ease;
    }

        .footer-links a:hover {
            color: var(--accent);
        }


/* -------- Legal note (small print under register button) -------- */

.legal-note {
    margin: 1rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

    .legal-note a {
        color: var(--text-dim);
        text-decoration: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    }

        .legal-note a:hover {
            color: var(--accent);
        }


/* -------- Register: interests section -------- */

.section {
    margin: 1.5rem 0 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--card-border);
}

    .section h2 {
        margin: 0 0 0.2rem;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text);
    }

.section-hint {
    margin: 0 0 0.9rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
}

.interest-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 0.88rem;
    color: var(--text);
    transition: border-color 0.15s ease, background 0.15s ease;
}

    .interest-item:hover {
        border-color: rgba(148, 163, 184, 0.35);
        background: rgba(15, 23, 42, 0.6);
    }

    .interest-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--accent);
        cursor: pointer;
        flex-shrink: 0;
    }

        .interest-item input[type="checkbox"]:checked + .interest-name {
            color: var(--accent);
            font-weight: 500;
        }


/* ================================================================
   6. Legal page
   ================================================================ */

.legal-page {
    padding-bottom: 4rem;
}


/* -------- Header -------- */

.legal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}

    .legal-header .brand {
        margin-bottom: 0;
        justify-content: flex-start;
        gap: 0.6rem;
    }

    .legal-header .brand-logo {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        font-size: 0.9rem;
    }

    .legal-header .brand-name {
        font-size: 0.95rem;
    }

.back-link {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s ease;
}

    .back-link:hover {
        color: var(--accent);
    }


/* -------- Two-column layout -------- */

.legal-shell {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    align-items: start;
    position: relative;
    z-index: 1;
}


/* -------- Sidebar TOC -------- */

.legal-toc {
    position: sticky;
    top: 90px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

    .legal-toc h2 {
        margin: 0 0 0.75rem;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    .legal-toc nav {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
    }

    .legal-toc a {
        display: block;
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
        color: var(--text-dim);
        text-decoration: none;
        border-left: 2px solid transparent;
        transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
        border-radius: 0 6px 6px 0;
    }

        .legal-toc a:hover {
            color: var(--text);
            background: rgba(148, 163, 184, 0.06);
            border-left-color: rgba(99, 102, 241, 0.4);
        }

        .legal-toc a.sub {
            padding-left: 1.5rem;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

            .legal-toc a.sub:hover {
                color: var(--text-dim);
            }

    .legal-toc::-webkit-scrollbar {
        width: 6px;
    }

    .legal-toc::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.2);
        border-radius: 3px;
    }


/* -------- Content -------- */

.legal-content {
    min-width: 0;
    max-width: 760px;
}

    .legal-content h1 {
        margin: 0 0 0.5rem;
        font-size: 2rem;
        font-weight: 700;
        letter-spacing: -0.02em;
    }

    .legal-content .meta {
        margin: 0 0 1.5rem;
        font-size: 0.82rem;
        color: var(--text-muted);
        line-height: 1.7;
    }

    .legal-content .lede {
        font-size: 1.02rem;
        color: var(--text-dim);
        margin: 0 0 1.75rem;
        padding-left: 1rem;
        border-left: 3px solid var(--accent);
    }

    .legal-content h2 {
        margin: 3rem 0 1rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--card-border);
        font-size: 1.5rem;
        font-weight: 700;
        letter-spacing: -0.01em;
        scroll-margin-top: 100px;
    }

        .legal-content h2:first-of-type {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
        }

    .legal-content h3 {
        margin: 2rem 0 0.75rem;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text);
        scroll-margin-top: 100px;
    }

    .legal-content h4 {
        margin: 1.5rem 0 0.5rem;
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--text-dim);
    }

    .legal-content p {
        margin: 0 0 1rem;
        color: var(--text-dim);
        font-size: 0.95rem;
    }

    .legal-content ul {
        margin: 0 0 1.25rem;
        padding-left: 1.4rem;
        color: var(--text-dim);
    }

        .legal-content ul li {
            margin: 0 0 0.5rem;
            font-size: 0.95rem;
        }

            .legal-content ul li strong {
                color: var(--text);
                font-weight: 600;
            }

    .legal-content section {
        scroll-margin-top: 90px;
    }

    .legal-content a {
        color: var(--accent);
        text-decoration: none;
        border-bottom: 1px solid transparent;
        transition: border-color 0.15s ease;
    }

        .legal-content a:hover {
            border-bottom-color: var(--accent);
        }


/* -------- Callouts -------- */

.callout {
    margin: 0 0 1.5rem;
    padding: 1.25rem 1.4rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
}

    .callout strong {
        color: var(--text);
    }

    .callout.emphasis {
        background: var(--success-bg);
        border-color: rgba(52, 211, 153, 0.3);
        border-left-color: var(--success);
    }

        .callout.emphasis strong {
            color: var(--success);
        }

        .callout.emphasis p {
            margin: 0.75rem 0 0;
            color: var(--text-dim);
            font-size: 0.9rem;
        }


/* -------- Contact card -------- */

.contact-card {
    display: block;
    margin: 1rem 0 0;
    padding: 1rem 1.25rem;
    background: var(--code-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text);
}

    .contact-card a {
        color: var(--accent);
    }


/* -------- Donate button (optional) -------- */

.donate-button {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 8px 20px -8px var(--accent-glow);
    transition: filter 0.15s ease, transform 0.08s ease;
}

    .donate-button:hover {
        filter: brightness(1.08);
    }

    .donate-button:active {
        transform: translateY(1px);
    }


/* -------- Legal footer -------- */

.legal-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

    .legal-footer p {
        margin: 0.4rem 0;
        font-size: 0.82rem;
    }

        .legal-footer p:last-child {
            color: var(--text-dim);
            font-weight: 500;
        }


/* ================================================================
   7. Autofill overrides
   ================================================================ */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.95) inset;
    transition: background-color 9999s ease-in-out 0s;
}


/* ================================================================
   8. Responsive
   ================================================================ */

@media (max-width: 900px) {
    .legal-shell {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1.25rem;
    }

    .legal-toc {
        position: static;
        max-height: none;
        padding: 1rem 1.25rem;
        background: var(--card-bg);
        border: 1px solid var(--card-border);
        border-radius: 12px;
    }

    .legal-content {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem 1.75rem;
        border-radius: 14px;
    }

        .auth-card h1 {
            font-size: 1.4rem;
        }

    .legal-header {
        padding: 0.75rem 1rem;
    }

        .legal-header .brand-name {
            display: none;
        }

    .legal-content h1 {
        font-size: 1.6rem;
    }

    .legal-content h2 {
        font-size: 1.25rem;
    }

    .legal-content h3 {
        font-size: 1rem;
    }
}

/* -------- Back to top button -------- */

.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 50;
    width: 44px;
    height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    color: var(--text);
    background: var(--card-bg);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 30px -12px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.95);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.2s ease;
}

    .back-to-top.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .back-to-top:hover {
        color: var(--accent);
        border-color: rgba(99, 102, 241, 0.5);
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 30px -12px rgba(0, 0, 0, 0.6), 0 0 0 4px var(--accent-glow);
    }

    .back-to-top:active {
        transform: translateY(0) scale(0.96);
    }

    .back-to-top:focus-visible {
        outline: none;
        color: var(--accent);
        border-color: rgba(99, 102, 241, 0.5);
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 0 0 4px var(--accent-glow);
    }

@media (max-width: 480px) {
    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none;
    }
}

/* ================================================================
   Home page
   ================================================================ */

.home-page {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: radial-gradient(1200px 800px at 15% 5%, rgba(99, 102, 241, 0.18), transparent 60%), radial-gradient(1000px 700px at 85% 95%, rgba(14, 165, 233, 0.15), transparent 60%), linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
}

    .home-page::before,
    .home-page::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        filter: blur(80px);
        opacity: 0.3;
        pointer-events: none;
        z-index: 0;
    }

    .home-page::before {
        width: 500px;
        height: 500px;
        background: #6366f1;
        top: -160px;
        left: -120px;
        animation: float1 16s ease-in-out infinite;
    }

    .home-page::after {
        width: 600px;
        height: 600px;
        background: #0ea5e9;
        bottom: -240px;
        right: -180px;
        animation: float2 20s ease-in-out infinite;
    }

    .home-page main,
    .home-page .home-header,
    .home-page .home-footer {
        position: relative;
        z-index: 1;
    }


/* ================================================================
   Home Page V2 — Demiplane
   ================================================================ */

/* -------- Override Page Layout for Full-Bleed Sections -------- */
.home-page {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg-1); /* Base color */
}

    .home-page > main {
        flex: 1;
    }

/* -------- Header (Refined) -------- */
.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    background-color: #303d4dff !important;
}

/* -------- Hero: The List Builder Preview -------- */
.hero {
    position: relative;
    padding: 4rem 2rem 2rem;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.2), transparent), var(--bg-1);
    overflow: hidden;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-copy h1 {
    margin: 0 0 1.5rem;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text);
}

.hero-lede {
    max-width: 480px;
    margin: 0 0 2rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dim);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hero-note {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Hero Visual Mockup */
.hero-visual {
    perspective: 1000px;
}

.mock-window {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.3) inset;
    transform: rotateY(-10deg) rotateX(4deg);
    transition: transform 0.4s ease;
}

    .mock-window:hover {
        transform: rotateY(-5deg) rotateX(2deg);
    }

.mock-title-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.mock-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
}

.mock-title {
    margin-left: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dim);
}

.mock-body {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    padding: 1rem;
}

.mock-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    border-right: 1px solid rgba(148, 163, 184, 0.15);
}

.mock-nav-item {
    height: 24px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.1);
}

    .mock-nav-item.active {
        background: var(--accent);
        box-shadow: 0 0 12px var(--accent-glow);
    }

.mock-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mock-header-line {
    height: 32px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.08);
}

.mock-list-row {
    display: flex;
    gap: 0.75rem;
}

    .mock-list-row span {
        flex: 1;
        height: 28px;
        border-radius: 6px;
        background: rgba(148, 163, 184, 0.08);
    }

        .mock-list-row span:first-child {
            flex: 2;
        }

/* -------- Systems Rail (Horizontal Scroll) -------- */
.systems-rail {
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.systems-header {
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

    .systems-header .systems-eyebrow {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--accent);
    }

    .systems-header h2 {
        margin: 0;
        font-size: clamp(1.75rem, 3vw, 2.25rem);
        font-weight: 700;
        letter-spacing: -0.02em;
        color: var(--text);
    }

.rail-container {
    overflow-x: auto;
    padding: 0 2rem 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

    .rail-container::-webkit-scrollbar {
        height: 8px;
    }

    .rail-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .rail-container::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.3);
        border-radius: 4px;
    }

.rail-track {
    display: flex;
    gap: 1.25rem;
    width: max-content;
    padding-bottom: 0.5rem;
}

.rail-card {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 300px;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    .rail-card:hover {
        border-color: rgba(99, 102, 241, 0.4);
        transform: translateY(-4px);
        box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
    }

    .rail-card .system-tag {
        margin-bottom: 0.75rem;
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--accent);
    }

    .rail-card h3 {
        margin: 0 0 0.5rem;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text);
    }

    .rail-card p {
        margin: 0 0 1rem;
        font-size: 0.85rem;
        line-height: 1.5;
        color: var(--text-dim);
    }

    .rail-card .system-publisher {
        padding-top: 0.75rem;
        border-top: 1px solid var(--card-border);
        font-size: 0.75rem;
        color: var(--text-muted);
    }

.rail-card--more {
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.3);
}

    .rail-card--more:hover {
        border-color: rgba(99, 102, 241, 0.5);
    }

.systems-note {
    max-width: 1400px;
    margin: 1.5rem auto 0;
    padding: 0 2rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* -------- How It Works (Two-Column) -------- */
.how-it-works {
    padding: 5rem 2rem;
    background: var(--bg-2);
}

.how-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.how-copy h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.how-copy p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dim);
}

.how-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
}

.step-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.12);
    border-radius: 10px;
}

    .step-icon svg {
        width: 20px;
        height: 20px;
    }

.step-card h3 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.step-card p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-dim);
}

/* -------- Community Section -------- */
.community {
    padding: 5rem 2rem;
    background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(14, 165, 233, 0.15), transparent), var(--bg-1);
    overflow: hidden;
}

.community-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.community-copy h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.community-copy p {
    margin: 0 0 2rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dim);
}

.community-visual {
    position: relative;
    height: 300px;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    animation: orbFloat 8s ease-in-out infinite;
}

    .orb:nth-child(1) {
        width: 180px;
        height: 180px;
        background: var(--accent);
        top: 10%;
        left: 10%;
    }

    .orb:nth-child(2) {
        width: 120px;
        height: 120px;
        background: #0ea5e9;
        bottom: 10%;
        right: 20%;
        animation-delay: -3s;
    }

    .orb:nth-child(3) {
        width: 80px;
        height: 80px;
        background: #34d399;
        top: 50%;
        left: 50%;
        animation-delay: -5s;
    }

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -20px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* -------- Responsive Adjustments for New Layout -------- */
@media (max-width: 960px) {
    .hero-inner,
    .how-inner,
    .community-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-visual {
        order: -1; /* Put the mockup above the text on mobile */
        max-width: 500px;
        margin: 0 auto;
    }

    .mock-window {
        transform: none; /* Remove 3D tilt on small screens */
    }

    .community-visual {
        display: none; /* Hide the abstract orbs on mobile */
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 3rem 1.25rem 1rem;
    }

    .systems-rail {
        padding: 3rem 0;
    }

    .systems-header, .systems-note {
        padding: 0 1.25rem;
    }

    .rail-container {
        padding: 0 1.25rem 1rem;
    }

    .how-it-works, .community {
        padding: 3rem 1.25rem;
    }
}
