/* Legal Power: colours, type, spacing, motion. */

:root {
    /* ── Typography ─────────────────────────────────────── */
    --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
    --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
    --font-serif: "Instrument Serif", "Tiempos Headline", Georgia, serif;
    --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;

    /* ── Color: warm graphite neutrals ──────────────────── */
    --ink-0:   #ffffff;
    --ink-5:   #fafaf9;
    --ink-10:  #f5f5f3;
    --ink-20:  #ebebe8;
    --ink-30:  #d9d9d4;
    --ink-40:  #b8b8b2;
    --ink-50:  #8e8e88;
    --ink-60:  #666663;
    --ink-70:  #3f3f3d;
    --ink-80:  #252523;
    --ink-90:  #141413;
    --ink-100: #0a0a09;

    /* ── Primary: deep navy (trust + gravitas) ──────────── */
    --navy-50:  #eef1f7;
    --navy-100: #d6deec;
    --navy-300: #6e86b6;
    --navy-500: #1e3a6b;
    --navy-600: #15294d;
    --navy-700: #0e1e3a;
    --navy-900: #060d1f;

    /* ── Accent: warm gold (reserved, premium) ──────────── */
    --gold-50:  #faf6ec;
    --gold-100: #f4ead0;
    --gold-300: #d9b668;
    --gold-500: #b88f2f;
    --gold-600: #97721f;
    --gold-700: #735512;

    /* ── Status ─────────────────────────────────────────── */
    --ok:      #1f8a5b;
    --ok-bg:   #e5f4ec;
    --warn:    #b26a00;
    --warn-bg: #fbf0dd;
    --err:     #b23838;
    --err-bg:  #fbe8e6;

    /* ── Surfaces ───────────────────────────────────────── */
    --surface:          #ffffff;
    --surface-2:        #fafaf9;
    --surface-sunk:     #f4f4f1;
    --surface-elevated: rgba(255, 255, 255, 0.72);
    --surface-glass:    rgba(255, 255, 255, 0.55);
    --border:           rgba(10, 10, 9, 0.08);
    --border-strong:    rgba(10, 10, 9, 0.14);
    --divider:          rgba(10, 10, 9, 0.06);

    /* ── Text ───────────────────────────────────────────── */
    --text-primary:   var(--ink-90);
    --text-secondary: var(--ink-60);
    --text-tertiary:  var(--ink-50);
    --text-on-dark:   #ffffff;

    /* ── Radii ──────────────────────────────────────────── */
    --r-xs:   6px;
    --r-sm:   8px;
    --r-md:   12px;
    --r-lg:   16px;
    --r-xl:   22px;
    --r-2xl:  28px;
    --r-pill: 999px;

    /* ── Shadows (soft, layered) ───────────── */
    --shadow-xs:    0 1px 2px rgba(10, 10, 9, 0.04);
    --shadow-sm:    0 1px 3px rgba(10, 10, 9, 0.06), 0 1px 2px rgba(10, 10, 9, 0.03);
    --shadow-md:    0 4px 12px rgba(10, 10, 9, 0.06), 0 1px 3px rgba(10, 10, 9, 0.04);
    --shadow-lg:    0 12px 32px rgba(10, 10, 9, 0.08), 0 2px 6px rgba(10, 10, 9, 0.04);
    --shadow-xl:    0 24px 60px rgba(10, 10, 9, 0.12), 0 4px 12px rgba(10, 10, 9, 0.06);
    --shadow-focus: 0 0 0 4px rgba(30, 58, 107, 0.16);

    /* ── Spacing scale ─────────────────────────────────── */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  22px;
    --space-6:  28px;
    --space-7:  36px;
    --space-8:  48px;
    --gap: 16px;

    /* ── Motion ─────────────────────────────────────────── */
    --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast:    180ms;
    --dur:         280ms;
    --dur-slow:    480ms;

    /* ── Semantic type ─────────────────────────────────── */
    --type-h1-size: 36px;
    --type-h1-weight: 600;
    --type-h1-tracking: -0.03em;
    --type-h1-line: 1.1;

    --type-h2-size: 28px;
    --type-h2-weight: 600;
    --type-h2-tracking: -0.025em;
    --type-h2-line: 1.15;

    --type-h3-size: 20px;
    --type-h3-weight: 650;
    --type-h3-tracking: 0em;
    --type-h3-line: 1.2;

    --type-body-size: 14px;
    --type-body-line: 1.5;
    --type-body-weight: 400;

    --type-small-size: 12.5px;
    --type-tiny-size: 11.5px;

    --type-eyebrow-size: 11px;
    --type-eyebrow-tracking: 0.04em;
    --type-eyebrow-weight: 600;
}

/* Dark variant. */
[data-theme="dark"],
.app-dark {
    --ink-0:   #0a0a09;
    --ink-5:   #141413;
    --ink-10:  #1a1a18;
    --ink-20:  #22221f;
    --ink-30:  #2e2e2a;
    --ink-40:  #4a4a45;
    --ink-50:  #6e6e69;
    --ink-60:  #9a9a94;
    --ink-70:  #c2c2bc;
    --ink-80:  #e2e2dc;
    --ink-90:  #f2f2ec;
    --ink-100: #ffffff;

    --surface:          #141413;
    --surface-2:        #1a1a18;
    --surface-sunk:     #0e0e0d;
    --surface-elevated: rgba(30, 30, 28, 0.72);
    --surface-glass:    rgba(40, 40, 36, 0.55);
    --border:           rgba(255, 255, 255, 0.08);
    --border-strong:    rgba(255, 255, 255, 0.14);
    --divider:          rgba(255, 255, 255, 0.06);

    --navy-50:  #1a2540;
    --navy-100: #22335a;
    --navy-500: #7a9ad4;
    --navy-600: #9ab4e0;
    --navy-700: #b8c9e8;

    --shadow-xs:    0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg:    0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl:    0 24px 60px rgba(0, 0, 0, 0.6);
    --shadow-focus: 0 0 0 4px rgba(154, 180, 224, 0.22);
}

/* ── Base elements ───────────────────────────────────── */
body {
    font-family: var(--font-text);
    color: var(--text-primary);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: var(--type-body-size);
    line-height: var(--type-body-line);
}

h1, .h1 {
    font-family: var(--font-display);
    font-size: var(--type-h1-size);
    font-weight: var(--type-h1-weight);
    letter-spacing: var(--type-h1-tracking);
    line-height: var(--type-h1-line);
    color: var(--text-primary);
    margin: 0;
}

h2, .h2 {
    font-family: var(--font-display);
    font-size: var(--type-h2-size);
    font-weight: var(--type-h2-weight);
    letter-spacing: var(--type-h2-tracking);
    line-height: var(--type-h2-line);
    color: var(--text-primary);
    margin: 0;
}

h3, .h3 {
    font-family: var(--font-display);
    font-size: var(--type-h3-size);
    font-weight: var(--type-h3-weight);
    letter-spacing: var(--type-h3-tracking);
    line-height: var(--type-h3-line);
    color: var(--text-primary);
    margin: 0;
}

p {
    font-size: var(--type-body-size);
    line-height: var(--type-body-line);
    color: var(--text-primary);
}

.eyebrow {
    font-family: var(--font-text);
    font-size: var(--type-eyebrow-size);
    font-weight: var(--type-eyebrow-weight);
    letter-spacing: var(--type-eyebrow-tracking);
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.serif {
    font-family: var(--font-serif);
    letter-spacing: -0.02em;
    font-weight: 400;
    font-style: italic;
}

.mono {
    font-family: var(--font-mono);
    letter-spacing: 0;
    font-size: 12.5px;
}

code, pre {
    font-family: var(--font-mono);
}

a {
    color: var(--navy-600);
    text-decoration: none;
}
a:hover {
    color: var(--navy-700);
    text-decoration: underline;
}
