/* Base -----------------------------------------------------------------------
   Reset, document defaults, the three type roles, and the handful of
   utilities every page in the system shares. Nothing in here knows about a
   section.
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* iOS Safari otherwise re-scales body text when a phone is rotated, which
     breaks every measure the layout is set against. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--type-body);
  font-weight: var(--w-regular);
  line-height: var(--lead-body);
  font-kerning: normal;
  /* The weight ceiling: no synthetic bold, no synthetic italic. */
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.dialog-open { overflow: hidden; }

button, a { color: inherit; }
button { font: inherit; }
a { text-decoration: none; }
img { display: block; max-width: 100%; }
b, strong { font-weight: inherit; }

/* Type roles ------------------------------------------------------------------
   .t-display  the light serif, used uppercase at the largest sizes
   .t-title    the light serif in sentence case, for statements and quotes
   .t-label    tracked uppercase sans: eyebrows, captions, data
   The section sheets apply these by element; the classes exist so a new page
   can reach for them directly.
   -------------------------------------------------------------------------- */
.t-display {
  font-family: var(--font-display);
  font-weight: var(--w-light);
  letter-spacing: var(--track-display);
  line-height: var(--lead-display);
  text-transform: uppercase;
  font-variant-numeric: lining-nums;
}

.t-title {
  font-family: var(--font-display);
  font-weight: var(--w-light);
  letter-spacing: var(--track-title);
  line-height: var(--lead-title);
  font-variant-numeric: lining-nums;
}

.t-label {
  font-family: var(--font-sans);
  font-weight: var(--w-regular);
  font-size: 11px;
  letter-spacing: var(--track-label);
  line-height: 1.3;
  text-transform: uppercase;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  padding: 10px 14px;
  background: var(--milk);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .08em;
}

.skip-link:focus { transform: translateY(0); }

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

.section-light { background: var(--paper); color: var(--ink); }
/* Sections alternate paper and a shade under it, so each one ends visibly
   without the page ever leaving the light ground. */
.section-shade { background: var(--paper-2); color: var(--ink); }
/* One step up from paper — the system's brightest tone, for a section that
   should read lighter than the page around it. */
.section-milk { background: var(--milk); color: var(--ink); }
.section-dark { background: var(--charcoal); color: var(--cream); }

/* Scroll reveal: the base state is invisible, script.js adds .is-visible. */
.reveal { opacity: 0; transform: translateY(38px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.image-reveal { overflow: hidden; }
.image-reveal img { transform: scale(1.045); transition: transform 1.4s var(--ease); }
.image-reveal.is-visible img { transform: scale(1); }

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