/* ══════════════════════════════════════════════════════════════════════
   "The Descent" — shared tokens and page furniture for 10deep.ai.

   SOURCE OF TRUTH: app/lib/config/theme.dart and
   app/lib/config/trail_visuals.dart. The share page mirrors the same values
   in backend/app/routes/share.py. If a token changes there, change it here.

   Semantic colors have exactly one job each:
     azure = interactive / informational (the app-wide accent)
     gold  = premium, and ONLY premium
     green = success / verified
   (The per-level depth ramp was retired — one azure accent at every level.)

   Used by /about, /use-cases, /faq, /library, /app. The homepage inlines its
   own copy of these tokens on purpose — it is the highest-traffic page and
   stays self-contained so nothing blocks its first render.
   ══════════════════════════════════════════════════════════════════════ */

:root {
    --abyss: #060A0F;
    --sea-top: #0B1622;
    --surface: #0F1C29;
    --surface-light: #13232F;
    --border: #1E3140;

    --ink: #EAF2F6;
    --ink-secondary: #93A6B2;
    --ink-muted: #5E7180;

    --accent: #3B90FF;
    --gold: #D4AF37;
    --green: #4CAF78;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* html carries its own background; body pins a calm deep-water ground to the
   viewport — the old aqua→indigo depth ramp was retired to match the app. */
html { background: var(--abyss); }

body {
    background: linear-gradient(180deg, var(--sea-top) 0%, var(--abyss) 60%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--surface);
    color: var(--ink);
    padding: 0.75rem 1.25rem;
    z-index: 100;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.skip-link:focus { left: 0; }

/* ── Header ── */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid rgba(30, 49, 64, 0.6);
}

.site-logo {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--accent);
    text-transform: uppercase;
    text-decoration: none;
}
.site-logo:hover { text-decoration: none; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.site-nav a { color: var(--ink-secondary); transition: color 0.2s ease; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }

@media (max-width: 640px) {
    .site-header { padding: 1rem 1.25rem; flex-wrap: wrap; }
    .site-nav { gap: 1rem; font-size: 0.72rem; }
}

/* ── Prose ── */
main { max-width: 800px; margin: 0 auto; padding: 3.5rem 2rem 4rem; }

.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--ink-secondary);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.eyebrow::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--depth, var(--accent));
    flex-shrink: 0;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5vw, 2.9rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.lead {
    font-size: 1.18rem;
    color: var(--ink);
    margin-bottom: 2rem;
    line-height: 1.6;
}

h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    margin-top: 2.75rem;
    margin-bottom: 0.9rem;
    line-height: 1.25;
}

h3 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

p { color: var(--ink-secondary); margin-bottom: 1.25rem; }
ul, ol { color: var(--ink-secondary); margin-bottom: 1.25rem; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }
strong { color: var(--ink); font-weight: 500; }

/* Dateline on the legal pages. */
.last-updated {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ink-secondary);
    margin-bottom: 3rem;
}

/* ── CTA block ── */
.cta {
    margin-top: 3rem;
    padding: 1.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
}

.cta p { color: var(--ink); margin-bottom: 1.25rem; }

.store-buttons {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
}

.store-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    padding: 0.85rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease,
                background 0.2s ease, border-color 0.2s ease;
}

.store-button:hover { text-decoration: none; transform: translateY(-2px); }

.store-button.primary {
    background: var(--ink);
    color: var(--abyss);
    border: 1px solid var(--ink);
}

.store-button.primary:hover { box-shadow: 0 8px 26px rgba(234, 242, 246, 0.16); }

.store-button.secondary {
    background: rgba(59, 144, 255, 0.10);
    border: 1px solid rgba(59, 144, 255, 0.4);
    color: var(--ink);
}

.store-button.secondary:hover {
    background: rgba(59, 144, 255, 0.18);
    border-color: rgba(59, 144, 255, 0.7);
}

/* Premium marker — gold is reserved for this and nothing else. */
.pro-tag {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.4rem;
    padding: 0.1rem 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
}

/* ── Card grid (use-case index) ── */
.uc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) { .uc-grid { grid-template-columns: 1fr; } }

.uc-card {
    display: block;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.uc-card:hover {
    text-decoration: none;
    border-color: rgba(59, 144, 255, 0.5);
    background: var(--surface-light);
    transform: translateY(-2px);
}

.uc-card h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.5rem;
}

.uc-card p { font-size: 0.95rem; margin-bottom: 0; }

/* ── Related links ── */
.related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.related h2 { font-size: 1.1rem; margin-top: 0; }
.related a { display: inline-block; margin: 0 1rem 0.5rem 0; }

/* ── Footer ── */
footer {
    padding: 2.5rem 2rem 3rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-secondary);
    border-top: 1px solid rgba(30, 49, 64, 0.6);
}

footer a { color: var(--ink-secondary); margin: 0 0.75rem; }
footer a:hover { color: var(--ink); text-decoration: none; }
footer p { margin-top: 0.75rem; color: var(--ink-secondary); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
