/* ===== Design tokens (shared across app + author) ===== */

:root {
    --bg: #0f0f1a;
    --bg-deep: #0c0c16;
    --bg-elevated: #161628;
    --bg-card: #1a1a2e;
    --bg-input: #12121f;
    --border: #2a2a40;
    --border-hover: #3d3d5c;
    --text: #d4d4de;
    --text-bright: #f0f0f5;
    --text-muted: #8b8b9e;
    --text-dim: #5c5c72;
    --gold: #c9a959;
    --gold-hover: #e0bf6a;
    --gold-soft: #d4b96a;
    --gold-bg: rgba(201, 169, 89, 0.12);
    --gold-border: rgba(201, 169, 89, 0.28);
    --parchment: #faf6eb;
    --parchment-deep: #f0e8d4;
    --ink: #2c1810;
    --ink-soft: #5a4a3a;
    --ink-muted: #6a5a4a;
    --green: #4ade80;
    --green-bg: rgba(74, 222, 128, 0.12);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.12);
    --red-border: rgba(239, 68, 68, 0.25);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.28);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.18);
    --font-ui: 'Cabin', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-story: 'Crimson Text', Georgia, 'Times New Roman', serif;
    --nav-h: 60px;
}

/* ===== Base ===== */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 169, 89, 0.07), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(90, 70, 140, 0.06), transparent 50%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold);
    transition: color 0.15s ease;
}

a:hover {
    color: var(--gold-hover);
}

.grid-x {
    position: relative;
}

/* Main content breathing room under sticky nav */
.page-shell {
    min-height: calc(100vh - var(--nav-h) - 80px);
    padding-bottom: 2.5rem;
}

/* ===== Shared buttons ===== */

.btn-primary,
.btn-play,
.login-box-submit-button,
.signup-box-submit-button,
.settings-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-ui);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary:active,
.btn-play:active {
    transform: translateY(1px);
}

/* ===== Parchment surface (story content / forms) ===== */

.surface-parchment {
    background:
        linear-gradient(135deg, rgba(234, 224, 200, 0.35) 0%, transparent 50%),
        linear-gradient(to bottom, #f5f0e1, var(--parchment));
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.surface-dark {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

/* ===== Site footer ===== */

.site-footer {
    margin-top: auto;
    padding: 1.75rem 1rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(201, 169, 89, 0.12);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.25), transparent);
}

.site-footer .footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gold);
    font-family: var(--font-story);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.site-footer .footer-brand i {
    opacity: 0.85;
}

.site-footer .footer-copy {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.8rem;
}

footer:not(.site-footer) {
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ===== Noty polish ===== */

.noty_theme__mint.noty_bar,
.noty_bar {
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-ui) !important;
}

/* ===== Foundation reveal overlay ===== */

.reveal-overlay {
    background: rgba(8, 8, 16, 0.72) !important;
    backdrop-filter: blur(4px);
}

/* ===== Utility ===== */

.text-story {
    font-family: var(--font-story);
}

.text-gold {
    color: var(--gold);
}

.u-muted {
    color: var(--text-muted);
}
