/* Opening scene, inspired by the LP before the redesign. */
html.intro-pending,
html.intro-pending body {
  overflow: hidden;
}

html.intro-pending .skip-link { visibility: hidden; }

.intro {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  place-items: center;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 46%, #fff9ca 0 19%, transparent 44%),
    repeating-conic-gradient(from -8deg at 50% 46%, transparent 0 15deg, #fff3a4 15deg 20deg, transparent 20deg 30deg),
    var(--yellow);
  transition: opacity .45s ease, transform .45s ease;
}

html.intro-pending .intro { display: grid; }
.intro[hidden] { display: none !important; }
.intro.is-ending { opacity: 0; transform: scale(1.04); pointer-events: none; }

.intro::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 3px solid var(--ink);
  border-radius: 30px;
  pointer-events: none;
}

.intro-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100% - 48px, 650px);
  padding: 24px 0 46px;
  text-align: center;
}

.intro-eyebrow {
  padding: 7px 17px;
  border: 2px solid var(--ink);
  border-radius: 100px;
  background: white;
  font: 900 12px/1.2 "Nunito", sans-serif;
  letter-spacing: .13em;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-3deg);
}

.intro-figure {
  position: relative;
  width: clamp(245px, 31vw, 340px);
  aspect-ratio: 1;
  margin-top: 12px;
}

.intro-orbit {
  position: absolute;
  inset: 22px;
  border: 5px dashed var(--blue);
  border-radius: 50%;
  background: #fff5a9;
  box-shadow: 0 0 0 11px #ffffff6b, 0 14px 0 #dabb36;
  animation: intro-orbit-in 1.4s cubic-bezier(.2,.8,.2,1) both;
}

.intro-orbit::before,
.intro-orbit::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 3px dashed #8bd6e6;
  border-radius: 50%;
}

.intro-orbit::after {
  inset: 54px;
  border: 0;
  background: #fffdf0;
}

.intro-tiles {
  --radius: -148px;
  position: absolute;
  inset: 0;
  animation: intro-tiles-turn 2.2s ease-out both;
}

.intro-tiles i {
  position: absolute;
  top: calc(50% - 15px);
  left: calc(50% - 15px);
  width: 30px;
  height: 30px;
  border: 3px solid white;
  border-radius: 9px;
  background: var(--tone);
  box-shadow: 3px 4px 0 var(--ink);
  transform: rotate(var(--angle)) translateY(var(--radius)) rotate(var(--back));
  animation: intro-tile-pop .55s cubic-bezier(.2,1.6,.3,1) both;
}

.intro-tiles i:nth-child(1) { animation-delay: .08s; }
.intro-tiles i:nth-child(2) { animation-delay: .12s; }
.intro-tiles i:nth-child(3) { animation-delay: .16s; }
.intro-tiles i:nth-child(4) { animation-delay: .20s; }
.intro-tiles i:nth-child(5) { animation-delay: .24s; }
.intro-tiles i:nth-child(6) { animation-delay: .28s; }
.intro-tiles i:nth-child(7) { animation-delay: .32s; }
.intro-tiles i:nth-child(8) { animation-delay: .36s; }
.intro-tiles i:nth-child(9) { animation-delay: .40s; }
.intro-tiles i:nth-child(10) { animation-delay: .44s; }
.intro-tiles i:nth-child(11) { animation-delay: .48s; }
.intro-tiles i:nth-child(12) { animation-delay: .52s; }

.intro-mascot {
  position: absolute;
  bottom: 11px;
  left: 50%;
  z-index: 2;
  width: 174px;
  height: auto;
  filter: drop-shadow(5px 9px 0 #d7ad39);
  animation: intro-mascot-arrive 1s .65s cubic-bezier(.16,1.35,.34,1) both;
}

.intro-name {
  margin-top: 4px;
  font-size: clamp(45px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.09em;
  filter: drop-shadow(4px 4px 0 white);
  animation: intro-copy-in .55s 1.05s ease-out both;
}

.intro-tagline {
  margin-top: 4px;
  font-size: clamp(15px, 2vw, 22px);
  font-weight: 900;
  animation: intro-copy-in .55s 1.2s ease-out both;
}

.intro-progress {
  width: min(230px, 55vw);
  height: 12px;
  margin-top: 25px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 30px;
  background: white;
}

.intro-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left;
  background: linear-gradient(90deg, var(--green), var(--sky));
  animation: intro-progress-fill 2.55s linear both;
}

.intro-loading {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.intro-loading span { display: inline-block; animation: intro-dots .9s steps(3) infinite; }

.intro-skip {
  position: absolute;
  right: max(40px, 4vw);
  bottom: max(40px, 5vh);
  padding: 9px 16px;
  border: 2px solid var(--ink);
  border-radius: 100px;
  color: var(--ink);
  background: white;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}

.intro-skip:hover { transform: translate(3px, 3px); box-shadow: none; }
.intro-skip:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }

@keyframes intro-orbit-in {
  from { opacity: 0; transform: rotate(-100deg) scale(.45); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

@keyframes intro-tiles-turn {
  from { transform: rotate(-90deg); }
  to { transform: rotate(0); }
}

@keyframes intro-tile-pop {
  from { opacity: 0; transform: rotate(var(--angle)) translateY(-55px) rotate(var(--back)) scale(.1); }
  to { opacity: 1; transform: rotate(var(--angle)) translateY(var(--radius)) rotate(var(--back)) scale(1); }
}

@keyframes intro-mascot-arrive {
  from { opacity: 0; transform: translate(-50%, 90px) scale(.6); }
  70% { opacity: 1; transform: translate(-50%, -12px) scale(1.08); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes intro-copy-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes intro-progress-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes intro-dots {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@media (max-width: 600px) {
  .intro::before { inset: 10px; border-radius: 22px; }
  .intro-stage { padding-bottom: 55px; }
  .intro-figure { width: 260px; }
  .intro-tiles { --radius: -113px; }
  .intro-tiles i { top: calc(50% - 13px); left: calc(50% - 13px); width: 26px; height: 26px; }
  .intro-mascot { width: 142px; }
  .intro-skip { right: 29px; bottom: 27px; }
}

@media (max-height: 620px) {
  .intro-stage { transform: scale(.78); padding: 0; }
  .intro-skip { bottom: 20px; }
}
