/* ==========================================================================
   HERO — EVOLVE across the viewport, purple geometry behind it, glass in
   front of it. The glass drifts with the pointer and reveals different
   parts of the word; "AI" sits sharp on the lens.
   ========================================================================== */

.hero {
  position: relative;
  height: 100svh;
  min-height: 680px;
  max-height: 1080px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(50% 55% at 88% 8%, rgba(185, 165, 255, .6), transparent 72%),
    radial-gradient(42% 48% at 6% 88%, rgba(170, 182, 255, .5), transparent 72%),
    var(--paper);
}

.hero__world,
.hero__glass,
.hero__depth {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__world { z-index: 0; }
.hero__type  { position: absolute; inset: 0; z-index: 1; }
.hero__glass { z-index: 2; }

/* ── Geometry behind the word ──────────────────────────────── */
.hero__world .shape,
.hero__world .orbit { position: absolute; }

.hero__s1 {                                   /* quarter, top right */
  --form: 0 0 0 100%;
  top: -7vw;
  right: -7vw;
  width: 38vw;
  background: linear-gradient(200deg, var(--electric), var(--royal) 70%);
}
.hero__s2 {                                   /* lavender drop, left */
  --fill: var(--lavender);
  left: 3vw;
  top: 38%;
  width: 16vw;
}
.hero__s3 {                                   /* small indigo circle */
  --fill: var(--indigo);
  left: 43vw;
  top: 17%;
  width: 4.6vw;
}
.hero__s4 {                                   /* periwinkle leaf */
  --fill: var(--periwinkle);
  right: 20vw;
  bottom: 9%;
  width: 9vw;
}
.hero__orbit {
  left: 21vw;
  top: 14%;
  width: 11vw;
}

/* ── The word ──────────────────────────────────────────────── */
.hero__kicker {
  position: absolute;
  top: calc(var(--nav-top) + 62px + clamp(28px, 5vh, 56px));
  left: 0;
  right: 0;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.hero__title {
  position: absolute;
  left: 0;
  right: 0;
  top: 23%;
  font-size: var(--fs-mega);
  font-weight: 700;
  line-height: .8;
  letter-spacing: -.07em;
  color: var(--ink);
}
.hero__word {
  display: flex;
  justify-content: center;
  padding-right: .07em;                        /* optical: the last letter's tracking */
}
.hero__word > span { display: inline-block; }

/* ── Glass in front of the word ────────────────────────────── */
.hero__glass .glass { position: absolute; }

.hero__lens {
  display: grid;
  place-items: center;
  left: 57vw;
  top: 33%;
  width: clamp(200px, 24vw, 400px);
  aspect-ratio: 1;
  border-radius: 50%;
}
.hero__ai {
  font-size: clamp(3.5rem, 1rem + 6vw, 8rem);
  font-weight: 600;
  letter-spacing: -.06em;
  line-height: 1;
  color: var(--ink);
}
.hero__capsule {
  left: 31vw;
  top: 21%;
  width: 7.5vw;
  height: 23vw;
  border-radius: 999px;
  rotate: -24deg;
}
.hero__chip {
  display: flex;
  align-items: center;
  gap: 10px;
  right: 7vw;
  top: 26%;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.hero__chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50% 0 50% 50%;
  background: var(--electric);
}

/* ── Foot: the sentence, the actions ───────────────────────── */
.hero__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--rise) + clamp(12px, 2.5vh, 28px));   /* clear of the arch */
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.hero__tagline {
  font-size: clamp(1.375rem, 1.1rem + .9vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--ink);
}
.hero__lead {
  max-width: 28rem;
  margin-top: 12px;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-2);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero__scroll {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.hero__scroll-track {
  position: relative;
  width: 22px;
  height: 36px;
  border: 1.5px solid rgba(19, 7, 46, .25);
  border-radius: 999px;
}
.hero__scroll-track i {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--electric);
}
.motion .hero__scroll-track i { animation: scroll-dot 2.4s var(--ease-io) infinite; }
@keyframes scroll-dot {
  0%   { transform: translateY(0); opacity: 0; }
  30%  { opacity: 1; }
  80%  { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ── Entrance: the word assembles, shapes arrive, glass settles ── */
.motion .hero__word > span {
  animation: letter-in 1.5s var(--ease) both;
  animation-delay: calc(var(--i) * 75ms + 150ms);
}
@keyframes letter-in {
  from { opacity: 0; transform: translateY(28%); filter: blur(20px); }
}
/* entrance (scale, opacity) and ambient drift (translate / rotate) run
   together — they animate different properties */
.hero__world > .hero__depth:nth-child(1) { --in: .35s; }
.hero__world > .hero__depth:nth-child(2) { --in: .55s; }
.hero__world > .hero__depth:nth-child(3) { --in: .75s; }
.hero__world > .hero__depth:nth-child(4) { --in: .65s; }
.hero__world > .hero__depth:nth-child(5) { --in: .85s; }
.motion .hero__world .amb-a     { animation: shape-in 1.6s var(--ease) var(--in) both, drift-a 26s var(--ease-io) infinite; }
.motion .hero__world .amb-b     { animation: shape-in 1.6s var(--ease) var(--in) both, drift-b 32s var(--ease-io) infinite; }
.motion .hero__world .amb-orbit { animation: shape-in 1.6s var(--ease) var(--in) both, spin 22s linear infinite; }
@keyframes shape-in {
  from { opacity: 0; scale: .7; }
}
.motion .hero__glass .glass {
  animation: glass-in 1.4s var(--ease) both;
  animation-delay: .75s;
}
.motion .hero__glass .hero__capsule { animation-delay: .9s; }
.motion .hero__glass .hero__chip { animation-delay: 1.1s; }
@keyframes glass-in {
  from { opacity: 0; transform: translateY(40px) scale(.92); }
}
.motion .hero__kicker,
.motion .hero__foot > * {
  animation: fade-up 1.2s var(--ease) both;
  animation-delay: 1s;
}
.motion .hero__foot > :last-child { animation-delay: 1.2s; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
}

/* ── Tablet ───────────────────────────────────────────────── */
@media (max-width: 899px) {
  .hero { max-height: none; }
  .hero__title { top: 26%; }
  .hero__lens { left: 55vw; top: 31%; width: 34vw; }
  .hero__capsule { width: 10vw; height: 30vw; left: 26vw; }
  .hero__chip { display: none; }
  .hero__scroll { display: none; }
}

/* ── Phones: a vertical composition. EVOLVE, then the AI lens under
      it, then the words — nothing is cut off. ─────────────── */
@media (max-width: 599px) {
  .hero {
    height: auto;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
  }
  .hero__type {
    position: relative;
    inset: auto;
    padding-top: calc(var(--nav-top) + 62px + 36px);
  }
  .hero__kicker { position: static; }
  .hero__title {
    position: relative;
    top: auto;
    margin-top: 28px;
    font-size: 25.5vw;
  }
  .hero__word { justify-content: flex-start; padding-left: calc(var(--gutter) - .03em); }
  .hero__glass { position: relative; inset: auto; height: 46vw; margin-top: -6vw; }
  .hero__glass > .hero__depth { position: absolute; inset: 0; }
  .hero__lens { left: auto; right: var(--gutter); top: 0; width: 46vw; }
  .hero__capsule,
  .hero__s2,
  .hero__s3 { display: none; }
  .hero__s1 { width: 62vw; top: -18vw; right: -22vw; }
  .hero__s4 { width: 18vw; right: 8vw; bottom: 4%; }
  .hero__orbit { width: 22vw; left: auto; right: 12vw; top: 12%; }
  .hero__foot {
    position: relative;
    bottom: auto;
    margin-top: auto;
    padding-top: 32px;
    padding-bottom: calc(var(--rise) + 28px);
  }
}
