/* Talentproof Design Tokens — Dark first */

:root {
  /* Backgrounds */
  --bg: #0a0a0b;
  --bg-1: #0a0a0b;
  --bg-2: #111113;
  --surface-1: #18181b;
  --surface-2: #1f1f23;

  /* Borders */
  --border-1: #27272a;
  --border-2: #3f3f46;

  /* Text */
  --text-primary: #fafafa;
  /* Secondary / muted hex — lifted slightly for contrast on --bg */
  --text-secondary: #b4b4bd;
  --text-muted: #9ca3af;

  /* White-on-dark tiers (readable but clearly below primary white ~0.95+) */
  --text-on-dark-muted: rgba(255, 255, 255, 0.48); /* captions, closing copy */
  --text-on-dark-dim: rgba(255, 255, 255, 0.4); /* labels, dead/strike names */
  --text-on-dark-soft: rgba(255, 255, 255, 0.36); /* fine print, meta */
  --text-on-dark-faint: rgba(255, 255, 255, 0.28); /* ghost lines, icons, deco */
  --text-on-dark-whisper: rgba(255, 255, 255, 0.14); /* huge background type only */

  /* Brand & semantic */
  --black: #000000;
  --white: #ffffff;
  --green: #22c55e;
  --red: #FF2D2D;
  --red-dim: rgba(255,45,45,0.15);
  --grey-1: rgba(255, 255, 255, 0.62);
  --grey-2: rgba(255, 255, 255, 0.4);
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-muted: rgba(99, 102, 241, 0.15);
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;

  /* Typography — site-wide UI font (recruiters hero headline, body, components).
     Do not change without explicit product approval + user confirmation. */
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-ui: var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --text-h1: clamp(2.25rem, 4vw, 4rem);
  --text-h2: clamp(1.75rem, 3vw, 2.5rem);
  --text-h3: 1.5rem;
  --text-body: 1.0625rem;
  --text-small: 0.875rem;

  /* Hero display headlines (home `.h-headline`, inner LP heroes, students/recruiters/institutions) */
  --hero-headline-size: clamp(3.8rem, 8vw, 7.5rem);

  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.5;

  /* Site-wide content rail: left/right padding for nav + all sections (home + other pages) */
  --content-max-width: 1200px;
  --content-padding-inline: clamp(32px, 10vw, 140px);
  /* Recruiters / inner rails — matches nav + section inset */
  --inset: calc(8vw + clamp(16px, 1.5vw, 28px));
  /* Fixed nav clearance (62px bar). Zero on mobile where nav scrolls with the page. */
  --tp-nav-fixed-offset: 62px;
  --nav-h: 62px; /* alias for legacy layouts (e.g. request-demo) */
  /* Vertical rhythm between major sections (hero → next block, between stacked sections) */
  --section-gap-y: 160px;
  /* Hairline UI */
  --border: rgba(255, 255, 255, 0.08);

  /* Spacing scale: 4 8 12 16 24 32 48 64 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Motion */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 220ms;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);

  /* Hero background word (e.g. PROOF) — same watermark treatment on home, students, institutions, recruiters */
  --hero-watermark-color: rgba(255, 255, 255, 0.065);
  --hero-watermark-shadow: 0 0 48px rgba(0, 0, 0, 0.32), 0 0 1px rgba(0, 0, 0, 0.28);
  --hero-watermark-size: clamp(180px, 28vw, 380px);
}

/* Horizontal rail: matches `.lp-hero__content`, `.lp-help__wrap`, `.st-hero-left`, recruiters hero */
@media (max-width: 1023px) {
  :root {
    --inset: calc(8vw + clamp(20px, 4vw, 28px));
  }
}

@media (max-width: 767px) {
  :root {
    --inset: clamp(16px, 5vw, 24px);
    --tp-nav-fixed-offset: 0px;
    --nav-h: 0px;
  }
}

@media (max-width: 420px) {
  :root {
    --inset: var(--space-4);
  }
}

/* Semantic headings — Inter site-wide (same stack as home `.h-hero` / `--font-sans`) */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
}

/* Shared hero “PROOF” background word — same as home .h-watermark (visibility, size, fade, parallax via --h-wm-tx) */
@keyframes hero-watermark-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hero-bg-watermark {
  position: absolute;
  right: -2vw;
  top: 50%;
  transform: translate(var(--h-wm-tx, 0px), -50%);
  font-family: var(--font-sans);
  /* Fallbacks match :root — same computed look on every page if vars are missing */
  font-size: clamp(180px, 28vw, 380px);
  font-size: var(--hero-watermark-size);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.065);
  color: var(--hero-watermark-color);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  z-index: 1;
  user-select: none;
  pointer-events: none;
  opacity: 0;
  animation: hero-watermark-in 1.2s ease 1.4s forwards;
  text-shadow: 0 0 48px rgba(0, 0, 0, 0.32), 0 0 1px rgba(0, 0, 0, 0.28);
  text-shadow: var(--hero-watermark-shadow);
  white-space: nowrap;
  line-height: 1;
  mix-blend-mode: normal;
}

/* Responsive watermark positioning:
   On tablet/mobile the hero watermark can be pushed partially off-screen by parallax (`--h-wm-tx`).
   Clamp drift and pull slightly inward so the full "PROOF" word stays visible. */
@media (max-width: 1024px) {
  .hero-bg-watermark {
    right: -0.5vw;
    transform: translate(clamp(-24px, var(--h-wm-tx, 0px), 24px), -50%);
  }
}

@media (max-width: 767px) {
  :root {
    --hero-watermark-size: clamp(140px, 42vw, 260px);
  }

  .hero-bg-watermark {
    right: 0;
    /* Prevent negative drift that clips the left-most "P" on small screens */
    transform: translate(clamp(0px, var(--h-wm-tx, 0px), 16px), -50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
  }

  .hero-bg-watermark {
    animation: none;
    opacity: 1;
  }
}
