/* ============================================================
   PENINSULA POOL CARE — style.css
   ============================================================ */

:root {
  --bg: #071322;
  --bg-secondary: #0d1f32;
  --text: #d6e8f0;
  --text-muted: #7da8bf;
  --accent: #00b4d8;
  --accent-dark: #0090ad;
  --white: #ffffff;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 4px;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
select, input, textarea {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: transparent;
}

/* ---- Loader ---- */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-text {
  font-family: var(--font-head);
  font-size: clamp(1rem, 4vw, 1.75rem);
  letter-spacing: 0.35em;
  color: var(--accent);
  animation: loaderPulse 1s ease-in-out infinite alternate;
}
@keyframes loaderPulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* ---- Navigation ---- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(7, 19, 34, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--accent);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--white);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--white); }
.nav-links .nav-cta {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.nav-links .nav-cta:hover {
  background: var(--accent);
  color: var(--bg);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}
.mobile-menu ul a {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: var(--text);
  transition: color var(--transition);
}
.mobile-menu ul a:hover { color: var(--accent); }
.mobile-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.mobile-close:hover { color: var(--white); }

/* ---- Hero ---- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: url('https://images.unsplash.com/photo-1575429198097-0414ec08e8cd?w=1920&auto=format&fit=crop') center center / cover no-repeat;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(7, 19, 34, 0.55) 0%,
    rgba(7, 19, 34, 0.3) 50%,
    rgba(7, 19, 34, 0.75) 100%
  );
  z-index: 1;
}
#water-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: all;
  opacity: 0.35;
}
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}
.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: block;
}
.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.hero-headline .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.hero-headline .word.visible {
  opacity: 1;
  transform: translateY(0);
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text);
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto 2.5rem;
}
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--text-muted);
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  transition: background var(--transition), color var(--transition), transform 0.15s ease;
  cursor: pointer;
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}
.btn-full { width: 100%; text-align: center; }

/* ---- Layout Helpers ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding: 7rem 0; }
.section-alt { background: var(--bg-secondary); }
.section-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 3rem;
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Services ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 180, 216, 0.1);
  border-bottom: 3px solid transparent;
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-bottom-color var(--transition), transform var(--transition);
}
.service-card:hover {
  border-bottom-color: var(--accent);
  transform: translateY(-4px);
}
.service-card h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.service-freq {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.service-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.service-card ul li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
}
.service-card ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}
.card-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  transition: letter-spacing var(--transition);
}
.card-link:hover { letter-spacing: 0.08em; }

/* ---- How It Works ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}
.step { }
.step-num {
  display: block;
  font-family: var(--font-head);
  font-size: 2.5rem;
  color: rgba(0, 180, 216, 0.2);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.step h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.step p { font-size: 0.95rem; color: var(--text-muted); }

/* ---- Chemical Health Panel ---- */
.chemical-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.chemical-copy .section-title { margin-bottom: 1.5rem; }
.chemical-copy p { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.95rem; }
.gauges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.gauge-svg {
  width: 100%;
  max-width: 120px;
  transform: rotate(-90deg);
}
.gauge-track {
  fill: none;
  stroke: rgba(0, 180, 216, 0.12);
  stroke-width: 8;
}
.gauge-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 301.6;
  stroke-dashoffset: 301.6;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.gauge-label { text-align: center; }
.gauge-name {
  display: block;
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--white);
}
.gauge-range {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ---- About ---- */
.about-inner { max-width: 800px; }
.about-headline {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 2rem;
}
.about-body p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  max-width: 620px;
}
.pull-quote {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding: 1rem 0 1rem 1.75rem;
  margin: 2.25rem 0;
  font-style: normal;
}

/* ---- Testimonials ---- */
.stats-row {
  display: flex;
  gap: 4rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}
.stat { min-width: 120px; }
.stat-num {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--accent);
  line-height: 1;
}
.stat-suffix {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--accent);
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.testimonial-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 180, 216, 0.1);
  border-radius: var(--radius);
  padding: 2.25rem;
}
.quote-mark {
  font-size: 4rem;
  line-height: 0.8;
  color: var(--accent);
  opacity: 0.4;
  font-family: Georgia, serif;
  margin-bottom: 1rem;
}
.testimonial-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-style: italic;
}
.testimonial-card cite {
  font-size: 0.8rem;
  font-weight: 500;
  font-style: normal;
  color: var(--accent);
  letter-spacing: 0.06em;
}

/* ---- Gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 1rem;
}
.gallery-tall { grid-row: span 2; }
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.gallery-item img {
  transition: filter 0.4s ease, transform 0.4s ease;
}
.gallery-item:hover img {
  filter: saturate(0.3) brightness(0.5);
  transform: scale(1.04);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--white);
  text-align: center;
}

/* ---- Contact ---- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.contact-copy .section-title { margin-bottom: 1.25rem; }
.contact-copy p { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.95rem; }
.contact-whatsapp a {
  color: var(--accent);
  font-weight: 500;
  transition: opacity var(--transition);
}
.contact-whatsapp a:hover { opacity: 0.7; }
.service-area-note {
  font-size: 0.78rem !important;
  color: rgba(125, 168, 191, 0.6) !important;
  line-height: 1.7;
}

/* Form */
.form-group {
  margin-bottom: 2rem;
  position: relative;
}
.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(125, 168, 191, 0.25);
  padding: 0.6rem 0;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  border-radius: 0;
}
.form-group select {
  cursor: pointer;
}
.form-group select option {
  background: var(--bg-secondary);
  color: var(--text);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: var(--accent);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(125, 168, 191, 0.35); }
.form-success, .form-error {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.form-success { background: rgba(0, 180, 216, 0.1); color: var(--accent); }
.form-error { background: rgba(220, 50, 50, 0.1); color: #f07070; }

/* ---- Footer ---- */
#footer {
  background: var(--bg);
  border-top: 1px solid rgba(0, 180, 216, 0.1);
  padding: 2.5rem 0 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.footer-left { font-size: 0.85rem; color: var(--text-muted); }
.footer-right { font-size: 0.85rem; color: var(--text-muted); }
.footer-right a { color: var(--accent); transition: opacity var(--transition); }
.footer-right a:hover { opacity: 0.7; }
.footer-copy p { font-size: 0.75rem; color: rgba(125, 168, 191, 0.4); }

/* ---- Floating WhatsApp ---- */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .chemical-inner { grid-template-columns: 1fr; gap: 3rem; }
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-tall { grid-row: span 2; }
}

/* Mobile */
@media (max-width: 768px) {
  .section { padding: 5rem 0; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-headline { font-size: clamp(2.2rem, 8vw, 3.2rem); }
  .services-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 2rem; }
  .gauges-grid { gap: 1.5rem; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 2.5rem; }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
  .gallery-tall { grid-row: span 1; }
  .footer-inner { flex-direction: column; text-align: center; }
  .whatsapp-float { bottom: 1.5rem; right: 1.5rem; }
}
