:root {
  --ink: #0a1020;
  --navy: #121a32;
  --cyan: #5ce1ff;
  --mint: #5ef0c8;
  --blue: #6ea8ff;
  --coral: #ff8fb8;
  --peach: #ffb38a;
  --lilac: #c4a8ff;
  --amber: #ffe066;
  --text: #f5f8ff;
  --muted: #b8c7e0;
  --danger: #ff8a9a;
  --glass: rgba(22, 30, 55, 0.72);
  --border: rgba(124, 220, 255, 0.28);
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-body);
  background: var(--ink);
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 45% at 8% 12%, rgba(92, 225, 255, 0.32), transparent 58%),
    radial-gradient(ellipse 48% 42% at 92% 8%, rgba(255, 143, 184, 0.28), transparent 55%),
    radial-gradient(ellipse 42% 38% at 78% 88%, rgba(255, 224, 102, 0.2), transparent 52%),
    radial-gradient(ellipse 40% 36% at 18% 88%, rgba(196, 168, 255, 0.22), transparent 55%),
    linear-gradient(155deg, #08101f 0%, #152040 42%, #1a1540 100%);
  animation: skyHue 16s ease-in-out infinite alternate;
}

@keyframes skyHue {
  from { filter: saturate(1) hue-rotate(0deg); }
  to { filter: saturate(1.15) hue-rotate(8deg); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(92, 225, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 143, 184, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.75;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.55;
  animation: blobDrift 12s ease-in-out infinite alternate;
}

.blob--a {
  width: 280px;
  height: 280px;
  left: -50px;
  top: 18%;
  background: #5ce1ff;
}

.blob--b {
  width: 220px;
  height: 220px;
  right: -30px;
  top: 8%;
  background: #ff8fb8;
  animation-delay: -4s;
}

.blob--c {
  width: 250px;
  height: 250px;
  right: 18%;
  bottom: -70px;
  background: #ffe066;
  animation-delay: -7s;
}

@keyframes blobDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(18px, -14px) scale(1.06); }
}

.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px 4px rgba(255, 255, 255, 0.5);
  animation: twinkle 2.6s ease-in-out infinite;
}

.spark--1 { top: 14%; left: 42%; }
.spark--2 { top: 28%; right: 18%; background: var(--cyan); animation-delay: 0.5s; }
.spark--3 { bottom: 22%; left: 12%; background: var(--coral); animation-delay: 1s; }
.spark--4 { bottom: 18%; right: 30%; background: var(--amber); animation-delay: 1.5s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.2); }
}

.code-float {
  position: absolute;
  z-index: 0;
  margin: 0;
  padding: 0.55rem 0.7rem 0.6rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(145deg, rgba(28, 36, 68, 0.88), rgba(18, 24, 48, 0.9));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.45;
  color: #dce7f8;
  white-space: pre;
  pointer-events: none;
  animation: codeFloat 9s ease-in-out infinite;
}

.code-float__lang {
  display: inline-block;
  margin-bottom: 0.2rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1a1030;
}

.code-float--cs .code-float__lang { background: var(--cyan); }
.code-float--java .code-float__lang { background: var(--peach); }
.code-float--py .code-float__lang { background: var(--mint); }
.code-float--js .code-float__lang { background: var(--amber); }
.code-float--cpp .code-float__lang { background: var(--lilac); }

.code-float .kw { color: #9ae7ff; }
.code-float .fn { color: #9af5d0; }
.code-float .str { color: #ffe08a; }
.code-float .num { color: #ffb0c8; }

.code-float--cs {
  top: 8%;
  left: 3%;
  --rot: -4deg;
  animation-delay: 0s;
}

.code-float--java {
  top: 38%;
  left: 1%;
  --rot: 3deg;
  animation-delay: -2s;
}

.code-float--py {
  bottom: 10%;
  left: 14%;
  --rot: -2deg;
  animation-delay: -4s;
}

.code-float--js {
  top: 12%;
  right: 3%;
  --rot: 3deg;
  animation-delay: -1.5s;
}

.code-float--cpp {
  bottom: 14%;
  right: 4%;
  --rot: -3deg;
  animation-delay: -3.5s;
}

@keyframes codeFloat {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--rot, 0deg)); }
}

.stage,
.thanks {
  position: relative;
  z-index: 1;
  height: 100dvh;
  width: 100%;
}

.hero {
  height: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(0.85rem, 2.4vw, 1.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(1rem, 3vw, 2.4rem);
  align-items: center;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.brand-row__logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: contain;
  background: #0f1729;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.35),
    0 0 0 3px rgba(92, 225, 255, 0.45),
    0 0 24px rgba(255, 143, 184, 0.25);
}

.brand-row__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-row__tag {
  margin: 0.2rem 0 0;
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

#hero-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.accent-line {
  display: inline;
  background: linear-gradient(110deg, var(--cyan), var(--mint), var(--amber), var(--coral), var(--lilac));
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: accentShift 5s ease infinite;
}

@keyframes accentShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero__lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.5;
  max-width: 42ch;
  font-weight: 500;
}

.pop-in {
  animation: popIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pop-in--2 { animation-delay: 0.07s; }
.pop-in--3 { animation-delay: 0.12s; }
.pop-in--4 { animation-delay: 0.18s; }

@keyframes popIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.form {
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(40, 48, 88, 0.55), rgba(22, 28, 52, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  border: 1px solid rgba(148, 168, 196, 0.2);
  background: rgba(5, 12, 24, 0.7);
  color: var(--text);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder {
  color: rgba(148, 168, 196, 0.4);
}

.field input:focus {
  border-color: rgba(255, 143, 184, 0.65);
  box-shadow: 0 0 0 3px rgba(92, 225, 255, 0.18);
}

.field--invalid input {
  border-color: rgba(255, 138, 154, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 138, 154, 0.18);
}

.field--invalid > span {
  color: var(--danger);
}

.req {
  color: var(--coral);
  text-decoration: none;
  font-weight: 800;
}

.form__error {
  margin: 0;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: none;
}

.form__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  font-weight: 500;
}

.cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #1a1030;
  background: linear-gradient(120deg, var(--cyan), var(--mint), var(--amber), var(--coral));
  background-size: 220% 220%;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(92, 225, 255, 0.32);
  transition: transform 0.2s ease, filter 0.2s ease;
  animation: ctaGlow 4s ease-in-out infinite;
}

@keyframes ctaGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.cta:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.cta__code {
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.cta__shine {
  position: absolute;
  inset: -40% auto -40% -35%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0%, 50% { left: -35%; opacity: 0; }
  65% { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

.cta--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  animation: popIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

.orbit {
  position: absolute;
  width: min(330px, 76vw);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed rgba(255, 180, 200, 0.28);
  animation: orbitSpin 22s linear infinite;
}

.orbit__dot {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #1a1030;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: var(--cyan);
  border: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.orbit__dot--1 { top: 4%; left: 44%; background: var(--cyan); }
.orbit__dot--2 { bottom: 16%; left: 2%; background: var(--peach); }
.orbit__dot--3 { right: 0; top: 42%; background: var(--lilac); }

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

.phone {
  position: relative;
  z-index: 2;
  width: min(270px, 64vw);
  aspect-ratio: 9 / 18.2;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.5));
}

.phone.float {
  animation: floatPhone 5.5s ease-in-out infinite;
}

@keyframes floatPhone {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.phone__bezel {
  height: 100%;
  border-radius: 34px;
  padding: 10px;
  background: linear-gradient(160deg, #243356, #121a30 55%, #1e1638);
  border: 1px solid rgba(255, 180, 200, 0.28);
}

.phone__notch {
  width: 40%;
  height: 12px;
  margin: 2px auto 8px;
  border-radius: 999px;
  background: #050b14;
}

.phone__screen {
  position: relative;
  height: calc(100% - 22px);
  border-radius: 26px;
  overflow: hidden;
  padding: 0.9rem 0.8rem;
  display: grid;
  align-content: start;
  gap: 0.65rem;
  background:
    radial-gradient(circle at 85% 8%, rgba(92, 225, 255, 0.28), transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(255, 143, 184, 0.22), transparent 40%),
    linear-gradient(180deg, #1a2f52, #121c36 72%);
}

.phone__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.phone__top img {
  border-radius: 10px;
}

.phone__top strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.phone__top small {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.phone__banner {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.6rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(92, 225, 255, 0.16), rgba(196, 168, 255, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.phone__banner img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #0f1729;
  flex-shrink: 0;
}

.phone__banner em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--mint);
}

.phone__banner span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.bob {
  animation: bob 3s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.phone__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.stat {
  padding: 0.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.stat b {
  display: block;
  font-family: var(--font-mono);
  color: var(--peach);
  font-size: 0.95rem;
}

.stat span {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
}

.pulse-soft {
  animation: softPulse 2.8s ease-in-out infinite;
}

.pulse-soft--delay { animation-delay: 0.7s; }

@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 143, 184, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(92, 225, 255, 0); }
}

.phone__quest {
  position: relative;
  padding: 0.65rem 0.7rem;
  border-radius: 14px;
  background: rgba(255, 143, 184, 0.14);
  border: 1px solid rgba(255, 143, 184, 0.32);
}

.phone__quest-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--coral), var(--peach));
  color: #1a1030;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.phone__quest strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem;
}

.phone__quest p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.phone__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.phone__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lilac), var(--cyan), var(--mint), var(--amber));
  background-size: 200% 100%;
  animation: barFlow 2.2s linear infinite;
}

@keyframes barFlow {
  to { background-position: 200% 0; }
}

.phone__terminal {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--mint);
  opacity: 0.85;
}

.float-card {
  position: absolute;
  z-index: 3;
  padding: 0.5rem 0.7rem;
  border-radius: 14px;
  background: rgba(18, 24, 48, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  animation: cardPop 5s ease-in-out infinite;
}

.float-card strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--mint);
}

.float-card span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.float-card--xp {
  top: 12%;
  right: 2%;
}

.float-card--star {
  bottom: 16%;
  left: 0;
  animation-delay: -1.5s;
}

.float-card--star strong {
  color: var(--amber);
}

@keyframes cardPop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.thanks {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  height: 100dvh;
}

.thanks[hidden],
.stage[hidden] {
  display: none !important;
}

.thanks__confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.thanks__crew {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.4rem;
  min-height: 150px;
  margin-bottom: -0.4rem;
  animation: popIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.thanks__rocket {
  filter: drop-shadow(0 10px 18px rgba(92, 225, 255, 0.35));
  animation: thanksRocketBob 3.8s ease-in-out infinite;
}

.thanks__flame {
  transform-origin: 45px 120px;
  animation: flameFlicker 0.28s ease-in-out infinite alternate;
}

.thanks__astro {
  position: relative;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.35));
  animation: thanksBob 4.2s ease-in-out infinite 0.4s;
}

.thanks__bubble {
  position: absolute;
  top: 4px;
  right: -8px;
  z-index: 2;
  padding: 0.35rem 0.6rem;
  border-radius: 14px 14px 14px 4px;
  background: linear-gradient(120deg, #ffe066, #ffb38a);
  color: #1a1030;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  animation: thanksBubble 2.4s ease-in-out infinite;
}

.thanks__wave {
  transform-origin: 128px 112px;
  animation: thanksWave 1.1s ease-in-out infinite;
}

@keyframes thanksBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes thanksRocketBob {
  0%, 100% { transform: rotate(-18deg) translateY(8px); }
  50% { transform: rotate(-14deg) translateY(-4px); }
}

@keyframes thanksWave {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(28deg); }
}

@keyframes thanksBubble {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.06) rotate(2deg); }
}

.thanks__card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 1.6rem;
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(160deg, rgba(28, 36, 68, 0.94), rgba(24, 18, 48, 0.92));
  border: 1px solid rgba(255, 180, 200, 0.25);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  animation: popIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.thanks__logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: contain;
  background: #0f1729;
  margin-bottom: 0.5rem;
  box-shadow:
    0 0 0 3px rgba(92, 225, 255, 0.35),
    0 0 20px rgba(255, 143, 184, 0.3);
}

.thanks__brand {
  margin: 0 0 0.3rem;
  color: var(--coral);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
}

.thanks__card h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.thanks__card p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 500;
}

body.is-thanks .sky-cast {
  visibility: hidden;
}

@media (max-width: 900px) {
  .thanks__rocket svg {
    width: 48px;
    height: auto;
  }

  .thanks__astro svg {
    width: 92px;
    height: auto;
  }

  .thanks__bubble {
    font-size: 0.68rem;
    right: -4px;
  }
}

/* Foguete + astronauta — posição/rota via JS */
.sky-cast {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sky-rocket {
  position: absolute;
  left: 0;
  top: 0;
  width: 72px;
  height: 112px;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 16px rgba(92, 225, 255, 0.5));
  transform-origin: center center;
}

.sky-rocket.is-active {
  visibility: visible;
}

.sky-rocket svg {
  display: block;
  width: 100%;
  height: auto;
}

.sky-rocket__flame {
  transform-origin: 45px 120px;
  animation: flameFlicker 0.22s ease-in-out infinite alternate;
}

.sky-rocket__flame-inner {
  animation: flameFlicker 0.16s ease-in-out infinite alternate-reverse;
}

@keyframes flameFlicker {
  from { transform: scaleY(0.82) scaleX(1.1); opacity: 0.8; }
  to { transform: scaleY(1.2) scaleX(0.88); opacity: 1; }
}

.sky-astro {
  position: absolute;
  left: 0;
  top: 0;
  width: 128px;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.4));
  transform-origin: center center;
}

.sky-astro.is-active {
  visibility: visible;
}

.sky-astro.is-active .sky-astro__bubble {
  animation: bubblePulse 4s ease-in-out infinite;
}

.sky-astro.is-active .sky-astro__thumb {
  animation: thumbBob 1.1s ease-in-out infinite alternate;
}

.sky-astro__spin {
  position: relative;
  width: 100%;
  transform-origin: center center;
  will-change: transform;
}

.sky-astro__body {
  display: block;
  width: 100%;
  height: auto;
}

.sky-astro__thumb {
  transform-origin: 138px 120px;
}

.sky-astro__bubble {
  position: absolute;
  top: 6px;
  left: 50%;
  z-index: 2;
  padding: 0.4rem 0.65rem;
  border-radius: 16px;
  background: linear-gradient(120deg, #ffe066, #ffb38a);
  color: #1a1030;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateX(-50%);
}

.sky-rock {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.sky-rock.is-active {
  visibility: visible;
}

.sky-rock svg {
  display: block;
  width: 100%;
  height: auto;
}

.sky-rock--sm { width: 18px; height: 18px; opacity: 0.75; }
.sky-rock--md { width: 28px; height: 28px; }
.sky-rock--lg { width: 40px; height: 40px; }

@keyframes thumbBob {
  from { transform: rotate(-10deg) translateY(2px); }
  to { transform: rotate(12deg) translateY(-6px); }
}

@keyframes bubblePulse {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

@media (max-width: 900px) {
  .sky-rocket {
    width: 48px;
    height: 74px;
  }

  .sky-astro {
    width: 92px;
  }

  .sky-astro__bubble {
    font-size: 0.64rem;
    padding: 0.28rem 0.45rem;
  }

  .sky-rock--lg { width: 30px; height: 30px; }

  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-content: center;
    gap: 0.4rem;
    padding: 0.7rem;
  }

  .hero__visual {
    order: -1;
    min-height: auto;
  }

  .phone { width: min(150px, 40vw); }
  .orbit { width: min(210px, 58vw); }

  .float-card,
  .code-float,
  .orbit {
    display: none;
  }

  .hero__lead {
    max-width: none;
    margin-bottom: 0.5rem;
  }

  .form {
    padding: 0.75rem;
    gap: 0.45rem;
  }

  #hero-title {
    font-size: clamp(1.15rem, 4.6vw, 1.4rem);
  }
}

@media (max-height: 720px) {
  .phone { width: min(128px, 32vw); }
  .hero__lead,
  .form__note,
  .brand-row__tag,
  .phone__terminal {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .sky-cast {
    display: none;
  }
}
