/* ==========================================================================
   GSA Digital — custom styles (animations, gradients, phone mockup)
   ========================================================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background-color: #05070f;
}

/* ---------- Nav ---------- */
#nav {
  box-shadow: none;
}

#nav.nav-scrolled {
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.6);
}

/* ---------- Logo: smooth the corners and blend the black backing into the nav ---------- */
.logo-blend {
  mix-blend-mode: screen;
  border-radius: 0.75rem;
}

/* ---------- Mobile menu ---------- */
.mobile-menu-wrap {
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  transition: grid-template-rows 0.3s ease;
  background: rgba(5, 7, 15, 0.98);
}

.mobile-menu-wrap > div {
  min-height: 0;
  overflow: hidden;
}

.mobile-menu-wrap.open {
  grid-template-rows: minmax(0, 1fr);
}

/* ---------- Hero gradient shimmer ---------- */
.hero-gradient {
  background: radial-gradient(circle at 20% 15%, rgba(30, 64, 175, 0.35), transparent 55%),
              radial-gradient(circle at 80% 25%, rgba(37, 99, 235, 0.28), transparent 50%),
              radial-gradient(circle at 50% 95%, rgba(15, 23, 42, 0.7), transparent 60%),
              radial-gradient(circle at 90% 85%, rgba(29, 78, 216, 0.25), transparent 55%),
              #05070f;
  background-size: 200% 200%;
  animation: shimmer 20s ease-in-out infinite;
}

/* Fade the hero's blue out into the flat background of the section below */
.hero-gradient::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to bottom, transparent, #05070f);
  pointer-events: none;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Typing effect cursor ---------- */
.type-cursor {
  display: inline-block;
  margin-left: 2px;
  color: #2563eb;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ---------- CTA glow pulse ---------- */
.cta-glow {
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.5), 0 0 12px 0 rgba(30, 64, 175, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(30, 64, 175, 0), 0 0 24px 4px rgba(30, 64, 175, 0.55); }
}

/* ---------- Fade-in on scroll ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- Hover lift ---------- */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(30, 64, 175, 0.35);
}

/* ---------- Pricing check icon ---------- */
.check-icon {
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.15);
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---------- FAQ accordion ---------- */
.faq-answer {
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  overflow: hidden;
  transition: grid-template-rows 0.3s ease;
}

.faq-answer > p {
  min-height: 0;
  overflow: hidden;
}

.faq-item.open .faq-answer {
  grid-template-rows: minmax(0, 1fr);
}

.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

/* ---------- Phone mockup ---------- */
.phone-frame {
  width: 300px;
  height: 600px;
  background: #050609;
  border: 10px solid #131a2b;
  border-radius: 2.75rem;
  box-shadow: 0 30px 60px -20px rgba(30, 64, 175, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 22px;
  background: #131a2b;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  z-index: 10;
}

.phone-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 30px;
  background: linear-gradient(180deg, #0b1220 0%, #05070f 100%);
}

.phone-header {
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #e2e8f0;
  padding: 0.5rem 0 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.phone-messages {
  flex: 1;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: hidden;
}

.msg-bubble {
  max-width: 78%;
  padding: 0.55rem 0.85rem;
  border-radius: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  animation: msg-in 0.35s ease forwards;
}

@keyframes msg-in {
  to { opacity: 1; transform: translateY(0); }
}

.msg-system {
  align-self: flex-start;
  background: #131a2b;
  color: #e2e8f0;
  border-bottom-left-radius: 0.3rem;
}

.msg-customer {
  align-self: flex-end;
  background: #1e40af;
  color: #ffffff;
  border-bottom-right-radius: 0.3rem;
}

.msg-typing {
  align-self: flex-start;
  background: #131a2b;
  border-bottom-left-radius: 0.3rem;
  padding: 0.65rem 0.9rem;
  display: inline-flex;
  gap: 4px;
  opacity: 0;
  transform: translateY(8px);
  animation: msg-in 0.3s ease forwards;
}

.msg-typing .dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #64748b;
  animation: typing-bounce 1s ease-in-out infinite;
}

.msg-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.msg-typing .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-gradient,
  .cta-glow,
  .type-cursor,
  .msg-typing .dot {
    animation: none !important;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hover-lift {
    transition: none !important;
  }

  .msg-bubble,
  .msg-typing {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
