/* =========================================================================
   PRINCIPAL — BASE
   Reset, base typography, layout and utilities.
   ========================================================================= */

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

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; color: inherit; }

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--color-accent-dark);   /* ≥ 3:1 on paper and sand */
  outline-offset: 2px;
  border-radius: 4px;
}
.section--ink :focus-visible { outline-color: var(--color-accent-light); }
[tabindex="-1"]:focus-visible { outline: none; }   /* skip-link target */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight);
  color: var(--color-ink);
  text-wrap: balance;
}
h1, h2, h3 { font-family: var(--font-display); }
h4, h5, h6 { font-family: var(--font-sans); }

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { text-wrap: pretty; }

strong { font-weight: var(--fw-bold); }

.display { font-family: var(--font-display); font-size: var(--fs-display); line-height: var(--lh-tight); font-weight: var(--fw-bold); }
.lead { font-size: var(--fs-lead); color: var(--color-ink-70); line-height: 1.5; }
.serif { font-family: var(--font-accent); }

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--ink {
  background: var(--color-ink-surface);
  color: var(--color-paper);
}
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--color-paper); }
.section--ink .lead { color: rgba(255, 252, 248, 0.72); }

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

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* Keyboard users can jump past the header; hidden until focused. */
.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-ink);
  color: var(--color-paper);
  font-weight: var(--fw-bold);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; outline-color: var(--color-accent-light); }

/* --------------------------------------------------------------------------
   PRINT
   -------------------------------------------------------------------------- */
@media print {
  .site-header { position: static; margin: 0; transform: none; }
  .nav, .nav-toggle, .site-header__actions, .skip-link, .screens__dots, .outcome-tabs__nav { display: none !important; }
  .section--ink { background: #fff; color: var(--color-ink); }
  .section--ink h2, .section--ink h3, .section--ink .lead, .section--ink p, .section--ink span, .section--ink em { color: var(--color-ink); }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; row-gap: var(--space-4); }
  .marquee__track .logo-item[aria-hidden="true"] { display: none; }
  /* Every tab panel prints, one after another */
  .outcome-tabs.is-ready .outcome-panel,
  .outcome-tabs.is-ready .outcome-panel[hidden] { grid-area: auto; visibility: visible; break-inside: avoid; }
  .btn { border-color: var(--color-ink); }
}
