:root {
  --ink: #071b2d;
  --midnight: #051625;
  --deep-night: #020b13;
  --pitch-green: #063a34;
  --cricket-green: #0d5147;
  --teal: #008c8c;
  --gold: #d7a63b;
  --rim-gold: #e7c56b;
  --paper: #fcfbf7;
  --warm-surface: #fefcf8;
  --surface: #ffffff;
  --muted-text: #66728a;
  --border: #d8dee8;
  --ball-red: #a92722;
  --page-progress: 0;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--deep-night);
  color: var(--surface);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
  background: var(--paper);
}

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

main {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 52% 42%, rgba(231, 197, 107, 0.24), transparent 23rem),
    radial-gradient(circle at 50% 120%, rgba(0, 140, 140, 0.18), transparent 28rem),
    linear-gradient(110deg, rgba(2, 11, 19, 0.94) 0%, rgba(5, 22, 37, 0.82) 46%, rgba(6, 58, 52, 0.96) 100%),
    var(--pitch-green);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  z-index: -2;
  opacity: 0.18;
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(252, 251, 247, 0.28) 7.2% 7.6%, transparent 7.8% 14%),
    linear-gradient(0deg, rgba(231, 197, 107, 0.12), transparent 62%);
  background-size: 132px 100%, 100% 100%;
  transform: skewX(-7deg) scaleX(1.15);
}

.hero::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 11, 19, 0.88), transparent 46%, rgba(2, 11, 19, 0.44)),
    linear-gradient(180deg, rgba(2, 11, 19, 0.18), rgba(2, 11, 19, 0.78));
}

.pitch-lines {
  position: absolute;
  inset: 10% 12% auto auto;
  width: 26rem;
  max-width: 70vw;
  height: 68vh;
  max-height: 42rem;
  border-radius: 8px;
  opacity: 0.22;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(252, 251, 247, 0.26) 0 3px,
      transparent 3px 42px
    ),
    linear-gradient(180deg, rgba(13, 81, 71, 0.8), rgba(5, 22, 37, 0.6));
  transform: perspective(900px) rotateX(3deg) rotateZ(1deg);
}

.hero__center {
  position: relative;
  width: min(34rem, calc(100vw - 2rem));
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 2rem 1rem;
}

.hero__center::before {
  content: "";
  position: absolute;
  inset: 8% 10%;
  z-index: -1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(231, 197, 107, 0.2), transparent 68%);
  filter: blur(18px);
}

.hero__crest {
  width: min(19rem, 72vw);
  height: auto;
  filter: drop-shadow(0 28px 70px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 34px rgba(231, 197, 107, 0.32));
}

.hero h1 {
  margin: 1.15rem 0 0;
  color: var(--surface);
  font-size: 3.5rem;
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 900;
  text-wrap: balance;
}

.hero p {
  max-width: 31rem;
  margin: 1rem 0 0;
  color: rgba(252, 251, 247, 0.82);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero__footer {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  width: min(48rem, calc(100vw - 2rem));
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(252, 251, 247, 0.13);
  border-radius: 999px;
  color: rgba(252, 251, 247, 0.76);
  background: rgba(7, 27, 45, 0.42);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.hero__footer span {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.screen-stack {
  position: relative;
  background:
    linear-gradient(180deg, var(--deep-night) 0%, var(--midnight) 38%, var(--paper) 38%),
    var(--paper);
}

.screen-stack::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: calc(var(--page-progress) * 100%);
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--rim-gold), var(--teal));
  transform-origin: left center;
  pointer-events: none;
}

.screen-stack__intro {
  min-height: 42vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.65rem;
  padding: 7rem 1rem 4rem;
  text-align: center;
  color: var(--surface);
}

.eyebrow {
  margin: 0;
  color: var(--rim-gold);
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.screen-stack__intro h2 {
  max-width: 48rem;
  margin: 0;
  color: var(--surface);
  font-size: 3rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  text-wrap: balance;
}

.screen-panel {
  --progress: 0;
  --settle-progress: 0;
  --image-progress: 0;
  --lift: 0px;
  position: relative;
  min-height: 275vh;
  background:
    radial-gradient(circle at 78% 12%, rgba(231, 197, 107, 0.14), transparent 19rem),
    linear-gradient(180deg, var(--midnight), var(--deep-night));
}

.screen-panel--matches {
  background:
    radial-gradient(circle at 22% 12%, rgba(0, 140, 140, 0.16), transparent 18rem),
    linear-gradient(180deg, var(--deep-night), var(--pitch-green));
}

.screen-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 42rem;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(1rem, 2vh, 1.5rem);
  padding: 1rem;
}

.screen-stage__chrome {
  z-index: 2;
  width: min(72rem, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(252, 251, 247, 0.12);
  border-radius: 8px;
  color: var(--surface);
  background: rgba(7, 27, 45, 0.64);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.screen-stage__chrome h3 {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.screen-stage__chrome > span {
  flex: 0 0 auto;
  padding: 0.5rem 0.68rem;
  border-radius: 999px;
  color: var(--deep-night);
  background: var(--rim-gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.screen-frame {
  align-self: stretch;
  justify-self: center;
  width: min(76rem, calc(100vw - 2rem));
  min-height: 0;
  height: 100%;
  margin: 0;
  border: 1px solid rgba(252, 251, 247, 0.14);
  border-radius: 8px;
  background: rgba(252, 251, 247, 0.04);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
  overflow: hidden;
  transform: translateY(calc((1 - var(--settle-progress)) * 12px));
}

.screen-image {
  width: 100%;
  max-width: none;
  height: auto;
  transform: translate3d(0, calc(var(--lift) * -1), 0);
  transform-origin: top center;
  will-change: transform;
}

.magnet-rail {
  position: absolute;
  right: 1.25rem;
  top: 6rem;
  bottom: 1.25rem;
  width: 3px;
  border-radius: 999px;
  background: rgba(252, 251, 247, 0.14);
}

.magnet-rail span {
  display: block;
  width: 100%;
  height: calc(var(--image-progress) * 100%);
  border-radius: inherit;
  background: linear-gradient(180deg, var(--rim-gold), var(--teal));
}

.site-footer {
  min-height: 28vh;
  display: grid;
  place-items: center;
  gap: 0.5rem;
  padding: 4rem 1rem;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
}

.site-footer img {
  filter: drop-shadow(0 14px 24px rgba(7, 27, 45, 0.18));
}

.site-footer p {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.site-footer span {
  color: var(--muted-text);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .hero h1 {
    font-size: 2.6rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero__footer {
    align-items: center;
    flex-direction: column;
    justify-content: center;
    width: min(22rem, calc(100vw - 1rem));
    border-radius: 8px;
    text-align: center;
  }

  .screen-stack__intro {
    min-height: 34vh;
    padding-top: 4rem;
  }

  .screen-stack__intro h2 {
    font-size: 2.15rem;
  }

  .screen-panel {
    min-height: 220vh;
  }

  .screen-stage {
    min-height: 36rem;
    padding: 0.75rem;
  }

  .screen-stage__chrome {
    align-items: flex-start;
    flex-direction: column;
  }

  .screen-frame {
    width: min(44rem, 168vw);
  }

  .magnet-rail {
    display: none;
  }
}

@media (max-width: 420px) {
  .hero__crest {
    width: min(17rem, 76vw);
  }

  .hero h1 {
    font-size: 2.15rem;
  }

  .pitch-lines {
    right: -7rem;
  }

  .screen-stage__chrome h3 {
    font-size: 1rem;
  }
}

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

  .screen-image,
  .screen-frame {
    transition: none;
  }
}
