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

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

body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);

  overflow-x: clip;
}

img,
svg,
iframe {
  max-width: 100%;
  display: block;
}

[hidden] { display: none !important; }

img { height: auto; }

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  color: var(--color-ink);
  line-height: var(--lh-tight);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a {
  color: var(--color-ink);
  text-decoration: none;
  transition: color var(--t-fast), border-color var(--t-fast), opacity var(--t-fast);
}

a:hover { color: var(--color-accent); }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

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

:where(a, button, input, select, textarea, [tabindex]):focus,
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
}

h1 em,
h2 em,
h3 em,
h4 em {
  font-style: italic;
  font-weight: var(--fw-light);
}

.container {
  max-width: var(--maxw-content);
  margin-inline: auto;
}

.container--pad { padding-inline: var(--gutter); }

.container--text {
  max-width: var(--maxw-text);
  margin-inline: auto;
}

.section {
  padding: var(--section-y) var(--gutter);
  position: relative;
  z-index: var(--z-raised);
}

.section--cream {
  background: var(--color-cream);
  --on-section: var(--color-surface);
}

.section--surface {
  background: var(--color-surface);
  --on-section: var(--color-cream);
}
.section--flush { padding-inline: 0; }

.section--photo {
  background: var(--color-ink);
  color: var(--color-on-dark);
}

.section--photo > *:not(.section-photo) {
  position: relative;
  z-index: var(--z-raised);
}

.section-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.section-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.section-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(19, 24, 48, var(--photo-veil));
}

.section--photo .section-title { color: var(--color-on-dark); }
.section--photo .section-lead { color: var(--color-on-dark-soft); }
.section--photo .arrow { color: var(--color-on-dark); }
.section--photo .arrow:hover { color: var(--color-on-dark-mute); }

.section--cream + .section--cream,
.section--surface + .section--surface { padding-top: 0; }
.section--top { padding-bottom: 0; }
.section--bottom { padding-top: 0; }

.section-head {
  text-align: center;
  max-width: var(--maxw-lead);
  margin-inline: auto;
}

.section-title { font-size: var(--fs-headline); }

.section-lead {
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: var(--lead-lh, var(--lh-normal));
  color: var(--color-ink-soft);
  margin-top: var(--lead-gap, 22px);
}

.section-note {
  padding: clamp(20px, 2.2vw, 28px) clamp(22px, 2.6vw, 32px);
  border-top: 1px solid var(--color-cream-deep);
  border-bottom: 1px solid var(--color-cream-deep);
  font-size: var(--fs-base);
  font-weight: var(--fw-light);
  font-style: italic;
  line-height: var(--lh-normal);
  color: var(--color-muted);
}

.section-rule {
  display: block;
  width: 1px;
  height: var(--rule-h, 88px);
  background: var(--color-line-strong);
  margin: var(--rule-gap, 38px) auto 0;
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 26px;
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: var(--lh-normal);
  color: var(--color-ink-soft);
}

.prose--tight { gap: 20px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
}

.media {
  position: relative;
  overflow: hidden;
  background-color: var(--ph-base);
}

.media > img,
.media > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media--arch { border-radius: var(--radius-arch) var(--radius-arch) 0 0; }
.media--tr { border-radius: 0 clamp(120px, 16vw, 240px) 0 0; }
.media--tl { border-radius: clamp(120px, 16vw, 240px) 0 0 0; }
.media--top { border-radius: clamp(120px, 16vw, 240px) clamp(120px, 16vw, 240px) 0 0; }

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-floating);
  background: var(--color-ink);
  color: var(--color-on-dark);
  padding: var(--space-12) var(--space-24);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.skip-link:focus {
  left: var(--space-16);
  top: var(--space-16);
  color: var(--color-on-dark);
}

.text-center { text-align: center; }

.gap-title { margin-bottom: clamp(40px, 5vw, 64px); }
.gap-lead { margin-bottom: 30px; }
.stack-md { margin-top: clamp(34px, 4vw, 54px); }
.stack-lg { margin-top: clamp(40px, 5vw, 60px); }
.stack-xl { margin-top: clamp(72px, 8vw, 120px); }

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--t-reveal), transform var(--t-reveal);
}

:root.is-revealing .reveal { transition: none; }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal.d1 { transition-delay: 0.09s; }
.reveal.d2 { transition-delay: 0.18s; }
.reveal.d3 { transition-delay: 0.27s; }
.reveal.d4 { transition-delay: 0.36s; }
.reveal.d5 { transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes title-clip {
  from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(-16px); }
  to { opacity: 1; clip-path: inset(0 0 0 0); transform: translateY(0); }
}

@keyframes slide-in-x {
  from { opacity: 0; transform: translateX(-8%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes letter-in {
  from { opacity: 0; transform: translateY(28px) rotate(40deg); }
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

.entry__revision {
  max-width: var(--maxw-text);
  margin: clamp(34px, 4vw, 52px) auto 0;
  padding-top: clamp(18px, 2vw, 24px);
  border-top: 1px solid var(--color-line);
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--color-muted-light);
}

.entry__content table {
  width: 100%;
  border-collapse: collapse;
  margin: clamp(20px, 2.4vw, 30px) 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

.entry__content thead th {
  text-align: left;
  padding: 0 16px 12px 0;
  border-bottom: 1px solid var(--color-line-strong);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}

.entry__content tbody td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--color-line);
  vertical-align: top;
  color: var(--color-ink-soft);
}

.entry__content tbody td:first-child {
  color: var(--color-ink);
  white-space: nowrap;
}

.entry__content tbody td:last-child,
.entry__content thead th:last-child {
  padding-right: 0;
  white-space: nowrap;
}

.entry__content td code {
  font-size: 0.94em;
  background: var(--color-cream);
  padding: 2px 6px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .entry__content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .entry__content tbody td:not(:first-child) { white-space: normal; min-width: 200px; }
}
