.hero {
  --hero-stage: max(42rem, 100svh);
  --hero-progress: 0;
  position: relative;
  display: block;
  height: calc(var(--hero-stage) + 128svh);
  min-height: 0;
  isolation: isolate;
  background: #fbfbfb;
}

.hero-viewport {
  position: sticky;
  top: 0;
  height: var(--hero-stage);
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 20%, #33201975 0%, #190f1060 33%, transparent 66%),
    radial-gradient(ellipse at 87% 85%, #101e365c, transparent 58%), #080809;
}

.hero-art, .hero-art canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art {
  z-index: 0;
  opacity: clamp(0, calc(1.21 - var(--hero-progress) * 1.34), 1);
  transform: translate(calc(var(--hero-progress) * 6%), calc(var(--hero-progress) * -9%)) scale(calc(1 + var(--hero-progress) * .055));
}

.hero-art::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #0707094f, transparent 37%),
    radial-gradient(ellipse at 26% 71%, #090a1270, transparent 46%);
  content: '';
}

.hero-copy {
  position: absolute;
  z-index: 1;
  top: 41%;
  left: clamp(var(--gutter), 18vw, 20rem);
  color: #fff;
  opacity: max(0, calc(1 - var(--hero-progress) * 2.15));
  transform: translateY(calc(var(--hero-progress) * -6rem));
}

.hero-copy:has(.hero-action:focus-visible) { opacity: 1; transform: none; }
.hero.is-copy-past .hero-copy:not(:focus-within) { pointer-events: none; }
.hero-viewport:has(.hero-action:focus-visible) .hero-dissolve { opacity: 0; }

.hero-eyebrow {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin: 0 0 .95rem;
  color: #e4e6ea;
  font: 500 .75rem/1.5 var(--typeface);
  letter-spacing: .1em;
}

.hero-eyebrow span { opacity: .58; }

.hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(3.3rem, 6.1vw, 6.75rem);
  font-weight: var(--title-weight);
  line-height: 1.13;
  letter-spacing: var(--title-tracking);
  text-shadow: 0 2px .65em #08090d52, 0 1px .18em #04060c5e;
}

.hero h1 span { display: block; }
.hero h1 span + span { color: #e4e9f2; }

.hero-deck {
  max-width: 26em;
  margin: 1.35rem 0 1.85rem;
  color: #d0d0d2;
  font-size: clamp(.875rem, 1.15vw, 1.0625rem);
  line-height: 1.85;
  text-wrap: pretty;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.hero-action {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .6rem 1.15rem;
  border: 1px solid #ffffff65;
  border-radius: 2rem;
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .22s, border-color .22s, color .22s;
}

.hero-action span { font-size: .9rem; transition: transform .22s; }
.hero-action:hover { background: #ffffff20; border-color: #ffffffb8; }
.hero-action:hover span { transform: translate(2px, -2px); }
.hero-action-primary:hover span { transform: translate(2px, 2px); }
.hero-action-primary { border-color: #fff; background: #fff; color: #111217; }
.hero-action-primary:hover { background: #e6ebff; box-shadow: 0 0 1.2rem #a7c7ff40; }

.hero-dissolve {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-dissolve::before, .hero-dissolve::after {
  position: absolute;
  content: '';
  inset: 0;
}

.hero-dissolve::before {
  inset: 0 -12% -75%;
  background: radial-gradient(ellipse 53% 14% at 66% 55%, #b4dfffbb, #7db1f91e 59%, transparent 100%),
    linear-gradient(175deg, transparent 13%, #110c3838 27%, #1d1a8dc2 42%, #2853da 51%, #79b7ff 60%, #d7edff 70%, #fbfbfb 82%);
  transform: translateY(calc(62% - var(--hero-progress) * 116%));
}

.hero-dissolve::after {
  background: #fbfbfb;
  opacity: clamp(0, calc((var(--hero-progress) - .79) * 4.77), 1);
}

.ct-opening {
  position: fixed;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  padding-inline: max(1.25rem, 7vw);
  background: radial-gradient(ellipse at 62% 51%, #0e1023 0%, #070811 33%, #060609 68%);
  color: #f8f8fb;
  pointer-events: none;
  animation: ct-opening-out 1.35s both;
}

.ct-opening-inner {
  display: grid;
  grid-template-columns: minmax(6rem, .8fr) minmax(16rem, 3fr) minmax(6rem, .8fr);
  align-items: center;
  gap: clamp(.75rem, 4vw, 5rem);
  width: min(100%, 72rem);
}

.ct-opening-log img { display: block; width: 4.5rem; height: auto; margin-bottom: 1rem; }
.ct-opening-steps { display: grid; gap: .38rem; }
.ct-opening-steps span, .ct-opening-count > span:first-child {
  color: #8f94a9;
  font: 500 .6875rem/1.45 var(--typeface);
  letter-spacing: .045em;
  white-space: nowrap;
}
.ct-opening-steps .is-active { color: #fff; }
.ct-opening-steps .is-active::before { background: #fb724d; }
.ct-opening-steps span::before {
  display: inline-block;
  width: .32rem;
  height: .32rem;
  margin-right: .4rem;
  border-radius: 50%;
  background: #404663;
  content: '';
  vertical-align: .06rem;
}

.ct-opening-map { display: block; width: 100%; overflow: visible; }
.ct-opening-map path[fill^='url'] { opacity: .48; }
.ct-opening-flight { stroke-dasharray: 1; animation: ct-opening-flight .69s cubic-bezier(.26,.64,.38,1) both; }
.ct-opening-beacon {
  transform-box: fill-box;
  transform-origin: center;
  animation: ct-opening-beacon .68s .28s ease-out both;
}
.ct-opening-count { display: grid; justify-items: end; gap: .45rem; }
.ct-opening-count b { font: 650 clamp(1.75rem, 4vw, 3.7rem)/.9 var(--mono); letter-spacing: -.07em; }
.ct-opening-count small { margin-left: .25rem; color: #8f9ac3; font: 650 .73rem var(--mono); }
.ct-opening-count i { width: 100%; height: 1px; background: #30354c; }
.ct-opening-count i::before {
  display: block;
  width: 100%;
  height: 100%;
  background: #809dff;
  transform: scaleX(var(--opening-progress, 0));
  transform-origin: left;
  content: '';
}

@keyframes ct-opening-flight {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes ct-opening-beacon {
  0% { opacity: 0; transform: scale(.6); }
  30% { opacity: .85; }
  100% { opacity: 0; transform: scale(4.1); }
}
@keyframes ct-opening-out {
  0%, 44% { opacity: 1; }
  85%, 100% { opacity: 0; }
}

.ct-entering :is(.mast-rail, .header-inner .brand, .header-inner .header-link, .header-inner .menu-toggle, .site-nav a, .hero-eyebrow, .hero h1 span, .hero-deck, .hero-actions) {
  animation: ct-hero-enter .51s cubic-bezier(.19,.75,.33,1) both;
  animation-delay: var(--enter-delay, .6s);
}
.ct-entering .site-nav a:nth-child(2) { --enter-delay: .65s; }
.ct-entering .site-nav a:nth-child(3) { --enter-delay: .70s; }
.ct-entering .hero-eyebrow { --enter-delay: .62s; }
.ct-entering .hero h1 span { --enter-delay: .69s; }
.ct-entering .hero h1 span + span { --enter-delay: .74s; }
.ct-entering .hero-deck { --enter-delay: .80s; }
.ct-entering .hero-actions { --enter-delay: .84s; }

@keyframes ct-hero-enter {
  from { opacity: 0; translate: 0 .85rem; }
  to { opacity: 1; translate: 0 0; }
}

@media (min-width: 761px) and (max-height: 790px) {
  .hero-copy { top: 39%; }
  .hero-deck { margin-block: 1.2rem 1.55rem; }
  .hero h1 { font-size: clamp(3.3rem, min(6.1vw, 11.4svh), 6.75rem); }
}

@media (min-width: 761px) and (max-height: 570px) {
  .hero { --hero-stage: max(21rem, 100svh); }
  .hero-copy { top: auto; bottom: 1.5rem; }
  .hero h1 { font-size: clamp(2.3rem, 9.5svh, 3.9rem); }
  .hero-deck { margin-block: .8rem 1rem; }
}

@media (max-width: 760px) {
  .hero { --hero-stage: max(40rem, 100svh); height: calc(var(--hero-stage) + 68svh); }
  .hero-viewport { background: radial-gradient(ellipse at 90% 23%, #241611 0%, #090807 55%, #060605 78%); }
  .hero-art::after { background: linear-gradient(180deg, transparent 50%, #07080d8a 89%); }
  .hero-copy { top: auto; right: var(--gutter); bottom: clamp(2.25rem, 7.5svh, 5rem); left: var(--gutter); }
  .hero-eyebrow { margin-bottom: .55rem; font-size: .67rem; }
  .hero h1 { font-size: clamp(2.6rem, 11.6vw, 4.75rem); }
  .hero-deck { max-width: 22em; margin-block: .9rem 1.25rem; font-size: .875rem; }
  .hero-action { padding-inline: .9rem; }
  .ct-opening-inner { grid-template-columns: 1fr 1fr; gap: 1.1rem; max-width: 30rem; }
  .ct-opening-map { grid-column: 1 / -1; grid-row: 1; }
  .ct-opening-log img { width: 3.25rem; margin-bottom: .65rem; }
  .ct-opening-count { align-self: end; width: min(100%, 6rem); justify-self: end; }
}

@media (max-width: 760px) and (max-height: 640px) {
  .hero { --hero-stage: max(21rem, 100svh); }
  .hero-copy { bottom: 1.5rem; }
  .hero h1 { font-size: min(clamp(2.6rem, 11.6vw, 4.75rem), 9.5svh); }
}

@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero-viewport { position: relative; }
  .hero-art, .hero-copy { opacity: 1; transform: none; }
  .hero-dissolve { display: none; }
  .ct-opening { display: none; }
  .hero-action, .hero-action span { transition: none; }
}
