/* ============================================================
   Prestige Home FL — Apple-inspired design system
   Dependency-free. Tokens first, then primitives, then sections.
   ============================================================ */

:root {
  /* Brand tokens — from the Prestige logo: navy wordmark + red roof triangle */
  --accent: #ee2326;          /* Prestige red — CTAs and eyebrows */
  --accent-hover: #c9191c;
  --accent-soft: #fdecec;
  --navy: #2b3990;            /* logo navy — links, icons, secondary UI */
  --navy-soft: #eef0f9;
  --dark: #1a2260;            /* deep navy — CTA banner / license badge */
  --gold: #e8a33d;            /* review stars only */

  /* Apple-neutral surfaces */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --hairline: rgba(0, 0, 0, 0.08);

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 28px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 12px 40px rgba(0, 0, 0, 0.12);

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --nav-h: 52px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }

/* ---------- Type scale ---------- */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

.display {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  line-height: 1.06;
  font-weight: 700;
}

.headline {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
}

.subhead {
  font-size: clamp(1.1rem, 2vw, 1.375rem);
  line-height: 1.45;
  color: var(--ink-2);
  font-weight: 400;
  max-width: 42em;
}

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

/* ---------- Layout ---------- */
.wrap { width: min(1120px, calc(100% - 44px)); margin: 0 auto; }
.wrap-narrow { width: min(820px, calc(100% - 44px)); margin: 0 auto; }

section { padding: clamp(72px, 10vw, 128px) 0; }
section.alt { background: var(--bg-alt); }

.section-head { text-align: center; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .subhead { margin: 16px auto 0; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--hairline); background: rgba(255, 255, 255, 0.85); }

.nav-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em; }
.nav-logo img { height: 30px; width: auto; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink); font-size: 0.875rem; opacity: 0.85; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

.nav-phone { font-weight: 600; color: var(--navy); }

.lang-toggle {
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 980px;
  padding: 5px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}
.lang-toggle:hover { border-color: var(--navy); color: var(--navy); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px;
  border-radius: 980px;
  font-size: 1.0625rem; font-weight: 500;
  border: none; cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-lift); }

.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-ghost:hover { background: var(--navy-soft); }

.btn-small { padding: 8px 18px; font-size: 0.875rem; }
.btn-xl { padding: 16px 36px; font-size: 1.125rem; }

.link-more { font-size: 1.0625rem; font-weight: 500; }
.link-more::after { content: " ›"; }

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--nav-h) + clamp(64px, 10vw, 120px)) 0 clamp(64px, 9vw, 110px);
  text-align: center;
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--accent-soft) 0%, rgba(255,255,255,0) 65%),
    var(--bg);
}
.hero .subhead { margin: 22px auto 0; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 0.8125rem; color: var(--ink-3); }

/* ---------- Trust bar ---------- */
.trust {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.trust-item { text-align: center; }
.trust-item strong { display: block; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; color: var(--navy); }
.trust-item span { font-size: 0.8125rem; color: var(--ink-2); }

/* ---------- Interrogation probes (self-interrogation sections) ---------- */
.probe { padding: clamp(56px, 9vw, 72px) 0; }
.probe-content { max-width: 720px; margin: 0; text-align: left; }
.probe-content .headline { font-size: clamp(1.75rem, 4.5vw, 2.5rem); margin-bottom: 16px; }
.probe-content .subhead-left {
  font-size: clamp(1.0625rem, 1.6vw, 1.125rem);
  line-height: 1.55;
  color: var(--ink-2);
  font-weight: 400;
  max-width: 62ch;
  margin: 0 0 24px;
}
.probe-content .link-more { font-size: 1.1875rem; font-weight: 600; }
.probe-content .btn { margin-top: 4px; }

.probe-answers { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.probe-content .btn-probe { font-size: 0.9375rem; padding: 11px 22px; margin-top: 0; }

.probe-authority { font-size: 0.8125rem; color: var(--ink-3); margin: 16px 0 0; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg);
  border-radius: var(--radius-l);
  padding: 36px 30px;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
section.alt .card { box-shadow: none; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }

.card h3 { font-size: 1.375rem; margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 0.9875rem; margin: 0 0 16px; }

.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--navy-soft); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 26px; height: 26px; }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 0; }
.step-num {
  font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--accent); line-height: 1; margin-bottom: 14px;
}
.step h3 { font-size: 1.25rem; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 0.9375rem; margin: 0; }

/* ---------- Florida cities ---------- */
.cities { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.city-chip {
  padding: 12px 22px; border-radius: 980px;
  background: var(--bg); border: 1px solid var(--hairline);
  font-size: 0.9375rem; font-weight: 500; color: var(--ink);
}
.license-badge {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 36px; padding: 14px 26px;
  background: var(--dark); color: #fff; border-radius: var(--radius-m);
  font-size: 0.9375rem; font-weight: 500;
}

/* ---------- Reviews ---------- */
.review-card .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 14px; font-size: 1.05rem; }
.review-card blockquote { margin: 0 0 18px; font-size: 1rem; line-height: 1.55; color: var(--ink); }
.review-card cite { font-style: normal; font-size: 0.875rem; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--hairline);
  padding: 22px 0;
}
.faq-item:first-child { border-top: 1px solid var(--hairline); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--navy);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  color: var(--ink-2);
  font-size: 0.9875rem;
  line-height: 1.65;
  margin: 14px 0 0;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--dark); color: #fff;
  border-radius: var(--radius-l);
  padding: clamp(48px, 7vw, 80px) clamp(28px, 6vw, 72px);
  text-align: center;
}
.cta-banner .headline { color: #fff; }
.cta-banner .subhead { color: rgba(255, 255, 255, 0.75); margin: 16px auto 32px; }

/* ---------- Footer ---------- */
footer {
  padding: 56px 0 40px;
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem; color: var(--ink-2);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-grid h4 { font-size: 0.8125rem; color: var(--ink); margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--ink-2); }
.footer-grid a:hover { color: var(--ink); }
.footer-legal { border-top: 1px solid var(--hairline); padding-top: 24px; color: var(--ink-3); line-height: 1.7; }

/* ---------- Funnel (quote.html) ---------- */
.funnel-page {
  min-height: 100vh;
  background: var(--bg-alt);
  padding: calc(var(--nav-h) + 48px) 0 80px;
}
.funnel-card {
  background: var(--bg);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  padding: clamp(32px, 5vw, 56px);
  max-width: 640px; margin: 0 auto;
}
.funnel-progress { display: flex; gap: 8px; margin-bottom: 36px; }
.funnel-progress span {
  height: 4px; flex: 1; border-radius: 4px;
  background: var(--hairline); transition: background 0.4s var(--ease);
}
.funnel-progress span.done { background: var(--navy); }

.funnel-step { display: none; }
.funnel-step.active { display: block; animation: stepIn 0.45s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.funnel-step h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: 8px; }
.funnel-step .hint { color: var(--ink-2); font-size: 0.9375rem; margin: 0 0 28px; }

.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 28px; }
.option-tile {
  border: 1.5px solid var(--hairline); border-radius: var(--radius-m);
  padding: 22px 18px; cursor: pointer; text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  font-weight: 500; font-size: 0.9875rem; background: var(--bg);
}
.option-tile:hover { border-color: var(--navy); }
.option-tile.selected { border-color: var(--navy); background: var(--navy-soft); }
.option-tile .tile-icon { font-size: 1.6rem; display: block; margin-bottom: 8px; }

/* Step 1 — region select: 5 tiles on the default 2-up .option-grid; the
   existing 5-tile rule below (nth-child(5):last-child) spans the last tile
   full-width, same treatment as the roof-age step. */

.region-outside {
  display: block; margin: 14px auto 0;
  background: none; border: none; padding: 4px; font-family: inherit;
  font-size: 0.8125rem; color: var(--ink-3); text-decoration: underline;
  text-align: center; cursor: pointer;
}
.region-outside:hover { color: var(--ink-2); }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.field input, .field select {
  width: 100%; padding: 14px 16px;
  border: 1.5px solid var(--hairline); border-radius: var(--radius-s);
  font-size: 1rem; font-family: inherit; background: var(--bg); color: var(--ink);
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--navy); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.consent {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-alt); border-radius: var(--radius-s);
  padding: 16px; margin: 6px 0 24px;
}
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--navy); flex-shrink: 0; }
.consent label { font-size: 0.78rem; color: var(--ink-2); line-height: 1.55; }

.funnel-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.funnel-nav-single { justify-content: flex-end; }
.btn-back { background: none; border: none; color: var(--ink-2); font-size: 0.9375rem; cursor: pointer; padding: 12px 8px; font-family: inherit; }
.btn-back:hover { color: var(--ink); }

/* 5-tile groups (e.g. roof age): let the last tile span the full row instead
   of leaving a lonely half-width tile dangling. */
.option-grid .option-tile:nth-child(5):last-child { grid-column: 1 / -1; }
/* 3-tile groups (e.g. insurance notice): same treatment. */
.option-grid .option-tile:nth-child(3):last-child { grid-column: 1 / -1; }

/* ---------- Thank-you verdict (thank-you.html) ---------- */
.verdict-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 20px 0; }
.verdict-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 16px; border-radius: var(--radius-s);
  background: var(--bg-alt); border: 1px solid var(--hairline);
  text-align: left;
}
.verdict-chip strong { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
.verdict-chip span { font-size: 0.875rem; color: var(--ink); font-weight: 500; }
.verdict-followup { max-width: 440px; margin: 4px auto 20px; }
.btn-call { margin: 4px 0 8px; font-size: 1.1875rem; padding: 16px 34px; }

.funnel-success, .funnel-deadend { text-align: center; padding: 24px 0; }
.success-check {
  width: 72px; height: 72px; margin: 0 auto 24px; border-radius: 50%;
  background: var(--navy-soft); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.deadend-icon {
  width: 72px; height: 72px; margin: 0 auto 24px; border-radius: 50%;
  background: var(--bg-alt); color: var(--ink-2); border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.funnel-deadend h2 { font-size: clamp(1.4rem, 3vw, 1.7rem); }
.funnel-deadend .hint { margin: 10px auto 0; max-width: 420px; }
.funnel-deadend .btn { margin-top: 20px; }

.error-msg { color: #d70015; font-size: 0.8125rem; margin: -8px 0 16px; display: none; }
.error-msg.show { display: block; }

/* ---------- Legal pages ---------- */
.legal-page { padding: calc(var(--nav-h) + 56px) 0 96px; }
.legal-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.legal-page .updated { color: var(--ink-3); font-size: 0.875rem; margin-bottom: 40px; }
.legal-page h2 { font-size: 1.375rem; margin: 40px 0 12px; }
.legal-page p, .legal-page li { color: var(--ink-2); font-size: 0.9875rem; line-height: 1.7; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile CTA bar ---------- */
.mobile-cta { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  /* Tablet widths (e.g. 768/834/1024): the full anchor-link row overlaps the
     phone number + CTA + lang toggle. Drop to the same reduced nav used on
     phone widths — only phone, Free Estimate, and lang toggle remain. */
  .nav-links a:not(.btn):not(.nav-phone) { display: none; }
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr 1fr; }
  .option-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-phone { display: none; }
  .probe { padding: 44px 0; }
  .probe-content { max-width: 100%; }

  .mobile-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--hairline);
  }
  .mobile-cta .btn {
    flex: 1;
    padding: 12px 26px;
    font-size: 1.0625rem;
  }

  footer { padding-bottom: 96px; }
}

/* Service material photos */
.card-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 18px;
}

/* Probe section ghost numerals (desktop only) */
.probe { position: relative; overflow: hidden; }
.probe::after {
  content: attr(data-probe-num);
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(140px, 16vw, 230px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #2b3990;
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 900px) {
  .probe::after { display: none; }
}
