/* Custom styles for Baby Wave */
/* Tailwind CSS handles most styling via CDN */

/* Sticky header */
#site-header {
  transition: background-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
  background: rgba(15, 15, 15, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#site-header.header-scrolled {
  background: rgba(15, 15, 15, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.animate-on-scroll {
  opacity: 0;
}

.animate-on-scroll.animated {
  animation-fill-mode: forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-600 {
  animation-delay: 0.6s;
}

.phone-mockup {
  background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 40px;
  padding: 12px;
  box-shadow:
    0 50px 100px -20px rgba(0, 0, 0, 0.25),
    0 30px 60px -30px rgba(0, 0, 0, 0.3);
}

.phone-screen {
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gradient-text {
  background: linear-gradient(135deg, #ff9a56 0%, #e88040 40%, #e87090 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Modern Effects */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.gradient-border {
  background: linear-gradient(135deg, #ff9a56, #ff6b2c, #f472b6, #ff9a56);
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes float-3d {

  0%,
  100% {
    transform: translateY(0) rotateY(0deg) rotateX(0deg);
  }

  25% {
    transform: translateY(-15px) rotateY(5deg) rotateX(2deg);
  }

  50% {
    transform: translateY(-8px) rotateY(-3deg) rotateX(-1deg);
  }

  75% {
    transform: translateY(-12px) rotateY(2deg) rotateX(1deg);
  }
}

.float-3d {
  animation: float-3d 6s ease-in-out infinite;
}

.shadow-glow {
  box-shadow:
    0 0 60px rgba(255, 154, 86, 0.25),
    0 0 120px rgba(244, 114, 182, 0.08),
    0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.shadow-glow-lg {
  box-shadow:
    0 0 80px rgba(255, 154, 86, 0.35),
    0 0 140px rgba(244, 114, 182, 0.1),
    0 35px 60px -15px rgba(0, 0, 0, 0.3);
}

.text-gradient-animated {
  background: linear-gradient(135deg, #ff9a56, #ff6b2c, #f472b6, #ff9a56, #ff6b2c);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 4s ease infinite;
}

.mesh-gradient {
  background:
    radial-gradient(at 40% 20%, rgba(255, 154, 86, 0.3) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(255, 107, 44, 0.2) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(255, 200, 150, 0.3) 0px, transparent 50%),
    radial-gradient(at 80% 50%, rgba(244, 114, 182, 0.12) 0px, transparent 50%),
    radial-gradient(at 20% 80%, rgba(244, 114, 182, 0.15) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(255, 220, 180, 0.3) 0px, transparent 50%);
}

.card-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-3d:hover {
  transform: translateY(-8px) rotateX(5deg);
}

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

  100% {
    background-position: 200% 0;
  }
}

.shimmer {
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

.phone-glow::before {
  content: "";
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, #ff9a56, #ff6b2c, #f472b6, #ff9a56);
  border-radius: inherit;
  z-index: -1;
  opacity: 0.6;
  filter: blur(15px);
}

/* Hero 3-phone fan layout */
.hero-phones-fan {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  gap: 0;
  position: relative;
  padding: 2rem 0;
}

.hero-phone {
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  flex-shrink: 0;
}

.hero-phone .phone-mockup {
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Center phone - largest, front */
.hero-phone-center {
  z-index: 20;
  position: relative;
}

.hero-phone-center .phone-mockup {
  width: 200px;
}

/* Left phone - smaller, rotated, behind */
.hero-phone-left {
  z-index: 10;
  transform: translateX(28px) rotateY(18deg) scale(0.82);
  opacity: 0.92;
  filter: brightness(0.97);
}

.hero-phone-left .phone-mockup {
  width: 180px;
}

.hero-phone-left:hover {
  transform: translateX(20px) rotateY(10deg) scale(0.88);
  opacity: 1;
  filter: brightness(1);
}

/* Right phone - smaller, rotated, behind */
.hero-phone-right {
  z-index: 10;
  transform: translateX(-28px) rotateY(-18deg) scale(0.82);
  opacity: 0.92;
  filter: brightness(0.97);
}

.hero-phone-right .phone-mockup {
  width: 180px;
}

.hero-phone-right:hover {
  transform: translateX(-20px) rotateY(-10deg) scale(0.88);
  opacity: 1;
  filter: brightness(1);
}

/* Responsive fan sizes */
@media (min-width: 640px) {
  .hero-phone-center .phone-mockup {
    width: 220px;
  }

  .hero-phone-left .phone-mockup,
  .hero-phone-right .phone-mockup {
    width: 195px;
  }

  .hero-phone-left {
    transform: translateX(32px) rotateY(18deg) scale(0.82);
  }

  .hero-phone-right {
    transform: translateX(-32px) rotateY(-18deg) scale(0.82);
  }
}

@media (min-width: 768px) {
  .hero-phone-center .phone-mockup {
    width: 240px;
  }

  .hero-phone-left .phone-mockup,
  .hero-phone-right .phone-mockup {
    width: 210px;
  }

  .hero-phone-left {
    transform: translateX(36px) rotateY(20deg) scale(0.82);
  }

  .hero-phone-right {
    transform: translateX(-36px) rotateY(-20deg) scale(0.82);
  }
}

/* ───── Mobile & Tablet optimizations ───── */

/* Smaller phone mockup chrome on small screens */
@media (max-width: 640px) {
  .phone-mockup {
    border-radius: 24px;
    padding: 6px;
  }

  .phone-screen {
    border-radius: 20px;
  }

  .phone-glow::before {
    filter: blur(8px);
    opacity: 0.35;
  }

  /* Show all 3 phones - scale the whole group down to fit */
  .hero-mockups {
    transform: scale(0.55);
    transform-origin: center center;
    margin: -3rem auto;
    display: flex;
    justify-content: center;
    max-width: 100%;
  }

  .hero-phone-center .phone-mockup {
    width: 180px;
  }

  .hero-phone-left .phone-mockup,
  .hero-phone-right .phone-mockup {
    width: 160px;
  }

  .hero-phone-left {
    transform: translateX(22px) rotateY(15deg) scale(0.82);
  }

  .hero-phone-right {
    transform: translateX(-22px) rotateY(-15deg) scale(0.82);
  }

  .float-3d {
    animation: none;
  }

  /* Reduce decorative blurs – heavy on mobile GPU */
  .mesh-gradient {
    opacity: 0.5;
  }
}

@media (max-width: 380px) {
  .hero-mockups {
    transform: scale(0.48);
  }
}

@media (max-width: 480px) and (min-width: 381px) {
  .hero-mockups {
    transform: scale(0.52);
  }
}

/* Tablet tweaks (md breakpoint) */
@media (min-width: 641px) and (max-width: 1023px) {
  .hero-phone-center .phone-mockup {
    width: 220px;
  }

  .hero-phone-left .phone-mockup,
  .hero-phone-right .phone-mockup {
    width: 190px;
  }
}

/* Feature tiles – equal height across both mode columns */
.feature-tiles-grid {
  grid-auto-rows: 1fr;
}

.feature-tiles-grid>.group {
  display: flex;
}

.feature-tiles-grid>.group>.glass-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.feature-tiles-grid>.group>.glass-card>.relative {
  flex: 1;
}

/* Gallery */
.gallery-scroll-container {
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-scroll-container::-webkit-scrollbar {
  display: none;
}

.gallery-scroll-container>.gallery-row {
  display: flex;
}

@media (max-width: 768px) {

  /* Gallery arrows – visible on mobile only */
  .gallery-arrow {
    display: flex;
  }

  .gallery-arrow-left.at-start,
  .gallery-arrow-right.at-end {
    opacity: 0.25;
    pointer-events: none;
  }

  /* Gallery dots */
  #gallery-dots .gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
  }

  #gallery-dots .gallery-dot.active {
    width: 18px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.7);
  }

  #gallery .gallery-scroll-container {
    overflow: hidden;
  }

  #gallery .gallery-scroll-container>.gallery-row {
    display: flex;
    width: max-content;
    transition: transform 0.4s ease;
  }

  #gallery .gallery-row {
    align-items: stretch;
    gap: 0.75rem;
    padding-inline: 0;
  }

  #gallery .gallery-row>* {
    flex: 0 0 auto;
  }

  #gallery .gallery-row .group {
    transform: none !important;
    transition: none !important;
  }

  #gallery .gallery-row .group>div:not(.phone-mockup) {
    display: none !important;
  }

  #gallery .gallery-row .phone-mockup {
    width: 140px !important;
    padding: 0;
    border-radius: 14px;
    background: transparent;
    box-shadow: none !important;
  }

  #gallery .gallery-row .gallery-dashboard .phone-mockup {
    width: 160px !important;
  }

  #gallery .gallery-row .phone-screen {
    border-radius: 14px;
    background: transparent;
  }

  #gallery .gallery-row .phone-screen img {
    display: block;
    width: 100%;
    height: auto;
  }
}

/* Gallery – desktop: original layout */
@media (min-width: 769px) {
  .gallery-arrow {
    display: none !important;
  }

  #gallery-dots {
    display: none !important;
  }

  #gallery .gallery-scroll-container {
    overflow: visible;
  }

  #gallery .gallery-scroll-container>.gallery-row {
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    transform: none !important;
    transition: none !important;
  }

  /* Restore hover effects on desktop */
  #gallery .gallery-row .group {
    transform-style: preserve-3d;
  }
}

/* Testimonials – equal height cards */
.grid.sm\:grid-cols-2>.animate-on-scroll {
  display: flex;
}

.grid.sm\:grid-cols-2>.animate-on-scroll>.glass-card {
  flex: 1;
}

/* Hide heavy decorative blurs on mobile */
@media (max-width: 768px) {
  .decorative-orb {
    display: none !important;
  }
}

/* Reduce animations for users who prefer it */
@media (prefers-reduced-motion: reduce) {

  .float-3d,
  .animate-float,
  .animate-pulse-slow,
  .animate-bounce-slow {
    animation: none !important;
  }

  .animate-on-scroll {
    opacity: 1 !important;
  }

  .shimmer {
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* FAQ accordion */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Touch-friendly tap targets */
@media (max-width: 768px) {
  .faq-question {
    min-height: 56px;
  }

  .mobile-nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
}

/* Prevent horizontal overflow on mobile */
html,
body {
  overflow-x: hidden;
}

/* CTA section responsive glass card */
@media (max-width: 480px) {
  .glass-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}