/* ============================================
   A+ Vancouver Cleaning Services — styles.css
   Palette: white / navy / teal (mobile-first)
   ============================================ */

:root {
  --white: #ffffff;
  --off-white: #f6f9fc;
  --navy: #0e2a47;
  --navy-dark: #0a1f36;
  --teal: #14b8a6;
  --teal-dark: #0e9384;
  --teal-soft: #e6f7f5;
  --text: #1e2a38;
  --muted: #5b6b7c;
  --border: #e3eaf1;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 42, 71, 0.08);
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: "Poppins", sans-serif; color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 700; margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; font-weight: 700; }

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

.container { width: min(1140px, 92%); margin-inline: auto; }
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }

.eyebrow {
  color: var(--teal-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.section-sub { color: var(--muted); max-width: 560px; margin-bottom: 2.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.35);
}
.btn-primary:hover { background: var(--teal-dark); }

.btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

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

.btn-block { width: 100%; justify-content: center; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled { background: var(--white); box-shadow: 0 2px 16px rgba(14, 42, 71, 0.1); }

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

.logo { display: inline-flex; align-items: center; gap: 0.7rem; }
.logo-mark { height: 40px; width: auto; display: block; }

/* Light mark over the dark hero, dark mark once the nav turns white */
.nav .logo-mark-dark { display: none; }
.nav.scrolled .logo-mark-light { display: none; }
.nav.scrolled .logo-mark-dark { display: block; }
.logo-text { font-family: "Poppins", sans-serif; font-weight: 700; color: var(--white); transition: color 0.3s ease; }
.nav.scrolled .logo-text { color: var(--navy); }

.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: rgba(255, 255, 255, 0.9); font-weight: 500; font-size: 0.95rem; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--teal); }
.nav.scrolled .nav-links a { color: var(--text); }
.nav.scrolled .nav-links a:hover { color: var(--teal-dark); }

.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--teal-dark); color: var(--white) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--white);
  cursor: pointer;
  transition: color 0.3s ease;
}
.nav.scrolled .nav-toggle { color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(900px 520px at 82% 18%, rgba(20, 184, 166, 0.28), transparent 62%),
    linear-gradient(150deg, rgba(14, 42, 71, 0.94) 0%, rgba(10, 31, 54, 0.82) 48%, rgba(10, 31, 54, 0.95) 100%),
    url("assets/kitchen.jpg");
  background-size: auto, auto, cover;
  background-position: center, center, center;
  background-repeat: no-repeat;
}
.hero-content { position: relative; z-index: 1; padding: calc(var(--nav-h) + 3rem) 0 4rem; }

.hero h1 { color: var(--white); }
.hero .accent { color: var(--teal); }

.hero-headline { display: flex; gap: 1.3rem; margin: 1.2rem 0; }
.hero-monogram {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.hero-monogram img {
  width: clamp(135px, 20vw, 240px);
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.5));
}

.hero-slogan {
  margin-top: 0.7rem;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}

.hero-logo { margin-bottom: 1.6rem; }
.hero-logo img {
  width: clamp(150px, 22vw, 215px);
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.45));
}

.hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}
.stars { color: #fbbf24; letter-spacing: 2px; }

/* Shorter line, so it can carry more weight without crowding the headline */
.hero-sub {
  max-width: 39ch;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.45;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2rem;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); }
.hero-badges i { color: var(--teal); margin-right: 0.4rem; }

/* ---------- Services ---------- */
.grid { display: grid; gap: 1.5rem; }
/* Fixed steps, not auto-fit — auto-fit gave 4 columns and orphaned 2 cards on row two */
.services-grid { grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 560px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
/* whole card is clickable, so signal it and echo the link's hover state */
.card:has(.card-cta) { cursor: pointer; }
.card:has(.card-cta):hover { border-color: var(--teal); }
.card:hover .card-cta i { transform: translateX(4px); }
.card.featured { border: 2px solid var(--teal); box-shadow: var(--shadow); }

.card-head { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.6rem; }

.card-cta {
  margin-top: auto;
  padding-top: 0.85rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--teal-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.card-cta i { transition: transform 0.2s ease; font-size: 0.8rem; }
.card:hover .card-cta i { transform: translateX(4px); }

.card-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 1.05rem;
}
.card h3 { font-size: 1rem; margin-bottom: 0.1rem; }
.card p { color: var(--muted); font-size: 0.87rem; line-height: 1.5; }
.card-price {
  color: var(--teal-dark) !important;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 0.95rem !important;
}

/* Secondary services list */
.more-services {
  margin-top: 1.6rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
}
.more-services h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.more-list { list-style: none; display: grid; gap: 0.65rem; }
.more-list li { font-size: 0.85rem; color: var(--muted); }
.more-link {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: inherit;
  border-radius: 8px;
  padding: 0.2rem 0.3rem;
  margin: -0.2rem -0.3rem;
  transition: background 0.2s ease;
}
.more-link:hover { background: var(--teal-soft); }
.more-link:hover strong { color: var(--teal-dark); }
.more-link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.more-list i { color: var(--teal); font-size: 1.05rem; margin-top: 0.2rem; width: 20px; text-align: center; flex-shrink: 0; }
.more-list strong { color: var(--navy); font-weight: 600; }
.more-list em { color: var(--teal-dark); font-style: normal; font-weight: 600; white-space: nowrap; }

.more-cta {
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.more-cta p { color: var(--muted); font-size: 0.95rem; margin: 0; max-width: 30rem; }

@media (min-width: 720px) {
  .more-list { grid-template-columns: 1fr 1fr; gap: 1rem 2rem; }
}

/* ---------- About ---------- */
/* Section backgrounds alternate: services white / reviews off-white / about white
   / areas off-white / contact navy. Keep them alternating if sections get reordered. */
.about-grid { display: grid; gap: 3rem; align-items: center; }

.checklist { list-style: none; margin-top: 1.5rem; display: grid; gap: 1rem; }
.checklist li { display: flex; gap: 0.8rem; align-items: flex-start; }
.checklist i { color: var(--teal); font-size: 1.15rem; margin-top: 0.2rem; }
.checklist strong { color: var(--navy); }

.about-media { margin-bottom: 1.2rem; }

/* A single image at its natural shape — no slider, no crop, no letterboxing.
   Square corners: rounding clipped the photo's corners and read as damage. */
.about-img {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin-inline: auto;
  box-shadow: var(--shadow);
}


.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-num { display: block; font-family: "Poppins", sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--teal-dark); }
.stat-label { font-size: 0.85rem; color: var(--muted); }

/* ---------- Areas ---------- */
.areas { background: var(--off-white); }
.areas-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.area-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem;
  transition: transform 0.25s ease, background 0.25s ease;
}
.area-card:hover { transform: translateY(-5px); background: var(--navy-dark); }
.area-card i { color: var(--teal); font-size: 1.4rem; margin-bottom: 0.8rem; }
.area-card h3 { color: var(--white); margin-bottom: 0.4rem; }
.area-card p { font-size: 0.88rem; color: rgba(255, 255, 255, 0.75); }

/* ---------- Badges ---------- */
/* In normal flow, not absolute — absolute positioning collided with the card title */
.tag {
  align-self: flex-start;
  margin-bottom: 0.6rem;
  background: var(--teal);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Testimonials ---------- */
.testimonials { background: var(--off-white); }
.reviews-carousel { position: relative; margin-top: 2.5rem; }

/* Marquee: the track never stops moving, so it is transform-driven rather than
   scroll-driven. The viewport clips it; arrows sit outside so they aren't cut off. */
.reviews-viewport { overflow: hidden; padding: 0.5rem 0.25rem 1rem; }
.reviews-viewport:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: var(--radius); }

.testimonial-track {
  display: flex;
  gap: 1.5rem;
  will-change: transform;
}

.testimonial {
  flex: 0 0 min(370px, 84%);
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.testimonial p { flex: 1; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(14, 42, 71, 0.16);
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.carousel-btn:hover { background: var(--teal); color: var(--white); border-color: var(--teal); }
.carousel-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.carousel-btn:active { transform: translateY(-50%) scale(0.88); }
.carousel-btn.prev:hover i { animation: nudge-left 0.4s ease; }
.carousel-btn.next:hover i { animation: nudge-right 0.4s ease; }

@keyframes nudge-left {
  50% { transform: translateX(-3px); }
}
@keyframes nudge-right {
  50% { transform: translateX(3px); }
}

.carousel-btn.prev { left: -14px; }
.carousel-btn.next { right: -14px; }

@media (max-width: 560px) {
  .carousel-btn.prev { left: -6px; }
  .carousel-btn.next { right: -6px; }
}
.testimonial p { font-size: 0.95rem; color: var(--text); }

/* Google's G, inlined once as a <symbol> and referenced with <use> */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.g-icon { width: 20px; height: 20px; flex-shrink: 0; }
.g-icon-lg { width: 46px; height: 46px; }

/* Review card header: avatar, name, stars, Google mark */
.t-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.9rem; }
.t-who { flex: 1; min-width: 0; }
.t-name {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  background: var(--teal-dark);
}
/* Initials get a rotating colour so the cards don't read as identical */
.testimonial:nth-child(6n + 1) .avatar { background: #0e9384; }
.testimonial:nth-child(6n + 2) .avatar { background: #2f6fb0; }
.testimonial:nth-child(6n + 3) .avatar { background: #b5762f; }
.testimonial:nth-child(6n + 4) .avatar { background: #7a5bb5; }
.testimonial:nth-child(6n + 5) .avatar { background: #3f8f4a; }
.testimonial:nth-child(6n + 6) .avatar { background: #b04a63; }

.stars { color: #fbbc05; display: inline-flex; gap: 2px; font-size: 0.78rem; }

/* Rating summary above the carousel */
.rating-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  box-shadow: var(--shadow);
}
.rating-score { display: flex; align-items: center; gap: 0.7rem; }
.rating-score .score {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 2.3rem;
  line-height: 1;
  color: var(--navy);
}
.rating-summary .stars { font-size: 1.05rem; }
.rating-meta { flex: 1; min-width: 12rem; font-size: 0.88rem; color: var(--muted); }
.rating-link { font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.rating-link:hover { text-decoration: underline; }
.rating-link i { font-size: 0.72rem; margin-left: 0.3rem; }

/* ---------- Contact ---------- */
.contact { background: var(--navy); color: var(--white); }
.contact .eyebrow { color: var(--teal); }
.contact h2 { color: var(--white); }
.contact-grid { display: grid; gap: 3rem; }
.contact-info > p { color: rgba(255, 255, 255, 0.8); max-width: 420px; }

.contact-list { list-style: none; margin: 1.8rem 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: 0.9rem; }
.contact-list i { color: var(--teal); font-size: 1.1rem; width: 22px; text-align: center; }
.contact-list a, .contact-list span { color: rgba(255, 255, 255, 0.9); }
.contact-list a:hover { color: var(--teal); }

.maps-link { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--teal); font-weight: 600; }
.maps-link:hover { text-decoration: underline; }

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  /* quote CTAs anchor straight to the form; keep it clear of the fixed nav */
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* Paired 2-up rows at every width, including mobile, so the form keeps one shape */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
/* min-width:0 so grid columns stay equal — the date input's intrinsic width
   otherwise forces its column wider than its partner's */
.form-field { margin-bottom: 0.75rem; min-width: 0; }
.form-field label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--navy); margin-bottom: 0.25rem; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px; /* touch target */
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.form-field textarea { resize: vertical; }

.form-hint {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--muted);
  background: var(--teal-soft);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.8rem;
}
.form-hint i { color: var(--teal-dark); margin-top: 0.15rem; flex-shrink: 0; }

.form-status { margin-top: 0.9rem; font-size: 0.9rem; font-weight: 500; text-align: center; color: var(--navy); min-height: 1.3em; }
.form-status.ok { color: var(--teal-dark); }
.form-status.error { color: #d43f3f; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-dark); color: rgba(255, 255, 255, 0.75); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; gap: 2.2rem; }

.footer .logo-text { color: var(--white); }
.footer .logo-mark { height: 44px; }
.footer-brand p { margin-top: 1rem; font-size: 0.9rem; max-width: 280px; }

.footer-col { display: grid; gap: 0.6rem; align-content: start; }
.footer-col h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 0.4rem; }
.footer-col a, .footer-col span { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }
.footer-col a:hover { color: var(--teal); }
.footer-col i { color: var(--teal); margin-right: 0.5rem; width: 16px; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 1.5rem; text-align: center; font-size: 0.85rem; }

/* ---------- Quote modal ---------- */
.quote-modal {
  /* explicit centering — a plain `display: flex` on the dialog overrides the UA
     margin:auto and pins it to the top */
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  border-radius: var(--radius);
  padding: 0;
  width: min(560px, 94vw);
  max-height: 92dvh;
  overflow: hidden;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);

  /* entry/exit animation. allow-discrete lets `display` participate so the
     dialog stays rendered long enough to animate out */
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1),
    overlay 0.28s allow-discrete, display 0.28s allow-discrete;
}
/* display only when open, so the UA's display:none still applies when closed */
.quote-modal[open] { display: flex; opacity: 1; transform: none; }
@starting-style {
  .quote-modal[open] { opacity: 0; transform: translateY(14px) scale(0.97); }
}

.quote-modal::backdrop {
  background: rgba(10, 31, 54, 0);
  transition: background 0.28s ease, overlay 0.28s allow-discrete,
    display 0.28s allow-discrete;
}
.quote-modal[open]::backdrop { background: rgba(10, 31, 54, 0.62); }
@starting-style {
  .quote-modal[open]::backdrop { background: rgba(10, 31, 54, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .quote-modal { transition-duration: 0.12s; transform: none; }
  .quote-modal[open] { transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  background: var(--navy);
  flex-shrink: 0;
}
.modal-logo { height: 30px; width: auto; flex-shrink: 0; }
.modal-title {
  flex: 1;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: clamp(0.92rem, 3.4vw, 1.05rem);
  line-height: 1.25;
  color: var(--white);
}

@media (max-width: 400px) {
  .modal-head { padding: 0.7rem 0.9rem; gap: 0.6rem; }
  .modal-logo { height: 26px; }
}
.modal-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}
.modal-close:hover { background: var(--teal); }
.modal-close:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* the sticky bar and back-to-top would sit under the backdrop; just hide them */
body.modal-open .mobile-cta-bar,
body.modal-open .back-to-top { display: none; }

#modalFormSlot { overflow-y: auto; }
#modalFormSlot .contact-form { box-shadow: none; border-radius: 0; }

/* ---------- Thank you modal ---------- */
.thanks-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  border-radius: var(--radius);
  padding: 2.4rem 1.8rem 2rem;
  width: min(400px, 92vw);
  text-align: center;
  background: var(--white);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);

  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
    overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}
.thanks-modal[open] { display: block; opacity: 1; transform: none; }
@starting-style {
  .thanks-modal[open] { opacity: 0; transform: translateY(14px) scale(0.96); }
}
.thanks-modal::backdrop {
  background: rgba(10, 31, 54, 0);
  transition: background 0.3s ease, overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}
.thanks-modal[open]::backdrop { background: rgba(10, 31, 54, 0.62); }
@starting-style {
  .thanks-modal[open]::backdrop { background: rgba(10, 31, 54, 0); }
}

.thanks-logo { width: 104px; height: auto; margin: 0 auto 1.1rem; display: block; }
.thanks-modal h2 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.thanks-modal p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.6rem; }
.thanks-modal .btn { width: 100%; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .thanks-modal { transition-duration: 0.12s; transform: none; }
  .thanks-modal[open] { transform: none; }
}

/* ---------- Mobile sticky action bar ---------- */
.mobile-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
  background: var(--white);
  box-shadow: 0 -4px 20px rgba(14, 42, 71, 0.18);
  transition: transform 0.3s ease;
}
.mobile-cta-bar.hidden-bar { transform: translateY(110%); }

.mcb-call,
.mcb-book {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}
.mcb-call { border: 2px solid var(--navy); color: var(--navy); }
.mcb-book { background: var(--teal); color: var(--white); box-shadow: 0 4px 14px rgba(20, 184, 166, 0.35); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 14px;
  bottom: 18px;
  z-index: 89;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(14, 42, 71, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.2s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top.suppressed { opacity: 0; pointer-events: none; }
.back-to-top:hover { background: var(--teal-dark); }
.back-to-top:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* ---------- Scroll reveal ---------- */
.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; }
}

/* ---------- Tablet & up ---------- */
@media (min-width: 560px) {
  .form-row { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
}

@media (min-width: 720px) {
  .about-grid { grid-template-columns: 1.2fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1.1fr; align-items: start; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 860px) {
  /* 44x44 touch target */
  .nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; }

  .mobile-cta-bar { display: grid; }
  /* the sticky bar carries both of these, so the hero pair is redundant here */
  .hero-ctas { display: none; }
  /* keep page content and back-to-top clear of the fixed bar */
  body { padding-bottom: 76px; }
  .back-to-top { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1.2rem 6%;
    gap: 1rem;
    box-shadow: 0 14px 30px rgba(14, 42, 71, 0.15);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { color: var(--text) !important; padding: 0.3rem 0; }
  .nav-cta { text-align: center; color: var(--white) !important; }
}
