/* ==========================================================================
   Reset, elements, layout primitives, utilities
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  /* Anchor links clear the sticky header instead of hiding under it */
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-display);
  color: inherit;
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--navy-800); }

ul, ol { margin: 0 0 var(--sp-4); padding-left: var(--sp-6); }

/* Every interactive element gets the same visible ring — keyboard users
   should never have to hunt for where they are. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

::selection {
  background: var(--navy-800);
  color: var(--white);
}

/* --- Layout -------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }

.section--dark {
  background: var(--bg-dark);
  color: var(--ink-dark);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--ink-dark); }
.section--dark p { color: var(--ink-dark-muted); }

/* Alternate sections sit on ruled paper: a 2rem ledger pitch, faint enough
   to register as texture rather than lines. Cards and photos sit on top. */
.section--alt {
  background-color: var(--bg-alt);
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent calc(2rem - 1px),
    rgba(1, 0, 78, 0.03) calc(2rem - 1px),
    rgba(1, 0, 78, 0.03) 2rem
  );
}

/* Asymmetric split — deliberately not 50/50, so it reads as editorial
   rather than a generic two-column block. */
.split {
  display: grid;
  gap: clamp(var(--sp-8), 4vw, var(--sp-20));
  align-items: start;
}
@media (min-width: 62rem) {
  .split { grid-template-columns: 5fr 6fr; }
  .split--reverse { grid-template-columns: 6fr 5fr; }
  .split--reverse > :first-child { order: 2; }
}

.grid { display: grid; gap: var(--sp-6); }
@media (min-width: 40rem)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 40rem)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem)  { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.stack > * + * { margin-top: var(--sp-4); }

/* --- Type utilities ------------------------------------------------------ */

/* Uppercase letterspaced label with a leading rule — the recurring
   section marker across the site. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--blue-600);
}
.eyebrow::before {
  content: "";
  width: var(--sp-8);
  height: 1px;
  background: currentColor;
  flex: none;
}
.section--dark .eyebrow { color: var(--blue-500); }

.display {
  font-size: var(--fs-hero);
  line-height: var(--lh-display);
  font-weight: var(--fw-display);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 62ch;
}
.section--dark .lead { color: var(--ink-dark-muted); }

/* Keep paragraphs inside the comfortable 65–75 character band */
.measure { max-width: 68ch; }

.text-sm { font-size: var(--fs-sm); }

/* Photographs: one radius and one shadow everywhere, so the shoot reads as
   a set rather than seven separate pictures. */
.photo {
  border-radius: var(--radius-photo);
  box-shadow: var(--shadow-card);
}
.section--dark .photo { box-shadow: 0 24px 56px rgba(1, 0, 54, 0.5); }

/* Section counter, e.g. 01 / 04 */
.count {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--silver-400);
  font-variant-numeric: tabular-nums;
}

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

.skip-link {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: var(--z-modal);
  padding: var(--sp-3) var(--sp-4);
  background: var(--white);
  color: var(--navy-800);
  font-weight: 600;
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* Scroll reveal, the hero entrance and every other animated state live in
   motion.css, which loads last so it can override anything here. That file
   also owns the prefers-reduced-motion block for the whole site. */
