/* ─── Nav entrance ─── */
#nav {
  animation: navEnter 300ms ease both;
}

@keyframes navEnter {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Hero stagger ─── */
.hero-tagline {
  animation: heroSlideIn 600ms ease 380ms both;
}

.hero-cta {
  animation: heroSlideIn 600ms ease 700ms both;
}

.hero-image-col {
  animation: heroImageIn 700ms ease 250ms both;
}

@keyframes heroSlideIn {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroImageIn {
  from {
    opacity: 0;
    transform: translateX(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ─── Hero word reveal ─── */
.word-wrap {
  display: inline-block;
  overflow: visible;
  vertical-align: bottom;
  margin-right: 0.25em;
  padding-bottom: 0.15em;
}

.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  animation: wordReveal 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes wordReveal {
  from {
    opacity: 0;
    transform: translateY(110%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-headline .word-wrap:nth-child(1) .word { animation-delay: 200ms; }
.hero-headline .word-wrap:nth-child(2) .word { animation-delay: 340ms; }
.hero-headline .word-wrap:nth-child(3) .word { animation-delay: 480ms; }
.hero-headline .word-wrap:nth-child(4) .word { animation-delay: 620ms; }
.hero-headline .word-wrap:nth-child(5) .word { animation-delay: 760ms; }
.hero-headline .word-wrap:nth-child(6) .word { animation-delay: 900ms; }

/* ─── Scroll reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 400ms ease, transform 400ms ease;
}

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

/* Stagger for grid children */
.signatures-grid .drink-card:nth-child(2).reveal {
  transition-delay: 80ms;
}

.signatures-grid .drink-card:nth-child(3).reveal {
  transition-delay: 160ms;
}

.mojito-names-grid .mojito-item:nth-child(2).reveal {
  transition-delay: 60ms;
}

.mojito-names-grid .mojito-item:nth-child(3).reveal {
  transition-delay: 120ms;
}

.mojito-names-grid .mojito-item:nth-child(4).reveal {
  transition-delay: 180ms;
}

/* ─── Scale reveal ─── */
.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ─── Heading reveal ─── */
.reveal-heading {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-script {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1) 150ms,
              transform 600ms cubic-bezier(0.22, 1, 0.36, 1) 150ms;
}

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

/* ─── Hover: card lift ─── */
.drink-card {
  will-change: transform;
}

.mojito-item {
  will-change: transform;
}

/* ─── Mobile Micro-interactions ─── */
.btn-primary:active {
  transform: scale(0.97);
  background: var(--orange-dark);
  transition: transform 0ms, background 0ms;
}

.drink-card:active {
  transform: scale(0.98);
  transition: transform 100ms;
}

.mojito-item:active {
  transform: scale(0.98);
  transition: transform 100ms;
}

@media (max-width: 767px) {
  .nav-links a:active {
    background: rgba(232, 115, 42, 0.08);
    border-radius: 8px;
  }
}

/* CTA ripple — CSS only */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  border-radius: inherit;
  pointer-events: none;
}

.btn-primary:active::after {
  opacity: 1;
  transform: scale(2.5);
  transition: transform 400ms ease-out, opacity 400ms ease-out;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  #nav {
    animation: none;
    opacity: 1;
  }

  .hero-headline,
  .hero-tagline,
  .hero-cta,
  .hero-image-col {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .word {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .drink-card,
  .mojito-item,
  .btn-primary {
    transition: none;
    will-change: auto;
  }

  .nav-links a::after {
    transition: none;
  }

  .reveal-heading,
  .reveal-script {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
