/* ===== Oly Software — Shared Design Tokens & Components ===== */

:root {
    --deep: #000e24;
    --navy: #1a1a2e;
    --ocean: #2563A0;
    --slate: #64748b;
    --sky: #E8F0F8;
    --snow: #F7F9FC;
    --white: #FFFFFF;
    --copper: #2a6b2c;
    --copper-hover: #1f5021;
    --amber: #E8A84C;
    --gold: #F5E6C8;
    --gold-bg: #FFFCF7;
    --success: #2D8A4E;
    --success-light: #5BC47A;
    --warning: #D4880F;
    --danger: #C0392B;
    --danger-light: #E87B6F;
    --neutral: #6B7B8D;
    --border: #e2e8f0;

    --font-heading: 'DM Sans', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-base: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;

    --transition-fast: 100ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-base: 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: 500ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html, body {
    font-family: var(--font-body);
    font-weight: 400;
    background: var(--deep);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

/* ===== Top Navigation ===== */
.nav {
    background: var(--deep);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    color: white;
    letter-spacing: -0.01em;
}
.nav-logo .o {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--copper);
    display: inline-block;
    margin-right: 1px;
}
.nav-links {
    display: flex;
    gap: 28px;
    flex: 1;
}
.nav-links a {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    transition: color var(--transition-fast);
    letter-spacing: 0.02em;
}
.nav-links a:hover, .nav-links a.active { color: white; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    padding: 11px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-base), border-color var(--transition-base);
    letter-spacing: 0;
    white-space: nowrap;
}
.btn-primary {
    background: var(--copper);
    color: white;
}
.btn-primary:hover { background: var(--copper-hover); }
.btn-secondary {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.12);
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.25); color: white; }
.btn-nav {
    padding: 7px 18px;
    font-size: 12px;
    background: var(--copper);
    color: white;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
}
.btn-nav:hover { background: var(--copper-hover); }

/* ===== Editorial Grid ===== */
.edgrid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 32px;
}
.edgrid-label .eyebrow {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 16px;
}
.edgrid-label h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 28px;
    line-height: 1.2;
    color: var(--navy);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}
.edgrid-label p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 13px;
    line-height: 1.7;
    color: var(--slate);
}
.edgrid.dark .edgrid-label h2 { color: white; }
.edgrid.dark .edgrid-label p { color: rgba(255,255,255,0.5); }

section.light { background: var(--snow); color: var(--navy); }
section.white { background: white; color: var(--navy); }
section.dark  { background: var(--deep); color: white; }

/* ===== Status dots ===== */
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dark .dot-danger, .dot-danger-dark { background: var(--danger-light); }
.dark .dot-warning, .dot-warning-dark { background: var(--amber); }
.dark .dot-success, .dot-success-dark { background: var(--success-light); }
.dot-danger-light { background: var(--danger); }
.dot-warning-light { background: var(--warning); }
.dot-success-light { background: var(--success); }

.badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}
.badge-danger-dark  { background: rgba(192,57,43,0.12);  color: var(--danger-light); }
.badge-warning-dark { background: rgba(212,136,15,0.12); color: var(--amber); }
.badge-success-dark { background: rgba(45,138,78,0.18);  color: var(--success-light); }
.badge-danger  { background: #FDEAEA; color: var(--danger); }
.badge-warning { background: #FFF3E0; color: var(--warning); }
.badge-success { background: #E8F5E9; color: var(--success); }

/* ===== OCRI Lookup Component ===== */
.ocri {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
}
.ocri-label {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 14px;
}
.ocri-search-wrap { position: relative; margin-bottom: 20px; }
.ocri-search {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 11px 14px 11px 36px;
    color: white;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-base);
}
.ocri-search:focus { border-color: rgba(255,255,255,0.3); }
.ocri-search::placeholder { color: rgba(255,255,255,0.35); }
.ocri-search-icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.4);
    pointer-events: none;
}
.ocri-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #162231;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 100ms;
}
.ocri-dropdown.open { opacity: 1; pointer-events: auto; }
.ocri-drop-item {
    padding: 9px 14px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background var(--transition-fast);
}
.ocri-drop-item:hover, .ocri-drop-item.active { background: rgba(255,255,255,0.05); }
.ocri-drop-item:last-child { border-bottom: none; }
.ocri-drop-name {
    font-family: var(--font-body);
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}
.ocri-drop-fips {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255,255,255,0.35);
}
.ocri-drop-score {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    color: white;
    min-width: 22px;
    text-align: right;
}
.ocri-county-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    color: white;
    margin-bottom: 14px;
}
.ocri-score-row {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 24px;
}
.ocri-score {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 72px;
    line-height: 0.85;
    color: white;
    letter-spacing: -0.03em;
}
.ocri-score-suffix {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 20px;
    color: rgba(255,255,255,0.35);
    padding-bottom: 6px;
}
.ocri-percentile {
    padding-bottom: 6px;
}
.ocri-pct-num {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    color: var(--copper);
    display: block;
    line-height: 1.1;
}
.ocri-pct-label {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    display: block;
}
.ocri-bars { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.obar {
    display: grid;
    grid-template-columns: 96px 1fr 32px;
    align-items: center;
    gap: 12px;
}
.obar-label {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}
.obar-track {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
}
.obar-fill {
    height: 100%;
    width: 0;
    transition: width 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), background-color 0.5s;
}
.obar-value {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.ocri-footer {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    display: flex;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    letter-spacing: 0.3px;
}

/* ===== Proof Strip ===== */
.proof-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: white;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.proof-cell {
    padding: 24px 28px;
    border-right: 1px solid var(--border);
}
.proof-cell:last-child { border-right: none; }
.proof-num {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 18px;
    color: var(--navy);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}
.proof-label {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 11px;
    color: var(--slate);
}

/* ===== Dashboard Mock (Browser Chrome) ===== */
.chrome {
    background: var(--deep);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}
.chrome-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.chrome-dot { width: 8px; height: 8px; border-radius: 50%; }
.chrome-dot.r { background: #E24B4A; }
.chrome-dot.y { background: #E8A84C; }
.chrome-dot.g { background: #2D8A4E; }
.chrome-url {
    margin-left: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* ===== Tables ===== */
.tbl {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.tbl th {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate);
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--snow);
}
.tbl td {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--navy);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.tbl tr:last-child td { border-bottom: none; }
.tbl td.mono, .tbl td.num {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}
.tbl td.num { text-align: right; }

/* ===== Footer ===== */
.footer {
    background: var(--deep);
    padding: 64px 32px 32px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}
.footer-col h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 14px;
}
.footer-col a {
    display: block;
    font-family: var(--font-body);
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    padding: 4px 0;
    transition: color var(--transition-fast);
}
.footer-col a:hover { color: white; }
.footer-lead {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
    margin-top: 10px;
}
.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===== Utility ===== */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.copper { color: var(--copper); }
.eyebrow-tag {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--copper);
}

/* ===== OCRI preview / coming-soon overlay ===== */
.ocri-coming-soon-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 4px 10px;
    background: rgba(42, 107, 44, 0.14);
    color: var(--copper);
    border: 1px solid rgba(42, 107, 44, 0.3);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}
.ocri-static-note {
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 20px;
    line-height: 1.5;
    font-style: italic;
}
.ocri-olymap-link {
    color: var(--copper);
    font-weight: 500;
}
.ocri-olymap-link:hover { color: var(--copper-hover); }

/* ===== Unified early-access form ===== */
.ea-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin-top: 20px;
}
.ea-form input[type="email"] {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    padding: 11px 14px;
    color: white;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-base);
}
.ea-form input[type="email"]:focus { border-color: var(--copper); }
.ea-form input[type="email"]::placeholder { color: rgba(255,255,255,0.35); }
.ea-form button {
    background: var(--copper);
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    padding: 11px 20px;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-base);
}
.ea-form button:hover { background: var(--copper-hover); }
.ea-form button:disabled { opacity: 0.6; cursor: not-allowed; }
.ea-msg {
    font-family: var(--font-body);
    font-size: 13px;
    margin-top: 12px;
    min-height: 20px;
}
.ea-msg.ok { color: var(--success-light); }
.ea-msg.err { color: var(--danger-light); }
