/* ==========================================================================
   Simitri HR — design tokens (doc 10, WCAG-verified).
   Brand values updated 6 Jul from the REAL logo file (pixel-sampled via a
   color histogram over the actual image — not an estimate). Shield green
   #006840, ribbon lime #B8D000, wordmark charcoal #404040.
   ========================================================================== */

:root {
  /* Color */
  --bg: #FAFAF7;                /* page ground, warm off-white            */
  --surface: #F2F1EA;           /* cards, alternate bands                 */
  --surface-inverse: #0B4A2E;   /* dark statement sections, footer — darkened real shield green for AAA text contrast */
  --text: #262626;              /* softened from the logo's #404040 for body-text contrast */
  --text-2: #55554F;
  --text-on-dark: #FAFAF7;
  --text-2-on-dark: #C7D9CE;
  --accent: #B8D000;            /* real logo ribbon lime — DARK GROUNDS ONLY, large-scale (3.95:1 vs shield green) */
  --accent-hover: #CCE33A;
  --accent-deep: #006840;       /* the real logo shield green, used as the "green" of light mode (6.58:1) */
  --accent-deep-hover: #00512F;
  --tint: #E4F1E9;              /* chips, hover washes */
  --border: #E0DED3;
  --border-dark: rgba(250, 250, 247, 0.16);
  --success: #15803D;
  --error: #B91C1C;
  --btn-text-on-lime: #0E1512;  /* 10.63:1 — never white on lime          */

  /* Type — Fraunces (display) + Inter (body), self-hosted variable WOFF2 */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-display-xl: clamp(2.75rem, 1.93rem + 4.1vw, 5rem);
  --fs-display: clamp(2.375rem, 1.88rem + 2.5vw, 3.75rem);
  --fs-h1: clamp(2rem, 1.64rem + 1.8vw, 3rem);
  --fs-h2: clamp(1.625rem, 1.4rem + 1.1vw, 2.25rem);
  --fs-h3: clamp(1.375rem, 1.24rem + 0.7vw, 1.75rem);
  --fs-h4: clamp(1.125rem, 1.08rem + 0.25vw, 1.25rem);
  --fs-body-lg: clamp(1.125rem, 1.08rem + 0.25vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.8125rem;
  --fs-stat: clamp(2.5rem, 1.8rem + 2.2vw, 3.5rem);

  /* Spacing scale */
  --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px;  --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px;

  /* Layout */
  --content-max: 1128px;
  --measure: 42rem;             /* 60–70ch paragraph width               */
  --radius: 8px;
  --header-h: 80px;
  --header-h-stuck: 64px;
  --header-h-mobile: 60px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-hover: 180ms;
  --dur-component: 300ms;
  --dur-entrance: 650ms;
  --reveal-distance: 32px;
}

/* --- Font faces (subsetted variable WOFF2, preloaded in layout head) ----- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
/* Fraunces' own ampersand glyph is an ornate swash by design — reads as a
   rendering glitch rather than a stylistic choice to a general audience.
   Override just that one character (unicode-range) to borrow a plain
   ampersand from a standard serif, leaving every other glyph untouched. */
@font-face {
  font-family: "Fraunces";
  src: local("Georgia"), local("Times New Roman");
  unicode-range: U+0026;
  font-weight: 100 900;
  font-style: normal;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h-stuck) + 16px); /* WCAG 2.4.11 */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .display-xl, .display {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-optical-sizing: auto;
  margin: 0 0 0.5em;
}
.display-xl { font-size: var(--fs-display-xl); font-weight: 560; line-height: 1.02; letter-spacing: -0.025em; }
.display    { font-size: var(--fs-display);    font-weight: 560; line-height: 1.08; letter-spacing: -0.02em; }
h1 { font-size: var(--fs-h1); font-weight: 580; line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.2;  letter-spacing: -0.015em; }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3;  letter-spacing: -0.01em; }
h4 { font-family: var(--font-body); font-size: var(--fs-h4); font-weight: 600; line-height: 1.4; margin: 0 0 0.5em; }

p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: var(--fs-body-lg); line-height: 1.65; }
small, .small { font-size: var(--fs-small); color: var(--text-2); }

.eyebrow {
  display: block;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: var(--sp-3);
}
.on-dark .eyebrow { color: var(--accent); }

a { color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep-hover); }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: 2px;
}
.on-dark :focus-visible { outline-color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

/* --- Layout helpers -------------------------------------------------------- */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}
.section { padding-block: clamp(var(--sp-8), 9vw, var(--sp-10)); }
.section--dark {
  background: var(--surface-inverse);
  color: var(--text-on-dark);
  padding-block: clamp(var(--sp-9), 11vw, 160px);
}
.section--tint { background: var(--tint); }
.rule { border: 0; border-top: 1px solid var(--border); margin: 0; }
.on-dark .rule, .section--dark .rule { border-top-color: var(--border-dark); }

/* --- Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-hover) ease-out,
              border-color var(--dur-hover) ease-out,
              transform var(--dur-hover) ease-out;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent-deep); color: #fff; }
.btn-primary:hover { background: var(--accent-deep-hover); color: #fff; }
.btn-lime { background: var(--accent); color: var(--btn-text-on-lime); }
.btn-lime:hover { background: var(--accent-hover); color: var(--btn-text-on-lime); }
.btn-ghost { background: transparent; color: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost:hover { background: var(--tint); }
.on-dark .btn-ghost { color: var(--text-on-dark); border-color: var(--border-dark); }
.on-dark .btn-ghost:hover { background: rgba(250, 250, 247, 0.08); }

/* --- Scroll reveal (JS toggles .in) ---------------------------------------- */
.reveal { opacity: 0; transform: translateY(var(--reveal-distance)) scale(0.98); }
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-entrance) var(--ease-out),
              transform var(--dur-entrance) var(--ease-out);
}

/* --- Reduced motion: global kill switch (WCAG 2.3.3) ------------------------ */
@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;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- Utility ----------------------------------------------------------------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; top: -48px; left: var(--sp-4);
  background: var(--accent-deep); color: #fff;
  padding: 12px 20px; border-radius: 0 0 var(--radius) var(--radius);
  z-index: 100;
}
.skip-link:focus { top: 0; color: #fff; }
.tabular { font-variant-numeric: tabular-nums; }
