/* =============================================================
   NextHire — Design System Tokens
   Single source of truth: colors, type, space, motion, surfaces.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT@0,9..144,400..600,30..50;1,9..144,400..600,30..50&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ---------- BONE — warm paper backgrounds (≈75% surface) ---------- */
  --bone-50:  #FBF9F4;  /* default page background — never #FFFFFF */
  --bone-100: #F5F1E8;  /* section alternation, pill bg, table row hl */
  --bone-200: #ECE5D5;  /* ghost-button hover, badges */

  /* ---------- INK — deep type & primary surfaces (≈18%) ---------- */
  --ink-900:  #0E1116;  /* primary text, primary CTA fill, footer bg */
  --ink-800:  #1A1F28;  /* primary CTA hover */
  --ink-700:  #2A2F38;  /* body text, secondary headings */
  --ink-500:  #5A6270;  /* eyebrows, captions, mono metadata */
  --ink-300:  #B8BEC8;  /* ghost border default, mono prefix */
  --ink-200:  #D8D5CD;  /* hairline rules, table dividers */
  --ink-100:  #E8E6E1;  /* very subtle structural lines */

  /* ---------- EMBER — brand orange, punctuation only (≤7%) ---------- */
  --ember-700: #B84E32; /* body-size ember (passes AA on bone) */
  --ember-600: #FF6A00; /* THE BRAND ORANGE — italic word, stat numbers, dot */
  --ember-500: #FF8533; /* ember-fill hover (rare) */
  --ember-100: #FFE8D6; /* recommended-pill bg */
  --ember-50:  #FFF4E8; /* reserved */

  /* ---------- FOREST — counter-position section only (1–2%) ---------- */
  --forest-700: #2F4A3D;
  --forest-50:  #EEF1ED;

  /* ---------- TYPE FAMILIES ---------- */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino', Georgia, serif;
  --font-body:    'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* ---------- TYPE SCALE (modular ≈1.25, fluid clamp) ---------- */
  --t-display-2xl: clamp(3.5rem, 8vw, 6rem);     /* 56–96px hero H1 */
  --t-display-xl:  clamp(2.5rem, 5.5vw, 4.25rem); /* 40–68px section H1 */
  --t-display-l:   clamp(2rem, 4vw, 3rem);       /* 32–48px subsection */
  --t-display-m:   clamp(1.5rem, 2.6vw, 2rem);   /* 24–32px card title */
  --t-display-s:   1.375rem;                     /* 22px small inline */
  --t-body-xl:     clamp(1.0625rem, 1.4vw, 1.3125rem); /* 17–21px lead */
  --t-body-l:      1.125rem;                     /* 18px long-form */
  --t-body-m:      1rem;                         /* 16px default */
  --t-body-s:      0.875rem;                     /* 14px caption */
  --t-eyebrow:     0.75rem;                      /* 12px UPPERCASE */
  --t-mono-m:      0.8125rem;                    /* 13px evidence */
  --t-mono-s:      0.75rem;                      /* 12px source footnote */

  /* ---------- SPACING (4px base, Fibonacci-flavored at scale) ---------- */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;
  --s-40: 160px;
  --s-48: 192px;

  /* ---------- LAYOUT ---------- */
  --container-max: 1240px;
  --gutter-mobile: 20px;
  --gutter-tablet: 40px;
  --gutter-desk:   80px;
  --measure:       62ch;     /* body line-length cap */

  /* ---------- RADII ---------- */
  --r-pill:  999px;
  --r-card:  16px;
  --r-mark:  8px;            /* logo mark in nav */
  --r-input: 8px;

  /* ---------- ELEVATION (sparingly) ---------- */
  --shadow-soft: 0 2px 8px rgba(14,17,22,0.04), 0 12px 32px rgba(14,17,22,0.06);
  --shadow-elev: 0 4px 12px rgba(14,17,22,0.06), 0 16px 40px rgba(14,17,22,0.08);

  /* ---------- MOTION ---------- */
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);  /* entrances */
  --ease-snappy:   cubic-bezier(0.4, 0, 0.2, 1);   /* state changes */
  --t-fast: 150ms;
  --t-med:  280ms;
  --t-long: 480ms;
}

/* =============================================================
   BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bone-50);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: var(--t-body-m);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Fraunces variation per size */
.display-2xl, .display-xl, .display-l, .display-m, .display-s {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink-900);
}
.display-2xl { font-size: var(--t-display-2xl); line-height: 0.94; letter-spacing: -0.035em; font-variation-settings: "SOFT" 30, "opsz" 144; }
.display-xl  { font-size: var(--t-display-xl);  line-height: 1.00; letter-spacing: -0.030em; font-variation-settings: "SOFT" 30, "opsz" 96;  }
.display-l   { font-size: var(--t-display-l);   line-height: 1.05; letter-spacing: -0.025em; font-variation-settings: "SOFT" 30, "opsz" 72;  }
.display-m   { font-size: var(--t-display-m);   line-height: 1.15; letter-spacing: -0.020em; font-variation-settings: "SOFT" 30, "opsz" 36; font-weight: 500; }
.display-s   { font-size: var(--t-display-s);   line-height: 1.25; letter-spacing: -0.015em; font-weight: 500; }

/* Italic emphasis — reserved for ONE word per surface */
.italic-emphasis {
  font-style: italic;
  color: var(--ember-600);
  font-variation-settings: "SOFT" 50, "opsz" 144;
}

/* Quoted italic — used in problem-section paragraphs */
.italic-quoted {
  font-style: italic;
  color: var(--ink-900);
}

/* Body roles */
.body-xl  { font-size: var(--t-body-xl);  line-height: 1.45; color: var(--ink-700); letter-spacing: -0.005em; }
.body-l   { font-size: var(--t-body-l);   line-height: 1.55; color: var(--ink-700); }
.body-m   { font-size: var(--t-body-m);   line-height: 1.60; color: var(--ink-700); }
.body-s   { font-size: var(--t-body-s);   line-height: 1.55; color: var(--ink-500); font-weight: 500; letter-spacing: 0.005em; }

/* Eyebrow — opens every major section. All variants stay on ink-900;
   the only exception is the on-dark variant for surfaces like the footer. */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-900);
  margin: 0 0 var(--s-5) 0;
}
.eyebrow--forest,
.eyebrow--loss,
.eyebrow--gain { color: var(--ink-900); }
.eyebrow--ink-on-dark { color: var(--ink-300); }

/* Mono whisper */
.mono   { font-family: var(--font-mono); font-weight: 400; }
.mono-m { font-family: var(--font-mono); font-size: var(--t-mono-m); line-height: 1.45; letter-spacing: -0.01em; color: var(--ink-500); }
.mono-s { font-family: var(--font-mono); font-size: var(--t-mono-s); line-height: 1.40; color: var(--ink-500); }

/* 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;
  }
}

/* =============================================================
   LAYOUT — container + 12-col grid
   ============================================================= */
.nh-container {
  width: 100%;
  max-width: calc(var(--container-max) + (var(--gutter-desk) * 2));
  margin: 0 auto;
  padding: 0 var(--gutter-mobile);
}
@media (min-width: 640px)  { .nh-container { padding: 0 var(--gutter-tablet); } }
@media (min-width: 1024px) { .nh-container { padding: 0 var(--gutter-desk);   } }

.nh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (min-width: 640px)  { .nh-grid { grid-template-columns: repeat(8,  1fr); gap: 20px; } }
@media (min-width: 1024px) { .nh-grid { grid-template-columns: repeat(12, 1fr); gap: 24px; } }

/* =============================================================
   COMPONENTS
   ============================================================= */

/* --- Pill (badge) --- */
.nh-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 7px 14px;
  background: var(--bone-100);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink-700);
}
.nh-pill__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ember-600);
  animation: nh-pulse 2.4s var(--ease-standard) infinite;
}
.nh-pill--recommended {
  background: var(--ember-100);
  border-color: transparent;
  color: var(--ember-700);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 10px;
}
@keyframes nh-pulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0   rgba(255,106,0,0.4); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 4px rgba(255,106,0,0);   }
}
@media (prefers-reduced-motion: reduce) { .nh-pill__dot { animation: none; } }

/* --- Buttons --- */
.nh-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--t-med) var(--ease-snappy),
              border-color var(--t-fast) var(--ease-snappy),
              color var(--t-fast) var(--ease-snappy),
              transform var(--t-med) var(--ease-snappy),
              box-shadow var(--t-med) var(--ease-snappy);
  min-height: 48px;
}
.nh-btn__arrow {
  display: inline-block;
  transition: transform var(--t-fast) var(--ease-snappy);
}
.nh-btn:hover .nh-btn__arrow { transform: translateX(2px); }

.nh-btn--primary {
  background: var(--ink-900);
  color: var(--bone-50);
  box-shadow: 0 1px 2px rgba(14,17,22,0.10);
}
.nh-btn--primary:hover { background: var(--ink-800); transform: translateY(-1px); }
.nh-btn--primary:active { transform: translateY(0); background: var(--ink-900); }
.nh-btn--primary:focus-visible { outline: 2px solid var(--ember-600); outline-offset: 2px; }

.nh-btn--ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--ink-300);
}
.nh-btn--ghost:hover { background: var(--bone-100); border-color: var(--ink-900); }
.nh-btn--ghost:active { background: var(--bone-200); }
.nh-btn--ghost:focus-visible { outline: 2px solid var(--ember-600); outline-offset: 2px; }

.nh-btn--ember-on-dark {
  background: var(--ember-600);
  color: var(--ink-900);
}
.nh-btn--ember-on-dark:hover { background: var(--ember-500); }

.nh-btn--small { padding: 10px 16px; font-size: 13px; min-height: 40px; }

/* --- Inline link --- */
.nh-link {
  position: relative;
  color: var(--ink-900);
  text-decoration: none;
  display: inline-block;
  transition: color var(--t-fast) var(--ease-snappy);
}
.nh-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  height: 1.5px;
  width: 0;
  background: var(--ember-600);
  transition: width var(--t-fast) var(--ease-snappy);
}
.nh-link:hover { color: var(--ember-600); }
.nh-link:hover::after { width: 100%; }
.nh-link:focus-visible { outline: 2px solid var(--ember-600); outline-offset: 2px; border-radius: 4px; }

/* --- Hairline rule --- */
.nh-hairline { border: 0; border-top: 1px solid var(--ink-200); margin: 0; }

/* --- Logo mark (used in nav, footer, watermarks) --- */
.nh-mark {
  width: 32px; height: 32px;
  border-radius: var(--r-mark);
  background: var(--ember-600);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nh-mark svg { display: block; }

/* --- Wordmark — sans, intentional, tighter than Inter default --- */
.nh-wordmark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  line-height: 1;
}

/* --- Form input --- */
.nh-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-900);
  background: var(--bone-50);
  border: 1px solid var(--ink-300);
  border-radius: var(--r-input);
  transition: border-color var(--t-fast) var(--ease-snappy),
              border-width var(--t-fast) var(--ease-snappy);
}
.nh-input::placeholder { color: var(--ink-500); }
.nh-input:focus { outline: none; border: 2px solid var(--ember-600); padding: 11px 13px; }

/* --- Section padding helpers --- */
.nh-section { padding-block: var(--s-20); }
@media (min-width: 1024px) { .nh-section { padding-block: var(--s-32); } }
.nh-section--hero { padding-block: var(--s-16) var(--s-24); }
.nh-section--forest { background: var(--forest-50); }
.nh-section--ink { background: var(--ink-900); color: var(--bone-100); }
