/* =========================================================
   CreditFinance — creditpathdirect.org
   Shared stylesheet: fonts, tokens, ledger motif, components
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
    --canvas: #0B101C;
    --hero: #141C32;
    --card: #1B2640;
    --chrome: #080C16;
    --cta: #C46A2B;
    --gold: #E89A4A;
    --mint: #7EB6E8;
    --ink: #F3F5FA;
    --muted: #9AABC2;
    --line: #2C3D5C;
}

* {
    scrollbar-color: var(--line) var(--canvas);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background: var(--canvas);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

img, svg, video, canvas {
    max-width: 100%;
}

.grid > * {
    min-width: 0;
}

::selection {
    background: var(--gold);
    color: var(--chrome);
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Fonts as utility classes (used alongside Tailwind) */
.font-display {
    font-family: 'Sora', sans-serif;
}

.font-body {
    font-family: 'Inter', sans-serif;
}

.font-mono {
    font-family: 'IBM Plex Mono', monospace;
}

/* ---------- Ledger tick divider ----------
      A hairline rule with ruler-style tick marks, used across the
      site as a section divider that echoes a statement / gauge scale. */
.ledger-rule {
    position: relative;
    height: 1px;
    background: var(--line);
    width: 100%;
}

.ledger-rule::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(90deg,
            var(--line) 0, var(--line) 1px,
            transparent 1px, transparent 24px);
    height: 8px;
    top: -3px;
    opacity: .55;
}

.ledger-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .72rem;
    color: var(--mint);
}

/* ---------- Score dial ---------- */
.dial-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(220px, 100%);
    margin-inline: auto;
}

.dial-wrap svg {
    width: 100%;
    height: auto;
    max-width: 100%;
    overflow: visible;
}

.dial-readout {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ---------- Cards ---------- */
.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.tick-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: border-color .2s ease, transform .2s ease;
}

.tick-card:hover {
    border-color: var(--mint);
    transform: translateY(-2px);
}

/* ---------- Buttons ---------- */
.btn-cta {
    background: var(--cta);
    color: var(--ink);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    transition: background .18s ease, transform .18s ease;
}

.btn-cta:hover {
    background: #0a5c73;
    transform: translateY(-1px);
}

.btn-gold {
    background: var(--gold);
    color: var(--chrome);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    border-radius: 8px;
    transition: filter .18s ease, transform .18s ease;
}

.btn-gold:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 8px;
    transition: border-color .18s ease, color .18s ease;
}

.btn-outline:hover {
    border-color: var(--mint);
    color: var(--mint);
}

/* ---------- Range sliders ---------- */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 4px;
    background: var(--line);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--chrome);
    cursor: pointer;
    box-shadow: 0 0 0 1px var(--gold);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--chrome);
    cursor: pointer;
}

/* ---------- Standard form inputs ---------- */
.field-input {
    background: var(--hero);
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 8px;
}

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

.field-input:focus {
    border-color: var(--mint);
}

/* ---------- Nav ---------- */
.nav-link {
    position: relative;
    color: var(--muted);
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    font-size: .92rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--ink);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--gold);
}

/* mobile menu */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}

#mobileMenu.open {
    max-height: 520px;
}

/* ---------- misc ---------- */
.bg-noise {
    background-image: radial-gradient(circle at 1px 1px, rgba(154, 171, 194, .10) 1px, transparent 0);
    background-size: 22px 22px;
}

.chip {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .72rem;
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 999px;
    transition: all .15s ease;
}

.chip.active {
    background: var(--cta);
    color: var(--ink);
    border-color: var(--cta);
}

.chip:hover {
    border-color: var(--mint);
    color: var(--mint);
}

.progress-track {
    background: var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width .4s ease;
}

.toast {
    transition: transform .3s ease, opacity .3s ease;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}