/* ============================================================
   Cairns Irrigation — base stylesheet
   Tropical palette: deep teal water, fresh leaf green, sand cream
   ============================================================ */

:root {
  --water-900: #0a4750;
  --water-700: #0d6e7d;
  --water-500: #1aa0b0;
  --water-300: #6dd0db;
  --water-50:  #e7f6f8;

  --leaf-700:  #2f7a3d;
  --leaf-500:  #4aa15a;
  --leaf-300:  #a7d8a6;

  /* Heritage greens — carried over from the 2009 site for brand continuity */
  --heritage-900: #003300;  /* original body bg — deep forest */
  --heritage-500: #669933;  /* original frame/accent — grass green */
  --heritage-100: #d2e9bc;  /* original panel — pale leaf */
  --heritage-sun: #f5d142;  /* softened from old #FFFF00 link colour */

  --sand-50:   #faf7ef;
  --sand-100:  #f1ead8;
  --sand-200:  #e2d8bf;

  --ink-900:   #102a2f;
  --ink-700:   #2a4147;
  --ink-500:   #5a6e72;
  --ink-300:   #9aa9ac;

  --white:     #ffffff;
  --shadow-sm: 0 1px 2px rgba(10,71,80,.08), 0 1px 1px rgba(10,71,80,.04);
  --shadow-md: 0 6px 18px rgba(10,71,80,.10), 0 2px 4px rgba(10,71,80,.06);
  --shadow-lg: 0 20px 40px rgba(10,71,80,.18);

  --radius:    14px;
  --radius-sm: 8px;
  --maxw:      1180px;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--sand-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--water-700); text-decoration: none; }
a:hover { color: var(--water-900); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.5vw + 1rem, 2.25rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink-900); color: var(--white); padding: .6rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.topbar {
  background: linear-gradient(90deg, var(--water-900), var(--water-700));
  color: var(--water-50);
  font-size: .85rem;
}
.topbar__row {
  display: flex; gap: 1.25rem; align-items: center;
  padding: .5rem 1.25rem;
  flex-wrap: wrap;
}
.topbar__item { opacity: .92; display: inline-flex; align-items: center; gap: .35rem; }
.topbar__phone {
  margin-left: auto;
  color: var(--white); font-weight: 600;
  display: inline-flex; gap: .4rem; align-items: center;
  white-space: nowrap;
}
.topbar__phone:hover { color: var(--water-300); }

.header__row {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1.25rem;
  position: relative;
}

.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink-900); flex-shrink: 0; min-width: 0; }
.brand:hover { color: var(--water-900); }
.brand__mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--water-500), var(--heritage-500) 70%, var(--heritage-900));
  color: var(--white);
  display: grid; place-items: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--heritage-100);
  flex-shrink: 0;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__name { font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; white-space: nowrap; }
.brand__tag  { font-size: .76rem; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-toggle {
  margin-left: auto;
  border: 1px solid var(--sand-200);
  background: var(--white);
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  font-size: 1.15rem;
  display: none;
  align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink-700);
}
.nav-toggle:hover { background: var(--sand-50); }
.nav-toggle[aria-expanded="true"] { background: var(--water-50); color: var(--water-900); border-color: var(--water-300); }

.primary {
  margin-left: auto;
  display: flex; align-items: center; gap: .35rem;
}
.primary > ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: .15rem; align-items: center;
}
.primary > ul > li { position: relative; }
.primary > ul > li > a {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .8rem;
  color: var(--ink-700);
  border-radius: var(--radius-sm);
  font-weight: 550;
  font-size: .95rem;
  white-space: nowrap;
  text-decoration: none;
}
.primary > ul > li > a:hover { background: var(--water-50); color: var(--water-900); }
.primary > ul > li > a.is-current { color: var(--water-900); background: var(--water-50); }
.primary > ul > li > a > i:first-child { color: var(--water-500); }

.primary__cta {
  margin-left: .5rem;
  background: var(--leaf-500); color: var(--white) !important;
  padding: .55rem 1.05rem !important; border-radius: 999px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: .4rem;
  white-space: nowrap;
  text-decoration: none;
}
.primary__cta:hover { background: var(--leaf-700); }

/* ---------- Dropdown ---------- */

.dropdown__chev { font-size: .65em; margin-left: .05rem; opacity: .55; transition: transform .15s; }
.has-dropdown:hover .dropdown__chev,
.has-dropdown:focus-within .dropdown__chev,
.has-dropdown.is-open > a .dropdown__chev { transform: rotate(180deg); }

.dropdown {
  position: absolute; left: 0; top: 100%;
  min-width: 240px;
  background: var(--white);
  list-style: none; margin: 0;
  /* padding-top creates a hover bridge so cursor can cross from parent to menu */
  padding: .65rem .4rem .4rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(10,71,80,.08);
  opacity: 0; visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .14s, transform .14s, visibility .14s;
  z-index: 60;
}
.dropdown::before {
  /* invisible bridge between parent <a> and the dropdown */
  content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 12px;
}
.dropdown > li { display: block; }
.dropdown > li > a {
  display: flex; gap: .55rem; align-items: center;
  padding: .55rem .75rem;
  color: var(--ink-700);
  border-radius: var(--radius-sm);
  font-size: .94rem; font-weight: 500;
  text-decoration: none;
}
.dropdown > li > a:hover { background: var(--water-50); color: var(--water-900); }
.dropdown > li > a > i { color: var(--water-500); width: 1.1em; text-align: center; }

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.dropdown-toggle {
  display: none;
  background: transparent; border: 0;
  color: var(--ink-500);
  cursor: pointer;
}

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

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: transform .08s ease, box-shadow .15s ease, background .15s;
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--leaf-500); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--leaf-700); color: var(--white); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn--water { background: var(--water-700); color: var(--white); }
.btn--water:hover { background: var(--water-900); color: var(--white); }
.btn--lg { padding: 1rem 1.6rem; font-size: 1.02rem; }
.btn--xl {
  padding: 1.15rem 2rem;
  font-size: 1.1rem;
  letter-spacing: .005em;
  box-shadow: 0 12px 28px rgba(47,122,61,.35), 0 2px 6px rgba(0,0,0,.18);
}
.btn--primary.btn--xl:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(47,122,61,.4), 0 2px 8px rgba(0,0,0,.22); }
@media (max-width: 700px) {
  .btn--xl { padding: 1rem 1.35rem; font-size: 1rem; width: 100%; justify-content: center; }
  .btn--lg { width: 100%; justify-content: center; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: calc(100vh - 60px);
  display: flex; align-items: center;
  background:
    linear-gradient(120deg, rgba(10,71,80,.82) 0%, rgba(13,110,125,.6) 45%, rgba(47,122,61,.55) 100%),
    image-set(url("/img/hero.webp") type("image/webp"), url("/img/hero.jpg") type("image/jpeg")) center/cover no-repeat,
    linear-gradient(160deg, var(--water-900), var(--water-700) 45%, var(--heritage-500) 90%, var(--heritage-900));
  color: var(--white);
  overflow: hidden;
  border-top: 3px solid var(--heritage-500);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(109,208,219,.35), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 60px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'><path d='M0,30 C240,60 480,0 720,30 C960,60 1200,0 1440,30 L1440,60 L0,60 Z' fill='%23faf7ef'/></svg>")
    center/100% 100% no-repeat;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}
body.is-scrolled .hero::after { opacity: 1; }
.hero__row {
  width: 100%;
  display: grid; gap: 2.5rem; grid-template-columns: 1.2fr .9fr;
  align-items: center;
  padding: 4rem 1.25rem 5.5rem;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.14);
  padding: .35rem .75rem; border-radius: 999px;
  font-size: .82rem; letter-spacing: .02em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.22);
  margin-bottom: 1rem;
}
.hero h1 { color: var(--white); }
.hero h1 em { font-style: normal; color: var(--water-300); }
.hero__lede { font-size: 1.15rem; color: rgba(255,255,255,.92); max-width: 38ch; }
.hero__cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; align-items: center; }
.hero__cta-sub {
  margin: .9rem 0 0; font-size: .92rem; color: rgba(255,255,255,.82);
  display: inline-flex; align-items: center; gap: .45rem;
}
.hero__cta-sub i { color: var(--heritage-sun); }

.hero__badges {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem;
  margin-top: 2rem;
  max-width: 30rem;
}
.hero__badge {
  display: flex; gap: .65rem; align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  padding: .65rem .85rem; border-radius: 12px;
  font-size: .9rem;
}
.hero__badge i { color: var(--water-300); font-size: 1.1rem; }

.hero__card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}
.hero__card h3 { color: var(--white); margin-bottom: .75rem; }
.hero__card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.hero__card li { display: flex; gap: .6rem; align-items: center; font-size: .95rem; }
.hero__card li i { color: var(--leaf-300); }

/* ---------- Sections ---------- */

.section { padding: 4rem 0; }
.section--tight { padding: 2.5rem 0; }
.section--sand { background: var(--sand-50); }
.section--cream { background: var(--sand-100); }
.section--water { background: var(--water-50); }
.section--heritage {
  background: linear-gradient(180deg, var(--heritage-100), var(--sand-50));
  border-top: 1px solid rgba(102,153,51,.25);
  border-bottom: 1px solid rgba(102,153,51,.25);
}

.section__head { max-width: 60ch; margin: 0 auto 2.5rem; text-align: center; }
.section__eyebrow {
  display: inline-block;
  color: var(--heritage-500); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; font-size: .8rem;
  margin-bottom: .5rem;
  position: relative;
  padding-left: 1.5rem;
}
.section__eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 1rem; height: 2px; background: var(--heritage-500); transform: translateY(-50%);
}

/* ---------- Cards grid ---------- */

.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10,71,80,.06);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--water-50), var(--sand-100));
  color: var(--water-700);
  display: grid; place-items: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}
.card--leaf .card__icon { color: var(--leaf-700); background: linear-gradient(135deg, #ecf6e9, var(--sand-100)); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-700); margin: 0; font-size: .96rem; }
.card__link {
  display: inline-flex; gap: .35rem; align-items: center;
  margin-top: 1rem; font-weight: 600;
}
.card__link:hover { gap: .55rem; }

/* ---------- Why-us strip ---------- */

.why {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(4, 1fr);
}
.why__item {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: 1rem 1.1rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(10,71,80,.06);
}
.why__item i {
  font-size: 1.4rem; color: var(--leaf-500);
  flex: 0 0 auto;
}
.why__item strong { display: block; }
.why__item span { color: var(--ink-500); font-size: .9rem; }

/* ---------- Service area chips ---------- */

.areas { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.areas li {
  list-style: none;
  background: var(--white);
  border: 1px solid var(--sand-200);
  padding: .45rem .85rem;
  border-radius: 999px;
  font-size: .9rem;
  color: var(--ink-700);
}
.areas li i { color: var(--water-500); margin-right: .35rem; }

/* ---------- Tips strip ---------- */

.tips {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.tip {
  background: var(--white);
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--heritage-500);
  box-shadow: var(--shadow-sm);
}
.tip h4 { margin: 0 0 .35rem; display: flex; gap: .5rem; align-items: center; }
.tip h4 i { color: var(--heritage-500); }
.tip p { font-size: .92rem; color: var(--ink-700); margin: 0; }

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

.cta-band {
  position: relative;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(10,71,80,.86) 0%, rgba(13,110,125,.72) 50%, rgba(0,51,0,.78) 100%),
    image-set(url("/img/hero.webp") type("image/webp"), url("/img/hero.jpg") type("image/jpeg")) center/cover no-repeat,
    var(--water-900);
  border-top: 3px solid var(--heritage-sun);
  border-bottom: 3px solid var(--heritage-500);
}
.cta-band__row {
  display: flex; gap: 2rem; align-items: center; justify-content: space-between;
  padding: 3rem 1.25rem;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: .25rem; }
.cta-band p { color: rgba(255,255,255,.9); margin: 0; }
.cta-band__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Suppress the sitewide CTA band on the home page;
   the dedicated `.home-cta` section already covers it there. */
body.page-home .cta-band { display: none; }

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

.site-footer {
  background: var(--ink-900); color: rgba(255,255,255,.78);
  padding: 3rem 0 1.25rem;
  font-size: .92rem;
}
.site-footer h3 {
  color: var(--white); font-size: .95rem; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: .75rem;
}
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: var(--water-300); }
.site-footer__grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  padding-bottom: 2rem;
}
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-list i { color: var(--water-500); margin-right: .35rem; width: 1.1em; }
.brand--footer .brand__name { color: var(--white); }
.brand--footer { margin-bottom: .5rem; }
.site-footer__bottom {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.55);
}

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

.form { display: grid; gap: 1rem; max-width: 38rem; }
.form label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .92rem; }
.form input, .form textarea, .form select {
  width: 100%;
  padding: .75rem .9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--sand-200);
  font: inherit;
  background: var(--white);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--water-500);
  box-shadow: 0 0 0 4px var(--water-50);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---------- Generic page header ---------- */

.page-hero {
  position: relative;
  color: var(--white);
  padding: 4rem 0 4.5rem;
  background:
    linear-gradient(135deg, rgba(10,71,80,.86) 0%, rgba(13,110,125,.76) 55%, rgba(0,51,0,.82) 100%),
    image-set(url("/img/hero.webp") type("image/webp"), url("/img/hero.jpg") type("image/jpeg")) center/cover no-repeat;
  /* background-attachment defaults to `scroll` — image moves with the page on scroll. */
  background-color: var(--water-900);
  border-top: 2px solid var(--heritage-500);
  box-shadow: inset 0 -3px 0 rgba(0,51,0,.25);
}
.page-hero h1 { color: var(--white); margin: 0; }
.page-hero p { color: rgba(255,255,255,.85); margin-top: .5rem; max-width: 60ch; }
.crumbs { color: rgba(255,255,255,.7); font-size: .9rem; margin-bottom: .75rem; }
.crumbs a { color: rgba(255,255,255,.85); }

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

/* Hide brand tagline below this width so the nav has room to breathe */
@media (max-width: 1180px) {
  .brand__tag { display: none; }
}

/* Tablet content tweaks */
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: repeat(2, 1fr); }
  .tips { grid-template-columns: 1fr; }
  .hero__row { grid-template-columns: 1fr; padding: 3rem 1.25rem 4.5rem; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* Hamburger menu kicks in at tablet/landscape phone */
@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }

  .topbar__item { display: none; }
  .topbar__phone { margin-left: auto; }

  /* Mobile drawer */
  .primary {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white);
    flex-direction: column; align-items: stretch;
    padding: .5rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--sand-200);
    display: none;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    margin: 0;
    gap: 0;
  }
  .primary.is-open { display: flex; }

  .primary > ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    width: 100%;
  }
  .primary > ul > li { position: relative; width: 100%; }
  .primary > ul > li > a {
    width: 100%;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    justify-content: flex-start;
  }
  .primary > ul > li > a > .dropdown__chev { display: none; }

  /* Dropdown parent: anchor + toggle button side by side */
  .has-dropdown { display: flex; flex-wrap: wrap; align-items: center; }
  .has-dropdown > a { flex: 1; min-width: 0; }

  .dropdown-toggle {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    transition: transform .18s;
    flex-shrink: 0;
    font-size: .9rem;
  }
  .dropdown-toggle:hover { background: var(--sand-50); }
  .has-dropdown.is-open > .dropdown-toggle { transform: rotate(180deg); background: var(--water-50); color: var(--water-700); }

  /* Mobile submenu collapses inline */
  .dropdown {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0;
    padding: 0; margin: 0;
    width: 100%;
    display: none;
    background: var(--sand-50);
    border-radius: var(--radius-sm);
  }
  .dropdown::before { display: none; }
  .has-dropdown.is-open > .dropdown { display: block; padding: .25rem 0; margin: .25rem 0 .35rem; }
  .dropdown > li > a { padding: .65rem 1rem .65rem 2.5rem; font-size: .92rem; }

  .primary__cta {
    margin: .5rem .25rem .25rem !important;
    justify-content: center;
    text-align: center;
  }

  /* Slightly less hero on mobile so wave visible quicker */
  .hero { min-height: auto; }
  .hero__row { padding: 3rem 1.25rem 4rem; }
}

@media (max-width: 700px) {
  .grid--3, .grid--4, .grid--2, .why { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .brand__name { font-size: 1rem; }

  /* Phone hero: H1 tight to the top. Badges sit just under it; the rest
     of the viewport is breathing space (Call now FAB lives bottom-left
     so the empty area reads as intentional). Card drops past the fold. */
  .hero { min-height: calc(100vh - 60px); align-items: flex-start; }
  .hero__row {
    padding: 1.5rem 1.1rem 1.5rem;
    grid-template-rows: minmax(calc(100vh - 60px - 3rem), max-content) auto;
    row-gap: 0;
  }
  .hero__row > div:first-child { align-self: start; }
  .hero h1 { font-size: 1.85rem; line-height: 1.15; margin-top: 0; }
  .hero__lede { font-size: 1rem; margin-top: .65rem; }
  .hero__badges { margin-top: 1.5rem; }
  .hero__card { margin-top: 1.5rem; }
}

/* ---------- Back to top ---------- */

.to-top {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--water-700); color: var(--white);
  border: 0; cursor: pointer;
  display: grid; place-items: center;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s, background .15s;
  z-index: 80;
}
.to-top:hover { background: var(--water-900); }
body.is-scrolled .to-top { opacity: 1; visibility: visible; transform: translateY(0); }

@media (max-width: 700px) {
  .to-top { right: .85rem; bottom: .85rem; width: 42px; height: 42px; }
}

/* ---------- Home CTA (reuses hero BG) ---------- */

.home-cta {
  position: relative;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(10,71,80,.86) 0%, rgba(13,110,125,.72) 50%, rgba(0,51,0,.78) 100%),
    image-set(url("/img/hero.webp") type("image/webp"), url("/img/hero.jpg") type("image/jpeg")) center/cover no-repeat,
    var(--water-900);
  border-top: 3px solid var(--heritage-sun);
  border-bottom: 3px solid var(--heritage-500);
}
.home-cta__row { padding: 5rem 1.25rem; }
.home-cta__copy { max-width: 56rem; }
.home-cta__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  padding: .35rem .8rem; border-radius: 999px;
  font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.home-cta__eyebrow i { color: var(--water-300); }
.home-cta h2 { color: var(--white); font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: .5rem; }
.home-cta p { color: rgba(255,255,255,.9); max-width: 50ch; font-size: 1.08rem; }
.home-cta__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; align-items: center; }
.home-cta__chips {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: flex; flex-wrap: wrap; gap: .5rem .75rem;
  color: rgba(255,255,255,.85); font-size: .92rem;
}
.home-cta__chips li {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  padding: .35rem .7rem; border-radius: 999px;
}
.home-cta__chips i { color: var(--leaf-300); }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: .65rem; max-width: 56rem; margin: 0 auto; }
.faq__item {
  background: var(--white);
  border: 1.5px solid var(--sand-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .15s ease;
}
.faq__item[open] { border-color: var(--water-500); }
.faq__item > summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-weight: 600; color: var(--ink-900);
  font-size: 1.02rem;
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary:hover { background: var(--sand-50); }
.faq__icon {
  flex: 0 0 auto;
  width: 1.6rem; height: 1.6rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--water-50); color: var(--water-700);
  transition: transform .25s ease, background .15s ease, color .15s ease;
  font-size: .85rem;
}
.faq__item[open] .faq__icon {
  transform: rotate(45deg);
  background: var(--water-700); color: var(--white);
}
.faq__a { padding: 0 1.25rem 1.1rem; color: var(--ink-500); }
.faq__a p { margin: 0; line-height: 1.6; }

/* ---------- Before / after slider ---------- */

.ba-card { margin: 0; padding: 0; }
.ba-card__cap {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .85rem 0 .25rem; font-size: .95rem;
}
.ba-card__cap span { color: var(--ink-500); font-size: .88rem; }
.ba-card__cap i { color: var(--water-500); margin-right: .25rem; }

.ba {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--ink-900);
  user-select: none; touch-action: none;
  isolation: isolate;
}
.ba__after, .ba__before {
  position: absolute; inset: 0;
  display: block;
}
.ba__after img, .ba__before img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.ba__before {
  clip-path: inset(0 calc(100% - var(--ba-pos, 50%)) 0 0);
}
.ba__placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center; gap: .5rem;
  color: rgba(255,255,255,.92);
  font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
}
.ba__placeholder i { font-size: 2.4rem; opacity: .85; }
.ba__placeholder--after { background: linear-gradient(135deg, var(--leaf-500), var(--water-500)); }
.ba__placeholder--before { background: linear-gradient(135deg, #6b5a3a, #2c2419); }
.ba__range {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; padding: 0;
  cursor: ew-resize;
  appearance: none; background: transparent;
  z-index: 3;
}
.ba__range:focus-visible { outline: 3px solid var(--water-300); outline-offset: -3px; }
.ba__range::-webkit-slider-thumb { appearance: none; width: 44px; height: 100%; background: transparent; cursor: ew-resize; }
.ba__range::-moz-range-thumb { width: 44px; height: 100%; background: transparent; border: 0; cursor: ew-resize; }
.ba__handle {
  position: absolute; top: 0; bottom: 0;
  left: var(--ba-pos, 50%);
  width: 3px; background: rgba(255,255,255,.95);
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.18);
  z-index: 2;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.ba__handle::before {
  content: ""; position: absolute;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.ba__handle i {
  position: relative; color: var(--water-900); font-size: .95rem; z-index: 1;
}
.ba__tag {
  position: absolute; top: .65rem;
  padding: .25rem .6rem; border-radius: 999px;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(0,0,0,.5); color: var(--white);
  z-index: 2;
  pointer-events: none;
}
.ba__tag--before { left: .65rem; }
.ba__tag--after  { right: .65rem; }

/* ---------- Floating mobile call button ---------- */

.call-fab {
  position: fixed;
  left: .85rem; bottom: .85rem;
  display: none;
  align-items: center; gap: .5rem;
  background: var(--leaf-500); color: var(--white);
  padding: .85rem 1.1rem;
  border-radius: 999px;
  text-decoration: none; font-weight: 600;
  box-shadow: 0 6px 18px rgba(47,122,61,.45), 0 2px 4px rgba(0,0,0,.18);
  z-index: 80;
  animation: callfab-pulse 2.4s ease-in-out infinite;
}
.call-fab i { font-size: 1rem; }
.call-fab:hover, .call-fab:focus-visible {
  background: var(--leaf-700); color: var(--white);
  animation-play-state: paused;
}
@keyframes callfab-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(47,122,61,.45), 0 2px 4px rgba(0,0,0,.18), 0 0 0 0 rgba(74,161,90,.55); }
  50%      { box-shadow: 0 6px 18px rgba(47,122,61,.45), 0 2px 4px rgba(0,0,0,.18), 0 0 0 12px rgba(74,161,90,0); }
}
@media (max-width: 700px) {
  .call-fab { display: inline-flex; }
  .hide-on-mobile { display: none !important; }
  /* Call FAB covers the phone CTA, so the teal topbar collapses to nothing useful — hide it. */
  .topbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .call-fab { animation: none; }
}

/* =====================================================================
   Modern CSS — progressive enhancements
   Each block is opt-in via @supports / @container or self-gated by the
   feature itself, so older browsers fall back to the existing rules.
   ===================================================================== */

/* --- View Transitions: soft crossfade between same-origin navigations ---
   One-line opt-in. Chromium browsers honor it; Safari/Firefox ignore. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 220ms; }
/* Keep header and footer steady across navigations so only the content
   morphs. view-transition-name is set inline on <header> / <footer>. */
::view-transition-group(site-header),
::view-transition-group(site-footer) { animation-duration: 0ms; }

/* --- Scroll-driven animations: replace `body.is-scrolled` class toggle ---
   Hero wave and back-to-top reveal as you scroll past the fold, with
   zero JS. JS fallback in main.js is skipped when this is supported. */
@supports (animation-timeline: scroll()) {
  .hero::after {
    animation: hero-wave-reveal linear both;
    animation-timeline: scroll(root block);
    animation-range: 30px 140px;
  }
  @keyframes hero-wave-reveal { to { opacity: 1; } }

  .to-top {
    animation: fab-reveal linear both;
    animation-timeline: scroll(root block);
    animation-range: 40px 180px;
  }
  @keyframes fab-reveal {
    to { opacity: 1; visibility: visible; transform: translateY(0); }
  }
}

/* --- :has() parent state -------------------------------------------------
   Nav dropdown parent is highlighted when any of its children is the
   current page. Replaces the PHP loop in nav_is_active(). */
.primary li.has-dropdown:has(.dropdown a.is-current) > a {
  color: var(--water-900);
  background: var(--water-50);
}

/* Footer CTA suppression on the home page: declarative — any page that
   contains a .home-cta section hides the sitewide .cta-band. Replaces
   the earlier body.page-home selector. */
body:has(.home-cta) .cta-band { display: none; }

/* Forms with an invalid field surface a softer submit button — feels
   responsive without a single line of JS. */
.form:has(:user-invalid) button[type="submit"] {
  opacity: .6;
  filter: saturate(.7);
}

/* --- color-mix(): hover/focus derived from base palette tokens ----------
   No more "leaf-700 is for leaf-500 hover" coupling — hovers compute
   dynamically. If a token changes, hovers track automatically. */
@supports (color: color-mix(in oklab, red, blue)) {
  .btn--primary:hover {
    background: color-mix(in oklab, var(--leaf-500), black 14%);
  }
  .btn--water:hover {
    background: color-mix(in oklab, var(--water-700), black 12%);
  }
  .call-fab:hover, .call-fab:focus-visible {
    background: color-mix(in oklab, var(--leaf-500), black 14%);
  }
  .to-top:hover {
    background: color-mix(in oklab, var(--water-700), black 14%);
  }
  /* Subtle global focus ring derived from the brand teal — works on dark
     and light backgrounds. */
  :focus-visible {
    outline: 2px solid color-mix(in oklab, var(--water-500), white 25%);
    outline-offset: 2px;
  }
}

/* --- Container queries: cards adapt to their grid width -----------------
   A card in a 3-col grid (narrow) gets a tighter look than the same
   card in a 2-col grid (wider), even at the same viewport width. */
@supports (container-type: inline-size) {
  .grid { container-type: inline-size; container-name: card-grid; }

  /* Narrow grid → compact card chrome */
  @container card-grid (max-width: 700px) {
    .card { padding: 1.15rem; }
    .card__icon { width: 44px; height: 44px; font-size: 1.15rem; border-radius: 12px; margin-bottom: .8rem; }
    .card h3 { font-size: 1.05rem; }
    .card p { font-size: .92rem; }
  }
  /* Very narrow grid (single-col phone or small sidebar) → even tighter */
  @container card-grid (max-width: 380px) {
    .card { padding: 1rem; }
    .card__icon { width: 40px; height: 40px; font-size: 1rem; }
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
