@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:wght@500;600&display=swap");

/*
 * Hero and metric balance
 *
 * The hero borrows Resend's compositional discipline—compact copy and visual
 * mass—without copying its artwork. This file is intentionally loaded last.
 */

:root {
  --hero-editorial: "EB Garamond", Georgia, "Times New Roman", serif;
}

/* Connect the copy and phone with one restrained neutral light field. */
.hero-sticky::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 34% 45% at 70% 51%, rgba(255, 255, 255, 0.075), transparent 72%),
    linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, 0.022) 51%, transparent 73%);
  opacity: 0.86;
}

.hero-bg-overlay {
  background:
    linear-gradient(
      90deg,
      rgba(5, 5, 5, 0.96) 0%,
      rgba(5, 5, 5, 0.78) 31%,
      rgba(5, 5, 5, 0.2) 66%,
      rgba(5, 5, 5, 0.62) 100%
    ),
    linear-gradient(180deg, rgba(5, 5, 5, 0.76), rgba(5, 5, 5, 0.06) 43%, rgba(5, 5, 5, 0.88));
}

/* Settle the copy left of the phone without hugging the viewport edge. */
.story-copy {
  left: clamp(72px, 9vw, 160px);
  width: min(590px, 43vw);
  min-height: 400px;
  transform: translateY(-43%);
}

.story-beat[data-beat="0"] > .eyebrow {
  display: none !important;
}

.story-beat h1,
.story-beat h2,
.final-copy h2 {
  font-family: var(--hero-editorial);
  font-weight: 500;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.story-beat h1,
.story-beat h2 {
  max-width: 600px;
  font-size: clamp(64px, 6.25vw, 108px);
  line-height: 0.86;
}

.story-beat .supporting-copy {
  max-width: 455px;
  margin-top: 22px;
  font-size: clamp(15px, 1.16vw, 17px);
  line-height: 1.55;
}

.hero-waitlist-cta {
  display: inline-flex;
  width: fit-content;
  min-height: 46px;
  margin-top: clamp(24px, 2.2vw, 31px);
  padding: 0 15px 0 18px;
  align-items: center;
  gap: 19px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  color: #080808;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.22),
    0 0 0 rgba(255, 255, 255, 0);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  pointer-events: none;
  transition:
    background-color 180ms ease-out,
    box-shadow 180ms ease-out,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-waitlist-cta span:last-child {
  font-size: 13px;
  font-weight: 500;
  transform: translateY(-0.5px);
}

.hero-sticky:has(.stage-item[data-stage="0"].is-active) .hero-waitlist-cta {
  pointer-events: auto;
}

.hero-waitlist-cta:hover,
.hero-waitlist-cta:focus-visible {
  color: #050505;
  background: #ffffff;
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.25),
    0 0 30px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.hero-waitlist-cta:active {
  transform: translateY(0) scale(0.98);
}

.final-copy h2 {
  font-size: clamp(66px, 8vw, 128px);
  line-height: 0.86;
}

.scroll-cue {
  left: clamp(72px, 9vw, 160px);
}

/*
 * Increase and shift the portrait phone during Capture and Track. The authored
 * centered landscape pose is restored before the Measure stage.
 */
#phone-canvas {
  transform-origin: 59% 50%;
  transform: translate3d(clamp(6px, 1.2vw, 28px), 0, 0) scale(1.065);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.hero-sticky:has(.stage-item[data-stage="1"].is-active) #phone-canvas {
  transform: translate3d(clamp(2px, 0.8vw, 18px), 0, 0) scale(1.045);
}

.hero-sticky:has(.stage-item[data-stage="2"].is-active) #phone-canvas {
  transform: none;
}

/* Smaller square metric instruments with one shared section rhythm. */
.metrics-section .section-shell {
  gap: clamp(40px, 4.8vw, 64px);
}

.metrics-section .metric-rail {
  width: min(890px, 100%) !important;
  gap: clamp(14px, 1.45vw, 19px) !important;
}

.metrics-section .metric-row {
  min-height: 0 !important;
  padding: clamp(22px, 2.15vw, 30px) !important;
  border-radius: 21px;
}

.metrics-section .metric-code {
  font-family: var(--display);
  font-size: clamp(44px, 4.5vw, 64px);
  font-weight: 680;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.metrics-section .metric-row > div {
  margin-top: auto;
}

.metrics-section .metric-row > strong {
  top: clamp(23px, 2.15vw, 30px);
  right: clamp(22px, 2.15vw, 30px);
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 8px;
}

.metrics-section .metric-row h3 {
  font-size: clamp(25px, 2.45vw, 35px);
  line-height: 1;
}

.metrics-section .metric-row p {
  margin-top: 13px;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1100px) and (min-width: 821px) {
  .story-copy {
    left: clamp(56px, 7vw, 100px);
    width: min(520px, 44vw);
  }

  .story-beat h1,
  .story-beat h2 {
    font-size: clamp(58px, 6.5vw, 78px);
  }

  .scroll-cue {
    left: clamp(56px, 7vw, 100px);
  }

  #phone-canvas {
    transform: translate3d(clamp(4px, 1vw, 20px), 0, 0) scale(1.055);
  }

  .hero-sticky:has(.stage-item[data-stage="1"].is-active) #phone-canvas {
    transform: translate3d(clamp(0px, 0.6vw, 12px), 0, 0) scale(1.035);
  }
}

@media (max-width: 820px) {
  .hero-sticky::before {
    background: radial-gradient(ellipse 58% 34% at 50% 58%, rgba(255, 255, 255, 0.055), transparent 76%);
  }

  .story-copy {
    left: 24px;
    width: calc(100% - 48px);
    min-height: 270px;
    transform: none;
  }

  .story-beat h1,
  .story-beat h2,
  .final-copy h2 {
    line-height: 0.91;
  }

  .hero-waitlist-cta {
    min-height: 44px;
    margin: 22px auto 0;
  }

  #phone-canvas,
  .hero-sticky:has(.stage-item[data-stage="1"].is-active) #phone-canvas,
  .hero-sticky:has(.stage-item[data-stage="2"].is-active) #phone-canvas {
    transform: none;
  }

  .scroll-cue {
    left: 50%;
  }

  .metrics-section .metric-rail {
    width: min(760px, 100%) !important;
    gap: 13px !important;
  }

  .metrics-section .metric-row {
    padding: 20px !important;
    border-radius: 18px;
  }

  .metrics-section .metric-code {
    font-size: clamp(36px, 6vw, 50px);
  }

  .metrics-section .metric-row > strong {
    top: 21px;
    right: 20px;
  }

  .metrics-section .metric-row h3 {
    font-size: clamp(21px, 3.4vw, 29px);
  }

  .metrics-section .metric-row p {
    margin-top: 10px;
    font-size: 12px;
  }
}

@media (max-width: 700px) {
  .metrics-section .metric-rail {
    width: min(360px, 100%) !important;
  }
}

@media (max-width: 560px) {
  .story-copy {
    left: 18px;
    width: calc(100% - 36px);
  }

  .story-beat h1,
  .story-beat h2,
  .final-copy h2 {
    font-size: clamp(42px, 13.2vw, 62px);
  }

  .hero-waitlist-cta {
    min-height: 42px;
    padding-inline: 16px 13px;
    gap: 15px;
    font-size: 10.5px;
  }

  .metrics-section .metric-rail {
    width: min(330px, 100%) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #phone-canvas,
  .hero-waitlist-cta {
    transition: none;
  }
}