/* ============================================================
   Academia Cortex — Colors & Type
   Monochrome-first, scientific-mystical palette.
   ============================================================ */

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

:root {
  /* ----------------------------------------------------------
     COLOR — Core monochrome (logo-derived)
     The brand is rooted in pure black + warm paper white.
     ---------------------------------------------------------- */
  --ink-1000: #0A0A0B;        /* deep ink, primary text & logo */
  --ink-900:  #141416;
  --ink-800:  #1F1F22;
  --ink-700:  #2E2E33;
  --ink-600:  #4A4A52;
  --ink-500:  #6B6B73;
  --ink-400:  #93939A;
  --ink-300:  #BDBDC2;
  --ink-200:  #DEDEE1;
  --ink-150:  #ECECEE;
  --ink-100:  #F4F3F0;        /* warm paper */
  --ink-50:   #FAF9F6;        /* page background */
  --ink-0:    #FFFFFF;

  /* ----------------------------------------------------------
     COLOR — Accent (the "mind / cosmos" thread)
     Used sparingly: links, focus rings, single highlight.
     ---------------------------------------------------------- */
  --moss-900: #1A2417;
  --moss-700: #2F4128;
  --moss-500: #4A6B3D;       /* primary accent — verde musgo */
  --moss-400: #6E8C5C;
  --moss-200: #C5D2B6;
  --moss-50:  #EEF1E6;

  /* legacy aliases — kept so existing components still resolve */
  --indigo-900: var(--moss-900);
  --indigo-700: var(--moss-700);
  --indigo-500: var(--moss-500);
  --indigo-400: var(--moss-400);
  --indigo-200: var(--moss-200);
  --indigo-50:  var(--moss-50);

  /* Warm signal — used only for testimonials / marks of authority */
  --ochre-700: #8A5A12;
  --ochre-500: #C8881F;
  --ochre-200: #F1DDB2;
  --ochre-50:  #FBF3E0;

  /* Semantic */
  --success: #1F7A4D;
  --warn:    #B8651E;
  --danger:  #A8332B;

  /* ----------------------------------------------------------
     Surfaces & semantic mapping
     ---------------------------------------------------------- */
  --bg-page:     var(--ink-50);
  --bg-surface:  var(--ink-0);
  --bg-elevated: var(--ink-0);
  --bg-inverse:  var(--ink-1000);
  --bg-muted:    var(--ink-100);

  --fg-1: var(--ink-1000);     /* primary text */
  --fg-2: var(--ink-700);      /* secondary text */
  --fg-3: var(--ink-500);      /* tertiary / meta */
  --fg-4: var(--ink-400);      /* placeholder */
  --fg-on-inverse: var(--ink-50);

  --border-1: var(--ink-200);  /* default hairline */
  --border-2: var(--ink-300);  /* hover / stronger */
  --border-strong: var(--ink-1000);

  --link: var(--ink-1000);
  --link-accent: var(--moss-500);

  --focus-ring: var(--moss-500);

  /* ----------------------------------------------------------
     SPACING (4-based, slightly editorial)
     ---------------------------------------------------------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ----------------------------------------------------------
     RADII — restrained. Brand is geometric (circle logo).
     Cards use small radius; pills are full.
     ---------------------------------------------------------- */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* ----------------------------------------------------------
     ELEVATION — soft, ink-toned. No colored shadows.
     ---------------------------------------------------------- */
  --shadow-1: 0 1px 2px rgba(10, 10, 11, 0.04), 0 1px 1px rgba(10, 10, 11, 0.03);
  --shadow-2: 0 2px 4px rgba(10, 10, 11, 0.05), 0 4px 12px rgba(10, 10, 11, 0.05);
  --shadow-3: 0 6px 16px rgba(10, 10, 11, 0.07), 0 12px 32px rgba(10, 10, 11, 0.08);
  --shadow-4: 0 12px 32px rgba(10, 10, 11, 0.10), 0 24px 60px rgba(10, 10, 11, 0.12);
  --shadow-inset: inset 0 0 0 1px rgba(10, 10, 11, 0.06);

  /* ----------------------------------------------------------
     MOTION — slow, considered. No bounces.
     ---------------------------------------------------------- */
  --ease-quiet: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-firm:  cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:   140ms;
  --dur-base:   240ms;
  --dur-slow:   420ms;
  --dur-deep:   720ms;

  /* ----------------------------------------------------------
     TYPE — Fraunces (display, serif, scientific-editorial)
                 + Manrope (body, geometric-sans, calm)
                 + JetBrains Mono (technical / data)
     ---------------------------------------------------------- */
  --font-display: 'IBM Plex Sans', -apple-system, 'Helvetica Neue', sans-serif;
  --font-body:    'Manrope', -apple-system, 'Helvetica Neue', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* Type scale (perfect-fourth lite, 1.2 ratio at the top) */
  --fs-display-1: clamp(56px, 7vw, 96px);
  --fs-display-2: clamp(40px, 5vw, 64px);
  --fs-h1: clamp(32px, 3.6vw, 48px);
  --fs-h2: clamp(26px, 2.6vw, 36px);
  --fs-h3: 24px;
  --fs-h4: 20px;
  --fs-body-lg: 18px;
  --fs-body:    16px;
  --fs-body-sm: 14px;
  --fs-caption: 12px;
  --fs-eyebrow: 12px;

  --lh-tight: 1.04;
  --lh-snug:  1.2;
  --lh-base:  1.5;
  --lh-loose: 1.7;

  --ls-tight: -0.02em;
  --ls-snug:  -0.01em;
  --ls-base:  0;
  --ls-wide:  0.04em;
  --ls-eyebrow: 0.18em;
}

/* ============================================================
   SEMANTIC TYPE STYLES
   ============================================================ */

html, body {
  background: var(--bg-page);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.cx-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--fg-3);
}

.cx-display-1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  font-variation-settings: "opsz" 144, "SOFT" 30;
  text-wrap: balance;
}

.cx-display-2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-2);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}

h1, .cx-h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h1);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  font-variation-settings: "opsz" 48;
  text-wrap: balance;
}

h2, .cx-h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  font-variation-settings: "opsz" 36;
  text-wrap: balance;
}

h3, .cx-h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
}

h4, .cx-h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-h4);
  line-height: 1.3;
}

p, .cx-body {
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  color: var(--fg-2);
  text-wrap: pretty;
}

.cx-body-lg {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-base);
}

.cx-body-sm {
  font-size: var(--fs-body-sm);
  line-height: var(--lh-base);
}

.cx-caption {
  font-size: var(--fs-caption);
  line-height: 1.4;
  color: var(--fg-3);
}

.cx-quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.35;
  color: var(--fg-1);
  font-variation-settings: "opsz" 36, "SOFT" 60;
  text-wrap: balance;
}

.cx-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-body-sm);
  letter-spacing: 0;
}

a, .cx-link {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--ink-300);
  transition: text-decoration-color var(--dur-fast) var(--ease-quiet);
}
a:hover, .cx-link:hover {
  text-decoration-color: var(--ink-1000);
}

::selection {
  background: var(--ink-1000);
  color: var(--ink-50);
}
