/* ============================================================
   TruBlue Pools Palm Beach — Design Tokens
   Palette: deep blue / pool blue / aqua-teal / foam / white
   Type: Outfit (display) + Inter (body/UI)
   Signature: wave dividers + ripple interactions
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy: #1e084b;
  --deep-blue: #3a1a72;
  --pool-blue: #0f649d;
  --aqua: #00c0f0;
  --aqua-light: #7fe0fa;
  --foam: #eaf7fa;
  --white: #ffffff;

  --text-body: #234653;
  --text-muted: #5c7d88;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-soft: 0 12px 30px rgba(11, 79, 108, 0.12);
  --shadow-lift: 0 18px 44px rgba(11, 79, 108, 0.18);

  --container: 1160px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }

p { margin: 0 0 1em; }

a { color: var(--pool-blue); text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pool-blue);
  margin-bottom: 0.8em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--aqua);
  display: inline-block;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate;
}
.btn:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--pool-blue);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.6);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-dark {
  background: var(--deep-blue);
  color: var(--white);
}
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }

/* Ripple signature interaction */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 60%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.6s ease;
  z-index: -1;
}
.btn:active::after {
  transform: scale(2.4);
  opacity: 1;
  transition: 0s;
}

/* ============ Header / Nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(11,79,108,0.08);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
}
.logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.logo small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--pool-blue);
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-body);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--aqua);
  transition: width 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--deep-blue); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-phone {
  font-weight: 700;
  color: var(--deep-blue);
  font-size: 0.95rem;
  white-space: nowrap;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: 0.25s;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--deep-blue) 0%, var(--pool-blue) 55%, var(--aqua) 130%);
  color: var(--white);
  padding: 92px 0 130px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 45%),
    radial-gradient(circle at 10% 80%, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 40%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-copy .eyebrow { color: var(--aqua-light); }
.hero-copy .eyebrow::before { background: var(--white); }
.hero h1 { color: var(--white); }
.hero-sub {
  font-size: 1.12rem;
  color: rgba(255,255,255,0.88);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.hero-trust {
  display: flex;
  gap: 26px;
  margin-top: 42px;
  flex-wrap: wrap;
}
.hero-trust div {
  display: flex;
  flex-direction: column;
}
.hero-trust strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}
.hero-trust span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Water ripple visual (signature) */
.hero-visual {
  position: relative;
  aspect-ratio: 1/1;
  max-width: 420px;
  justify-self: center;
}
.hero-visual svg { width: 100%; height: 100%; }
.ripple-ring {
  transform-origin: center;
  animation: ripple-pulse 5s ease-in-out infinite;
}
.ripple-ring.r2 { animation-delay: 1.1s; }
.ripple-ring.r3 { animation-delay: 2.2s; }
@keyframes ripple-pulse {
  0% { transform: scale(0.7); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ripple-ring { animation: none; opacity: 0.5; }
}

/* Wave divider signature */
.wave-divider {
  position: relative;
  line-height: 0;
  margin-top: -6px;
}
.wave-divider svg { width: 100%; height: 90px; display: block; }

/* ============ Sections ============ */
section { padding: 88px 0; }
.section-foam { background: var(--foam); }
.section-head {
  max-width: 640px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-head.left { margin: 0 0 52px; text-align: left; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 34px 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(11,79,108,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--foam);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--pool-blue);
}
.card-icon svg { width: 26px; height: 26px; }

/* Service area chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  background: var(--white);
  border: 1.5px solid rgba(28,134,168,0.25);
  color: var(--deep-blue);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Steps / process */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 46px;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--aqua);
  display: block;
  margin-bottom: 10px;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--foam), var(--aqua-light));
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item .tag {
  position: absolute;
  bottom: 12px; left: 12px;
  background: rgba(10,46,61,0.72);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}
.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--deep-blue);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
}

/* Testimonial */
.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-soft);
}
.testimonial p { font-size: 1.15rem; color: var(--navy); font-family: var(--font-display); font-weight: 500; }
.testimonial .stars { color: var(--aqua); letter-spacing: 3px; margin-bottom: 14px; }
.testimonial .who { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--deep-blue), var(--pool-blue));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }

/* Forms */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 42px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(11,79,108,0.18);
  background: var(--foam);
  color: var(--text-body);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--pool-blue);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 10px; }
.form-success {
  display: none;
  background: var(--foam);
  border: 1.5px solid var(--aqua);
  color: var(--deep-blue);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-top: 18px;
}
.form-success.show { display: block; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h4 {
  color: var(--white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: rgba(255,255,255,0.75); }
.footer-grid a:hover { color: var(--aqua-light); }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 14px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* Page hero (interior pages) */
.page-hero {
  background: linear-gradient(160deg, var(--deep-blue), var(--pool-blue));
  color: var(--white);
  padding: 70px 0 96px;
}
.page-hero h1 { color: var(--white); margin-bottom: 10px; }
.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 18px;
}
.breadcrumb a { color: rgba(255,255,255,0.9); }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 280px; margin-top: 20px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links, .nav-phone { display: none; }
  .nav-toggle { display: block; }
  .site-header.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    padding: 20px 24px 28px;
    box-shadow: var(--shadow-soft);
    gap: 18px;
  }
  .site-header.open .nav-phone { display: block; margin-top: 10px; }
  .grid-3, .grid-4, .steps, .gallery-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; padding: 40px 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .hero { padding: 56px 0 96px; }
}
