/* ============================================
   Poppy & Pollen — Custom Styles
   ============================================ */

/* Base resets & smooth scroll */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-subtitle {
  animation: slideUp 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-title {
  animation: slideUp 0.8s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.hero-desc {
  animation: slideUp 0.8s ease forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

.hero-cta {
  animation: slideUp 0.8s ease forwards;
  animation-delay: 0.8s;
  opacity: 0;
}

.hero-image {
  animation: fadeIn 1.2s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
  transform: scale(1.02);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

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

/* ============================================
   Scroll Indicator Animation
   ============================================ */
@keyframes scrollLine {
  0% {
    top: -100%;
  }
  100% {
    top: 100%;
  }
}

.animate-scroll-line {
  animation: scrollLine 1.5s ease-in-out infinite;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(4, 8, 16, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(129, 149, 208, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

.menu-line {
  display: block;
  transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}

.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ============================================
   Service Cards
   ============================================ */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 200, 160, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.service-card:hover::before {
  opacity: 1;
}

/* ============================================
   Input Focus States
   ============================================ */
input:focus,
textarea:focus {
  outline: none;
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
  background: rgba(61, 179, 127, 0.3);
  color: #e3f7ee;
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #080f20;
}

::-webkit-scrollbar-thumb {
  background: #1d3061;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a4182;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.15;
  }
}
