:root {
  --bg: #e8e4da;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --rule: rgba(29, 29, 31, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  overscroll-behavior-y: none;
  touch-action: pan-y;
}

.scroll-track {
  position: relative;
  height: 500vh;
  height: 500svh;
  height: 500dvh;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
}

.brand {
  position: absolute;
  top: 1.15rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
}

.brand img {
  display: block;
  height: 2.35rem;
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--bg);
  pointer-events: none;
}

.overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity, transform;
}

.overlay-hero {
  opacity: 1;
}

.overlay-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5.75rem 6vw 0;
  text-align: center;
}

.overlay-hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text);
  max-width: 16ch;
  text-wrap: balance;
}

.overlay-hero .subhead {
  margin-top: 0.85rem;
  font-size: clamp(0.82rem, 1.15vw, 1.05rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--muted);
  max-width: 38ch;
}

.overlay-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(1.5rem, 7vw, 7.5rem);
  gap: clamp(1.5rem, 4vw, 4rem);
}

.col {
  width: min(22rem, 26vw);
  flex-shrink: 0;
}

.col-copy h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.col-copy p {
  margin-top: 0.85rem;
  font-size: clamp(0.78rem, 0.95vw, 0.92rem);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.5;
  color: var(--muted);
  max-width: 28ch;
}

.col-stats {
  display: flex;
  flex-direction: column;
}

.stat {
  padding: 1.15rem 0 1.05rem;
  border-bottom: 1px solid var(--rule);
}

.stat:first-child {
  padding-top: 0;
}

.stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-value {
  display: block;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  display: block;
  margin-top: 0.45rem;
  font-size: clamp(0.68rem, 0.78vw, 0.78rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: var(--muted);
  max-width: 22ch;
}

.overlay-hotswap .col-copy {
  align-self: center;
}

.overlay-modular .col-copy {
  padding-right: 1rem;
}

@media (max-width: 860px) {
  html {
    scrollbar-width: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .brand {
    top: max(0.75rem, env(safe-area-inset-top, 0px));
  }

  .brand img {
    height: 1.7rem;
  }

  .overlay-hero {
    justify-content: flex-start;
    padding: calc(env(safe-area-inset-top, 0px) + 3.4rem) 1.35rem 0;
  }

  .overlay-hero h1 {
    max-width: 11.5em;
    font-size: clamp(1.4rem, 6.4vw, 1.8rem);
    line-height: 1.16;
  }

  .overlay-hero .subhead {
    margin-top: 0.55rem;
    font-size: 0.8rem;
    line-height: 1.4;
    max-width: 28ch;
  }

  .overlay-split {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 3.4rem) 1.35rem
      calc(env(safe-area-inset-bottom, 0px) + 1.2rem);
  }

  .overlay-split .col {
    width: 100%;
    max-width: none;
  }

  .overlay-split .col-copy {
    grid-row: 1;
    align-self: start;
    padding: 0;
    text-align: center;
  }

  .overlay-split .col-copy h2 {
    font-size: clamp(1.25rem, 5.5vw, 1.55rem);
  }

  .overlay-split .col-copy p {
    margin-top: 0.4rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.76rem;
    line-height: 1.45;
    max-width: 34ch;
  }

  .overlay-split .col-stats {
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem 0.7rem;
    width: 100%;
    min-width: 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--rule);
  }

  .stat,
  .stat:first-child,
  .stat:last-child {
    padding: 0;
    border-bottom: none;
    text-align: center;
  }

  .stat-value {
    font-size: clamp(1.2rem, 5.4vw, 1.45rem);
    letter-spacing: -0.04em;
  }

  .stat-label {
    margin-top: 0.28rem;
    font-size: 0.62rem;
    line-height: 1.3;
    max-width: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .overlay-hotswap .col-copy,
  .overlay-modular .col-copy {
    align-self: start;
    text-align: center;
  }

  .overlay-hotswap .col-copy p,
  .overlay-modular .col-copy p {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 860px) and (orientation: landscape) {
  .brand {
    top: 0.55rem;
    left: max(1rem, env(safe-area-inset-left, 0px));
    transform: none;
  }

  .brand img {
    height: 1.45rem;
  }

  .overlay-hero {
    align-items: flex-start;
    text-align: left;
    padding: 0.7rem 1.15rem 0 calc(3.4rem + env(safe-area-inset-left, 0px));
  }

  .overlay-hero h1 {
    font-size: 1.25rem;
    max-width: 16ch;
  }

  .overlay-hero .subhead {
    display: none;
  }

  .overlay-split {
    padding: 0.7rem max(1.15rem, env(safe-area-inset-right, 0px))
      calc(0.7rem + env(safe-area-inset-bottom, 0px))
      max(1.15rem, env(safe-area-inset-left, 0px));
  }

  .overlay-split .col-copy p {
    display: none;
  }

  .stat-label {
    display: none;
  }

  .stat-value {
    font-size: 1.15rem;
  }
}

@media (max-width: 380px) {
  .overlay-hero h1 {
    font-size: 1.32rem;
  }

  .stat-value {
    font-size: 1.12rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .overlay {
    will-change: auto;
  }
}
