/* Scroll-reveal ----------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children of a revealed group (cards in a grid, etc.) */
.reveal-group > *:nth-child(1) { --reveal-delay: 0s; }
.reveal-group > *:nth-child(2) { --reveal-delay: 0.08s; }
.reveal-group > *:nth-child(3) { --reveal-delay: 0.16s; }
.reveal-group > *:nth-child(4) { --reveal-delay: 0.24s; }
.reveal-group > *:nth-child(5) { --reveal-delay: 0.32s; }
.reveal-group > *:nth-child(6) { --reveal-delay: 0.4s; }

/* Hero entrance (plays immediately on load, not scroll-triggered) -------- */

.hero-in {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-in--1 { animation-delay: 0.05s; }
.hero-in--2 { animation-delay: 0.16s; }
.hero-in--3 { animation-delay: 0.27s; }
.hero-in--4 { animation-delay: 0.38s; }
.hero-in--5 { animation-delay: 0.49s; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card hover lift ---------------------------------------------------------- */

.package-card,
.service-card,
.problem-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.package-card:hover,
.service-card:hover,
.problem-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(123, 47, 243, 0.35);
}

.package-card--featured:hover {
  transform: translateY(-8px);
}

.service-card:hover,
.problem-card:hover {
  border-color: var(--violet);
}

/* Testimonial avatars -------------------------------------------------------- */

.testimonial-avatar {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-avatar:hover {
  transform: scale(1.08);
}

/* Nav link underline --------------------------------------------------------- */

.nav__links a:not(.btn) {
  position: relative;
  transition: color 0.2s ease;
}

.nav__links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__links a:not(.btn):hover::after {
  width: 100%;
}

/* Buttons: richer hover -------------------------------------------------- */

.btn-primary {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 32px -10px rgba(200, 45, 215, 0.65);
}

.btn-secondary {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, background 0.25s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px);
}

/* Footer links -------------------------------------------------------------- */

.site-footer a {
  transition: color 0.2s ease, padding-left 0.2s ease;
}

/* FAQ smooth open/close (JS-managed max-height, see motion.js) ------------- */

.faq-item__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}

.faq-item[open] .faq-item__answer {
  opacity: 1;
}

.faq-item summary::after {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

/* Hero aurora glow + edge blend --------------------------------------------
   Large, slow-drifting brand-gradient blobs behind the hero, plus a mask on
   the hero image/video so its edges dissolve into the Void background
   instead of sitting as a hard-edged rectangle. */

.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(45% 45% at 20% 25%, rgba(255, 59, 130, 0.35), transparent 70%),
    radial-gradient(40% 40% at 80% 20%, rgba(123, 47, 243, 0.4), transparent 70%),
    radial-gradient(50% 50% at 60% 80%, rgba(200, 45, 215, 0.3), transparent 70%),
    radial-gradient(35% 35% at 15% 80%, rgba(78, 23, 184, 0.35), transparent 70%);
  filter: blur(60px);
  animation: aurora-drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 3;
}

.hero__ghost-mark {
  position: absolute;
  top: -8%;
  right: -6%;
  width: 46%;
  max-width: 640px;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
  filter: blur(0.5px);
}

@media (max-width: 900px) {
  .hero__ghost-mark { width: 70%; opacity: 0.06; }
}

@keyframes aurora-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-2%, 3%) scale(1.08); }
  100% { transform: translate(3%, -2%) scale(1.02); }
}

.hero__media {
  -webkit-mask-image:
    linear-gradient(to left, black 62%, transparent 100%),
    linear-gradient(to top, black 75%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to left, black 62%, transparent 100%),
    linear-gradient(to top, black 75%, transparent 100%);
  mask-composite: intersect;
}

@media (max-width: 900px) {
  .hero__media {
    -webkit-mask-image: linear-gradient(to top, black 80%, transparent 100%);
    mask-image: linear-gradient(to top, black 80%, transparent 100%);
  }
}

/* Cinematic full-bleed hero (homepage) --------------------------------------
   Video/image fills the entire hero behind centered text instead of sitting
   in a boxed side column; a radial mask fades it into the Void + aurora at
   every edge (not just left/top), and a flat scrim keeps text readable over
   whatever frame the loop happens to be on. */

.hero--cinematic {
  min-height: clamp(560px, 90vh, 900px);
  display: flex;
  align-items: center;
}

.hero--cinematic::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(18, 10, 31, 0.45);
  pointer-events: none;
}

.hero__inner--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  padding-block: var(--space-6);
}

/* height is viewport-relative (not inset:0) on purpose: the hero's own
   height grows with its text content on narrow screens, and stretching the
   video to match that content-driven height forced object-fit:cover into an
   extreme, tightly-zoomed crop. Capping it to the viewport keeps the crop
   natural regardless of how tall the text stack gets; the mask below already
   fades it to transparent well before its own bottom edge, so there's no
   visible seam where it hands off to the plain aurora/void background. */
.hero__media.hero__media--full {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100svh;
  min-height: 560px;
  z-index: 1;
  border-radius: 0;
  aspect-ratio: auto;
  -webkit-mask-image: radial-gradient(ellipse 78% 72% at 50% 42%, black 42%, transparent 94%);
  mask-image: radial-gradient(ellipse 78% 72% at 50% 42%, black 42%, transparent 94%);
}

@media (max-width: 900px) {
  .hero__media.hero__media--full {
    -webkit-mask-image: radial-gradient(ellipse 95% 55% at 50% 32%, black 48%, transparent 96%);
    mask-image: radial-gradient(ellipse 95% 55% at 50% 32%, black 48%, transparent 96%);
  }
}

/* Hero eyebrow pill: the plain magenta .eyebrow text reads fine on solid
   section backgrounds but loses contrast over a busy photographic video, so
   the hero gets its own badge treatment (white text, translucent backing,
   backdrop-blur) instead. */

.hero__eyebrow {
  color: var(--paper);
  background: rgba(250, 248, 251, 0.08);
  border: 1px solid rgba(250, 248, 251, 0.16);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Hero headline word-rotator: gradient-clipped word cross-fades through
   data-rotate-words (pipe-delimited), driven by motion.js. */

.hero__rotate-word {
  display: inline-block;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero__rotate-word--out {
  opacity: 0;
  transform: translateY(8px);
}

@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}

/* Package "most popular" badge: gentle pulse to draw the eye --------------- */

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 130, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255, 59, 130, 0); }
}

.package-card__badge {
  animation: badge-pulse 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-in { opacity: 1 !important; transform: none !important; animation: none !important; }
  .package-card__badge { animation: none; }
}
