/* ============================================================================
   PERSPECTIVES — Design Tokens
   Colors, type, spacing, motion. Source of truth for every other file.
   ============================================================================ */

@font-face {
    font-family: "Syncopate";
    src: url("fonts/Syncopate-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Syncopate";
    src: url("fonts/Syncopate-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}

@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&family=Outfit:wght@100..900&family=JetBrains+Mono:wght@300;400;500&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap");

:root {
    /* ----- Type families -------------------------------------------------- */
    --font-display: "Syncopate", "Outfit", sans-serif;        /* logo, eyebrows */
    --font-serif:   "Newsreader", Georgia, serif;             /* editorial body, hero */
    --font-sans:    "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-ui:      "IBM Plex Sans", "Inter", sans-serif;     /* product UI body */
    --font-mono:    "JetBrains Mono", "Courier New", monospace;

    /* ----- Type scale (marketing / editorial) ----------------------------- */
    --type-hero:        clamp(48px, 7vw, 112px);
    --type-display-1:   clamp(40px, 5vw, 72px);
    --type-display-2:   clamp(32px, 4vw, 56px);
    --type-headline:    clamp(24px, 2.4vw, 36px);
    --type-title:       20px;
    --type-body-lg:     18px;
    --type-body:        16px;
    --type-caption:     13px;
    --type-eyebrow:     11px;        /* mono, tracked */
    --type-micro:       10px;

    --tracking-tight:   -0.02em;
    --tracking-normal:   0;
    --tracking-wide:     0.08em;
    --tracking-widest:   0.18em;

    /* ----- Brand colors --------------------------------------------------- */
    /* Paper / Obsidian — the editorial axis */
    --paper:        #fcfcfa;          /* warm off-white, the marketing canvas */
    --paper-pure:   #ffffff;
    --obsidian:     #0a0a0a;          /* near-black ink */
    --ink:          #1a1a1a;
    --ink-soft:     #2a2a2a;
    --muted:        #666666;
    --muted-soft:   #8a8a8a;
    --subtle:       #e5e5e5;          /* hairline borders */
    --subtle-soft:  #ededed;
    --surface:      #ffffff;          /* card on paper */

    /* App (default light theme) ------------------------------------------- */
    --app-bg:           #fafafa;
    --app-panel:        #f5f5f5;
    --app-elevated:     #efefef;
    --app-input:        #e8e8e8;
    --app-hover:        #dedede;
    --app-border:       #d0d0d0;
    --app-border-subtle:#e0e0e0;
    --app-text:         #1a1a1a;
    --app-text-bright:  #0a0a0a;
    --app-text-dim:     #6b6b6b;

    /* The Signal — the red */
    --accent:           #ff3333;          /* sociopath red, the spark */
    --accent-hover:     #ff4444;
    --accent-deep:      #cc2929;
    --accent-soft:      rgba(255, 51, 51, 0.08);
    --accent-glow:      rgba(255, 51, 51, 0.18);

    /* Semantic */
    --signal-defended:  #5cb85c;          /* verdict: defended */
    --signal-conceded:  #f0ad4e;          /* verdict: conceded */
    --signal-disputed:  #ff3333;          /* verdict: disputed */
    --gold:             #d4af37;

    /* ----- Persona palette (Forecaster council) -------------------------- */
    --p-base-rate:        #4a90a4;
    --p-trend:            #7b68ee;
    --p-contrarian:       #ff6b35;
    --p-insider:          #2e8b57;
    --p-systems:          #9370db;
    --p-sceptic:          #708090;
    --p-scenario:         #20b2aa;
    --p-risk:             #dc143c;

    /* ----- Persona palette (Default council) ----------------------------- */
    --p-sociopath:        #ff3333;
    --p-empath:           #4daafc;
    --p-pragmatist:       #5bc0de;
    --p-idealist:         #9b59b6;
    --p-manipulator:      #f0ad4e;
    --p-diplomat:         #5cb85c;
    --p-opportunist:      #aadd00;
    --p-organizer:        #e91e63;

    /* ----- Spacing -------------------------------------------------------- */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  24px;
    --space-6:  32px;
    --space-7:  48px;
    --space-8:  64px;
    --space-9:  96px;
    --space-10: 128px;

    /* ----- Geometry ------------------------------------------------------- */
    --radius-none:  0;
    --radius-xs:    2px;       /* product UI is mostly square; small tells */
    --radius-sm:    4px;
    --radius-md:    8px;
    --radius-pill:  999px;

    --hairline:     1px;       /* never thicker than 1px on paper surfaces */

    /* ----- Shadow (sparingly used; this is a flat system) ---------------- */
    --shadow-paper:    0 1px 2px rgba(10,10,10,0.04), 0 0 0 1px rgba(10,10,10,0.04);
    --shadow-elev:     0 6px 24px -8px rgba(10,10,10,0.18);
    --shadow-modal:    0 24px 80px -16px rgba(10,10,10,0.32);

    /* ----- Motion --------------------------------------------------------- */
    --ease-standard:   cubic-bezier(0.16, 1, 0.3, 1);
    --ease-snap:       cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast:    120ms var(--ease-snap);
    --t-medium:  220ms var(--ease-snap);
    --t-slow:    480ms var(--ease-standard);

    /* ----- Texture (noise, grid) ----------------------------------------- */
    --noise-svg: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/></svg>");
    --grid-line: linear-gradient(to right, rgba(10,10,10,0.04) 1px, transparent 1px),
                 linear-gradient(to bottom, rgba(10,10,10,0.04) 1px, transparent 1px);
}

/* ----- Resets specific to this design system ---------------------------- */
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--obsidian);
    font-family: var(--font-sans);
    font-size: var(--type-body);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
::selection { background: var(--accent); color: var(--paper-pure); }

/* ----- Utility classes -------------------------------------------------- */
.t-eyebrow {
    font-family: var(--font-mono);
    font-size: var(--type-eyebrow);
    font-weight: 700;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
}
.t-mono { font-family: var(--font-mono); font-size: var(--type-caption); letter-spacing: 0.02em; }
.t-display-serif {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: var(--tracking-tight);
    line-height: 1.05;
}
.t-display-sans {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.08;
}
.t-logo {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
}

.bg-paper { background: var(--paper); color: var(--obsidian); }
.bg-obsidian { background: var(--obsidian); color: var(--paper); }
.bg-noise { background-image: var(--noise-svg); }
.bg-grid { background-image: var(--grid-line); background-size: 32px 32px; }

.divider-hairline { border: 0; border-top: 1px solid var(--subtle); }

/* The wordmark — used everywhere */
.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    display: inline-flex;
    align-items: baseline;
}
.wordmark__accent { color: var(--accent); margin-left: 1px; }
