/* ============================================
   Old Palm Pool Construction — Site Styles
   Palette pulled from the logo:
   navy palms (#16395C) + orange sun (#F5821F)
   ============================================ */

:root {
  --navy: #16395c;
  --navy-deep: #0f2a46;
  --orange: #f5821f;
  --orange-dark: #d96d10;
  --orange-text: #c2410c; /* AA-contrast orange for small text on light bg */
  --sand: #faf7f2;
  --white: #ffffff;
  --ink: #1c2b3a;
  --muted: #5c6b7a;
  --line: #e6e0d6;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(15, 42, 70, 0.10);
  --container: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: "Marcellus", Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p { margin-bottom: 1rem; }

a { color: var(--navy); }

/* Keyboard focus — visible outline for tab navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.gallery-item:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.section.sand { background: var(--sand); }
.section.navy { background: var(--navy); }
.section.navy h2, .section.navy h3 { color: var(--white); }
.section.navy p { color: rgba(255, 255, 255, 0.85); }

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-text);
  margin-bottom: 14px;
}

.section-head {
  max-width: 680px;
  margin-bottom: 56px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head p { color: var(--muted); margin-top: 16px; margin-bottom: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); }

.btn-ghost { border-color: rgba(255, 255, 255, 0.7); color: var(--white); background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }

.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(15, 42, 70, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img { width: 52px; height: 52px; }
.brand-name {
  font-family: "Marcellus", Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.15;
  color: var(--navy);
}
.brand-name small {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
}

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--orange); }
.site-nav a.active { color: var(--orange); }
.site-nav .btn { padding: 11px 24px; }

.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: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  flex-direction: column;
  color: var(--white);
  background: var(--navy-deep);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
}
.hero-inner > .container { width: 100%; }
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 42, 70, 0.30) 0%, rgba(15, 42, 70, 0.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 48px 0;
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 540px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  padding: 110px 0 90px;
  overflow: hidden;
}
.page-hero .hero-bg { opacity: 0.25; }
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 42, 70, 0.2), rgba(15, 42, 70, 0.5));
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero p { color: rgba(255, 255, 255, 0.85); max-width: 620px; font-size: 1.1rem; margin: 0; }

/* ---------- Trust strip ---------- */

.trust-strip {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
/* When pinned inside the hero, paint above the image/overlay */
.hero .trust-strip { position: relative; z-index: 2; }
.trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.trust-item img { height: 56px; width: auto; }
.trust-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--orange);
  flex-shrink: 0;
}
.trust-badge svg { width: 17px; height: 17px; }
.trust-item .trust-seal { height: 48px; width: auto; }
.trust-item .trust-logo { height: 34px; width: auto; }

/* PebbleTec Elite Builder seal used in content sections */
.elite-seal { width: 92px; height: auto; flex-shrink: 0; }
.elite-callout {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
.elite-callout .elite-seal { width: 120px; height: auto; }
.elite-callout h2 { margin-bottom: 10px; }
.elite-callout p { color: var(--muted); margin: 0; }
@media (max-width: 560px) {
  .elite-callout { flex-direction: column; text-align: center; gap: 18px; }
}
.section.navy .eyebrow { color: #ffb877; }
.section.navy .elite-callout p { color: rgba(255, 255, 255, 0.85); }

/* Brand / partner logos */
.brands-eyebrow {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}
.brand-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 72px;
  flex-wrap: wrap;
}
.brand-logos img {
  height: 56px;
  width: auto;
}
.brand-inline { height: 50px; width: auto; margin: 0 auto 22px; display: block; }
.card-brand { height: 30px; width: auto; margin-bottom: 16px; align-self: flex-start; }
@media (max-width: 560px) {
  .brand-logos { gap: 40px; }
  .brand-logos img { height: 44px; }
}

/* ---------- Cards / grids ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin: 20px 0 10px; }
.card p { color: var(--muted); font-size: 0.97rem; margin: 0; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--sand);
  color: var(--orange);
}
.card-icon svg { width: 28px; height: 28px; }

/* ---------- Split section ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.split-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.split-img img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}
.split-body h2 { margin-bottom: 20px; }
.split-body p { color: var(--muted); }
.split-body .btn { margin-top: 12px; }

.checklist {
  list-style: none;
  margin: 24px 0 8px;
}
.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
  color: var(--ink);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--orange);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / 14px no-repeat, linear-gradient(#fff, #fff);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / 14px no-repeat, linear-gradient(#fff, #fff);
  -webkit-mask-composite: source-out;
  mask-composite: exclude;
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  background: var(--navy-deep);
}
.gallery-item img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.04); opacity: 0.92; }

.gallery-note {
  text-align: center;
  color: var(--muted);
  margin-top: 40px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 24, 38, 0.92);
  padding: 32px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
  text-align: center;
  padding: 88px 0;
}
.cta-band h2 { color: var(--white); margin-bottom: 14px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 560px; margin: 0 auto 32px; }
.cta-band .phone-line {
  display: block;
  margin-top: 22px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
}
.cta-band .phone-line a { color: var(--white); font-weight: 600; text-decoration: none; }
.cta-band .phone-line a:hover { color: var(--orange); }

/* ---------- Forms ---------- */

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group { margin-bottom: 22px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--navy);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--sand);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--white);
}
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 16px; }
.form-status { margin-top: 16px; font-weight: 600; font-size: 0.95rem; }
.form-status.success { color: #1a7f4b; }
.form-status.error { color: #c0392b; }

.contact-aside h3 { margin-bottom: 8px; }
.contact-aside p { color: var(--muted); }
.contact-aside .contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 1.02rem;
}
.contact-aside .contact-line a { text-decoration: none; font-weight: 600; }
.contact-aside .contact-line a:hover { color: var(--orange); }
.contact-aside .contact-line svg { width: 20px; height: 20px; color: var(--orange); flex-shrink: 0; }

/* ---------- Link-out cards (Design Your Pool) ---------- */

.linkout-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.linkout-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.linkout-card .linkout-img { height: 220px; overflow: hidden; }
.linkout-card .linkout-img img { width: 100%; height: 100%; object-fit: cover; }
.linkout-card .linkout-body { padding: 32px; flex: 1; display: flex; flex-direction: column; }
.linkout-card h3 { margin-bottom: 10px; }
.linkout-card p { color: var(--muted); font-size: 0.97rem; flex: 1; }
.linkout-card .linkout-cta {
  margin-top: 18px;
  font-weight: 600;
  color: var(--orange-text);
  font-size: 0.95rem;
}

/* Logo-forward brand cards (tile & mosaic brands) */
.brand-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.brand-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.brand-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  padding: 24px;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
}
.brand-card-logo img { max-height: 84px; max-width: 74%; width: auto; }
.brand-card-body { padding: 28px 32px; display: flex; flex-direction: column; flex: 1; }
.brand-card-body h3 { margin-bottom: 8px; }
.brand-card-body p { color: var(--muted); font-size: 0.97rem; flex: 1; margin-bottom: 0; }
.brand-card-body .linkout-cta { margin-top: 18px; font-weight: 600; color: var(--orange-text); font-size: 0.95rem; }

.step-list { counter-reset: step; list-style: none; max-width: 720px; margin: 0 auto; }
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 0 0 32px 72px;
}
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -4px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sand);
  border: 2px solid var(--orange);
  color: var(--navy);
  font-family: "Marcellus", serif;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-list h3 { margin-bottom: 6px; }
.step-list p { color: var(--muted); margin: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 72px 0 32px;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-brand img { width: 56px; height: 56px; }
.footer-brand span {
  font-family: "Marcellus", serif;
  font-size: 1.2rem;
  color: var(--white);
}
.site-footer h4 {
  color: var(--white);
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; transition: color 0.15s ease; }
.site-footer a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.social-links { display: flex; gap: 14px; margin-top: 20px; }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.social-links a:hover { border-color: var(--orange); background: rgba(245, 130, 31, 0.15); }
.social-links svg { width: 18px; height: 18px; }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-img img { height: 380px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .site-nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(15, 42, 70, 0.12);
    padding: 12px 24px 24px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; width: 100%; font-size: 1.05rem; }
  .site-nav .btn { margin-top: 12px; text-align: center; }
  .nav-toggle { display: block; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .grid-3, .grid-2, .gallery-grid { grid-template-columns: 1fr; }
  .hero { min-height: 76vh; }
  .hero-content { padding: 32px 0; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 32px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .gallery-item img { height: 300px; }

  /* Compact 3-up trust band so it stays short and visible on first load */
  .trust-strip { padding: 18px 0; }
  .trust-inner { gap: 12px; flex-wrap: nowrap; }
  .trust-item {
    flex: 1;
    flex-direction: column;
    gap: 7px;
    text-align: center;
    font-size: 0.58rem;
    line-height: 1.25;
  }
  .trust-item .trust-seal { height: 40px; }
  .trust-item .trust-logo { height: 26px; }
  .trust-badge { width: 30px; height: 30px; }
  .trust-badge svg { width: 16px; height: 16px; }
}
