/* ===== CUSTOM STYLES FOR HYDRO TECH POOLS ===== */

/* Base */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Selection color */
::selection {
  background: #F05A35;
  color: white;
}

/* ===== NAVIGATION ===== */
#site-header {
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #F05A35;
  border-radius: 1px;
  transition: width 0.25s ease;
}

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

/* Mobile menu */
#mobile-menu {
  animation: slideDown 0.25s ease-out;
}

#mobile-menu.hidden {
  animation: slideUp 0.2s ease-in forwards;
}

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

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

.mobile-nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.mobile-nav-link:hover {
  color: #F05A35;
}

/* ===== REVEAL ANIMATIONS ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-inline {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* When JS adds the class, animate into view */
.js-enabled .reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(24px);
}

.js-enabled .reveal-inline {
  opacity: 0;
  transform: translateY(12px);
}

.js-enabled .reveal-inline.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for cards */
.js-enabled .reveal:nth-child(1) { transition-delay: 0.05s; }
.js-enabled .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-enabled .reveal:nth-child(3) { transition-delay: 0.15s; }
.js-enabled .reveal:nth-child(4) { transition-delay: 0.2s; }
.js-enabled .reveal:nth-child(5) { transition-delay: 0.25s; }
.js-enabled .reveal:nth-child(6) { transition-delay: 0.3s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-inline {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ===== CARD HOVER EFFECTS ===== */
.card {
  will-change: transform;
}

/* ===== SMOOTH SCROLL OFFSET ===== */
section[id] {
  scroll-margin-top: 80px;
}

/* ===== FORM STYLES ===== */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B7B8C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  appearance: none;
}

/* ===== SUBTLE WAVE PATTERN (decorative) ===== */
.wave-divider {
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23F7F7F8' d='M0,30 C360,60 720,0 1080,30 C1260,45 1380,35 1440,30 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat center;
  background-size: cover;
}

/* ===== IMAGE PLACEHOLDER FALLBACK ===== */
img {
  max-width: 100%;
  height: auto;
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
  outline: 2px solid #F05A35;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 767px) {
  section[id] {
    scroll-margin-top: 70px;
  }

  .font-serif {
    word-break: break-word;
  }
}

/* ===== PRINT ===== */
@media print {
  #site-header, .reveal { display: none; }
  body { color: #000; background: #fff; }
}
