/* Shared resets and layout primitives */

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

* {
  margin: 0;
}

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

body {
  min-height: 100vh;
  background: var(--color-page);
  color: var(--color-ink-primary);
  font-family: var(--font-body);
  font-weight: var(--text-case-body-weight);
  font-size: var(--text-case-body-size);
  line-height: var(--text-case-body-line-height);
  letter-spacing: var(--text-case-body-letter-spacing);
  /* Match Figma greyscale AA; macOS subpixel ("auto") makes Regular look heavier */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Keep autoplaying case videos chrome-free on iOS/Safari */
video {
  object-fit: cover;
}

video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

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

button {
  font: inherit;
}

.page {
  width: 100%;
  overflow-x: clip;
}

.page__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--width-page);
  margin-inline: auto;
}

.content-col {
  width: 100%;
  max-width: var(--width-content);
}

.visuals-col {
  width: 100%;
  max-width: var(--width-visuals);
}

.divider {
  width: 100%;
  padding-block: var(--divider-pad-block);
}

.divider__rule {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--color-border);
  border: 0;
}

.text-meta {
  font-family: var(--font-body);
  font-size: var(--text-meta-size);
  font-weight: var(--text-meta-weight);
  line-height: var(--text-meta-line-height);
  letter-spacing: var(--text-meta-letter-spacing);
  color: var(--color-ink-secondary);
}

.text-case-title {
  font-family: var(--font-display);
  font-size: var(--text-case-title-size);
  font-weight: var(--text-case-title-weight);
  line-height: var(--text-case-title-line-height);
  letter-spacing: var(--text-case-title-letter-spacing);
  color: var(--color-ink-primary);
}

.text-case-body {
  font-family: var(--font-body);
  font-size: var(--text-case-body-size);
  font-weight: var(--text-case-body-weight);
  line-height: var(--text-case-body-line-height);
  letter-spacing: var(--text-case-body-letter-spacing);
  color: var(--color-ink-primary);
}

.text-caption {
  font-family: var(--font-body);
  font-size: var(--text-caption-size);
  font-weight: var(--text-caption-weight);
  line-height: var(--text-caption-line-height);
  letter-spacing: var(--text-caption-letter-spacing);
  color: var(--color-ink-secondary);
}

.text-body-large {
  font-family: var(--font-body);
  font-size: var(--text-body-large-size);
  font-weight: var(--text-body-large-weight);
  line-height: var(--text-body-large-line-height);
  letter-spacing: var(--text-body-large-letter-spacing);
  color: var(--color-ink-primary);
}

.text-pullquote {
  font-family: var(--font-display);
  font-size: var(--text-pullquote-size);
  font-weight: var(--text-pullquote-weight);
  line-height: var(--text-pullquote-line-height);
  letter-spacing: var(--text-pullquote-letter-spacing);
}

.text-nav {
  font-family: var(--font-body);
  font-size: var(--text-nav-size);
  font-weight: var(--text-caption-weight);
  line-height: var(--text-nav-line-height);
  letter-spacing: var(--text-caption-letter-spacing);
  color: var(--color-ink-primary);
}

.text-stat-number {
  font-family: var(--font-body);
  font-size: var(--text-stat-number-size);
  font-weight: var(--text-stat-number-weight);
  line-height: var(--text-stat-number-line-height);
  letter-spacing: var(--text-stat-number-letter-spacing);
  color: var(--color-ink-primary);
}

.text-stat-label {
  font-family: var(--font-body);
  font-size: var(--text-stat-label-size);
  font-weight: var(--text-stat-label-weight);
  line-height: var(--text-stat-label-line-height);
  letter-spacing: var(--text-stat-label-letter-spacing);
  color: var(--color-ink-secondary);
}

/* Motion: shared fade-up reveals */
.reveal-on-load,
.reveal-on-scroll {
  opacity: 0;
}

.reveal-on-load {
  transform: translateY(30px);
  transition:
    opacity 650ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll {
  transform: translateY(30px);
  transition:
    opacity 650ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-load.is-visible,
.reveal-on-scroll.is-visible {
  opacity: 1;
  /* `translateY(0)` still creates a stacking context and breaks mix-blend-mode */
  transform: none;
}

/* Opacity-only reveal — used for the screen-blend flower so mix-blend-mode
   is active on the first visible frame (no solid-magenta flash). */
.reveal-on-load.reveal-fade-only {
  transform: none;
}

.reveal-on-load.reveal-fade-only.is-visible {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-load,
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
