/* ============================================================
   Subconscious.ai — Colors & Type
   Foundations extracted from the production site (johnny-5-rebuild).
   ============================================================ */

/* --- GOOGLE FONTS --- */
/* Redaction: the editorial serif used for italic emphasis, pull quotes,
   and the "stated vs revealed" counterfactual treatments.              */
@import url("https://fonts.googleapis.com/css2?family=Redaction:ital@0;1&display=swap");

/* --- FONT FACES --- */
/* Exposure is the display/body family (custom). Sohne Mono is used for
   "meta" / code / labels. Inter is the Next.js runtime fallback.      */

@font-face {
  font-family: "Exposure";
  font-weight: 100;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Exposure-Thin.otf") format("opentype");
}
@font-face {
  font-family: "Exposure";
  font-weight: 200;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Exposure-ExtraLight.otf") format("opentype");
}
@font-face {
  font-family: "Exposure";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Exposure-Light.otf") format("opentype");
}
@font-face {
  font-family: "Exposure";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Exposure-Regular.otf") format("opentype");
}
@font-face {
  font-family: "SohneMono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/SohneMono-Regular.woff2") format("woff2");
}

/* ---------- COLOR TOKENS ----------
   Linear black/white is the default. data-mode="dark" inverts.
   Alt themes and chart rainbow were removed (dead in preview/).         */

:root {
  /* Default "Linear" theme --------------------------------- */
  --darkColor: #000000;
  --lightColor: #ffffff;

  /* Runtime: Light mode is the default across the site.
     data-mode="dark" inverts these two so the whole surface flips. */
  --backgroundColor: var(--lightColor);
  --color: var(--darkColor);

  /* ------- Brand accent (used sparingly) ------- */
  --accentColor: #6366f1;  /* indigo-500 — homepage themeColor */
  --linkColor:   #204136;  /* deep forest — legacy link ink   */

  /* ------- Neutral scale (derived from oklch greys) ------- */
  --n-0:   #ffffff;
  --n-50:  #f6f6f6;
  --n-100: #ebebeb;
  --n-200: #d9d9d9;
  --n-300: #b8b8b8;
  --n-400: #8a8a8a;
  --n-500: #6b6b6b;
  --n-600: #4a4a4a;
  --n-700: #2b2b2b;
  --n-800: #1d1d1d;
  --n-900: #0b0b0b;
  --n-1000:#000000;

  /* ------- Foreground / background aliases ------- */
  --fg-1: var(--color);                                               /* primary ink          */
  --fg-2: color-mix(in srgb, var(--color) 70%, var(--backgroundColor));/* secondary ink       */
  --fg-3: color-mix(in srgb, var(--color) 45%, var(--backgroundColor));/* tertiary / captions */
  --fg-4: color-mix(in srgb, var(--color) 25%, var(--backgroundColor));/* disabled / hairline */

  --bg-1: var(--backgroundColor);
  --bg-2: color-mix(in srgb, var(--color) 3%, var(--backgroundColor));  /* section tint  */
  --bg-3: color-mix(in srgb, var(--color) 6%, var(--backgroundColor));  /* card on tint  */
  --hairline: color-mix(in srgb, var(--color) 15%, transparent);
  --border:   color-mix(in srgb, var(--color) 40%, transparent);

}

[data-mode="dark"]  { --backgroundColor: var(--darkColor);  --color: var(--lightColor); }
[data-mode="light"] { --backgroundColor: var(--lightColor); --color: var(--darkColor); }

/* ---------- TYPE TOKENS ---------- */
:root {
  /* Families — Exposure is display/body, Sohne Mono is meta/code */
  --font-display: "Exposure", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Exposure", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "SohneMono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Weight scale (Exposure ships 100/200/300/400 — no bolds).
     The site uses 300 for hero display and 800 (fallback) for logo.    */
  --fw-thin:       100;
  --fw-extralight: 200;
  --fw-light:      300;
  --fw-regular:    400;
  --fw-heading:    600;   /* only hits when using Inter fallback       */
  --fw-display:    800;   /* used by the lowercase wordmark            */

  /* Fluid scale — mirrors the clamp() scale in globals.css.
     Format: clamp(min_px, preferred_vw, max_vw).                       */
  --fs-hero:   clamp(44px, 5.4vw, 5.4vw);  /* hero display              */
  --fs-h1:     clamp(36px, 3.5vw, 3.5vw);  /* nav-overlay scale         */
  --fs-h2:     clamp(28px, 2.4vw, 2.4vw);
  --fs-h3:     clamp(22px, 1.6vw, 1.6vw);
  --fs-h4:     clamp(18px, 1.25vw, 1.25vw);
  --fs-body:   clamp(15px, 1.1vw, 1.1vw);  /* body default              */
  --fs-small:  clamp(13px, 0.92vw, 0.92vw);
  --fs-meta:   clamp(12px, 0.78vw, 0.78vw);/* buttons, nav labels       */
  --fs-micro:  clamp(10px, 0.68vw, 0.68vw);/* comments, kicker labels   */

  /* Letter-spacing */
  --tracking-tight:    -0.04em;  /* linear h1/h2                        */
  --tracking-normal:   -0.03em;  /* default heading                     */
  --tracking-body:     -0.015em; /* body text                           */
  --tracking-loose:     0.12em;  /* kickers / labels (uppercase)        */
  --tracking-wordmark: -0.06em;  /* logo wordmark                       */

  /* Line heights */
  --lh-tight: 1.0;
  --lh-display: 1.05;
  --lh-body: 1.45;
  --lh-loose: 1.6;
}

/* ---------- SEMANTIC ELEMENT MAPPINGS ----------
   These style raw tags so prototypes inherit the system automatically. */

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

body {
  background-color: var(--backgroundColor);
  color: var(--color);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-body);
  font-weight: var(--fw-light);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-light);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-display);
}

h1 { font-size: var(--fs-hero); font-weight: var(--fw-light); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--fs-h1);   font-weight: var(--fw-light); }
h3 { font-size: var(--fs-h2);   font-weight: var(--fw-light); }
h4 { font-size: var(--fs-h3);   font-weight: var(--fw-regular); }
h5 { font-size: var(--fs-h4);   font-weight: var(--fw-regular); }
h6 { font-size: var(--fs-body); font-weight: var(--fw-regular); text-transform: uppercase; letter-spacing: var(--tracking-loose); }

p      { font-size: var(--fs-body); line-height: var(--lh-body); max-width: 58ch; }
small  { font-size: var(--fs-small); color: var(--fg-3); }
code, pre, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }

/* Utility classes ------------------------------------------ */
.kicker      { font-family: var(--font-mono); font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: var(--tracking-loose); color: var(--fg-3); }
.meta        { font-family: var(--font-mono); font-size: var(--fs-meta);  color: var(--fg-2); }
.comment     { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--fg-3); opacity: 0.7; }
.comment::before { content: "// "; }
.tabular     { font-variant-numeric: tabular-nums; }
.lowercase-wordmark { font-family: var(--font-display); font-weight: var(--fw-display); letter-spacing: var(--tracking-wordmark); text-transform: lowercase; }

/* Link treatment lives in preview/_base.css (fuzzy-at-rest, sharp-on-hover). */

/* Selection */
::selection { background: var(--color); color: var(--backgroundColor); }

/* ---------- SPACING, RADII, SHADOW, MOTION ---------- */
:root {
  /* Spacing scale — the site uses clamp() for nearly everything.      */
  --space-1:  clamp(4px,   0.3vw,  0.3vw);
  --space-2:  clamp(8px,   0.6vw,  0.6vw);
  --space-3:  clamp(12px,  0.9vw,  0.9vw);
  --space-4:  clamp(16px,  1.2vw,  1.2vw);
  --space-5:  clamp(24px,  1.8vw,  1.8vw);
  --space-6:  clamp(32px,  2.4vw,  2.4vw);
  --space-7:  clamp(48px,  3.6vw,  3.6vw);
  --space-8:  clamp(64px,  4.8vw,  4.8vw);
  --space-9:  clamp(96px,  7.2vw,  7.2vw);
  --space-10: clamp(128px, 9.6vw,  9.6vw);

  /* Radii — editorial paper, no soft corners. --radius-pill kept
     for the single red dot on the .label kicker.                        */
  --radius-pill: 999px;

  /* Motion — mostly eases, rarely springy. */
  --ease-out:     cubic-bezier(0.25, 0.8, 0.25, 1);
  --ease-in-out:  cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:     200ms;
  --dur-med:      300ms;
  --dur-slow:     600ms;

  /* Blur — used in protection gradients, chrome menus, and link hover */
  --blur-sm: 0.8px;
  --blur-md: 6px;
  --blur-lg: 12px;
}
