/* ===================================================================
   SmartWave Pool Automation — Modern Abstract Design
   =================================================================== */

/* --- Custom Properties ----------------------------------------------- */
:root {
  --sw-dark: #0a1628;
  --sw-navy: #0f1d32;
  --sw-surface: #1a2942;
  --sw-cyan: #00d4ff;
  --sw-teal: #0891b2;
  --sw-violet: #7c3aed;
  --sw-ice: #f0f9ff;
  --sw-slate: #94a3b8;
  --sw-gradient: linear-gradient(135deg, var(--sw-cyan), var(--sw-violet));

  --pico-font-family: 'DM Sans', sans-serif;
}

/* --- Pico Overrides -------------------------------------------------- */
body > main,
body > header,
body > footer {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--sw-dark);
}

a {
  text-decoration: none;
}

/* --- Site Header ----------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease;
}

.site-header.scrolled {
  background: rgba(10, 22, 40, 0.95);
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 0;
}
.nav-link:hover,
.nav-link.active {
  color: var(--sw-cyan);
}

.nav-cta {
  display: inline-block;
  background: var(--sw-gradient);
  color: #fff !important;
  padding: 0.55rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.mobile-toggle {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.25rem;
}

.mobile-menu {
  display: none;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-menu.open {
  display: block;
}

.mobile-nav-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--sw-cyan);
}

.mobile-nav-cta {
  display: inline-block;
  text-align: center;
  background: var(--sw-gradient);
  color: #fff !important;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* --- Hero Section ---------------------------------------------------- */
.hero-section {
  position: relative;
  background: linear-gradient(160deg, var(--sw-dark) 0%, var(--sw-navy) 50%, var(--sw-surface) 100%);
  overflow: hidden;
  padding-top: 80px;
}

.hero-section::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.12), transparent 70%);
  top: -200px;
  right: -150px;
  border-radius: 50%;
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1), transparent 70%);
  bottom: -100px;
  left: -100px;
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
}
.hero-wave svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Abstract Decorative Elements ------------------------------------ */
.gradient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.6;
}

.geo-ring {
  position: absolute;
  border: 2px solid rgba(0, 212, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.geo-square {
  position: absolute;
  border: 2px solid rgba(124, 58, 237, 0.06);
  border-radius: 8px;
  transform: rotate(45deg);
  pointer-events: none;
}

.dot-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 212, 255, 0.06) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* --- Gradient Text --------------------------------------------------- */
.gradient-text {
  background: var(--sw-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Buttons --------------------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--sw-gradient);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 24px rgba(0, 212, 255, 0.2);
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-secondary:hover {
  border-color: var(--sw-cyan);
  background: rgba(0, 212, 255, 0.08);
  color: var(--sw-cyan);
}

.btn-primary-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--sw-gradient);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 24px rgba(0, 212, 255, 0.15);
}
.btn-primary-dark:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.25);
  color: #fff;
}

/* --- Glass Cards ----------------------------------------------------- */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.08);
}

.glass-card-light {
  background: #fff;
  border: 1px solid rgba(10, 22, 40, 0.06);
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(10, 22, 40, 0.04);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card-light:hover {
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.1);
}

/* --- Service Card Icon ----------------------------------------------- */
.service-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--sw-gradient);
  color: #fff;
  margin-bottom: 1rem;
}
.service-icon-wrap svg {
  width: 26px;
  height: 26px;
}

/* --- Section Styling ------------------------------------------------- */
.section-dark {
  background: linear-gradient(160deg, var(--sw-dark) 0%, var(--sw-navy) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-light {
  background: var(--sw-ice);
  position: relative;
  overflow: hidden;
}

.section-white {
  background: #fff;
  position: relative;
  overflow: hidden;
}

/* --- Wave Divider ---------------------------------------------------- */
.wave-divider {
  line-height: 0;
  margin: 0;
  padding: 0;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Footer ---------------------------------------------------------- */
.site-footer {
  position: relative;
}
.footer-wave {
  line-height: 0;
  margin-top: -1px;
}
.footer-wave svg {
  display: block;
  width: 100%;
  height: auto;
}

.footer-link {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: var(--sw-cyan);
}

/* --- Contact Form ---------------------------------------------------- */
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  color: #fff;
  padding: 0.85rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--sw-cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
  outline: none;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--sw-slate);
}
.contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.contact-form select option {
  background: var(--sw-navy);
  color: #fff;
}
.contact-form label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  display: block;
}

/* --- Scroll Reveal Animations ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: if JS hasn't triggered visible within 2s, show content anyway */
@keyframes reveal-fallback {
  to { opacity: 1; transform: translateY(0); }
}
.reveal:not(.visible) {
  animation: reveal-fallback 0s 1.2s forwards;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Float Animation ------------------------------------------------- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
  animation: float-slow 8s ease-in-out infinite;
}

/* --- Badge ----------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 212, 255, 0.08);
  color: var(--sw-cyan);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 212, 255, 0.15);
}

.badge-dark {
  background: rgba(0, 212, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.12);
}

/* --- 404 Page -------------------------------------------------------- */
@keyframes wave-drift {
  0% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-15px) translateY(-8px); }
  100% { transform: translateX(0) translateY(0); }
}

.animate-wave-drift {
  animation: wave-drift 4s ease-in-out infinite;
}

/* --- Success Message ------------------------------------------------- */
.success-message {
  text-align: center;
  padding: 3rem 2rem;
}
.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--sw-gradient);
  margin-bottom: 1.5rem;
}

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 768px) {
  .hero-section {
    padding-top: 70px;
  }
}
