.hero {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--kite-paper);
  display: flex;
  flex-direction: column;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(36, 87, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 15% 80%, rgba(12, 12, 12, 0.06), transparent 55%),
    linear-gradient(160deg, #f7f7f5 0%, #eef0f6 45%, #e8ecf8 100%);
  transform-origin: 60% 40%;
  animation: hero-bg-drift 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: background 0.55s ease;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.25rem;
  flex: 1;
  width: 100%;
  max-width: 40rem;
  padding: clamp(5.5rem, 12vw, 7rem) var(--kite-gutter) 2rem;
}

.hero__title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28em 0.32em;
  max-width: 14ch;
  font-size: clamp(2.1rem, 6.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--kite-ink);
  transition: color 0.55s ease;
}

.hero__title span {
  display: inline-block;
  animation: hero-word-drift 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__title span:nth-child(1) { animation-delay: 0.05s; }
.hero__title span:nth-child(2) { animation-delay: 0.12s; }
.hero__title span:nth-child(3) { animation-delay: 0.19s; }
.hero__title span:nth-child(4) { animation-delay: 0.26s; }
.hero__title span:nth-child(5) { animation-delay: 0.33s; }
.hero__title span:nth-child(6) { animation-delay: 0.4s; }

.hero__sub {
  max-width: 28rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.55;
  color: rgba(12, 12, 12, 0.55);
  clip-path: inset(0 100% 0 0);
  animation: hero-wipe 0.85s cubic-bezier(0.65, 0, 0.35, 1) 0.45s both;
  transition: color 0.55s ease;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.hero__cta,
.hero__ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-chip-h, 2.4rem);
  padding: 0 1.2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transform-origin: left center;
  animation: hero-pill-unroll 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__cta {
  background: var(--kite-blue);
  color: #ffffff;
  animation-delay: 0.55s;
}

.hero__ghost {
  background: var(--kite-ink);
  color: #ffffff;
  animation-delay: 0.68s;
}

.hero__glass {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: min(19rem, calc(100% - 2 * var(--kite-gutter)));
  margin: 0 var(--kite-gutter) clamp(1.25rem, 4vw, 2.25rem) auto;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 40px rgba(12, 12, 12, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform-origin: 100% 100%;
  animation: hero-glass-settle 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
  transition: background 0.55s ease, border-color 0.55s ease, color 0.55s ease;
}

.hero__glass-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0.9rem;
}

.hero__glass-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.15rem 0.35rem 0.45rem;
}

.hero__glass-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(12, 12, 12, 0.45);
  transition: color 0.55s ease;
}

.hero__glass-text {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--kite-ink);
  transition: color 0.55s ease;
}

.hero__glass-meta {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(12, 12, 12, 0.5);
  transition: color 0.55s ease;
}

@keyframes hero-bg-drift {
  from {
    opacity: 0.35;
    transform: scale(1.12) translate(-2%, 1%);
    filter: saturate(0.7);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes hero-word-drift {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translate(-1.25rem, 0.35rem) rotate(-2deg);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

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

@keyframes hero-pill-unroll {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: scaleX(0.35);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

@keyframes hero-glass-settle {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translate(2.5rem, 2rem) rotate(7deg) scale(0.92);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg,
  .hero__title span,
  .hero__sub,
  .hero__cta,
  .hero__ghost,
  .hero__glass {
    animation: none;
    clip-path: none;
    filter: none;
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 900px) {
  .hero {
    height: 100dvh;
    min-height: 100dvh;
  }

  .hero__glass {
    position: absolute;
    right: var(--kite-gutter);
    bottom: clamp(1.25rem, 4vw, 2.25rem);
    margin: 0;
  }
}

@media (max-width: 899px) {
  .hero {
    min-height: 100dvh;
  }

  .hero__content {
    flex: 1;
    justify-content: flex-end;
    padding: 5rem var(--kite-gutter) 1rem;
  }

  .hero__title {
    max-width: 12ch;
  }

  .hero__glass {
    width: min(19rem, calc(100% - 2 * var(--kite-gutter)));
    gap: 0.55rem;
    margin-bottom: 1.5rem;
    padding: 0.65rem;
  }

  .hero__glass-img {
    height: 5.5rem;
    aspect-ratio: unset;
    border-radius: 0.7rem;
  }

  .hero__glass-body {
    gap: 0.25rem;
    padding: 0.05rem 0.25rem 0.3rem;
  }
}

@media (max-width: 520px) {
  .hero__glass {
    width: calc(100% - 2 * var(--kite-gutter));
    margin-inline: var(--kite-gutter);
  }

  .hero__glass-img {
    height: 5rem;
  }
}
