/* =========================================================
   TOKENS
========================================================= */
:root {
  /* Brand */
  --color-primary: #355B70;
  --color-primary-hover: #1C3845;
  --color-primary-light: #AFC4D1;
  --color-secondary: #93ACBA;
  --color-secondary-light: #E2E7EA;
  --color-accent: #C39F7D;
  --color-accent-dark: #9C7651;

  /* Backgrounds */
  --color-background: #F7F8F7;
  --color-surface: #FFFFFF;
  --color-surface-alt: #E2E7EA;

  /* Text */
  --color-text: #151B18;
  --color-text-secondary: #576B6B;
  --color-heading: #1C3845;
  --color-text-light: #FFFFFF;

  /* Borders */
  --color-border: #D1D4D6;
  --color-border-light: #E2E7EA;

  /* Buttons */
  --button-primary-bg: var(--color-primary);
  --button-primary-text: #FFFFFF;
  --button-primary-hover: var(--color-primary-hover);
  --button-secondary-bg: var(--color-secondary-light);
  --button-secondary-text: var(--color-heading);

  /* Status */
  --color-success: #477A61;
  --color-warning: #C39F7D;
  --color-danger: #B85454;
  --color-info: #5F8498;

  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(28, 56, 69, 0.08);
  --shadow-md: 0 4px 12px rgba(28, 56, 69, 0.12);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Layout + type */
  --nav-h: 120px;
  --tab-h: 0px;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: Lato, system-ui, -apple-system, "Segoe UI", sans-serif;
  --focus: var(--color-accent);
}

/* =========================================================
   BASE
========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 17px/1.6 var(--font-sans);
  color: var(--color-text);
  background: var(--color-background);
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--color-surface); color: var(--color-heading);
  padding: 10px 16px; border-radius: var(--radius-md); font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---- Scroll reveal helpers (JS adds .will-reveal, then .is-visible) ---- */
.reveal.will-reveal { opacity: 0; }
.reveal-left.will-reveal  { transform: translateX(-48px); }
.reveal-right.will-reveal { transform: translateX(48px) scale(.94); }
.reveal-up.will-reveal    { transform: translateY(32px); }

.reveal.will-reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
}
.reveal.delay-1.will-reveal.is-visible { transition-delay: .15s; }
.reveal.delay-2.will-reveal.is-visible { transition-delay: .3s; }
.reveal.delay-3.will-reveal.is-visible { transition-delay: .5s; }

/* ---- Shared keyframes ---- */
@keyframes fade-up    { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes item-in    { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes pop        { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes tick       { from { transform: rotate(45deg) scale(0); } to { transform: rotate(45deg) scale(1); } }
@keyframes card-in    { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes num-pop    { from { opacity: 0; transform: scale(.4) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes step-in    { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes img-settle { from { transform: scale(1.2); } to { transform: none; } }
@keyframes slide-l    { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@keyframes slide-r    { from { opacity: 0; transform: translateX(48px); }  to { opacity: 1; transform: none; } }

/* =========================================================
   SECTION 1: HEADER / NAV
   Transparent at the top, solid once the page is scrolled.
========================================================= */
.scroll-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 40px; pointer-events: none; }

.site-header {
  --nav-fg: #FFFFFF;
  --nav-underline: var(--color-accent);
  --call-bg: #FFFFFF;
  --call-fg: var(--color-heading);
  --call-sub: var(--color-text-secondary);

  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  --nav-fg: var(--color-heading);
  --nav-underline: var(--color-accent-dark);
  --call-bg: var(--color-primary);
  --call-fg: #FFFFFF;
  --call-sub: #FFFFFF;
  --focus: var(--color-accent-dark);

  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--color-border-light);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 48px;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 32px;
  transition: height .3s ease;
}
.site-header.is-scrolled .nav-inner { height: 96px; }

.brand {
  display: grid;
  flex: none;
  text-decoration: none;
}
.logo {
  grid-area: 1 / 1;            /* stack both logos in the same spot */
  height: 104px;
  width: auto;
  transition: opacity .3s ease, height .3s ease;
}
.logo-dark { opacity: 0; }

.site-header.is-scrolled .logo { height: 84px; }
.site-header.is-scrolled .logo-light { opacity: 0; }
.site-header.is-scrolled .logo-dark { opacity: 1; }

.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
.primary-nav a {
  display: block; padding: 10px 16px;
  color: var(--nav-fg); text-decoration: none; font-weight: 700; font-size: 16px;
  box-shadow: inset 0 -3px 0 transparent;
  transition: color .3s ease, box-shadow .2s ease;
}
.primary-nav a:hover { box-shadow: inset 0 -3px 0 var(--nav-underline); }
.primary-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--nav-underline); }

.call-btn {
  flex: none; display: inline-flex; align-items: center; gap: 12px;
  background: var(--call-bg); color: var(--call-fg);
  padding: 10px 20px; border-radius: var(--radius-md);
  text-decoration: none; font-weight: 900; font-size: 20px; line-height: 1.1;
  box-shadow: var(--shadow-sm);
  transition: background .3s ease, color .3s ease, transform .15s ease;
}
.call-btn:hover { transform: translateY(-1px); }
.site-header.is-scrolled .call-btn:hover { background: var(--color-primary-hover); }
.call-label { display: flex; flex-direction: column; }
.call-label small { font-size: 12px; font-weight: 700; color: var(--call-sub); }

/* =========================================================
   SECTION 2: HERO
========================================================= */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: grid; align-items: center;
  padding: calc(var(--nav-h) + 32px) 48px 72px;
  color: #FFFFFF;
  background: var(--color-heading) url("../images/hero-fallback2.jpg") center / cover no-repeat;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 0;
  /* dark blue tint so the white text stays readable over any footage */
  background: linear-gradient(160deg, rgba(26, 40, 46, 0.82) 0%, rgba(21, 32, 32, 0.62) 100%);
}
.hero-inner {
  position: relative; width: 100%; max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 64px; align-items: start;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font: 700 clamp(40px, 5.2vw, 68px)/1.02 var(--font-serif);
  animation: fade-up .7s ease both;
}
.hero-sub {
  margin: 0 0 20px;
  font: 600 clamp(26px, 3.2vw, 38px)/1.15 var(--font-serif);
  color: #E3C9A8;
  animation: fade-up .7s ease .15s both;
}
.hero-lead {
  margin: 0; max-width: 30em; font-size: 20px; color: rgba(255, 255, 255, .92);
  animation: fade-up .7s ease .3s both;
}

/* ---- Check list: items appear one by one ---- */
.checklist { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; max-width: 36em; }
.checklist li {
  position: relative; padding-left: 42px; font-size: 18px; line-height: 1.4;
  opacity: 0;
  animation: item-in .5s ease forwards;
  animation-delay: calc(.6s + var(--i, 0) * .18s);
}
.checklist li:nth-child(1) { --i: 0; }
.checklist li:nth-child(2) { --i: 1; }
.checklist li:nth-child(3) { --i: 2; }
.checklist li:nth-child(4) { --i: 3; }
.checklist li:nth-child(5) { --i: 4; }
.checklist li:nth-child(6) { --i: 5; }

/* circle */
.checklist li::before {
  content: ""; position: absolute; left: 0; top: -1px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-accent);
  transform: scale(0);
  animation: pop .45s cubic-bezier(.3, 1.5, .5, 1) forwards;
  animation-delay: calc(.6s + var(--i, 0) * .18s + .1s);
}
/* tick mark */
.checklist li::after {
  content: ""; position: absolute; left: 10px; top: 4px;
  width: 7px; height: 13px;
  border-right: 3px solid var(--color-heading);
  border-bottom: 3px solid var(--color-heading);
  transform: rotate(45deg) scale(0);
  transform-origin: 20% 80%;
  animation: tick .3s ease forwards;
  animation-delay: calc(.6s + var(--i, 0) * .18s + .3s);
}
.checklist strong { font-weight: 900; }

/* ---- Translucent form card ---- */
.form-card {
  background: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  animation: fade-up .8s ease .3s both;
}
.form-card h2 { margin: 0 0 8px; font: 700 27px/1.15 var(--font-serif); color: #FFFFFF; }
.field { margin-top: 16px; }
.field label { display: block; margin: 0 0 5px; font-weight: 700; font-size: 15px; }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 12px;
  border: 1.5px solid rgba(255, 255, 255, .5);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .94);
  color: var(--color-text);
  font: 400 17px var(--font-sans);
}
.field input:focus, .field select:focus { border-color: var(--color-accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.submit-btn {
  display: block; width: 100%; margin-top: 20px; padding: 16px;
  border: 0; border-radius: var(--radius-md);
  background: #FFFFFF; color: var(--color-heading);
  font: 900 19px var(--font-sans); text-align: center; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .15s;
}
.submit-btn:hover { background: var(--color-secondary-light); transform: translateY(-1px); }
.submit-btn[disabled] { opacity: .6; cursor: wait; }

.form-error { margin: 14px 0 0; min-height: 1em; font-weight: 700; font-size: 15px; color: #FFD2D2; }
.fine { margin: 14px 0 0; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, .88); }
.fine a { color: #FFFFFF; }
.thanks { text-align: center; padding: 12px 0; }
.thanks p { color: rgba(255, 255, 255, .92); }

/* =========================================================
   MOBILE APP SHELL (hidden on desktop, shown in the 1000px block below)
========================================================= */
.tabbar, .sheet, .sheet-overlay { display: none; }

/* =========================================================
   SECTION 3: HAPPY HOMEOWNERS
========================================================= */
.proof { background: var(--color-background); padding: 88px 48px; }
.proof-inner { max-width: 1280px; margin: 0 auto; text-align: center; }
.proof-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
  text-align: left;
}
.proof h2 {
  margin: 0;
  font: 700 clamp(34px, 4.4vw, 60px)/1.1 var(--font-serif);
  color: var(--color-heading);
}
.proof-logo {
  width: 100%;
  max-width: 560px;          /* raise this to make the logo bigger */
  height: auto;
  justify-self: end;
}
.proof-logo.will-reveal.is-visible { transition-delay: .2s; }   /* logo follows the heading */

.cards {
  list-style: none; margin: 0; padding: 0; text-align: left;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px;
}

.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 28px 24px 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

/* big pale number in the corner */
.card-num {
  position: absolute; right: 18px; top: 8px; z-index: 0;
  font: 700 84px/1 var(--font-serif);
  color: var(--color-surface-alt);
  transition: color .35s ease, transform .45s cubic-bezier(.2, .9, .3, 1.3);
}

/* icon tile */
.card-icon {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 56px; height: 56px; margin-bottom: 20px;
  border-radius: 14px;
  background: var(--color-primary); color: #FFFFFF;
  transition: background .35s ease, transform .35s cubic-bezier(.2, .9, .3, 1.3);
}

.card h3 {
  position: relative; z-index: 1;
  margin: 0 0 12px;
  font: 700 28px/1.12 var(--font-serif);
  color: var(--color-heading);
  transition: color .3s ease;
}
.card p { position: relative; z-index: 1; margin: 0; font-size: 16px; line-height: 1.6; color: var(--color-text-secondary); }
.card strong { color: var(--color-text); }

/* Scroll reveal: cards appear in order 1 > 2 > 3 > 4 */
.card:nth-child(1) { --i: 0; }
.card:nth-child(2) { --i: 1; }
.card:nth-child(3) { --i: 2; }
.card:nth-child(4) { --i: 3; }

.card.will-reveal,
.card.will-reveal .card-num { opacity: 0; }

.card.will-reveal.is-visible {
  opacity: 1;
  animation: card-in .7s cubic-bezier(.2, .8, .2, 1) backwards;
  animation-delay: calc(var(--i) * .2s);
}
.card.will-reveal.is-visible .card-num {
  opacity: 1;
  animation: num-pop .7s cubic-bezier(.2, .9, .3, 1.3) backwards;
  animation-delay: calc(var(--i) * .2s + .3s);   /* number lands just after its card */
}

/* =========================================================
   SECTION 4: REVIEWS PEEK (swipeable)
========================================================= */
.reviews {
  --w: clamp(270px, 25vw, 340px);
  background: var(--color-surface-alt);
  padding: 88px 0 72px;
  text-align: center;
  overflow: hidden;
}
.reviews-head { padding: 0 24px; margin-bottom: 12px; }
.reviews h2 {
  max-width: 20ch; margin: 0 auto 12px;
  font: 700 clamp(32px, 4vw, 52px)/1.1 var(--font-serif);
  color: var(--color-heading);
}
.reviews-head p { margin: 0; font-size: 19px; color: var(--color-text-secondary); }

.review-track {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: var(--w); gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 36px calc(50% - var(--w) / 2) 44px;
  scrollbar-width: none; text-align: left;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.review-track::-webkit-scrollbar { display: none; }

.review {
  scroll-snap-align: center;
  background: var(--color-surface);
  border-radius: 14px;
  padding: 24px 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: opacity .3s ease, transform .3s ease, box-shadow .3s ease;
}
.review.is-center { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(28, 56, 69, .2); }
.review.is-far { opacity: .35; transform: scale(.94); }

.review-head { display: flex; align-items: center; gap: 12px; }
.avatar {
  flex: none; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--color-primary); color: #FFFFFF;
  font: 900 17px var(--font-sans);
}
.review:nth-child(even) .avatar { background: var(--color-heading); }
.who { flex: 1; min-width: 0; }
.who h3 { margin: 0; font: 900 18px/1.2 var(--font-sans); color: var(--color-heading); }
.who span { display: block; font-size: 13.5px; line-height: 1.3; color: var(--color-text-secondary); }
.stars { flex: none; font-size: 14px; letter-spacing: 1px; color: var(--color-accent-dark); }

.qline { display: flex; align-items: center; gap: 12px; margin: 18px 0 8px; }
.qline::after { content: ""; flex: 1; height: 1px; background: var(--color-border-light); }
.qm { height: 22px; font: 700 46px/.6 var(--font-serif); color: var(--color-accent); }
.review p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--color-text-secondary); }

.carousel-ctrl { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: -8px; }
.arrow {
  width: 44px; height: 44px; padding: 0 0 3px; border-radius: 50%;
  border: 2px solid var(--color-border); background: var(--color-surface); color: var(--color-heading);
  font: 700 26px/1 var(--font-sans); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.dots { display: flex; gap: 10px; }
.dots button {
  width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%;
  background: var(--color-border); cursor: pointer;
  transition: background .2s, width .2s;
}
.dots button[aria-current="true"] { background: var(--color-primary); width: 28px; border-radius: 6px; }

.btn-reviews {
  display: inline-block; margin-top: 34px; padding: 16px 40px; border-radius: var(--radius-full);
  background: var(--color-primary); color: #FFFFFF;
  font: 900 19px var(--font-sans); text-decoration: none;
  transition: background .15s, transform .15s;
}
.btn-reviews:hover { background: var(--color-primary-hover); }

/* =========================================================
   SECTION 5: HOW IT WORKS
========================================================= */
.how { background: var(--color-background); padding: 88px 48px 96px; }
.how-inner { max-width: 1180px; margin: 0 auto; text-align: center; }
.how h2 { margin: 0 0 10px; font: 700 clamp(32px, 4vw, 52px)/1.1 var(--font-serif); color: var(--color-heading); }
.how-sub { margin: 0; font-size: 20px; color: var(--color-text-secondary); }

.steps {
  list-style: none; margin: 48px 0 0; padding: 0; text-align: left;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
}

.step {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
/* tan bar that sweeps across the bottom on hover */
.step::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 5px; width: 0;
  background: var(--color-accent);
  transition: width .45s ease;
}

.step-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-secondary); }
.step-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }

.step-num {
  position: absolute; top: 16px; left: 16px;
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--color-accent); color: var(--color-heading);
  border: 4px solid #FFFFFF;
  font: 900 20px var(--font-sans);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), background .3s ease;
}

.step-body { padding: 26px 28px 34px; }
.step h3 { margin: 0 0 10px; font: 700 30px/1.12 var(--font-serif); color: var(--color-heading); transition: color .3s ease; }
.step p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--color-text-secondary); }

/* Scroll reveal: cards rise in order 1 > 2 > 3 */
.step:nth-child(1) { --i: 0; }
.step:nth-child(2) { --i: 1; }
.step:nth-child(3) { --i: 2; }

.step.will-reveal { opacity: 0; }
.step.will-reveal.is-visible {
  opacity: 1;
  animation: step-in .8s cubic-bezier(.2, .8, .2, 1) backwards;
  animation-delay: calc(var(--i) * .2s);
}
.step.will-reveal.is-visible .step-media img {          /* photo settles from a slight zoom */
  animation: img-settle 1.3s ease-out backwards;
  animation-delay: calc(var(--i) * .2s + .1s);
}
.step.will-reveal.is-visible .step-num {                /* number pops in last */
  animation: num-pop .6s cubic-bezier(.2, .9, .3, 1.3) backwards;
  animation-delay: calc(var(--i) * .2s + .45s);
}

/* =========================================================
   SECTION 6: WHY CHOOSE US
========================================================= */
.why { background: var(--color-surface-alt); padding: 88px 48px; }
.why-inner { max-width: 1040px; margin: 0 auto; text-align: center; }
.why h2 { max-width: 22ch; margin: 0 auto 12px; font: 700 clamp(32px, 4vw, 52px)/1.1 var(--font-serif); color: var(--color-heading); }
.why-sub { max-width: 40em; margin: 0 auto; font-size: 19px; color: var(--color-text-secondary); }

/* ---- speed bars ---- */
.speed {
  max-width: 860px; margin: 44px auto 56px; padding: 26px 28px 22px; text-align: left;
  background: var(--color-surface); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.speed h3 { margin: 0 0 8px; font: 700 27px/1.1 var(--font-serif); color: var(--color-heading); }
.bar-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 14px; }
.bar-label { font-weight: 700; font-size: 15px; }
.bar-track { height: 46px; border-radius: 10px; background: var(--color-surface-alt); overflow: hidden; }
.bar {
  height: 100%; display: flex; align-items: center; padding: 0 16px;
  border-radius: 10px; font-weight: 900; font-size: 15px; white-space: nowrap; overflow: hidden;
  transition: width 1.4s cubic-bezier(.2, .8, .2, 1) .5s;       /* grows after the card appears */
}
.bar-us   { width: 24%;  background: var(--color-primary); color: #FFFFFF; }
.bar-them { width: 100%; background: linear-gradient(90deg, var(--color-secondary), var(--color-border)); color: var(--color-heading); transition-duration: 2.4s; }
/* bars start empty only when JS is running; otherwise they just show full */
.speed.will-reveal .bar { width: 0; }
.speed.will-reveal.is-visible .bar-us   { width: 24%; }
.speed.will-reveal.is-visible .bar-them { width: 100%; }
.speed-note { margin: 16px 0 0; font-size: 13px; color: var(--color-text-secondary); }

/* ---- comparison table ---- */
.cmp { text-align: left; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.cmp-head, .cmp-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); }
.cmp-head > div { padding: 18px 24px; text-align: center; font: 700 26px/1.1 var(--font-serif); }
.head-us   { background: var(--color-heading); color: #FFFFFF; }
.head-gap  { background: var(--color-surface-alt); }
.head-them { background: var(--color-primary-light); color: var(--color-heading); }

.ours, .theirs {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 26px; font-size: 18px; line-height: 1.35;
  border-bottom: 1px solid var(--color-border-light);
  transition: background .25s ease;
}
.ours   { background: var(--color-surface); font-weight: 700; color: var(--color-heading); }
.ours .chk { flex: none; color: var(--color-primary); }
.theirs { background: #F1F3F4; color: var(--color-text-secondary); border-bottom-color: var(--color-border); }
.cmp-row:last-child .ours, .cmp-row:last-child .theirs { border-bottom: 0; }

.spine { position: relative; display: grid; place-items: center; }
.spine::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: var(--color-border); }
.tile {
  position: relative; display: grid; place-items: center;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--color-primary); color: #FFFFFF;
  border: 4px solid var(--color-surface-alt);
  transition: transform .25s ease, background .25s ease;
}

/* ---- row reveal: our side slides from the left, theirs from the right, icon pops in between ---- */
.cmp-row.will-reveal .ours,
.cmp-row.will-reveal .theirs,
.cmp-row.will-reveal .tile { opacity: 0; }

.cmp-row.will-reveal.is-visible .ours   { opacity: 1; animation: slide-l .7s cubic-bezier(.2, .8, .2, 1) backwards; }
.cmp-row.will-reveal.is-visible .theirs { opacity: 1; animation: slide-r .7s cubic-bezier(.2, .8, .2, 1) .25s backwards; }
.cmp-row.will-reveal.is-visible .tile   { opacity: 1; animation: num-pop .6s cubic-bezier(.2, .9, .3, 1.3) .12s backwards; }

/* =========================================================
   SECTION 7: FINAL CTA
========================================================= */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 520px;
  padding: 96px 24px;
  text-align: center;
  color: #fff;
  background: var(--primary-dark, #1C3845); /* shows while image loads */
}
.cta-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../images/cta-bg.jpg") center / cover no-repeat;
  transform: scale(1.12);
  transition: transform 2.4s cubic-bezier(.2, .7, .2, 1);
}
.cta.is-in .cta-bg { transform: scale(1); }   /* slow settle on scroll-in */

.cta-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(28,56,69,.72) 0%, rgba(20,40,50,.9) 100%);
}
.cta-inner { max-width: 760px; }
.cta h2 {
  margin: 0 0 16px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.04;
}
.cta-lead {
  margin: 0 auto 36px;
  max-width: 32em;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255,255,255,.92);
}
.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 34px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 900;
  font-size: 1.25rem;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn-cta-primary { background: var(--accent, #C39F7D); color: #1C3845; }
.btn-cta-ghost   { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-cta svg { transition: transform .3s ease; }
.btn-cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
  padding: 28px 24px;
  background: #142832;
  color: rgba(255,255,255,.78);
  font-size: .875rem;
  line-height: 1.6;
  text-align: center;
}
.site-footer p { margin: 0; }
.site-footer a {
  color: #fff;
  text-underline-offset: 3px;
  transition: color .2s ease;
}
.site-footer a:hover { color: var(--accent, #C39F7D); }
.site-footer .sep { margin: 0 .35em; opacity: .6; }

/* =========================================================
   HOVER EFFECTS (one block, only for devices that can hover)
========================================================= */
@media (hover: hover) {
  /* Section 3: cards */
  .card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary-light);
    box-shadow: 0 18px 36px rgba(28, 56, 69, .16);
  }
  .card:hover .card-icon { background: var(--color-accent-dark); transform: scale(1.1) rotate(-6deg); }
  .card:hover .card-num { color: var(--color-primary-light); transform: scale(1.12) translateY(4px); }
  .card:hover h3 { color: var(--color-primary); }

  /* Section 4: reviews */
  .review:hover { box-shadow: 0 20px 40px rgba(28, 56, 69, .2); }
  .arrow:hover { background: var(--color-primary); border-color: var(--color-primary); color: #FFFFFF; }
  .btn-reviews:hover { transform: translateY(-2px); }

  /* Section 5: steps */
  .step:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary-light);
    box-shadow: 0 20px 40px rgba(28, 56, 69, .18);
  }
  .step:hover::after { width: 100%; }
  .step:hover .step-media img { transform: scale(1.07); }
  .step:hover .step-num { transform: scale(1.1); background: var(--color-accent-dark); color: #FFFFFF; }
  .step:hover h3 { color: var(--color-primary); }

  /* Section 6: comparison rows */
  .cmp-row:hover .ours { background: var(--color-background); }
  .cmp-row:hover .tile { transform: scale(1.15); background: var(--color-accent-dark); }

  /* Section 7: CTA buttons */
  .btn-cta:hover { transform: translateY(-3px); }
  .btn-cta-primary:hover { background: #d3b293; box-shadow: 0 12px 28px rgba(0,0,0,.35); }
  .btn-cta-ghost:hover { background: #fff; color: #1C3845; border-color: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.3); }
  .btn-cta-ghost:hover svg { transform: rotate(-14deg) scale(1.1); }
}

/* =========================================================
   RESPONSIVE
   One block per breakpoint, widest first, so smaller screens win.
========================================================= */

/* ---------- Medium desktops (1001px to 1180px): keep the nav on one line ---------- */
@media (max-width: 1180px) and (min-width: 1001px) {
  .nav-inner { gap: 16px; padding: 0 24px; }
  .logo { height: 88px; }
  .site-header.is-scrolled .logo { height: 76px; }
  .primary-nav a { padding: 10px 10px; }
  .call-btn { font-size: 18px; padding: 10px 16px; }
  .hero { padding-left: 24px; padding-right: 24px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; }
}

/* ---------- Tablet and mobile (1000px and below) ---------- */
@media (max-width: 1000px) {
  :root { --nav-h: 96px; --tab-h: 64px; }

  /* Header: logo only, centered. SAME size whether scrolled or not,
     and no height animation, so the nav stays steady. */
  .nav-inner { padding: 0 16px; justify-content: center; transition: none; }
  .site-header.is-scrolled .nav-inner { height: var(--nav-h); }
  .logo { height: 76px; transition: opacity .3s ease; }
  .site-header.is-scrolled .logo { height: 76px; }
  .primary-nav, .call-btn { display: none; }

  /* Hero */
  .hero { padding: calc(var(--nav-h) + 12px) 16px 56px; min-height: calc(100svh - var(--tab-h)); align-items: start; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-copy h1 { font-size: clamp(38px, 11vw, 48px); }
  .hero-sub { font-size: 26px; }
  .hero-lead { font-size: 17px; }
  .checklist { margin-top: 22px; }
  .checklist li { font-size: 16px; }

  /* Bottom tab bar */
  .tabbar {
    display: grid; grid-template-columns: 1fr 1fr 92px 1fr 1fr; align-items: start;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
    padding: 0 6px env(safe-area-inset-bottom, 0px);
    background: #FFFFFF; border-top: 1px solid var(--color-border-light);
    box-shadow: 0 -6px 20px rgba(28, 56, 69, .08);
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: var(--tab-h); padding: 0; background: none; border: 0; border-radius: var(--radius-md);
    font: 700 12px var(--font-sans); color: var(--color-text-secondary);
    text-decoration: none; cursor: pointer; touch-action: manipulation;
  }
  .tab svg { width: 25px; height: 25px; }
  .tab[aria-current="page"], .tab[aria-expanded="true"] { color: var(--color-primary); }
  .tab:active { background: var(--color-secondary-light); }

  .tab-call {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    height: var(--tab-h); padding-bottom: 7px;
    color: var(--color-heading); font: 900 12px/14px var(--font-sans);
    text-decoration: none; touch-action: manipulation;
  }
  .bubble {
    position: absolute; top: -28px; left: 50%; width: 70px; height: 70px; margin-left: -35px;
    display: grid; place-items: center; border-radius: 50%;
    background: var(--color-primary); color: #FFFFFF; border: 5px solid #FFFFFF;
    box-shadow: 0 8px 18px rgba(53, 91, 112, .4); transition: transform .15s;
  }
  .bubble svg { width: 30px; height: 30px; }
  .tab-call:active .bubble { transform: scale(.92); }

  /* "More" drawer */
  .sheet-overlay {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: rgba(21, 27, 24, .5); opacity: 0; visibility: hidden;
    transition: opacity .25s, visibility .25s;
  }
  .sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
    max-height: 85vh; overflow: auto; outline: 0;
    background: #FFFFFF; border-radius: 22px 22px 0 0;
    padding: 10px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%); visibility: hidden;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility .3s;
  }
  .sheet-overlay.open { opacity: 1; visibility: visible; }
  .sheet.open { transform: translateY(0); visibility: visible; }
  .sheet-handle { width: 44px; height: 5px; border-radius: 3px; background: var(--color-border); margin: 4px auto 10px; }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
  .sheet h2 { margin: 0; font: 700 30px/1.1 var(--font-serif); color: var(--color-heading); }
  .sheet-close {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50%; background: var(--color-secondary-light); color: var(--color-heading); cursor: pointer;
  }
  .sheet-close svg { width: 22px; height: 22px; }
  .sheet a {
    display: flex; align-items: center; gap: 14px; padding: 14px 4px;
    border-bottom: 1px solid var(--color-border-light);
    text-decoration: none; font-weight: 700; font-size: 18px; color: var(--color-heading);
  }
  .sheet a:last-child { border-bottom: 0; }
  .sheet a:active { background: var(--color-background); }
  .si { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--color-secondary-light); color: var(--color-primary); }
  .si svg { width: 23px; height: 23px; }
  .go { margin-left: auto; display: grid; color: var(--color-text-secondary); }
  .go svg { width: 22px; height: 22px; }

  /* Section 3: happy homeowners */
  .proof { padding: 64px 16px; }
  .proof-head { grid-template-columns: 1fr; gap: 24px; text-align: center; margin-bottom: 40px; }
  .proof-logo { justify-self: center; max-width: 380px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card:nth-child(odd)  { --i: 0; }
  .card:nth-child(even) { --i: 1; }

  /* Section 4: reviews */
  .reviews { padding: 64px 0 56px; }
}

/* ---------- Small tablets (900px and below) ---------- */
@media (max-width: 900px) {
  /* Section 5: how it works */
  .how { padding: 56px 16px 64px; }
  .steps { grid-template-columns: 1fr; max-width: 560px; margin: 36px auto 0; }
  .step:nth-child(n) { --i: 0; }      /* single column: each card animates when it reaches the screen */
}

/* ---------- Large phones (760px and below) ---------- */
@media (max-width: 760px) {
  /* Section 6: why choose us */
  .why { padding: 56px 16px 64px; }
  .speed { margin: 32px auto 36px; padding: 22px 20px 18px; }
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .bar-us, .speed.will-reveal.is-visible .bar-us { width: 46%; }

  /* each comparison becomes one card */
  .cmp { display: flex; flex-direction: column; gap: 14px; overflow: visible; box-shadow: none; border-radius: 0; }
  .cmp-head { display: none; }
  .cmp-row { display: block; overflow: hidden; border-radius: 14px; box-shadow: var(--shadow-sm); }
  .spine { display: none; }
  .ours { padding: 18px; border-bottom: 0; font-size: 17px; }
  .theirs { display: block; padding: 14px 18px 16px; border-bottom: 0; font-size: 15.5px; line-height: 1.45; }
  .theirs::before { content: "With an agent: "; font-weight: 700; color: var(--color-heading); }

  /* whole card rises instead of the side-slide */
  .cmp-row.will-reveal .ours, .cmp-row.will-reveal .theirs { opacity: 1; }
  .cmp-row.will-reveal.is-visible .ours, .cmp-row.will-reveal.is-visible .theirs { animation: none; }
  .cmp-row.will-reveal { opacity: 0; }
  .cmp-row.will-reveal.is-visible { opacity: 1; animation: card-in .7s cubic-bezier(.2, .8, .2, 1) backwards; }

  /* Section 7: CTA */
  .cta { min-height: 480px; padding: 72px 20px; }
  .cta-actions { flex-direction: column; align-items: stretch; max-width: 320px; margin: 0 auto; }
  .btn-cta { min-height: 56px; font-size: 1.15rem; }

  /* Footer: hide Privacy/Terms on mobile, keep copyright + Built by */
  .foot-legal { display: none; }
}

/* ---------- Phones (640px and below) ---------- */
@media (max-width: 640px) {
  /* Section 3 */
  .proof-logo { max-width: 300px; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 24px 22px 28px; }
  .card:nth-child(n) { --i: 0; }        /* single column: each card animates on its own */
  .card-num { font-size: 76px; }

  /* Section 4 */
  .reviews { --w: 80vw; }
  .review-track { gap: 16px; }
}

/* ---------- Small phones (420px and below) ---------- */
@media (max-width: 420px) {
  :root { --nav-h: 84px; }
  .logo { height: 66px; }
  .site-header.is-scrolled .nav-inner { height: var(--nav-h); }
  .site-header.is-scrolled .logo { height: 66px; }
  .row { grid-template-columns: 1fr; }
  .form-card { padding: 22px 18px; }
}

/* =========================================================
   REDUCED MOTION: show everything immediately
   (kept last so it overrides everything above)
========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .hero-copy h1, .hero-sub, .hero-lead, .form-card { animation: none; }
  .checklist li { opacity: 1; animation: none; }
  .checklist li::before { transform: none; animation: none; }
  .checklist li::after { transform: rotate(45deg) scale(1); animation: none; }
  .review.is-center, .review.is-far { transform: none; }
  .btn-reviews:hover { transform: none; }
  .step:hover { transform: none; }
  .step:hover .step-media img, .step:hover .step-num { transform: none; }
  .cmp-row:hover .tile { transform: none; }
  .cta-bg { transform: none; }
}