/* ============================================================================
   dpmcyber — colors_and_type.css
   ----------------------------------------------------------------------------
   Single source of truth for color tokens, type tokens, spacing, radii, and
   semantic role styles. Import this file ONCE per page; everything else
   should pull from these variables.

   Visual direction: bright light surface, GreenLock green as spotlight,
   illustration-led, narrative scroll. See README.md for the full rationale.
   ============================================================================ */

/* --------------------------------- FONTS --------------------------------- */
/* Space Grotesk (display + body) and JetBrains Mono (technical) are pulled
   from Google Fonts. If brand-canonical TTFs are added to /fonts/ later,
   declare them ABOVE the Google import and the browser will prefer the
   local source. */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* -------------------------------- TOKENS --------------------------------- */
:root {
  /* ---- color: paper (surfaces, light side) ---- */
  --paper-0: #ffffff;        /* pure white, card surfaces */
  --paper-1: #f8faf9;        /* primary page background, "warm off-white" */
  --paper-2: #eef3f0;        /* alternating section tint */
  --paper-3: #dde6e1;        /* hairline divider, soft border */

  /* ---- color: ink (text + structural dark) ---- */
  --ink-1: #0a1410;          /* primary text (near-black with green undertone) */
  --ink-2: #1f2b25;          /* sub-headings */
  --ink-3: #4a5b53;          /* body text */
  --ink-4: #7a8b82;          /* muted / captions */

  /* ---- color: green (the brand color) ---- */
  --green: #2ecc71;          /* GreenLock accent — spotlight words, CTAs, links */
  --green-deep: #0d503a;     /* deep emerald — eyebrows, primary CTA resting, footer */
  --green-soft: #c8e6d4;     /* pastel mint — watermark, soft chips */
  --green-tint: rgba(46, 204, 113, 0.10);  /* hover tint, highlight bg */
  --neon: #00ff66;           /* reserved spotlight — terminal cursor, inline code */

  /* ---- color: signal ---- */
  --danger: #e63946;         /* critical / vulnerability badges only */

  /* ---- spacing scale (4 · 8 · 12 · 16 · 24 · 32 · 48 · 64 · 96 · 128) ---- */
  --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-sm: 4px;          /* inputs, chips, mono tags */
  --radius-md: 8px;          /* buttons, small cards */
  --radius-lg: 16px;         /* cards, panels */
  --radius-xl: 24px;         /* hero containers, large media */
  --radius-full: 9999px;     /* pills, avatars */

  /* ---- shadows (low + cool) ---- */
  --shadow-1: 0 1px 2px rgba(10, 20, 16, 0.04);
  --shadow-2: 0 8px 24px rgba(10, 20, 16, 0.06);
  --shadow-3: 0 16px 40px rgba(10, 20, 16, 0.08);
  --shadow-glow: 0 0 0 4px rgba(46, 204, 113, 0.18);

  /* ---- motion ---- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-micro: 200ms;
  --dur-reveal: 400ms;
  --dur-hero: 600ms;

  /* ---- type families ---- */
  --font-sans: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* ---- type scale ---- */
  --fs-hero:    clamp(48px, 7vw, 88px);    /* 1-of-a-kind hero headline */
  --fs-display: clamp(36px, 5vw, 64px);    /* act-opening headlines */
  --fs-h1:      clamp(32px, 4vw, 48px);    /* section headings */
  --fs-h2:      clamp(24px, 3vw, 36px);    /* sub-section */
  --fs-h3:      24px;                      /* card title */
  --fs-h4:      18px;                      /* small heading */
  --fs-lead:    clamp(18px, 1.6vw, 22px);  /* lead paragraph */
  --fs-body:    17px;                      /* body */
  --fs-small:   15px;                      /* secondary body */
  --fs-caption: 13px;                      /* captions, micro */
  --fs-eyebrow: 13px;                      /* eyebrow / kicker */

  /* ---- line heights ---- */
  --lh-tight: 1.05;     /* hero, display */
  --lh-snug:  1.2;      /* headings */
  --lh-base:  1.6;      /* body */
  --lh-loose: 1.75;     /* long-form prose */

  /* ---- weights ---- */
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;

  /* ---- letter spacing ---- */
  --tracking-eyebrow: 0.18em;   /* ACTO 01, HOY */
  --tracking-tight: -0.02em;    /* hero, display */
  --tracking-base: 0;

  /* ---- layout ---- */
  --container-max: 1200px;
  --prose-max: 720px;
}

/* ----------------------------- RESET-LITE -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  color: var(--ink-2);
  background: var(--paper-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ------------------------- SEMANTIC TYPE ROLES --------------------------- */
/* Apply these classes (or copy the rules) on top of plain HTML elements to
   get the brand's canonical type treatment. */

.hero,
h1.hero {
  font-family: var(--font-sans);
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--fw-bold);
  color: var(--ink-1);
  text-wrap: balance;
  margin: 0 0 var(--space-5);
}

.display,
h1.display {
  font-family: var(--font-sans);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--fw-bold);
  color: var(--ink-1);
  text-wrap: balance;
  margin: 0 0 var(--space-5);
}

h1, .h1 {
  font-family: var(--font-sans);
  font-size: var(--fs-h1);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--fw-bold);
  color: var(--ink-1);
  text-wrap: balance;
  margin: 0 0 var(--space-4);
}

h2, .h2 {
  font-family: var(--font-sans);
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  font-weight: var(--fw-semi);
  color: var(--ink-1);
  text-wrap: balance;
  margin: 0 0 var(--space-4);
}

h3, .h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  font-weight: var(--fw-semi);
  color: var(--ink-1);
  margin: 0 0 var(--space-3);
}

h4, .h4 {
  font-family: var(--font-sans);
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
  font-weight: var(--fw-semi);
  color: var(--ink-2);
  margin: 0 0 var(--space-2);
}

p, .body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
  color: var(--ink-3);
  margin: 0 0 var(--space-4);
  max-width: var(--prose-max);
}

.lead {
  font-family: var(--font-sans);
  font-size: var(--fs-lead);
  line-height: var(--lh-base);
  font-weight: var(--fw-medium);
  color: var(--ink-2);
  margin: 0 0 var(--space-5);
  max-width: var(--prose-max);
}

.small  { font-size: var(--fs-small);   color: var(--ink-3); }
.caption{ font-size: var(--fs-caption); color: var(--ink-4); }

/* Eyebrow / kicker — uppercase mono label above section titles */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 0 0 var(--space-3);
}

/* Spotlight — the green-highlighted keyword inside a headline. Brand mechanic. */
.spotlight,
.hero .spotlight,
.display .spotlight,
h1 .spotlight,
h2 .spotlight {
  color: var(--green);
}

/* Mono — inline mono text (dates, code, certifications, file paths) */
.mono, code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.92em;
  font-weight: var(--fw-medium);
  color: var(--ink-2);
}

/* Block code / terminal-style */
pre, .pre {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  overflow-x: auto;
  margin: 0 0 var(--space-5);
}

/* Inline link */
a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--paper-3);
  text-underline-offset: 4px;
  transition: color var(--dur-micro) var(--ease),
              text-decoration-color var(--dur-micro) var(--ease);
}
a:hover {
  color: var(--green-deep);
  text-decoration-color: var(--green);
}

/* Strong / em inside narrative copy */
strong, b { color: var(--ink-1); font-weight: var(--fw-semi); }
em, i     { color: var(--ink-2); font-style: italic; }

hr {
  border: 0;
  border-top: 1px solid var(--paper-3);
  margin: var(--space-7) 0;
}

/* -------------------------- LAYOUT HELPERS ------------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.prose { max-width: var(--prose-max); }

/* -------------------------- FOCUS RING ----------------------------------- */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--shadow-glow);
  border-radius: var(--radius-sm);
}

/* -------------------------- PREFERS REDUCED MOTION ----------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
