/* Opening sequence: headline with rotating verb, scroll-driven globe, and the tiny USC campus. */

.journey {
  position: relative;
  height: 140vh;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

#globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  padding: clamp(108px,17vh,170px) var(--gutter) 0;
  text-align: center;
  will-change: transform;
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(42px,7.6vw,104px);
  line-height: 1.02;
  letter-spacing: -.025em;
  margin: 22px 0 0;
  text-wrap: balance;
}

h1 .l2 {
  display: block;
}

.slot {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  text-align: left;
  vertical-align: baseline;
  transition: width .7s cubic-bezier(.2,.75,.2,1);
}

.word {
  display: inline-block;
  font-style: italic;
  color: var(--accent);
  padding-right: .06em;
}

.word.leaving {
  position: absolute;
  left: 0;
  top: 0;
}

.ch {
  display: inline-block;
  transition: transform .7s cubic-bezier(.2,.75,.2,1),opacity .5s ease,filter .5s ease;
  transition-delay: calc(var(--i) * 24ms);
}

.entering .ch {
  transform: translateY(.42em) rotate(4deg);
  opacity: 0;
  filter: blur(10px);
}

.leaving .ch {
  transform: translateY(-.38em) rotate(-3deg);
  opacity: 0;
  filter: blur(10px);
  transition-duration: .45s,.35s,.35s;
}

.sub {
  max-width: 34em;
  margin: 22px auto 0;
  color: var(--fg-muted);
  font-size: clamp(16px,1.6vw,19px);
  text-wrap: balance;
}

.ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hint {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom,0px) + 22px);
  transform: translateX(-50%);
  z-index: 2;
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: color-mix(in srgb,var(--bg) 80%,transparent);
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: opacity .3s ease;
}

.hint i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  animation: bob 1.6s ease-in-out infinite;
}

.campus {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  pointer-events: none;
  width: clamp(200px,24vw,300px);
}

.campus svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: var(--campus-dim);
}

.campus .b {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0);
  opacity: 0;
  transition: transform .55s cubic-bezier(.34,1.56,.5,1),opacity .2s ease;
  transition-delay: var(--d,0s);
}

.campus .base {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transform: scale(.4);
  opacity: 0;
  transition: transform .55s cubic-bezier(.34,1.56,.5,1),opacity .25s ease;
}

.campus.on .b,
.campus.on .base {
  transform: none;
  opacity: 1;
}

.tag {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%,6px);
  opacity: 0;
  transition: opacity .4s ease .9s,transform .4s ease .9s;
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--bg-raised);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.campus.on .tag {
  opacity: 1;
  transform: translate(-50%,12px);
}

.campus.off .b,
.campus.off .base,
.campus.off .tag {
  transition-delay: 0s!important;
  transition-duration: .2s;
}

.flag {
  transform-box: fill-box;
  transform-origin: 0% 50%;
  animation: wave 1.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .ch,
  .slot,
  .campus .b,
  .campus .base,
  .tag {
    transition: none!important;
  }

  .hint i,
  .flag {
    animation: none;
  }
}

@keyframes bob {
  50% {
    transform: rotate(45deg) translate(2px,2px);
  }
}

@keyframes wave {
  50% {
    transform: skewY(-8deg) scaleX(.9);
  }
}

/* Compact next-event announcement, kept in sync with the events feed. */
.hero-next {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 650px;
  margin: 20px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb,var(--bg-raised) 88%,transparent);
  text-align: left;
}

.hero-next-tag {
  flex: none;
  color: var(--accent-ink);
  font: 500 10px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.hero-next-info {
  flex: 1;
  min-width: 0;
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.4;
}

.hero-next-info b {
  display: block;
  color: var(--fg);
  font-weight: 500;
  font-size: 14px;
}

.hero-next-meta {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.hero-next-link {
  flex: none;
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.hero-next-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width:560px) {
  .hero-next {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 5px 12px;
    padding: 11px 13px;
  }

  .hero-next-tag {
    grid-column: 1;
  }

  .hero-next-info {
    grid-column: 1;
  }

  .hero-next-link {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }
}
