/* Pinellas Pool Remodeling. No framework. Mobile first. */
:root {
  --navy: #0b3a5b; --navy-2: #072a43; --blue: #0f6fb0; --aqua: #19a7ce; --sky: #eaf5fb; --sky-2: #d7ecf6;
  --ink: #12263a; --muted: #4f6274; --line: #d9e6ee; --bg: #ffffff; --sun: #f5b300; --sun-ink: #2b2100;
  --radius: 14px; --shadow: 0 10px 30px rgba(7, 42, 67, .12);
  --display: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.65 var(--body); color: var(--ink); background: var(--bg); padding-bottom: 76px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.25rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 99; background: #fff; padding: 8px 12px; }
.icon { width: 24px; height: 24px; flex: none; }
.icon-sm { width: 18px; height: 18px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font: 600 1rem/1 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-call { background: var(--sun); color: var(--sun-ink); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.8); }
.btn-light { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand-icon { width: 38px; height: 38px; flex: none; }
.logo-text { font: 600 1.1rem/1.1 var(--display); color: var(--navy); }
.logo-text strong { color: var(--blue); font-weight: 700; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; align-items: center; }
.main-nav a, .main-nav summary { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .97rem; cursor: pointer; }
.main-nav a[aria-current="page"] { color: var(--blue); }
.has-sub { position: relative; }
.has-sub summary { list-style: none; }
.has-sub summary::-webkit-details-marker { display: none; }
.has-sub summary::after { content: ""; display: inline-block; margin-left: 6px; border: 5px solid transparent; border-top-color: currentColor; transform: translateY(3px); }
.sub { position: absolute; top: 36px; left: -14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 10px !important; display: grid !important; gap: 2px !important; min-width: 260px; }
.sub a { display: block; padding: 8px 10px; border-radius: 8px; }
.sub a:hover { background: var(--sky); }
.header-call { display: none; }
@media (max-width: 899px) { .main-nav { display: none; } }
@media (min-width: 900px) { .header-call { display: inline-flex; } body { padding-bottom: 0; } }

/* Breadcrumbs */
.crumbs { background: var(--sky); font-size: .88rem; }
.crumbs ol { list-style: none; margin: 0; padding: 10px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Hero */
.hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; background: var(--navy); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4,24,40,.86) 0%, rgba(4,24,40,.62) 50%, rgba(4,24,40,.35) 100%); }
.hero-plain { background: linear-gradient(135deg, var(--navy-2), var(--blue)); }
.hero-plain .hero-shade { display: none; }
.hero h1 { color: #fff; }
.hero .lead { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: #e6f2f9; max-width: 36em; }
.hero-sub { color: #cfe3ef; font-size: .98rem; }
.referral-note { display: inline-block; margin: 0 0 18px; padding: 6px 12px; border-radius: 999px; font-size: .9rem; font-weight: 600; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.hero-home { padding: 56px 0 64px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .hero-home { padding: 96px 0; min-height: 640px; } .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; } }
.hero-page { padding: 64px 0; }
@media (min-width: 900px) { .hero-page { padding: 96px 0; } }
.hero-page .hero-copy { max-width: 760px; margin-left: max(16px, calc((100% - 1160px) / 2)); }

/* Quote form card */
.quote-form { background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,.28); padding: 26px; display: grid; gap: 12px; }
.form-title { font-size: 1.5rem; margin: 0; }
.form-sub { margin: 0 0 4px; color: var(--muted); font-size: .95rem; }
.quote-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.quote-form input, .quote-form textarea { font: inherit; font-weight: 400; padding: 11px 12px; border: 1px solid #c3d4df; border-radius: 10px; background: #fbfdfe; }
.quote-form input:focus, .quote-form textarea:focus { outline: 3px solid var(--sky-2); border-color: var(--blue); }
.consent { font-size: .8rem; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -5000px; }

/* Sections */
.section { padding: 64px 0; }
.section.alt { background: var(--sky); }
@media (min-width: 900px) { .section { padding: 88px 0; } }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow { display: inline-block; font: 600 .8rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.prose { max-width: 760px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.two-col { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 56px; } }
.media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* Cards */
/* Grids sized to their item count (layout.mjs colsFor): one column on phones, never a lone card on a row above that. */
.cards, .steps { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .c2, .c4 { grid-template-columns: repeat(2, 1fr); }
  .c3 { grid-template-columns: repeat(3, 1fr); }
  .c5 { grid-template-columns: repeat(6, 1fr); } .c5 > * { grid-column: span 3; } .c5 > :nth-child(-n+3) { grid-column: span 2; }
}
@media (min-width: 1000px) { .c4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 2px 0 rgba(7,42,67,.03); }
.section.alt .card { border-color: transparent; box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a::after { content: " \2192"; color: var(--blue); }
.card-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--sky); color: var(--blue); margin-bottom: 14px; }
.section.alt .card-icon { background: var(--sky-2); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .icon { color: var(--aqua); margin-top: 2px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 14px; background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.section.alt .steps li { border-color: transparent; box-shadow: var(--shadow); }
.step-n { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 1.1rem/1 var(--display); }
.steps p { margin: 0; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .98rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy); color: #fff; font-family: var(--display); font-weight: 600; }
tbody tr:nth-child(even) td { background: #f6fafc; }
tbody tr:last-child td { border-bottom: 0; }
.table-note { color: var(--muted); font-size: .92rem; margin-top: 10px; }

/* Cost note + drivers */
.cost-box { background: #fff; border-radius: var(--radius); border-left: 5px solid var(--sun); padding: 22px 24px; box-shadow: var(--shadow); margin-top: 20px; }
.cost-note { font-weight: 600; color: var(--navy); }
.drivers { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.drivers li { display: flex; gap: 8px; color: var(--muted); }
.drivers li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .55em; border-radius: 50%; background: var(--aqua); }

/* FAQ accordions */
.faqs { display: grid; gap: 12px; max-width: 860px; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.section.alt .faq { border-color: transparent; box-shadow: 0 4px 16px rgba(7,42,67,.07); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 1.05rem; }
.faq-plus { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--sky); position: relative; }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 2px; background: var(--blue); }
.faq-plus::after { transform: rotate(90deg); transition: transform .2s; }
.faq[open] .faq-plus::after { transform: rotate(0); }
.faq-a { padding: 0 20px 6px; color: var(--muted); }

/* Pills / on-this-page */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.pills a { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--sky); color: var(--navy); text-decoration: none; font-weight: 600; font-size: .9rem; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--navy-2), var(--blue)); color: #fff; padding: 56px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d7e9f4; margin: 0; }
.cta-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .cta-grid { grid-template-columns: 1.4fr 1fr; } .cta-grid .btn-row { justify-content: flex-end; } }

/* Sources (collapsed, bottom of page) */
.sources { font-size: .85rem; color: var(--muted); padding: 18px 0 24px; }
.sources summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.sources ol { margin: 10px 0 0; padding-left: 1.2em; columns: 2 320px; }
.sources a { color: var(--muted); }

/* Footer */
.site-footer { background: var(--navy-2); color: #c9dbe7; padding: 48px 0 32px; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.foot-logo { display: flex; align-items: center; gap: 10px; }
.foot-logo .logo-text { color: #fff; font-size: 1.15rem; }
.foot-logo strong { color: var(--aqua); }
.foot-h { color: #fff; font-weight: 600; margin-bottom: 8px; }
.foot-links { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.site-footer a { color: #c9dbe7; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.disclosure { font-size: .92rem; }
.small { font-size: .85rem; }

/* Mobile sticky bar: Call + Get a Quote */
.call-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -6px 20px rgba(7,42,67,.15); }
.call-bar .btn { padding: 13px 10px; }
@media (min-width: 900px) { .call-bar { display: none; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
.hero a.on-dark { color: #fff; }

/* Mobile menu (no JS) */
.mobile-nav { position: relative; }
.mobile-nav summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); color: var(--navy); cursor: pointer; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav ul { position: absolute; right: 0; top: 52px; list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 260px; display: grid; gap: 2px; }
.mobile-nav a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.mobile-nav a:hover { background: var(--sky); }
@media (min-width: 900px) { .mobile-nav { display: none; } }

/* Section variety: backgrounds and rhythm */
.section.warm { background: #fbf7ef; }
.section.tight { padding: 44px 0; }
@media (min-width: 900px) { .section.tight { padding: 56px 0; } .section.roomy { padding: 112px 0; } }
.section.dark { background: var(--navy); color: #d8e8f2; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark a { color: #8fd6ef; }
.section.dark .checks .icon { color: var(--sun); }
.section.dark table { color: var(--ink); }
.section.rule { border-top: 1px solid var(--line); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46em; }
.section.dark .lede { color: #c6dbe8; }

/* Split: photo + text */
.split-grid { display: grid; gap: 28px; align-items: center; }
.split-media { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .split-grid { grid-template-columns: 1.05fr 1fr; gap: 64px; } .split-grid.reverse .split-media { order: 2; } }
.split-copy > :last-child { margin-bottom: 0; }

/* Two-up text blocks (no icons) */
.duo { display: grid; gap: 28px; }
@media (min-width: 760px) { .duo { grid-template-columns: 1fr 1fr; gap: 48px; } }
.duo h3 { margin-bottom: .35em; }
.duo p { color: var(--muted); }
.callout { border-left: 4px solid var(--aqua); padding: 4px 0 4px 18px; }

/* Dark section text contrast */
.section.dark .section-head p, .section.dark .table-note { color: #c6dbe8; }
/* Price drivers: balanced columns instead of a grid, so no bullet sits alone on a row */
.drivers { display: block; columns: 2 240px; column-gap: 32px; }
.drivers li { break-inside: avoid; margin-bottom: 8px; }

/* Logo (palm + wave mark with outlined Outfit wordmark): ~44px tall desktop, ~36px mobile */
.logo-img { display: block; height: 36px; width: auto; }
@media (min-width: 900px) { .logo-img { height: 44px; } }
.logo-foot { height: 44px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Header logo: stacked wordmark at 44px on desktop; one-line mark + "Pinellas Pool Remodeling" at 36px on mobile
   (stacked "REMODELING" would be under 10px tall at 36px). */
.logo-desktop { display: none; }
.logo-mobile { display: block; height: 36px; }
@media (min-width: 900px) { .logo-desktop { display: block; height: 44px; } .logo-mobile { display: none; } }

/* Form status */
.form-status { margin: 0; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .95rem; background: var(--sky); color: var(--navy); }
.form-status.ok { background: #e3f6ee; color: #11573f; }
.form-status.err { background: #fdecea; color: #8a1c12; }
.form-status.err a { color: inherit; }
.coming-soon { font-weight: 600; color: var(--navy); background: var(--sky); border-radius: 10px; padding: 12px 16px; display: inline-block; }
