/* ==========================================================================
   MacIsaac's Landscaping
   Dark green and leaf green from Nick's logo, the gold from his flyers,
   on warm paper. Fraunces + Public Sans.
   ========================================================================== */

:root {
  /* Colours */
  --ink: #15220a;
  --ink-deep: #0b1405;
  --charcoal: #1e300a; /* his card background */
  --graphite: #2b4212;
  --graphite-light: #3d5a1d;
  --silver: #c9d3bd;
  --silver-light: #eef2e8;
  --paper: #f7f5ee;
  --paper-deep: #ece8da;
  --white: #ffffff;
  --text: #1a1f14;
  --text-muted: #525a49;
  --text-on-dark: #f1f3ec;
  --text-on-dark-muted: #c2cab7;
  --line: #d9d4c4;
  --line-dark: rgba(255, 255, 255, 0.14);
  --input-border: #ada795;
  --placeholder: #6b7062;

  --leaf: #279747; /* the leaves in his logo */
  --leaf-light: #22863f; /* 4.6:1 with white text, so the top of the green strip still passes */
  --leaf-mid: #1d7536;
  --leaf-deep: #155a28;
  --leaf-on-dark: #6fd08a;
  --bark: #7e3b1e;

  --accent: #f0c23a;
  --accent-light: #f8d96a;
  --accent-deep: #c9961a;
  --accent-ink: #1d6b33; /* links on paper: green, since gold is too light */
  --accent-on-dark: #f5cf55;
  --accent-glint: #fff2bf;
  --btn-text: #1f1804;
  --accent-rgb: 240, 194, 58;
  --leaf-rgb: 39, 151, 71;
  --dark-rgb: 21, 34, 10;
  --error: #b3261e;

  /* Type */
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-small: 0.9375rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --fs-h2: clamp(2rem, 1.55rem + 2.1vw, 3.25rem);
  --fs-h1: clamp(2.375rem, 1.6rem + 3.9vw, 4.5rem);
  --fs-statement: clamp(2.5rem, 1.6rem + 4.4vw, 5.25rem);

  /* Spacing */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --section-y: clamp(4rem, 3rem + 5vw, 7.5rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --container: 75rem;
  --nav-height: 4.75rem;
  --marquee-h: 4rem;
  --strip-h: 4.25rem;
  /* Marquee + strip: both show on the first desktop screen, under the hero */
  --below-hero: calc(var(--marquee-h) + var(--strip-h));

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-card: 0 4px 16px rgba(var(--dark-rgb), 0.06), 0 1px 3px rgba(var(--dark-rgb), 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --shadow-card-hover: 0 28px 56px rgba(var(--dark-rgb), 0.14), 0 10px 20px rgba(var(--dark-rgb), 0.08);
  --shadow-nav: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-btn: 0 4px 15px rgba(var(--accent-rgb), 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  --shadow-btn-hover: 0 12px 30px rgba(var(--accent-rgb), 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);

  /* Motion */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
  scroll-padding-bottom: 6rem; /* keeps focused items clear of the chat button */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

body.lightbox-open {
  overflow: hidden;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 3px solid var(--leaf-mid);
  outline-offset: 3px;
  border-radius: 2px;
}

.on-dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible,
.lightbox :focus-visible {
  outline-color: var(--silver-light);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd {
  margin: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.on-dark {
  color: var(--text-on-dark);
}

.on-dark a:not(.btn) {
  color: var(--accent-on-dark);
}

.on-dark a:not(.btn):hover {
  color: var(--white);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  color: var(--white);
  background: var(--leaf-deep);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-md);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.4s var(--ease-spring);
}

.btn svg {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.btn-primary {
  color: var(--btn-text);
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 50%, var(--accent-deep) 100%);
  box-shadow: var(--shadow-btn);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  color: var(--btn-text);
  transform: translateY(-3px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-lg {
  min-height: 56px;
  padding: 0.9rem 1.75rem;
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* Secondary actions are plain underlined links */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 44px;
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--leaf);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.text-link:hover {
  color: var(--accent-ink);
  text-decoration-color: currentColor;
}

.on-dark .text-link--light,
.text-link--light {
  color: var(--text-on-dark);
}

.on-dark .text-link--light:hover,
.text-link--light:hover {
  color: var(--accent-glint);
}

/* ---------- Logo: Nick's round badge + his name ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--text-on-dark);
  text-decoration: none;
  line-height: 1;
}

.logo-badge {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.5s var(--ease-spring);
}

.logo-badge--lg {
  width: 6.5rem;
  height: 6.5rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-word {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
}

.logo-sub {
  margin-top: 0.25rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf-on-dark);
}

.logo:hover .logo-badge {
  transform: rotate(-8deg) scale(1.05);
}

/* ---------- Header and nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.site-header--solid,
.site-header.scrolled,
.site-header.menu-open {
  background: var(--ink);
  box-shadow: var(--shadow-nav);
}

.site-header.scrolled::after,
.site-header--solid::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--leaf) 0%, var(--accent) 40%, transparent 100%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--nav-height);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-on-dark);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu: solid opaque panel */
.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-md) var(--gutter) var(--space-xl);
  background: var(--ink);
  border-top: 1px solid var(--line-dark);
  box-shadow: var(--shadow-nav);
}

.nav-menu.open {
  display: flex;
}

.nav-links a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-on-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--line-dark);
}

.nav-links a:hover {
  color: var(--accent-on-dark);
}

.btn-nav {
  align-self: flex-start;
  border-radius: var(--radius-full);
  padding-inline: 1.5rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  /* Room under the note for the floating chat button on phones */
  padding-bottom: 6.5rem;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}

@media (max-width: 767.98px) {
  /* The headline says it and the services marquee lists it right below */
  .hero-text {
    display: none;
  }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.hero-content {
  max-width: 44rem;
}

.hero-title {
  font-size: var(--fs-h1);
  line-height: 1.04;
}

.hero-kicker {
  display: block;
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--silver);
}

.hero-line {
  display: block;
}

.highlight {
  color: var(--accent-on-dark);
}

.hero-text {
  max-width: 36rem;
  margin-top: var(--space-lg);
  font-size: var(--fs-lead);
  color: var(--text-on-dark-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-xl);
}

/* Glass note about the hero photo (tablet and up: on phones it would sit
   under the chat button) */
.hero-note {
  display: none;
  gap: 0.15rem;
  align-self: flex-start;
  max-width: 19rem;
  min-height: 44px;
  padding: 0.9rem 1.25rem;
  color: var(--text-on-dark);
  text-decoration: none;
  background: rgba(var(--dark-rgb), 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background-color var(--transition-base), transform 0.4s var(--ease-spring);
}

.on-dark a.hero-note,
.on-dark a.hero-note:hover {
  color: var(--text-on-dark);
}

.hero-note:hover {
  background: rgba(var(--dark-rgb), 0.65);
  transform: translateY(-3px);
}

.hero-note-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-on-dark-muted);
}

.hero-note-stars {
  margin-right: 0.25rem;
  letter-spacing: 0.08em;
  color: var(--accent-on-dark);
}

.hero-note-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.hero-note-more {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--accent-on-dark);
}

/* ---------- Marquee ---------- */
.marquee {
  display: flex;
  align-items: center;
  min-height: var(--marquee-h);
  overflow: hidden;
  /* Raised 3D band: lit top edge, shaded bottom edge */
  background: linear-gradient(180deg, var(--graphite) 0%, var(--charcoal) 45%, var(--ink-deep) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -6px 12px rgba(0, 0, 0, 0.45);
}

.marquee-track {
  display: flex;
  width: max-content;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 600;
  color: var(--silver-light);
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.5);
}

.marquee-item::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-inline: 1.75rem;
  /* Glossy bead instead of a flat dot */
  background: radial-gradient(circle at 35% 30%, var(--accent-glint) 0%, var(--accent-light) 40%, var(--accent-deep) 100%);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.75), 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* ---------- Service area strip ---------- */
/* Bevelled 3D strip with a drop shadow onto the next section */
.area-strip {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: var(--strip-h);
  padding-block: 0.75rem;
  color: var(--white);
  background: linear-gradient(180deg, var(--leaf-light) 0%, var(--leaf-mid) 50%, var(--leaf-deep) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 8px 18px rgba(var(--dark-rgb), 0.35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.area-strip-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.area-strip p {
  margin: 0;
  font-weight: 500;
}

.area-strip .area-hours {
  font-weight: 700;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  gap: var(--space-2xl);
}

.services-intro h2 span {
  display: block;
}

.services-intro p {
  max-width: 30rem;
  margin-top: var(--space-lg);
  font-size: var(--fs-lead);
  color: var(--text-muted);
}

.services-intro .text-link {
  margin-top: var(--space-sm);
}

.svc-list {
  border-top: 2px solid var(--text);
}

.svc {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-md);
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--line);
}

.service-icon {
  width: 2.25rem;
  height: 2.25rem;
  margin-top: 0.1rem;
  color: var(--leaf);
}

.svc h3 {
  margin-bottom: var(--space-xs);
}

.svc p {
  max-width: 38rem;
  color: var(--text-muted);
}

/* ---------- Proof band: what goes into a French drain ---------- */
.proof {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(var(--leaf-rgb), 0.18) 0%, transparent 65%),
    linear-gradient(180deg, var(--charcoal) 0%, var(--ink) 100%);
  isolation: isolate;
}

.proof::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--leaf-deep), var(--leaf), var(--accent), var(--leaf-deep));
}

.proof-top {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}

.proof-title {
  font-size: clamp(2.25rem, 1.5rem + 3.4vw, 4.25rem);
  line-height: 1.02;
}

.proof-title > span {
  display: block;
}

.proof-accent {
  margin-top: 0.15em;
  color: var(--accent-on-dark);
}

.proof-note {
  max-width: 34rem;
  margin-top: var(--space-xl);
  font-size: var(--fs-lead);
  color: var(--text-on-dark-muted);
}

/* The drain diagram */
.drain {
  margin: 0;
  padding: clamp(1rem, 0.6rem + 1.5vw, 1.5rem);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 48px rgba(0, 0, 0, 0.35);
}

.drain-svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #223a14 0%, #2d4a1a 100%);
}

.drain-key {
  display: grid;
  gap: 0.4rem 1.25rem;
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-small);
  color: var(--text-on-dark);
}

.drain-key li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.key-swatch {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.key-sod { background: #4f9a3a; }
.key-fabric { background: #2a2a26; }
.key-stone { background: radial-gradient(circle at 30% 30%, #c3cbd0 0 30%, #7d8790 31%); }
.key-pipe { background: #2f9e58; border-radius: 50%; }

.drain-drops {
  opacity: 0;
}

.drain-flow,
.drop {
  transform-box: fill-box;
  transform-origin: center;
}

.count {
  display: inline-block;
  color: var(--accent-on-dark);
  font-variant-numeric: tabular-nums;
}

.facts {
  display: grid;
  margin-top: var(--space-3xl);
  border-top: 1px solid var(--line-dark);
}

.fact {
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--line-dark);
}

.fact dt {
  margin-bottom: var(--space-2xs);
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--white);
}

.fact dd {
  color: var(--text-on-dark-muted);
}

.fact dd a {
  font-weight: 600;
}

/* ---------- Recent jobs gallery ---------- */
.jobs-head {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.jobs-head p {
  max-width: 34rem;
  font-size: var(--fs-lead);
  color: var(--text-muted);
}

/* 12 photos: 2, 3 or 4 across, so the last row is always full */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.gallery-item {
  margin: 0;
}

.gallery-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: var(--paper-deep);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
  transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-spring);
}

.gallery-btn img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(var(--dark-rgb), 0);
  transition: background-color var(--transition-base);
}

.gallery-overlay svg {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6rem;
  color: var(--btn-text);
  background: rgba(var(--accent-rgb), 0.95);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.gallery-btn:hover .gallery-overlay,
.gallery-btn:focus-visible .gallery-overlay {
  background: rgba(var(--dark-rgb), 0.35);
}

.gallery-btn:hover .gallery-overlay svg,
.gallery-btn:focus-visible .gallery-overlay svg {
  opacity: 1;
  transform: scale(1);
}

.gallery-caption {
  margin: var(--space-xs) 0 0;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-muted);
}

.jobs-more {
  margin-top: var(--space-xl);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem var(--gutter);
  background: rgba(7, 7, 8, 0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-figure {
  margin: 0;
  max-width: min(100%, 1100px);
  text-align: center;
}

.lightbox-figure img {
  width: auto;
  max-width: 100%;
  max-height: calc(100svh - 10rem);
  margin-inline: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-figure figcaption {
  margin-top: var(--space-md);
  color: var(--text-on-dark);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  color: var(--btn-text);
  background: var(--accent);
}

.lightbox-close {
  top: var(--space-md);
  right: var(--space-md);
}

.lightbox-prev {
  left: var(--space-sm);
}

.lightbox-next {
  right: var(--space-sm);
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- Reviews ---------- */
.reviews-head {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.reviews-head p {
  max-width: 34rem;
  font-size: var(--fs-lead);
  color: var(--text-muted);
}

.stars {
  display: flex;
  gap: 0.15rem;
  color: #d9a514;
}

.stars svg {
  width: 1.1rem;
  height: 1.1rem;
}

.review-featured {
  margin: 0 0 var(--space-2xl);
  padding-left: clamp(1rem, 0.5rem + 2vw, 2rem);
  border-left: 4px solid var(--leaf);
}

.review-featured blockquote {
  margin: var(--space-md) 0;
}

.review-featured blockquote p {
  max-width: 52rem;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.55rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
}

.review-featured figcaption,
.review-by {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  align-items: baseline;
  margin: 0;
  font-size: var(--fs-small);
}

.review-featured figcaption strong,
.review-by strong {
  font-size: 1rem;
  color: var(--text);
}

.review-featured figcaption span,
.review-by span {
  color: var(--text-muted);
}

.review-list {
  display: grid;
  border-top: 2px solid var(--text);
}

.review {
  padding-block: var(--space-xl);
  border-bottom: 1px solid var(--line);
  transition: transform 0.4s var(--ease-spring), border-color 0.4s var(--ease-spring);
}

.review blockquote {
  margin: var(--space-sm) 0 var(--space-md);
}

.review blockquote p {
  color: var(--text);
}

.reviews-more {
  margin-top: var(--space-xl);
}

/* ---------- About ---------- */
.about {
  background: var(--paper-deep);
}

.about-grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}

.about-photo {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 40%;
}

.about-copy h2 {
  margin-bottom: var(--space-lg);
}

.about-lead {
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--text);
}

.about-copy p:not(.about-lead) {
  color: var(--text-muted);
}

.about-copy .btn {
  margin-top: var(--space-md);
}

/* ---------- CTA banner ---------- */
.cta {
  position: relative;
  padding-block: clamp(4.5rem, 3rem + 7vw, 9rem);
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}

.cta-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.cta-bg picture,
.cta-bg img {
  width: 100%;
  height: 100%;
}

.cta-bg img {
  object-fit: cover;
  object-position: 50% 60%;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(var(--dark-rgb), 0.94) 0%, rgba(var(--dark-rgb), 0.78) 45%, rgba(var(--dark-rgb), 0.35) 100%),
    radial-gradient(ellipse at 90% 110%, rgba(var(--leaf-rgb), 0.35) 0%, transparent 55%);
}

.cta h2 {
  max-width: 42rem;
}

.cta h2 span {
  display: block;
}

.cta-accent {
  color: var(--accent-on-dark);
}

.cta p {
  max-width: 34rem;
  margin-top: var(--space-lg);
  font-size: var(--fs-lead);
  color: var(--text-on-dark-muted);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-xl);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-info > p {
  max-width: 28rem;
  margin-top: var(--space-lg);
  font-size: var(--fs-lead);
  color: var(--text-muted);
}

.contact-list {
  margin-top: var(--space-xl);
  border-top: 2px solid var(--text);
}

.contact-item {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-bottom: 1px solid var(--line);
  transition: transform 0.3s ease;
}

.contact-item dt {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 0.1rem;
}

.contact-item dd a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -10px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-item dd a[href^="tel:"] {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  color: var(--text);
  text-decoration-color: var(--leaf);
}

.form-panel {
  padding: clamp(1.5rem, 1rem + 2.5vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--leaf);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.5s var(--ease-spring), border-color 0.5s var(--ease-spring), transform 0.5s var(--ease-spring);
}

.form-fields {
  display: grid;
  gap: var(--space-lg);
}

.form-row {
  display: grid;
  gap: var(--space-lg);
}

.form-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.form-field textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-field textarea::placeholder {
  color: var(--placeholder);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--leaf-mid);
  box-shadow: 0 0 0 3px rgba(var(--leaf-rgb), 0.3);
}

.form-field [aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 1px var(--error);
}

.field-error,
.form-error {
  margin: 0.4rem 0 0;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--error);
}

.form-error a {
  color: var(--error);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-captcha:empty {
  display: none;
}

.form-privacy {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.form-privacy a {
  display: inline-block;
  padding-block: 0.6rem;
}

.form-success h3 {
  margin-bottom: var(--space-sm);
}

.form-success:focus {
  outline: none;
}

/* ---------- Privacy page ---------- */
.legal {
  max-width: 50rem;
  padding-block: calc(var(--nav-height) + var(--space-2xl)) var(--space-3xl);
}

.legal h1 {
  margin-bottom: var(--space-xs);
  font-size: var(--fs-h2);
}

.legal h2 {
  margin: var(--space-xl) 0 var(--space-sm);
  font-size: var(--fs-h3);
}

.legal ul {
  margin-bottom: var(--space-md);
  padding-left: 1.25rem;
  list-style: disc;
}

.legal li {
  margin-bottom: var(--space-xs);
}

.legal-updated {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  padding-top: var(--space-3xl);
  color: var(--text-on-dark-muted);
  background: var(--ink);
  border-top: 3px solid var(--leaf);
}

.footer-grid {
  display: grid;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.footer-brand p {
  max-width: 22rem;
  margin-top: var(--space-md);
}

.site-footer h2 {
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}

.site-footer li {
  margin-bottom: var(--space-xs);
}

.site-footer a:not(.logo):not(.social-link) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -8px;
  color: var(--text-on-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color var(--transition-fast), transform 0.3s ease;
}

.site-footer a:not(.logo):not(.social-link):hover {
  color: var(--accent-on-dark);
}

.social-link {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: var(--space-md);
  color: var(--text-on-dark);
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.social-link svg {
  width: 22px;
  height: 22px;
}

.social-links {
  display: flex;
  gap: var(--space-sm);
}

.social-link:hover {
  color: var(--white);
  background: var(--leaf);
  border-color: var(--leaf);
}

.site-footer--bare {
  padding-top: 0;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-xl);
  /* Extra room at the bottom so the chat button never covers the privacy link */
  padding-block: var(--space-lg) 5.5rem;
  font-size: var(--fs-small);
  border-top: 1px solid var(--line-dark);
}

/* ==========================================================================
   Breakpoints (mobile first)
   ========================================================================== */
@media (min-width: 480px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .hero-note {
    padding: 1rem 1.5rem;
  }
}

@media (min-width: 768px) {
  .hero-note {
    display: grid;
  }

  .area-strip-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xl);
  }

  .area-hours {
    flex-shrink: 0;
  }

  .svc {
    grid-template-columns: 3rem 1fr;
    gap: var(--space-lg);
    padding-block: var(--space-xl);
  }

  .reviews-head {
    grid-template-columns: 1fr 1.2fr;
    align-items: end;
    gap: var(--space-2xl);
  }

  .facts {
    grid-template-columns: repeat(3, 1fr);
    border-top: 0;
  }

  .fact {
    padding: var(--space-lg) var(--space-lg) 0 0;
    border-bottom: 0;
    border-top: 1px solid var(--line-dark);
  }

  .fact + .fact {
    padding-left: var(--space-lg);
    border-left: 1px solid var(--line-dark);
  }

  .jobs-head {
    grid-template-columns: 1fr 1.2fr;
    align-items: end;
    gap: var(--space-2xl);
  }

  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
  }

  .drain-key {
    grid-template-columns: 1fr 1fr;
  }

  .review-list {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-2xl);
  }

  .lightbox-prev {
    left: var(--space-lg);
  }

  .lightbox-next {
    right: var(--space-lg);
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1.2fr;
  }
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-xl);
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .nav-links {
    display: flex;
    gap: var(--space-xl);
  }

  .nav-links a {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    font-size: 1rem;
    border-bottom: 0;
  }

  .nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 6px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-base);
  }

  .nav-links a:hover::after,
  .nav-links a:focus-visible::after {
    width: 100%;
  }

  .nav-links a:hover {
    color: var(--white);
  }

  .btn-nav {
    align-self: center;
    min-height: 46px;
    padding: 0.65rem 1.4rem;
  }

  /* Hero, marquee and strip all fit in the first desktop screen */
  .hero {
    min-height: calc(100svh - var(--below-hero));
    padding-top: calc(var(--nav-height) + 1.5rem);
    padding-bottom: clamp(2rem, 5vh, 4rem);
  }

  .hero--page {
    min-height: 100svh;
  }

  .hero-title {
    font-size: clamp(2.5rem, min(4.4vw, 8vh), 3.9rem);
  }

  .marquee {
    height: var(--marquee-h);
    padding-block: 0;
  }

  .area-strip {
    height: var(--strip-h);
    padding-block: 0;
  }

  /* On load the chat button sits inside the strip, clear of its text. It drops
     to its usual spot once the page scrolls. */
  .area-strip-inner {
    justify-content: flex-start;
    gap: clamp(1.25rem, 2.5vw, 2.5rem);
    font-size: clamp(0.9375rem, 1.35vw, 1.0625rem);
    white-space: nowrap;
  }

  .site-header:not(.scrolled):not(.site-header--solid) ~ div > #cc-chat-toggle {
    bottom: calc((var(--strip-h) - 53px) / 2);
  }

  .hero-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .services-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: var(--space-3xl);
    align-items: start;
  }

  .services-intro {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-xl));
  }

  .about-grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: var(--space-3xl);
  }

  .proof-top {
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-3xl);
  }

  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-3xl);
  }
}

/* Heavy below-fold sections render on demand */
.about,
.contact,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}

/* ==========================================================================
   Premium animations (motion allowed only)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* Hero */
  .hero-kicker {
    animation: slide-down 0.8s var(--ease-spring) 0.2s both;
  }

  .highlight {
    background: linear-gradient(100deg, var(--accent-on-dark) 0%, var(--accent-on-dark) 40%, var(--accent-glint) 50%, var(--accent-on-dark) 60%, var(--accent-on-dark) 100%);
    background-size: 250% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gold-shimmer 4s ease 1s both;
  }

  .hero-note {
    animation: pop-in 0.6s var(--ease-spring) 0.9s both;
  }

  .btn-pulse {
    animation: pulse-glow 2.5s ease-in-out 2s infinite;
  }

  .btn-nav {
    animation: nav-cta-pulse 2s ease-in-out infinite;
  }

  .btn-pulse:hover,
  .btn-nav:hover {
    animation-play-state: paused;
  }

  /* Marquee */
  .marquee-track {
    animation: scroll-marquee 13s linear infinite;
  }

  /* Scroll reveals (only when JS is running) */
  .js .fade-in {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.2s var(--ease-spring), transform 1.2s var(--ease-spring);
  }

  .js .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .js .svc-list .svc:nth-child(2) { transition-delay: 0.08s; }
  .js .svc-list .svc:nth-child(3) { transition-delay: 0.16s; }
  .js .svc-list .svc:nth-child(4) { transition-delay: 0.24s; }
  .js .svc-list .svc:nth-child(5) { transition-delay: 0.32s; }

  .js .gallery .gallery-item:nth-child(3n + 2) { transition-delay: 0.1s; }
  .js .gallery .gallery-item:nth-child(3n) { transition-delay: 0.2s; }

  .js .facts.fade-in .fact {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s var(--ease-spring), transform 0.9s var(--ease-spring);
  }

  .js .facts.visible .fact {
    opacity: 1;
    transform: none;
  }

  .js .facts .fact:nth-child(2) { transition-delay: 0.15s; }
  .js .facts .fact:nth-child(3) { transition-delay: 0.3s; }

  /* Drain diagram: the layers go in bottom to top, like the real job, then
     rain falls and runs along the pipe */
  .js .drain .drain-layer {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease-spring), transform 0.7s var(--ease-spring);
  }

  .js .drain.visible .drain-layer {
    opacity: 1;
    transform: none;
  }

  .js .drain.visible .drain-trench { transition-delay: 0.25s; }
  .js .drain.visible .drain-stone { transition-delay: 0.55s; }
  .js .drain.visible .drain-pipe { transition-delay: 0.85s; }
  .js .drain.visible .drain-wrap { transition-delay: 1.15s; }
  .js .drain.visible .drain-sod { transition-delay: 1.45s; }

  .drain.visible .drain-drops {
    opacity: 1;
    transition: opacity 0.4s ease 2s;
  }

  .drain.visible .drop {
    animation: drop-fall 2.4s ease-in 2s infinite;
  }

  .drain.visible .drop-2 { animation-delay: 2.8s; }
  .drain.visible .drop-3 { animation-delay: 3.5s; }

  .drain.visible .drain-flow {
    animation: drain-flow 2.4s ease-in-out 2.4s infinite;
  }

  /* Rating counter pops in, counts up (script.js), then bounces */
  .js .facts .count {
    opacity: 0;
  }

  .js .facts.visible .count {
    animation: pop-in 0.6s var(--ease-spring) 0.2s both;
  }

  .count.bounce {
    animation: stat-bounce 0.9s ease both;
  }

  /* Review stars pop in one after another */
  .js .stars svg {
    transform: scale(0);
  }

  .js .visible .stars svg {
    animation: star-pop 0.3s var(--ease-spring) both;
  }

  .js .visible .stars svg:nth-child(1) { animation-delay: 0.2s; }
  .js .visible .stars svg:nth-child(2) { animation-delay: 0.3s; }
  .js .visible .stars svg:nth-child(3) { animation-delay: 0.4s; }
  .js .visible .stars svg:nth-child(4) { animation-delay: 0.5s; }
  .js .visible .stars svg:nth-child(5) { animation-delay: 0.6s; }

  .js .review-list .review:nth-child(2n) { transition-delay: 0.12s; }

  .review:hover {
    border-bottom-color: var(--leaf);
    transform: translateY(-6px);
  }

  /* Service icons pop in as each row reveals */
  .js .svc .service-icon {
    transform: scale(0);
  }

  .js .svc.visible .service-icon {
    animation: icon-pop 0.6s var(--ease-spring) 0.3s both;
  }

  .svc:hover .service-icon {
    color: var(--leaf-deep);
    transition: color var(--transition-base);
  }

  /* Gallery: lift and slow zoom */
  .gallery-btn:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
  }

  .gallery-btn:hover img {
    transform: scale(1.05);
  }

  .lightbox.open .lightbox-figure {
    animation: lightbox-zoom 0.4s var(--ease-spring) both;
  }

  /* About image slow zoom on reveal */
  .about-photo img {
    transform: scale(1.15);
  }

  .about-photo.visible img {
    transform: scale(1);
    transition: transform 12s linear;
  }

  /* Cards and panels */
  .form-panel:hover {
    border-color: var(--leaf);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-10px);
  }

  .about-photo {
    transition: box-shadow 0.5s var(--ease-spring);
  }

  .about-photo:hover {
    box-shadow: var(--shadow-card-hover);
  }

  /* Micro-interactions */
  .contact-item:hover {
    transform: translateX(8px);
  }

  .site-footer a:not(.logo):not(.social-link):hover {
    transform: translateX(4px);
  }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 768px) {
  .marquee-track {
    animation-duration: 12s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
    padding: 0.4rem var(--gutter);
  }

  .marquee-item {
    font-size: 1rem;
    line-height: 1.5;
  }

  .marquee-item::after {
    margin-inline: 0.9rem;
  }

  .marquee-item:nth-child(n + 9) {
    display: none;
  }

  .marquee-item:nth-child(8)::after {
    display: none;
  }

  .btn,
  .hero-note,
  .contact-item,
  .gallery-btn,
  .gallery-btn img,
  .form-panel,
  .site-footer a {
    transition: color var(--transition-fast), background-color var(--transition-fast), opacity var(--transition-fast);
  }

  .review,
  .review:hover {
    transform: none;
  }

  .btn:hover,
  .hero-note:hover,
  .gallery-btn:hover,
  .gallery-btn:hover img {
    transform: none;
  }
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gold-shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.5) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
  50% { box-shadow: 0 8px 40px rgba(var(--accent-rgb), 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
}

@keyframes nav-cta-pulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
  50% { box-shadow: 0 4px 24px rgba(var(--accent-rgb), 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
}

@keyframes scroll-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes icon-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes drop-fall {
  0% { opacity: 0; transform: translateY(-10px); }
  15% { opacity: 1; }
  70% { opacity: 1; transform: translateY(150px); }
  100% { opacity: 0; transform: translateY(185px); }
}

@keyframes drain-flow {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes star-pop {
  0% { transform: scale(0) rotate(-30deg); }
  70% { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes stat-bounce {
  0%, 100% { transform: translateY(0); }
  15% { transform: translateY(-10px); }
  30% { transform: translateY(0); }
  45% { transform: translateY(-5px); }
  60% { transform: translateY(0); }
  75% { transform: translateY(-2px); }
}

@keyframes lightbox-zoom {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}


/* ---------- Home hero: job photo cards ----------
   Nick's job photos are upright phone shots, so instead of one photo behind
   the headline the hero shows three of them as framed cards (same layout as
   drain-busters and martock-drywall).
   Tap or click a card behind to shuffle it to the front (script.js swaps
   each card's data-slot; the slots below place them). */
.hero--cards {
  min-height: 0;
  align-items: center;
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-3xl);
  background:
    radial-gradient(ellipse 60% 70% at 78% 50%, rgba(var(--leaf-rgb), 0.24) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(var(--accent-rgb), 0.12) 0%, transparent 70%),
    linear-gradient(180deg, var(--charcoal) 0%, var(--ink) 55%, var(--ink-deep) 100%);
}

.hero--cards .hero-inner {
  gap: var(--space-2xl);
}

/* The stack: a box sized from its height, cards placed inside it */
.hero-cards {
  --stack-h: clamp(15rem, 72vw, 21rem);
  position: relative;
  align-self: center;
  flex-shrink: 0;
  width: calc(var(--stack-h) * 1.24);
  height: var(--stack-h);
  /* Sideways swipes turn the stack (script.js); up and down still scroll */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.hero-card[data-slot="main"] {
  cursor: grab;
}

.hero-cards.is-dragging,
.hero-cards.is-dragging .hero-card {
  cursor: grabbing;
}

/* While a finger or mouse is dragging, the cards follow it with no lag */
.hero-card.is-dragged {
  z-index: 4;
  transition: none;
}

.hero-card[data-slot="main"].is-dragged {
  z-index: 5;
}

.hero-card {
  --r: 0deg;
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  font: inherit;
  color: inherit;
  background: var(--graphite);
  border: 4px solid rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-md);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--r));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hero-card:focus-visible {
  outline: 3px solid var(--accent-on-dark);
  outline-offset: 4px;
}

.hero-card picture,
.hero-card img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-card img {
  object-fit: cover;
  pointer-events: none;
}

/* The three places a card can sit */
.hero-card[data-slot="main"] {
  --r: -2deg;
  z-index: 3;
  left: 25%;
  top: 0;
  width: 50%;
}

.hero-card[data-slot="left"] {
  --r: -8deg;
  z-index: 1;
  left: 0;
  top: 15%;
  width: 39%;
  filter: brightness(0.8);
}

.hero-card[data-slot="right"] {
  --r: 7deg;
  z-index: 2;
  left: 61%;
  top: 10%;
  width: 39%;
  filter: brightness(0.8);
}

/* The jobs note sits over the bottom-left corner of the stack */
.hero--cards .hero-note {
  position: absolute;
  z-index: 6;
  left: -9%;
  bottom: -9%;
  max-width: 16rem;
  background: rgba(var(--dark-rgb), 0.78);
}

.hero--cards .hero-note:hover {
  background: rgba(var(--dark-rgb), 0.9);
}

/* Phones: a small hint under the stack (the note is hidden there) */
.hero-cards-hint {
  display: none;
}

@media (max-width: 767.98px) {
  .hero-cards-hint {
    position: absolute;
    top: calc(100% + 1.1rem);
    left: 0;
    right: 0;
    display: block;
    margin: 0;
    font-size: var(--fs-small);
    text-align: center;
    color: var(--text-on-dark-muted);
  }
}

@media (min-width: 768px) {
  .hero-cards {
    --stack-h: 24rem;
  }
}

/* Desktop: headline left, cards right, all inside the first screen */
@media (min-width: 1024px) {
  .hero--cards {
    min-height: calc(100svh - var(--below-hero));
    padding-top: calc(var(--nav-height) + 1rem);
    padding-bottom: 1.5rem;
  }

  .hero--cards .hero-inner {
    align-items: center;
    gap: var(--space-2xl);
  }

  .hero--cards .hero-content {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* Capped so "ready for your paint" stays on one line beside the stack, up
     to 1920 wide (the line is about 9.1em long) */
  .hero-cards {
    --stack-h: clamp(16rem, min(calc(100svh - var(--below-hero) - var(--nav-height) - 6rem), 36vw), 29rem);
    width: calc(var(--stack-h) * 1.12);
  }

  .hero--cards .hero-title {
    font-size: clamp(2.5rem, min(4.4vw, 8vh), 3.75rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-card {
    transition:
      left 0.75s var(--ease-spring),
      top 0.75s var(--ease-spring),
      width 0.75s var(--ease-spring),
      transform 0.5s var(--ease-spring),
      filter 0.45s ease,
      box-shadow 0.5s var(--ease-spring);
  }

  /* On load the cards deal in one after another (script.js adds .is-live after) */
  .hero-cards:not(.is-live) .hero-card {
    animation: card-in 0.9s var(--ease-spring) backwards;
  }

  .hero-cards:not(.is-live) .hero-card--left { animation-delay: 0.35s; }
  .hero-cards:not(.is-live) .hero-card--right { animation-delay: 0.5s; }
  .hero-cards:not(.is-live) .hero-card--main { animation-delay: 0.65s; }

  /* The shuffle: the picked card jumps up and over to the front while the old
     front card ducks down into its place */
  .hero-card.is-arriving {
    animation: card-to-front 0.8s var(--ease-spring);
  }

  .hero-card.is-leaving {
    animation: card-to-back 0.75s var(--ease-spring);
  }

  /* Tapping the front card gives it a little bounce */
  .hero-card.is-nudged {
    animation: card-nudge 0.5s var(--ease-spring);
  }

  .hero--cards .hero-note {
    animation-delay: 1.1s;
  }
}

/* Mouse and trackpad: the stack fans out under the cursor, and a card behind
   peeks up over the front one before you click it */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-cards:not(.is-holding):hover .hero-card[data-slot="left"] {
    transform: translateX(-9%) rotate(-11deg);
  }

  .hero-cards:not(.is-holding):hover .hero-card[data-slot="right"] {
    transform: translateX(9%) rotate(10deg);
  }

  .hero-cards:not(.is-holding) .hero-card[data-slot="left"]:hover,
  .hero-cards:not(.is-holding) .hero-card[data-slot="right"]:hover {
    z-index: 4;
    filter: none;
    box-shadow: 0 34px 64px rgba(0, 0, 0, 0.6), 0 10px 18px rgba(0, 0, 0, 0.35);
  }

  .hero-cards:not(.is-holding) .hero-card[data-slot="left"]:hover {
    transform: translateX(-14%) translateY(-14px) rotate(-4deg) scale(1.06);
  }

  .hero-cards:not(.is-holding) .hero-card[data-slot="right"]:hover {
    transform: translateX(14%) translateY(-14px) rotate(4deg) scale(1.06);
  }

  .hero-cards:not(.is-holding) .hero-card[data-slot="main"]:hover {
    transform: translateY(-8px) rotate(var(--r));
    box-shadow: 0 32px 60px rgba(0, 0, 0, 0.55), 0 8px 16px rgba(0, 0, 0, 0.35);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(40px) rotate(0deg) scale(0.94);
  }

  to {
    opacity: 1;
    transform: rotate(var(--r));
  }
}

@keyframes card-to-front {
  0% {
    transform: rotate(0deg) scale(0.9);
  }

  40% {
    transform: translateY(-26px) rotate(4deg) scale(1.1);
  }

  70% {
    transform: translateY(4px) rotate(-3deg) scale(0.99);
  }

  100% {
    transform: rotate(var(--r));
  }
}

@keyframes card-to-back {
  0% {
    transform: rotate(-2deg) scale(1);
  }

  45% {
    transform: translateY(18px) rotate(0deg) scale(0.86);
  }

  100% {
    transform: rotate(var(--r));
  }
}

@keyframes card-nudge {
  0%,
  100% {
    transform: rotate(var(--r));
  }

  35% {
    transform: translateY(-12px) rotate(1deg) scale(1.03);
  }

  65% {
    transform: translateY(2px) rotate(-3deg);
  }
}
