.engine-intro-overlay[hidden] {
  display: none !important;
}

.engine-intro-frame-lines {
  position: absolute;
  z-index: 1;
  inset: 14% 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.engine-intro-overlay[data-phase="igniting"] .engine-intro-frame-lines,
.engine-intro-overlay[data-phase="reveal"] .engine-intro-frame-lines {
  opacity: 1;
}

.engine-intro-frame-lines::before,
.engine-intro-frame-lines::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  content: "";
  background: linear-gradient(
    180deg,
    transparent,
    rgba(73, 185, 255, 0.58) 24%,
    rgba(111, 178, 255, 0.52) 76%,
    transparent
  );
  box-shadow:
    0 0 12px rgba(67, 173, 255, 0.25),
    0 0 28px rgba(54, 130, 220, 0.16);
}

.engine-intro-frame-lines::before {
  left: clamp(24px, 18vw, 300px);
}

.engine-intro-frame-lines::after {
  right: clamp(24px, 18vw, 300px);
}

.engine-intro-overlay {
  --intro-blue: #45baff;
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 34%, #111c2a 0%, #070d16 58%, #020306 100%);
  color: #eef4ff;
  opacity: 1;
  transition:
    opacity 900ms cubic-bezier(0.65, 0, 0.35, 1),
    visibility 900ms ease;
}

.engine-intro-overlay::before,
.engine-intro-overlay::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
}

.engine-intro-overlay::before {
  opacity: 0;
  background:
    linear-gradient(
      135deg,
      transparent 0 34%,
      rgba(132, 151, 174, 0.06) 34.1% 44%,
      transparent 44.1%
    ),
    linear-gradient(
      315deg,
      transparent 0 58%,
      rgba(76, 182, 185, 0.055) 58.1% 68%,
      transparent 68.1%
    ),
    radial-gradient(ellipse at 50% 78%, rgba(21, 86, 145, 0.21), transparent 34rem),
    radial-gradient(ellipse at 73% 65%, rgba(16, 83, 147, 0.17), transparent 32rem),
    radial-gradient(ellipse at center, transparent 34%, rgba(2, 4, 10, 0.82) 100%);
  transition: opacity 900ms ease;
}

.engine-intro-overlay[data-phase="igniting"]::before,
.engine-intro-overlay[data-phase="reveal"]::before {
  opacity: 0.85;
}

.engine-intro-overlay::after {
  background:
    linear-gradient(
      90deg,
      rgba(3, 5, 11, 0.72),
      transparent 27%,
      transparent 73%,
      rgba(3, 5, 11, 0.72)
    ),
    linear-gradient(
      0deg,
      rgba(3, 5, 11, 0.55),
      transparent 26%,
      transparent 74%,
      rgba(3, 5, 11, 0.42)
    );
}

.engine-intro-scene {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.engine-intro-landing-impact {
  position: absolute;
  z-index: 2;
  top: 58%;
  left: 50%;
  width: min(52vw, 620px);
  height: 52px;
  border: 2px solid rgba(208, 242, 255, 0.92);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(84, 188, 255, 0.5), transparent 72%);
  box-shadow:
    0 0 32px rgba(80, 184, 255, 0.78),
    inset 0 0 18px rgba(172, 227, 255, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.35, 0.3);
}

.engine-intro-overlay[data-landed="true"] .engine-intro-landing-impact {
  animation: engine-landing-wave 900ms ease-out;
}

.engine-intro-speedlines {
  position: absolute;
  z-index: 1;
  inset: 20% 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 450ms ease;
}

.engine-intro-speedlines i {
  position: absolute;
  left: -40%;
  width: 28vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(132, 206, 255, 0.6), transparent);
  filter: blur(1px);
  transform: skewY(-12deg);
}

.engine-intro-speedlines i:nth-child(1) {
  top: 24%;
}

.engine-intro-speedlines i:nth-child(2) {
  top: 37%;
  width: 20vw;
}

.engine-intro-speedlines i:nth-child(3) {
  top: 51%;
  width: 34vw;
}

.engine-intro-speedlines i:nth-child(4) {
  top: 66%;
  width: 24vw;
}

.engine-intro-speedlines i:nth-child(5) {
  top: 78%;
  width: 18vw;
}

.engine-intro-overlay.is-riding .engine-intro-speedlines {
  opacity: 1;
}

.engine-intro-overlay.is-riding .engine-intro-speedlines i {
  animation: engine-speedline 850ms linear infinite;
}

.engine-intro-overlay.is-riding .engine-intro-speedlines i:nth-child(2n) {
  animation-delay: -420ms;
}

.engine-intro-overlay.is-exiting {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.engine-intro-controls {
  position: absolute;
  z-index: 4;
  inset: max(22px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) auto
    max(24px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition:
    opacity 350ms ease,
    visibility 350ms ease;
}

.engine-intro-overlay[data-phase="reveal"] .engine-intro-controls {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.engine-intro-sound,
.engine-intro-skip {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(164, 186, 233, 0.2);
  border-radius: 999px;
  background: rgba(15, 21, 39, 0.8);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07);
  color: #d3ddf2;
  font:
    650 12px/1 "Segoe UI",
    Arial,
    sans-serif;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.engine-intro-sound:hover,
.engine-intro-skip:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 181, 255, 0.58);
  background: rgba(29, 38, 67, 0.93);
  color: #fff;
}

.engine-intro-sound[aria-pressed="false"] {
  color: #9caac2;
}

.engine-intro-sound svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.engine-intro-sound:focus-visible,
.engine-intro-skip:focus-visible,
.engine-ignition-button:focus-visible {
  outline: 2px solid #9ed5ff;
  outline-offset: 4px;
}

.engine-intro-skip {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: #a7b3ca;
}

.engine-intro-center {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(100% - 36px, 620px);
  justify-items: center;
  padding: 44px 20px;
  text-align: center;
}

.engine-ignition-wrap {
  position: relative;
  display: grid;
  width: 174px;
  height: 174px;
  place-items: center;
  margin-bottom: 23px;
  perspective: 700px;
}

.engine-ignition-halo {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(121, 160, 255, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(54, 122, 194, 0.2), transparent 62%),
    conic-gradient(
      from 25deg,
      transparent,
      rgba(66, 187, 255, 0.8),
      transparent 34%,
      rgba(116, 186, 255, 0.78),
      transparent 80%
    );
  box-shadow:
    0 0 34px rgba(76, 148, 255, 0.24),
    inset 0 0 26px rgba(72, 145, 224, 0.18);
  opacity: 0.18;
  transform: rotateX(68deg) rotateZ(-20deg);
  animation: engine-halo-turn 14s linear infinite;
}

.engine-ignition-halo::before,
.engine-ignition-halo::after {
  position: absolute;
  border: 1px solid rgba(137, 165, 255, 0.25);
  border-radius: 50%;
  content: "";
}

.engine-ignition-halo::before {
  inset: 12px;
  transform: rotate(38deg);
}

.engine-ignition-halo::after {
  inset: -9px;
  border-color: rgba(84, 191, 255, 0.16);
  transform: rotate(-27deg);
}

.engine-ignition-button {
  position: relative;
  z-index: 1;
  display: grid;
  width: 106px;
  height: 106px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(164, 188, 255, 0.56);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 22%, rgba(109, 142, 255, 0.33), transparent 48%),
    linear-gradient(145deg, #1a2340, #0b1021 70%);
  box-shadow:
    0 0 0 7px rgba(103, 155, 210, 0.06),
    0 0 28px rgba(68, 151, 255, 0.45),
    0 0 72px rgba(48, 116, 194, 0.26),
    inset 0 1px rgba(255, 255, 255, 0.2),
    inset 0 -12px 24px rgba(0, 0, 0, 0.28);
  color: #fff;
  cursor: pointer;
  transform: translateZ(0);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease,
    opacity 650ms ease;
}

.engine-ignition-button:hover {
  transform: scale(1.055);
  border-color: #b6d7ff;
  box-shadow:
    0 0 0 9px rgba(103, 155, 210, 0.09),
    0 0 38px rgba(68, 176, 255, 0.58),
    0 0 88px rgba(48, 116, 194, 0.35),
    inset 0 1px rgba(255, 255, 255, 0.22);
}

.engine-ignition-button svg {
  width: 27px;
  height: 27px;
  overflow: visible;
  stroke: #b8ddff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(86, 179, 255, 0.88));
}

.engine-ignition-button span {
  font:
    700 9px/1.2 "Segoe UI",
    Arial,
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.engine-intro-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.engine-intro-title {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(94vw, 900px);
  margin: 0;
  color: #f4f7ff;
  font:
    800 clamp(34px, 7.5vw, 76px) / 1.02 "Segoe UI",
    Arial,
    sans-serif;
  letter-spacing: 0.025em;
  opacity: 0;
  pointer-events: none;
  text-wrap: balance;
  text-shadow:
    0 0 28px rgba(86, 185, 255, 0.58),
    0 0 78px rgba(44, 138, 232, 0.34);
  transform: translate(-50%, calc(-50% + 24px)) scale(0.94);
  transition:
    opacity 1s ease,
    transform 1.2s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.engine-intro-title > span,
.engine-intro-title > strong {
  display: block;
}

.engine-intro-title-character {
  display: inline-block;
}

.engine-intro-title > strong .engine-intro-title-character {
  color: transparent;
  background: inherit;
  background-clip: text;
  -webkit-background-clip: text;
}

.engine-intro-overlay[data-phase="reveal"] .engine-intro-title-character {
  animation: engine-intro-letter-in 480ms cubic-bezier(0.18, 0.72, 0.28, 1) both;
  animation-delay: var(--character-delay);
}

.engine-intro-title > span {
  margin-bottom: 0.04em;
  color: #f2f5f8;
  font-size: 1em;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-shadow: 0 0 20px rgba(118, 198, 255, 0.52);
}

.engine-intro-title > strong {
  color: transparent;
  background: linear-gradient(110deg, #ffffff, #d1dce8 30%, #ffffff 52%, #b5c5d6 76%, #f7fbff);
  background-clip: text;
  -webkit-background-clip: text;
  font-weight: 800;
}

.engine-intro-subtitle {
  position: absolute;
  top: calc(50% + 105px);
  left: 50%;
  display: grid;
  width: min(94vw, 900px);
  justify-items: center;
  gap: 8px;
  margin: 0;
  color: #e8f5ff;
  font:
    700 clamp(10px, 1.45vw, 15px) / 1.4 "Segoe UI",
    Arial,
    sans-serif;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 0.88),
    0 0 20px rgba(58, 158, 238, 0.28);
  transform: translate(-50%, 12px);
  transition:
    opacity 900ms ease 250ms,
    transform 900ms ease 250ms;
}

.engine-intro-name {
  color: #edf1f5;
  font-size: 0.88em;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-shadow: 0 0 16px rgba(102, 190, 255, 0.48);
}

.engine-intro-subtitle .engine-intro-stack {
  color: #d7bc82;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.engine-intro-stack i {
  padding-inline: 9px;
  color: #ead9b5;
  font-style: normal;
}

.engine-intro-overlay[data-phase="igniting"] .engine-ignition-halo {
  animation-duration: 2.2s;
  border-color: rgba(104, 194, 255, 0.72);
  box-shadow:
    0 0 54px rgba(62, 165, 255, 0.56),
    inset 0 0 34px rgba(72, 145, 224, 0.28);
}

.engine-intro-overlay[data-phase="igniting"] .engine-ignition-button {
  animation: engine-start-pulse 950ms ease-in-out infinite alternate;
}

.engine-intro-overlay[data-landed="true"] .engine-intro-scene {
  animation: engine-landing-shake 420ms ease-out;
}

.engine-intro-overlay[data-phase="igniting"] .engine-ignition-wrap,
.engine-intro-overlay[data-phase="reveal"] .engine-ignition-wrap {
  opacity: 0;
  transform: scale(0.68);
  pointer-events: none;
  transition:
    opacity 800ms ease,
    transform 900ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.engine-intro-overlay[data-phase="reveal"] .engine-intro-status {
  opacity: 0;
}

.engine-intro-overlay[data-phase="reveal"] .engine-intro-title {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.engine-intro-overlay[data-phase="reveal"] .engine-intro-subtitle {
  opacity: 1;
  transform: translate(-50%, 0);
}

.engine-intro-orbit {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(72vw, 700px);
  aspect-ratio: 1;
  border: 1px solid rgba(100, 145, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 46px rgba(75, 140, 216, 0.06),
    inset 0 0 54px rgba(68, 128, 196, 0.06);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) rotateX(68deg) rotateZ(-18deg);
  transition: opacity 700ms ease;
}

.engine-intro-orbit-two {
  width: min(51vw, 500px);
  border-color: rgba(102, 164, 225, 0.11);
  transform: translate(-50%, -50%) rotateX(68deg) rotateZ(28deg);
}

.engine-intro-overlay[data-phase="igniting"] .engine-intro-orbit,
.engine-intro-overlay[data-phase="reveal"] .engine-intro-orbit {
  opacity: 1;
}

.engine-intro-overlay[data-phase="igniting"] .engine-intro-orbit {
  animation: engine-orbit-pulse 2.6s ease-out infinite;
}

.engine-intro-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.engine-intro-overlay[data-phase="igniting"] .engine-intro-particles,
.engine-intro-overlay[data-phase="reveal"] .engine-intro-particles {
  opacity: 1;
}

.engine-intro-particles i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #8bc7ff;
  box-shadow: 0 0 13px 2px rgba(93, 162, 255, 0.64);
  opacity: 0;
}

.engine-intro-particles i:nth-child(1) {
  top: 22%;
  left: 18%;
  animation-delay: -1s;
}

.engine-intro-particles i:nth-child(2) {
  top: 77%;
  left: 23%;
  animation-delay: -4s;
}

.engine-intro-particles i:nth-child(3) {
  top: 16%;
  left: 71%;
  animation-delay: -2.4s;
}

.engine-intro-particles i:nth-child(4) {
  top: 68%;
  left: 83%;
  animation-delay: -5.3s;
}

.engine-intro-particles i:nth-child(5) {
  top: 33%;
  left: 9%;
  animation-delay: -3.2s;
}

.engine-intro-particles i:nth-child(6) {
  top: 58%;
  left: 91%;
  animation-delay: -1.8s;
}

.engine-intro-particles i:nth-child(7) {
  top: 86%;
  left: 58%;
  animation-delay: -4.7s;
}

.engine-intro-particles i:nth-child(8) {
  top: 23%;
  left: 48%;
  animation-delay: -2.8s;
}

.engine-intro-particles i:nth-child(9) {
  top: 44%;
  left: 78%;
  animation-delay: -5.8s;
}

.engine-intro-particles i:nth-child(10) {
  top: 79%;
  left: 34%;
  animation-delay: -3.7s;
}

.engine-intro-overlay[data-phase="igniting"] .engine-intro-particles i {
  animation-name: engine-particle-streak;
  animation-duration: 2.1s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

body.engine-intro-active {
  overflow: hidden;
}

@keyframes engine-halo-turn {
  to {
    transform: rotateX(68deg) rotateZ(340deg);
  }
}

@keyframes engine-start-pulse {
  from {
    box-shadow:
      0 0 0 7px rgba(103, 155, 210, 0.08),
      0 0 30px rgba(68, 151, 255, 0.45),
      0 0 72px rgba(48, 116, 194, 0.26),
      inset 0 1px rgba(255, 255, 255, 0.2);
  }
  to {
    box-shadow:
      0 0 0 12px rgba(103, 155, 210, 0.04),
      0 0 44px rgba(68, 178, 255, 0.65),
      0 0 94px rgba(48, 116, 194, 0.4),
      inset 0 1px rgba(255, 255, 255, 0.24);
  }
}

@keyframes engine-orbit-pulse {
  0% {
    opacity: 0.38;
    transform: translate(-50%, -50%) rotateX(68deg) rotateZ(-18deg) scale(0.94);
  }
  72%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotateX(68deg) rotateZ(-18deg) scale(1.15);
  }
}

@keyframes engine-particle-streak {
  0% {
    opacity: 0;
    transform: translate3d(0, 8vh, 0) scale(0.7);
  }
  18% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate3d(25vw, -35vh, 0) scale(0);
  }
}

@keyframes engine-speedline {
  from {
    transform: translateX(0) skewY(-12deg);
  }
  to {
    transform: translateX(170vw) skewY(-12deg);
  }
}

@keyframes engine-landing-shake {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  18% {
    transform: translate3d(-5px, 3px, 0);
  }
  38% {
    transform: translate3d(4px, -2px, 0);
  }
  62% {
    transform: translate3d(-2px, 1px, 0);
  }
}

@keyframes engine-landing-wave {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35, 0.3);
  }
  18% {
    opacity: 0.92;
  }
  52% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35, 1.8);
  }
}

@keyframes engine-intro-letter-in {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translate3d(0, 0.28em, 0) rotateX(-45deg);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) rotateX(0);
  }
}

@media (max-width: 600px) {
  .engine-intro-controls {
    inset: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) auto
      max(14px, env(safe-area-inset-left));
  }

  .engine-intro-sound,
  .engine-intro-skip {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 11px;
  }

  .engine-ignition-wrap {
    width: 150px;
    height: 150px;
  }

  .engine-ignition-button {
    width: 96px;
    height: 96px;
  }

  .engine-intro-title {
    width: min(96vw, 520px);
    font-size: clamp(32px, 9.5vw, 54px);
  }

  .engine-intro-title > span {
    font-size: 1em;
    letter-spacing: 0.01em;
  }

  .engine-intro-subtitle {
    top: calc(50% + 83px);
    width: min(96vw, 520px);
    gap: 6px;
  }

  .engine-intro-subtitle .engine-intro-stack {
    letter-spacing: 0.025em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .engine-intro-overlay,
  .engine-intro-overlay *,
  .engine-intro-overlay *::before,
  .engine-intro-overlay *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
