/* =========================================================================
   Nuntia Design System — colors_and_type.css
   Single source of truth for color + type tokens.
   Import this once at the top of any HTML or component file.
   ========================================================================= */

/* Satoshi (primary), Instrument Serif (editorial) and JetBrains Mono (eyebrows,
   metadata, code), served from our own server since 05/10/2026: no requests to
   Google Fonts or Fontshare, which received every visitor's IP. */
@import url('fonts/fonts.css');

:root {
  /* -----------------------------------------------------------------------
     COLORS — raw scale
     ----------------------------------------------------------------------- */

  /* Paper (light backgrounds) — pure white primary, warm cream pills */
  --paper:    #FFFFFF;
  --paper-2:  #F7F5F0;
  --paper-3:  #FAFAFA;
  --bone:     #EDE7DA;
  --bone-2:   #E2DBCB;

  /* Ink (near-blacks, neutral grays) */
  --ink:      #0C0C0C;
  --ink-2:    #262626;
  --ink-3:    #525252;
  --ink-4:    #8A8A8A;
  --ink-5:    #B5B5B5;
  --ink-6:    #E5E5E5;

  /* Sage — dark research sections */
  --sage:        #4B5A4F;
  --sage-2:      #3D4A41;
  --sage-text:   #EFEAE0;

  /* Accent */
  --signal:        #D72638;
  --signal-hover:  #B91E2E;
  --signal-tint:   #FBE4E6;

  /* Semantic neutrals */
  --bg:            var(--paper);
  --bg-subtle:     var(--paper-2);
  --bg-elevated:   var(--paper-3);
  --bg-inverse:    var(--ink);

  --fg:            var(--ink);
  --fg-secondary:  var(--ink-3);
  --fg-tertiary:   var(--ink-4);
  --fg-disabled:   var(--ink-5);
  --fg-inverse:    var(--paper);

  --border:        var(--ink-6);
  --border-strong: var(--ink-4);
  --border-inverse: var(--ink-2);

  --link:          var(--ink);
  --link-hover:    var(--signal);
  --link-underline: var(--signal);

  /* Status */
  --success:  #2C7A4B;
  --warning:  #B5651D;
  --error:    var(--signal);

  /* -----------------------------------------------------------------------
     TYPOGRAPHY — families
     ----------------------------------------------------------------------- */

  --font-sans:    'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif:   'Instrument Serif', ui-serif, Georgia, 'Times New Roman', serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* -----------------------------------------------------------------------
     TYPOGRAPHY — raw scale (px)
     ----------------------------------------------------------------------- */

  --text-display:   88px;
  --text-h1:        56px;
  --text-h2:        40px;
  --text-h3:        28px;
  --text-h4:        20px;
  --text-lead:      20px;
  --text-body:      16px;
  --text-body-sm:   14px;
  --text-caption:   13px;
  --text-eyebrow:   11px;
  --text-micro:     10px;

  /* Line-heights */
  --lh-display:   1.02;
  --lh-headline:  1.08;
  --lh-h3:        1.18;
  --lh-body:      1.5;
  --lh-tight:     1.25;

  /* Tracking */
  --tr-display:  -0.025em;
  --tr-headline: -0.02em;
  --tr-body:     -0.005em;
  --tr-eyebrow:  0.08em;

  /* Weights */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* -----------------------------------------------------------------------
     SPACING — 4px base
     ----------------------------------------------------------------------- */

  --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;

  /* -----------------------------------------------------------------------
     RADII
     ----------------------------------------------------------------------- */

  --radius-xs:  2px;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-full: 999px;

  /* -----------------------------------------------------------------------
     SHADOWS & ELEVATION
     ----------------------------------------------------------------------- */

  --shadow-none:  none;
  --shadow-media-hover: 0 1px 2px rgba(10, 10, 10, 0.04),
                        0 8px 24px -8px rgba(10, 10, 10, 0.10);

  --gradient-protection-bottom:
    linear-gradient(to top, rgba(10, 10, 10, 0.55), transparent 50%);

  /* -----------------------------------------------------------------------
     MOTION
     ----------------------------------------------------------------------- */

  --ease-out-quint: cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --duration-fast:    150ms;
  --duration-base:    200ms;
  --duration-slow:    400ms;
  --duration-hero:    600ms;

  /* -----------------------------------------------------------------------
     LAYOUT
     ----------------------------------------------------------------------- */

  --container-max:  1280px;
  --container-pad-mobile:  16px;
  --container-pad-desk:    48px;
  --measure:        64ch;
  --nav-height:     64px;
}

/* ===========================================================================
   SEMANTIC TYPE CLASSES
   =========================================================================== */

.type-display,
.type-hero {
  font-family: var(--font-serif);
  font-size: var(--text-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  font-weight: var(--fw-regular);
  color: var(--fg);
}

.type-h1 {
  font-family: var(--font-sans);
  font-size: var(--text-h1);
  line-height: var(--lh-headline);
  letter-spacing: var(--tr-headline);
  font-weight: var(--fw-medium);
  color: var(--fg);
}

.type-h2 {
  font-family: var(--font-sans);
  font-size: var(--text-h2);
  line-height: var(--lh-headline);
  letter-spacing: var(--tr-headline);
  font-weight: var(--fw-medium);
}

.type-h3 {
  font-family: var(--font-sans);
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--tr-headline);
  font-weight: var(--fw-medium);
}

.type-h4 {
  font-family: var(--font-sans);
  font-size: var(--text-h4);
  line-height: var(--lh-tight);
  font-weight: var(--fw-semibold);
}

.type-lead {
  font-family: var(--font-sans);
  font-size: var(--text-lead);
  line-height: 1.45;
  letter-spacing: var(--tr-body);
  font-weight: var(--fw-regular);
  color: var(--fg-secondary);
}

.type-body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tr-body);
  font-weight: var(--fw-regular);
  color: var(--fg);
}

.type-body-sm {
  font-family: var(--font-sans);
  font-size: var(--text-body-sm);
  line-height: var(--lh-body);
  color: var(--fg-secondary);
}

.type-caption {
  font-family: var(--font-sans);
  font-size: var(--text-caption);
  line-height: 1.4;
  color: var(--fg-secondary);
}

.type-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  line-height: 1;
  letter-spacing: var(--tr-eyebrow);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  color: var(--fg-secondary);
}

.type-mono {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
}

.type-serif-quote {
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1.18;
  font-style: italic;
  font-weight: var(--fw-regular);
}

@media (max-width: 768px) {
  .type-display, .type-hero { font-size: 48px; }
  .type-h1 { font-size: 36px; }
  .type-h2 { font-size: 28px; }
  .type-h3 { font-size: 22px; }
}

/* ===========================================================================
   ELEMENT BASELINE
   =========================================================================== */

.nuntia-baseline {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tr-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.nuntia-baseline a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--duration-base) var(--ease-out-quint);
}
.nuntia-baseline a:hover {
  text-decoration-color: var(--link-underline);
}

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