:root {
  color-scheme: light;
  --paper: #f7f7f8;
  --ink: #1d1d1f;
  --quiet: #6e6e73;
  --link: #0071e3;
  --mx: 0;
  --my: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  text-rendering: geometricPrecision;
}

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

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

.hero {
  --press: 1;
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 72px);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 4vw clamp(128px, 18vh, 220px);
  z-index: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(29, 29, 31, 0.2), transparent);
  opacity: 0.48;
  transform:
    translate3d(calc(var(--mx) * -16px), calc(var(--my) * 5px), 0)
    scaleX(calc(0.96 + (var(--press) * 0.04)));
  transform-origin: center;
  transition:
    transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 220ms ease;
  animation: line-open 780ms 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(980px, 100%);
  margin-top: clamp(-72px, -6vh, -24px);
  transform:
    translate3d(calc(var(--mx) * -10px), calc(var(--my) * -8px), 0)
    scale(calc(1 - ((1 - var(--press)) * 0.012)));
  transition: transform 560ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

h1 {
  margin: 0;
  font-size: clamp(66px, 13.2vw, 186px);
  font-weight: 760;
  line-height: 0.9;
  letter-spacing: 0;
  text-wrap: balance;
  animation: title-open 720ms 70ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-text {
  margin: clamp(14px, 2vw, 24px) 0 0;
  color: var(--quiet);
  font-size: clamp(20px, 2.8vw, 34px);
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: 0;
  animation: copy-open 620ms 190ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: clamp(18px, 2.8vw, 34px);
  padding: 0 2px;
  border-radius: 0;
  color: var(--link);
  font-size: clamp(17px, 1.55vw, 22px);
  font-weight: 500;
  letter-spacing: 0;
  transition:
    color 180ms ease,
    transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: link-open 560ms 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.primary-button::after {
  content: "";
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.38em;
  border-top: 0.105em solid currentColor;
  border-right: 0.105em solid currentColor;
  transform: rotate(45deg) translateY(-0.03em);
  transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.primary-button:hover {
  color: #004f9e;
  transform: translateY(-4px) scale(1.045);
}

.primary-button:hover::after {
  transform: rotate(45deg) translate(0.14em, -0.17em);
}

.primary-button:active {
  transform: translateY(0) scale(0.97);
}

.primary-button:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.28);
  outline-offset: 7px;
}

.manga-anchor {
  position: absolute;
  left: clamp(-108px, -6vw, -42px);
  bottom: clamp(-114px, -8vw, -58px);
  z-index: 1;
  width: clamp(250px, 33vw, 520px);
  opacity: 0;
  filter: drop-shadow(0 22px 24px rgba(29, 29, 31, 0.1));
  transform:
    translate3d(calc(var(--mx) * 30px), calc(var(--my) * 18px), 0)
    rotate(calc(-1.25deg + (var(--mx) * 2deg)))
    scale(calc(1 + ((1 - var(--press)) * 0.026)));
  transform-origin: 34% 82%;
  transition:
    transform 620ms cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 260ms ease;
  animation: character-in 760ms 230ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.manga-frame {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 74ms linear;
}

.manga-frame-closed {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  opacity: 0;
}

.hero.is-blinking .manga-frame-closed,
.hero.is-pressing .manga-frame-closed {
  opacity: 1;
}

.hero.is-pressing {
  --press: 0;
}

.hero.is-pressing::before {
  opacity: 0.66;
}

.hero.is-pressing .manga-anchor {
  filter: drop-shadow(0 28px 30px rgba(29, 29, 31, 0.14));
}

@keyframes title-open {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes copy-open {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes link-open {
  0% {
    opacity: 0;
    transform: translateY(7px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes line-open {
  0% {
    opacity: 0;
    transform:
      translate3d(calc(var(--mx) * -16px), calc(var(--my) * 5px), 0)
      scaleX(0);
  }
  100% {
    opacity: 0.48;
    transform:
      translate3d(calc(var(--mx) * -16px), calc(var(--my) * 5px), 0)
      scaleX(calc(0.96 + (var(--press) * 0.04)));
  }
}

@keyframes character-in {
  0% {
    opacity: 0;
    translate: -18px 18px;
    rotate: -1.6deg;
    scale: 0.975;
  }
  100% {
    opacity: 1;
    translate: 0 0;
    rotate: 0deg;
    scale: 1;
  }
}

@media (max-width: 700px) {
  body {
    overflow: hidden;
  }

  .hero {
    align-items: start;
    padding-top: 24svh;
  }

  .hero::before {
    inset-inline: -10vw;
    bottom: clamp(132px, 22vh, 190px);
  }

  .hero-copy {
    margin-top: 0;
  }

  h1 {
    font-size: clamp(58px, 18vw, 104px);
  }

  .manga-anchor {
    left: clamp(-96px, -20vw, -54px);
    bottom: clamp(-92px, -13vw, -42px);
    width: clamp(245px, 72vw, 400px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .hero-copy,
  .hero::before,
  .manga-anchor {
    transform: none;
  }
}
