/* ==========================================================================
   JPSA — base: tokens, reset, typography, layout primitives
   Brand palette comes from the official JPSA color palette:
   #9E1414 (red) · #FDD82E (yellow) · #EEEEEE (gray) · #000000 (black)
   ========================================================================== */

:root {
  /* Brand */
  --red: #9e1414;
  --red-deep: #7a0e0e;
  --red-bright: #c21f1f;
  --yellow: #fdd82e;
  --yellow-soft: #fff3b8;
  --gray: #eeeeee;
  --black: #000000;

  /* Surfaces & text */
  --ink: #111111;
  --ink-2: #3d3d3d;
  --ink-3: #6b6b6b;
  --paper: #ffffff;
  --paper-2: #f7f6f3;
  --line: #e2e2e2;
  --line-strong: #111111;

  /* Type */
  --font-display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-hero: clamp(4.2rem, 13vw, 11.5rem);
  --fs-h1: clamp(3rem, 8vw, 6.5rem);
  --fs-h2: clamp(2.4rem, 5.4vw, 4.4rem);
  --fs-h3: clamp(1.35rem, 2.2vw, 1.75rem);
  --fs-lead: clamp(1.15rem, 1.8vw, 1.4rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;

  /* Space & shape */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(72px, 10vw, 136px);
  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.45);
  --shadow-block: 6px 6px 0 var(--black);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 240ms;

  --header-h: 76px;
  --z-header: 100;
  --z-menu: 110;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
[hidden] { display: none !important; }

::selection { background: var(--yellow); color: var(--black); }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--black);
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  background: var(--black);
  color: var(--yellow);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
.display,
h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.serif { font-family: var(--font-serif); font-weight: 400; font-style: italic; text-transform: none; letter-spacing: 0; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-small); }
.accent-red { color: var(--red); }
.accent-yellow { color: var(--yellow); }
.hl {
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  padding: 0 0.08em;
}

.prose p + p { margin-top: 1em; }
.prose { max-width: 68ch; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.section--gray { background: var(--gray); }
.section--paper { background: var(--paper-2); }
.section--black { background: var(--black); color: #fff; }
.section--red { background: var(--red); color: #fff; }
.section--yellow { background: var(--yellow); color: var(--black); }
.section--black .lead, .section--red .lead { color: rgba(255, 255, 255, 0.86); }
.section--black .muted, .section--red .muted { color: rgba(255, 255, 255, 0.7); }

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.split--center { align-items: center; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .split, .split--even { grid-template-columns: 1fr; }
}

.stack > * + * { margin-top: var(--stack, 1.25rem); }
.cluster { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.no-anim { transition: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
