/* Race to Revelation — shared site styles. Mirrors the iOS app:
 * navy background, ivory body text, gold accents, serif display
 * font for headlines, system sans for body. Mobile-first. */

:root {
    --bg:           #0d1530;
    --bg-elevated:  #131a3a;
    --text-primary: #f5f0e6;
    --text-secondary: #b8b6c4;
    --text-tertiary:  #8a8a96;
    --gold:         #d9a93a;
    --gold-deep:    #b8862a;
    --border:       #2a3155;
    --scarlet:      #d65656;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.15s ease;
}
a:hover { opacity: 0.8; }

/* Starfield — fixed background that mirrors the in-app RRBackground. */

.starfield {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--bg);
    background-image: url("/stars.svg");
    background-size: 1200px 1200px;
    background-position: center;
    background-repeat: repeat;
    pointer-events: none;
}

/* Corner nav — shows on the homepage only, top-right.
 * Legal pages use the .page-header instead. */

.corner-nav {
    position: absolute;
    top: 24px;
    right: 28px;
    display: flex;
    gap: 18px;
    font-size: 13px;
    z-index: 1;
}
.corner-nav a {
    color: var(--text-secondary);
    text-decoration: none;
}
.corner-nav a:hover {
    color: var(--gold);
}

/* Welcome / homepage hero — mirrors the OnbStepWelcome iOS screen. */

.welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px 40px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}
.welcome__logo {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 0 32px rgba(217, 169, 58, 0.25));
    margin-bottom: 24px;
}
.welcome__wordmark {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 44px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0 0 18px;
    line-height: 1.1;
}
.welcome__eyebrow {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 40px;
}
/* Hook line — promoted from "small italicized aside" to the actual
 * headline of the screen. Serif, larger, ivory. The eyebrow + brand
 * mark already say what the app is, so this line gets the spotlight. */
.welcome__hook {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35;
    letter-spacing: 0.2px;
    max-width: 480px;
    margin: 0 0 36px;
}
.welcome__cta {
    display: inline-block;
    padding: 16px 36px;
    background: var(--gold);
    color: var(--bg);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 24px rgba(217, 169, 58, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.welcome__cta:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 6px 30px rgba(217, 169, 58, 0.45);
}
.welcome__cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 16px rgba(217, 169, 58, 0.3);
}

/* Desktop sizing — bigger logo, bigger headline. */
@media (min-width: 768px) {
    .welcome { padding: 64px 32px 48px; }
    .welcome__logo { width: 280px; height: 280px; margin-bottom: 28px; }
    .welcome__wordmark { font-size: 56px; }
    .welcome__eyebrow { font-size: 13px; letter-spacing: 5px; }
    .welcome__hook { font-size: 32px; }
}

@media (min-width: 1100px) {
    .welcome__logo { width: 320px; height: 320px; }
    .welcome__wordmark { font-size: 64px; }
    .welcome__hook { font-size: 36px; }
}

/* Mobile tightening. */
@media (max-width: 480px) {
    .welcome { padding: 56px 22px 32px; }
    .welcome__logo { width: 168px; height: 168px; margin-bottom: 20px; }
    .welcome__wordmark { font-size: 34px; }
    .welcome__eyebrow { font-size: 11px; letter-spacing: 3px; margin-bottom: 32px; }
    .welcome__hook { font-size: 22px; }
    .welcome__cta { padding: 14px 28px; font-size: 15px; }
    .corner-nav { top: 16px; right: 18px; gap: 14px; font-size: 12px; }
}

/* === Legal pages (terms.html, privacy.html) === */

.page-header {
    padding: 32px 24px 20px;
    border-bottom: 1px solid var(--border);
}
.page-header__inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    text-decoration: none;
    color: var(--text-primary);
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}
.brand__name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.brand__tagline {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
}
.nav {
    display: flex;
    gap: 18px;
    font-size: 13px;
}
.nav a { text-decoration: none; }

main.legal-doc {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    flex: 1;
}

.legal-doc h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.15;
}
.legal-doc .updated {
    color: var(--text-tertiary);
    font-size: 13px;
    margin: 0 0 28px;
}
.legal-doc h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 12px;
    line-height: 1.2;
}
.legal-doc h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 8px;
    color: var(--text-primary);
}
.legal-doc p {
    margin: 0 0 14px;
    color: var(--text-secondary);
}
.legal-doc strong {
    color: var(--text-primary);
    font-weight: 600;
}
.legal-doc ul {
    margin: 0 0 14px;
    padding-left: 0;
    list-style: none;
}
.legal-doc ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.legal-doc ul li::before {
    content: "•";
    color: var(--gold);
    font-weight: 700;
    position: absolute;
    left: 4px;
    top: 0;
}
.legal-doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14px;
}
.legal-doc th,
.legal-doc td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.legal-doc th {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: var(--bg-elevated);
}
.legal-doc td {
    color: var(--text-secondary);
}
.legal-doc .tldr {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 0 0 32px;
}
.legal-doc .tldr h2 {
    margin-top: 0;
    font-size: 18px;
}

/* Footer (shared) */

footer {
    border-top: 1px solid var(--border);
    padding: 28px 24px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
}
footer a {
    color: var(--text-tertiary);
    margin: 0 8px;
    text-decoration: underline;
    text-underline-offset: 2px;
}
footer a:hover { color: var(--gold); }
footer .sep { color: var(--border); }

@media (max-width: 540px) {
    .legal-doc h1 { font-size: 26px; }
    .legal-doc h2 { font-size: 19px; }
    main.legal-doc { padding: 32px 20px 64px; }
    .page-header { padding: 24px 20px 16px; }
    .nav { gap: 14px; font-size: 12px; }
}
