/* ═══════════════════════════════════════════════════════════════
   Pool Pro — Public Website  |  Shared Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #0369a1;
  --primary-dark: #0c4a6e;
  --primary-light:#0284c7;
  --accent:       #06b6d4;
  --accent-light: #67e8f9;
  --light-bg:     #f0f9ff;
  --white:        #ffffff;
  --text:         #0f172a;
  --text-muted:   #475569;
  --border:       #bae6fd;
  --radius:       12px;
  --shadow:       0 4px 24px rgba(3,105,161,.10);
  --shadow-lg:    0 12px 48px rgba(3,105,161,.16);
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --nav-h:        64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ── Typography ───────────────────────────────────────────────── */
h1,h2,h3,h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

/* ── Layout helpers ───────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .75rem 1.6rem;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
  border: 2px solid transparent;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(3,105,161,.35);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 20px rgba(3,105,161,.45); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.7);
}
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: var(--white); }

.btn-outline-dark {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-dark:hover { background: var(--light-bg); }

/* ── Navigation ───────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(186,230,253,.5);
  box-shadow: 0 1px 8px rgba(3,105,161,.06);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo .logo-icon { font-size: 1.4rem; }
.nav-logo span.biz-name { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-links a {
  padding: .45rem .85rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  background: var(--light-bg);
}
.nav-links a.nav-portal {
  background: var(--primary);
  color: var(--white);
  border-radius: 50px;
  padding: .45rem 1.1rem;
  font-weight: 600;
}
.nav-links a.nav-portal:hover { background: var(--primary-dark); }

/* hamburger */
.nav-burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-dark);
  padding: .25rem;
}

/* mobile drawer */
.nav-drawer {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: .75rem 1.25rem 1rem;
  gap: .25rem;
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  padding: .65rem .75rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-drawer a:hover { background: var(--light-bg); color: var(--primary); }
.nav-drawer a.nav-portal {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  border-radius: 50px;
  font-weight: 600;
  margin-top: .35rem;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--accent) 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgba(255,255,255,0.04)' d='M0,96L60,112C120,128,240,160,360,165.3C480,171,600,149,720,133.3C840,117,960,107,1080,117.3C1200,128,1320,160,1380,176L1440,192L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z'/%3E%3C/svg%3E") bottom/cover no-repeat;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,56 C360,0 1080,0 1440,56 L1440,56 L0,56 Z'/%3E%3C/svg%3E") bottom/cover no-repeat;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--accent-light);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}
.hero h1 { margin-bottom: 1rem; text-shadow: 0 2px 16px rgba(0,0,0,.15); }
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: .88;
  max-width: 560px;
  margin: 0 auto 2rem;
}
.hero-ctas { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── Stats bar ────────────────────────────────────────────────── */
.stats-bar {
  background: var(--white);
  padding: 2rem 0 2.5rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.stat-val {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-lbl {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: .3rem;
}

/* ── Section ──────────────────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-light { background: var(--light-bg); }
.section-dark  { background: var(--primary-dark); color: var(--white); }
.section-title {
  text-align: center;
  margin-bottom: .6rem;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}
.section-dark .section-subtitle { color: rgba(255,255,255,.7); }

/* ── Service cards ────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: transform .2s, box-shadow .2s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.service-icon {
  font-size: 2.2rem;
  margin-bottom: .75rem;
  display: block;
}
.service-card h3 { color: var(--primary-dark); margin-bottom: .5rem; }
.service-card p  { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }

/* detailed service card (services page) */
.service-card-lg {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  transition: transform .2s, box-shadow .2s;
}
.service-card-lg:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.service-card-lg .icon-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.service-card-lg h3 { color: var(--primary-dark); margin-bottom: .4rem; }
.service-card-lg p  { font-size: .88rem; color: var(--text-muted); line-height: 1.65; }
.service-card-lg ul {
  margin: .65rem 0 0 1rem;
  font-size: .85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

/* ── Why-us pillars ───────────────────────────────────────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.pillar-icon {
  font-size: 2rem;
  margin-bottom: .6rem;
}
.pillar h3 { font-size: 1rem; margin-bottom: .35rem; color: var(--primary-dark); }
.pillar p  { font-size: .87rem; color: var(--text-muted); }

/* ── CTA strip ────────────────────────────────────────────────── */
.cta-strip {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}
.cta-strip h2 { margin-bottom: .75rem; }
.cta-strip p  { opacity: .85; max-width: 520px; margin: 0 auto 2rem; }
.cta-strip .btn-cta-row { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── Contact page ─────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.form-card h3 { color: var(--primary-dark); margin-bottom: 1.25rem; }

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(3,105,161,.12);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.submit-btn {
  width: 100%;
  padding: .8rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .15s;
  margin-top: .5rem;
}
.submit-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.submit-btn:disabled { background: #94a3b8; cursor: not-allowed; transform: none; }

.form-success {
  display: none;
  text-align: center;
  padding: 2rem 0;
}
.form-success .check { font-size: 3rem; margin-bottom: .75rem; }
.form-success h3 { color: var(--primary-dark); }
.form-success p  { color: var(--text-muted); margin-top: .4rem; }

.contact-info-card {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.contact-info-card h3 { color: var(--primary-dark); margin-bottom: 1.25rem; }

.info-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}
.info-item:last-child { border-bottom: none; }
.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.info-label { font-size: .75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.info-value { font-size: .9rem; color: var(--text); margin-top: .15rem; font-weight: 500; }
.info-value a { color: var(--primary); }
.info-value a:hover { text-decoration: underline; }

/* ── Portal page ──────────────────────────────────────────────── */
.portal-wrap {
  min-height: calc(100vh - var(--nav-h) - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  background: var(--light-bg);
}
.portal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.portal-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}
.portal-card h2 { color: var(--primary-dark); margin-bottom: .6rem; }
.portal-card p  { color: var(--text-muted); font-size: .95rem; line-height: 1.65; }
.portal-badge {
  display: inline-block;
  background: var(--light-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}
.portal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}
.portal-reach { font-size: .88rem; color: var(--text-muted); }
.portal-reach a { color: var(--primary); font-weight: 600; }
.portal-reach a:hover { text-decoration: underline; }

/* ── Page hero (interior pages) ──────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 3.5rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,40 C360,0 1080,0 1440,40 L1440,40 L0,40 Z'/%3E%3C/svg%3E") bottom/cover no-repeat;
}
.page-hero h1 { margin-bottom: .5rem; }
.page-hero p  { opacity: .82; font-size: 1.1rem; }

/* light bg page hero */
.page-hero-light {
  background: var(--light-bg);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
  text-align: center;
}
.page-hero-light h1 { color: var(--primary-dark); }
.page-hero-light p  { color: var(--text-muted); margin-top: .5rem; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .nav-logo { color: var(--white); font-size: 1.2rem; margin-bottom: .75rem; }
.footer-brand .nav-logo span.biz-name { color: var(--accent-light); }
.footer-brand p { font-size: .85rem; line-height: 1.7; max-width: 260px; }
.footer-col h4 { color: var(--white); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .85rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.footer-col ul li a { font-size: .875rem; transition: color .15s; }
.footer-col ul li a:hover { color: var(--accent-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8rem;
}

/* ── Misc ─────────────────────────────────────────────────────── */
.badge-pill {
  display: inline-block;
  background: var(--light-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 50px;
}

.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links  { display: none; }
  .nav-burger { display: block; }

  .contact-grid     { grid-template-columns: 1fr; }
  .footer-grid      { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-brand p   { max-width: 100%; }
  .stats-grid       { grid-template-columns: 1fr; gap: 1.25rem; }
  .field-row        { grid-template-columns: 1fr; }
  .service-card-lg  { flex-direction: column; gap: 1rem; }
  .footer-bottom    { flex-direction: column; text-align: center; }
  .hero { padding: 3.5rem 0 3.5rem; }
  .section { padding: 3rem 0; }
}

@media (max-width: 480px) {
  .portal-card { padding: 2rem 1.25rem; }
}
