/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-primary-fg);
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-primary-fg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}
.btn--secondary:hover {
  background: var(--color-secondary);
  color: var(--color-fg-inverse);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  padding-inline: var(--space-3);
}
.btn--ghost:hover { text-decoration: underline; }

.btn--large { padding: var(--space-4) var(--space-8); font-size: var(--fs-lg); }
.btn--small { padding: var(--space-2) var(--space-4); font-size: var(--fs-sm); }

/* ===== Header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
  transition: background var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(247, 242, 235, 0.92);
  border-bottom-color: transparent;
  box-shadow: 0 1px 0 var(--color-border-strong), 0 8px 24px rgba(31, 37, 48, 0.06);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  /* Tight vertical padding keeps the bar at its compact original height (~72px)
     while letting the logo grow into more of that height. Mobile drops further
     to let the logo near-fill the bar. */
  padding-block: 10px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--color-secondary);
  text-decoration: none;
}
/* Logo mark sizing: prominent brand anchor in the header. Width is auto so
   per-fork client logos with non-square aspect ratios (e.g. 3:1 wordmark+mark
   lockups) render at their natural proportions. Just update `aspect-ratio`
   in the per-fork override below. Height drives the size. */
.logo-mark {
  flex-shrink: 0;
  display: block;
  height: 64px;
  width: auto;
  aspect-ratio: 1; /* placeholder is square; per-fork: change to match client logo, e.g. `aspect-ratio: 3` for a 3:1 lockup */
}
.logo-text {
  letter-spacing: -0.01em;
}

.primary-nav ul {
  display: flex;
  gap: var(--space-6);
}

.primary-nav a {
  color: var(--color-fg);
  font-weight: var(--fw-medium);
}
.primary-nav a:hover { color: var(--color-primary); }

/* Submenu (Services dropdown) */
.primary-nav .has-submenu {
  position: relative;
}
.submenu-toggle {
  background: none;
  border: none;
  font: inherit;
  color: var(--color-fg);
  font-weight: var(--fw-medium);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.submenu-toggle:hover { color: var(--color-primary); }
.submenu-chevron {
  font-size: 0.7em;
  transition: transform var(--duration-fast) var(--ease-out);
}
.submenu-toggle[aria-expanded="true"] .submenu-chevron { transform: rotate(180deg); }
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: var(--space-3);
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--space-3);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
}
.submenu[hidden] { display: none; }
.submenu li { margin: 0; }
.submenu a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--color-fg);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.submenu a:hover { background: var(--color-bg); color: var(--color-primary); }

.header-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.phone-link {
  font-weight: var(--fw-semibold);
  color: var(--color-secondary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}
.nav-toggle-bar {
  display: block;
  width: 24px; height: 2px;
  background: var(--color-fg);
  position: relative;
  transition: background 200ms var(--ease-out);
}
.nav-toggle-bar::before, .nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px; height: 2px;
  background: var(--color-fg);
  transition: top 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.nav-toggle-bar::before { top: -8px; }
.nav-toggle-bar::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

.primary-nav-cta { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
  }
  .primary-nav[data-open="true"] { display: block; }
  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: var(--space-4);
  }
  .primary-nav a:not(.btn) {
    display: block;
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--color-border);
  }
  /* Mobile submenu: inline nested expand, no absolute positioning */
  .primary-nav .submenu-toggle {
    width: 100%;
    text-align: left;
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    justify-content: space-between;
    display: flex;
  }
  .primary-nav .submenu {
    position: static;
    margin: 0;
    background: var(--color-bg);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 var(--space-2) var(--space-4);
  }
  .primary-nav .submenu a {
    padding-block: var(--space-2);
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }
  .primary-nav-cta {
    display: block;
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--color-border);
  }
  .primary-nav-cta .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .header-cta .phone-link { display: none; }
}

/* ===== Hero ===== */

.hero {
  padding-block: var(--space-16) var(--space-20);
  background-color: var(--color-bg-dark);
  color: var(--color-fg-inverse);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: -350px;
  z-index: -1;
  overflow: hidden;
  will-change: transform;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-hero);
  z-index: 1;
  pointer-events: none;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transform-origin: 50% 40%;
  animation: heroKenBurns 36s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes heroKenBurns {
  0% {
    transform: scale(1.08) translate3d(-2%, -1%, 0);
    filter: saturate(1) brightness(1);
  }
  100% {
    transform: scale(1.24) translate3d(2.5%, 2%, 0);
    filter: saturate(1.08) brightness(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg img {
    animation: none;
    transform: scale(1.08);
  }
  .hero-bg {
    transform: none !important;
  }
}

.hero .container { position: relative; }
.hero-content { max-width: 720px; position: relative; }
.hero-text { position: relative; }

/* Hero-side inline wizard card. Sits in the right grid cell on desktop,
   stacks below the hero text on mobile. Opaque cream surface keeps the
   form legible above the photographic background. */
.hero-form-card {
  position: relative;
  background: var(--color-bg);
  color: var(--color-fg);
  padding: var(--space-6);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  margin-block-start: var(--space-10);
}
.hero-form-card .wizard {
  background: transparent;
  padding: 0;
}

@media (min-width: 960px) {
  .hero .container {
    display: grid;
    grid-template-columns: 1fr minmax(380px, 460px);
    gap: var(--space-8);
    align-items: start;
  }
  .hero-form-card {
    margin-block-start: 0;
    max-width: 460px;
    justify-self: end;
    width: 100%;
  }
}

.hero h1 {
  font-size: var(--fs-5xl);
  color: var(--color-fg-inverse);
  margin-block-end: var(--space-4);
  letter-spacing: -0.02em;
}

.hero .lede {
  font-size: var(--fs-lg);
  color: var(--color-fg-inverse);
  opacity: 0.92;
  margin-block-end: var(--space-6);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-block-end: var(--space-6);
}
.hero-cta .btn--secondary {
  background: transparent;
  color: var(--color-fg-inverse);
  border-color: var(--color-fg-inverse);
}
.hero-cta .btn--secondary:hover {
  background: var(--color-fg-inverse);
  color: var(--color-primary);
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
}
.trust-badges li {
  position: relative;
  padding-inline-start: var(--space-6);
  font-weight: var(--fw-medium);
  color: var(--color-fg-inverse);
  opacity: 0.88;
  font-size: var(--fs-sm);
}
.trust-badges li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: var(--fw-bold);
}

@media (max-width: 700px) {
  .hero { padding-block: var(--space-20); }
  .hero-bg img { object-position: center 35%; }
  .hero h1 { font-size: var(--fs-4xl); }
  .hero .lede { font-size: var(--fs-lg); }
}

/* ===== Service grid ===== */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.service-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  /* Soft resting shadow. Barely visible, gives the card lift on the warm
     cream page now that bg contrast alone no longer defines its edges. */
  box-shadow: 0 2px 8px rgba(31, 37, 48, 0.06);
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
  display: flex;
  flex-direction: column;
}
.service-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-bg);
}
.service-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}
.service-card-body {
  /* Note: --space-7 doesn't exist in tokens.css (scale skips 7: 6, 8, 10...).
     Pre-patch this rule referenced --space-7 and silently rendered as
     padding: 0. That's why the body text looked suffocated. Using only
     defined tokens now. */
  padding: var(--space-6) var(--space-6) var(--space-8);
}
.service-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.service-card:hover .service-card-media img {
  transform: scale(1.04);
}

.service-card h3 { font-size: var(--fs-lg); margin-block-end: var(--space-3); }
.service-card h3 a { color: var(--color-fg); }
.service-card h3 a:hover { color: var(--color-primary); }
.service-card p { font-size: var(--fs-sm); line-height: 1.6; color: var(--color-fg-muted); }

/* ===== Accreditations strip ===== */

.accreditations {
  padding-block: var(--space-12) var(--space-16);
  background: var(--color-bg-alt);
  border-block: 1px solid var(--color-border);
}
.accreditations-eyebrow {
  text-align: center;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin-block-end: var(--space-8);
}
.accreditations-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-10) var(--space-16);
  max-width: 1100px;
  margin-inline: auto;
}
.accreditations-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.accreditations-list a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-fg);
  transition: transform var(--duration-base) var(--ease-out);
}
.accreditations-list a:hover { transform: translateY(-3px); }
.accreditations-list img {
  height: 96px;
  width: auto;
  max-width: 320px;
  filter: none;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.accreditations-list .accreditation-meta {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 700px) {
  .accreditations { padding-block: var(--space-10) var(--space-12); }
  .accreditations-list { gap: var(--space-8); }
  .accreditations-list img { height: 64px; max-width: 240px; }
}

/* ===== Owner photo placeholder (Danny) ===== */

.owner-photo {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-block: var(--space-6);
}
.owner-photo-frame {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-fg-muted);
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
  object-position: 50% 25%;
}
img.owner-photo-frame {
  display: block;
  box-shadow: 0 2px 8px rgba(31, 37, 48, 0.12);
}
.owner-photo picture {
  flex: 0 0 auto;
  display: inline-block;
  line-height: 0;
}
.owner-photo--large picture .owner-photo-frame {
  width: 140px;
  height: 140px;
}
.owner-photo-frame[data-needs-photo] {
  border: 2px dashed var(--color-border-strong);
}
.owner-photo-frame[data-needs-photo]::after {
  content: "📷";
}
.owner-photo-caption {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  line-height: 1.5;
  margin: 0;
}
.owner-photo-caption strong {
  display: block;
  font-size: var(--fs-base);
  color: var(--color-fg);
  font-weight: var(--fw-semibold);
  margin-bottom: 2px;
}
.owner-photo--large .owner-photo-frame {
  width: 140px;
  height: 140px;
  font-size: 2.5rem;
}

/* ===== Reputation band (5-star) ===== */

.reputation-band {
  padding-block: var(--space-16);
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  text-align: center;
}
.reputation-band .section-eyebrow {
  display: inline-block;
  margin-block-end: var(--space-3);
}
.reputation-band h2 {
  max-width: 800px;
  margin-inline: auto;
  margin-block-end: var(--space-3);
}
.reputation-band .section-lede {
  max-width: 720px;
  margin-inline: auto;
  margin-block-end: var(--space-10);
}
.google-verified-card {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  max-width: 760px;
  margin: 0 auto var(--space-10);
  padding: var(--space-5) var(--space-6);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--color-fg);
  text-align: left;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.google-verified-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}
.google-verified-mark {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}
.google-verified-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.google-verified-eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: var(--fw-semibold);
  color: var(--color-fg-muted);
}
.google-verified-headline {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  color: var(--color-fg);
}
.google-verified-rating {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: 2px;
}
.google-verified-score {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--color-fg);
}
.google-verified-stars {
  color: var(--color-accent);
  letter-spacing: 2px;
}
.google-verified-count {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
}
.google-verified-cta {
  flex: 0 0 auto;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .google-verified-card { flex-wrap: wrap; gap: var(--space-3); padding: var(--space-4); }
  .google-verified-cta { width: 100%; text-align: right; }
}

.tiktok-verified-card {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  max-width: 760px;
  margin: 0 auto var(--space-10);
  padding: var(--space-5) var(--space-6);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--color-fg);
  text-align: left;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.tiktok-verified-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}
.tiktok-verified-mark {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tiktok-verified-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tiktok-verified-eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: var(--fw-semibold);
  color: var(--color-fg-muted);
}
.tiktok-verified-headline {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  color: var(--color-fg);
}
.tiktok-verified-sub {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  margin-top: 2px;
}
.tiktok-verified-cta {
  flex: 0 0 auto;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .tiktok-verified-card { flex-wrap: wrap; gap: var(--space-3); padding: var(--space-4); }
  .tiktok-verified-cta { width: 100%; text-align: right; }
}

/* Footer social icon row */
.social-links {
  display: flex;
  gap: var(--space-3);
  margin-block-start: var(--space-4);
  padding: 0;
  list-style: none;
}
.social-links li { margin: 0; }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
  transition: background var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.social-links a:hover,
.social-links a:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  opacity: 1;
}
.social-links img { width: 18px; height: 18px; display: block; }

.reputation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-8);
  text-align: left;
}
.reputation-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.reputation-stars {
  color: var(--color-accent);
  font-size: var(--fs-lg);
  letter-spacing: 2px;
  line-height: 1;
}
.reputation-quote {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: 1.45;
  color: var(--color-fg);
  margin: 0;
}
.reputation-author {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  margin: 0;
}
.reputation-author strong { color: var(--color-fg); font-weight: var(--fw-semibold); }
.reputation-band .section-cta { margin-top: var(--space-6); }

@media (max-width: 700px) {
  .reputation-band { padding-block: var(--space-10); }
  .reputation-grid { grid-template-columns: 1fr; }
}

/* ===== Trust strip ===== */

.trust-strip {
  background: var(--color-primary);
  color: var(--color-fg-inverse);
  padding-block: var(--space-12);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-8);
  text-align: center;
}

.trust-stat {
  font-size: var(--fs-5xl);
  font-weight: var(--fw-black);
  color: var(--color-accent);
  line-height: 1;
}

.trust-label {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-block-start: var(--space-2);
  color: var(--color-fg-inverse);
  opacity: 0.8;
}

/* ===== Process steps ===== */

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-8);
  counter-reset: step;
  list-style: none;
  position: relative;
}
.process-steps li {
  counter-increment: step;
  background: var(--color-bg-alt);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  /* Match the service-card resting shadow for cross-section consistency. */
  box-shadow: 0 2px 8px rgba(31, 37, 48, 0.06);
  position: relative;
  display: flex;
  flex-direction: column;
}
.process-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-primary-fg);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-block-end: var(--space-4);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}
.process-steps li img {
  width: calc(100% + var(--space-12));
  margin: 0 calc(-1 * var(--space-6)) var(--space-4);
  margin-block-start: calc(-1 * var(--space-6));
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.process-steps li img + ::before,
.process-steps li:has(img)::before {
  margin-block-start: calc(-1 * var(--space-12));
  margin-inline-start: var(--space-2);
}
.process-steps h3 {
  font-size: var(--fs-lg);
  margin-block-end: var(--space-2);
  color: var(--color-fg);
}
.process-steps p { font-size: var(--fs-sm); color: var(--color-fg-muted); }

@media (min-width: 880px) {
  .process-steps::before {
    content: "";
    position: absolute;
    top: calc(var(--space-6) + 1.5rem);
    left: 12%;
    right: 12%;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
    pointer-events: none;
  }
}

/* ===== Gallery ===== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
  list-style: none;
  padding: 0;
}
.gallery-grid .project-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.gallery-grid .gallery-item {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.project-card-caption {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--color-fg-muted);
  margin: 0;
}
.project-card-caption strong {
  color: var(--color-fg);
  font-weight: var(--fw-semibold);
}

/* ===== Testimonials ===== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.testimonial {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: relative;
}
.testimonial::before {
  content: "\201C";
  position: absolute;
  top: var(--space-2);
  left: var(--space-5);
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--color-secondary);
  opacity: 0.18;
  pointer-events: none;
}
.testimonial blockquote { margin: 0; line-height: var(--lh-relaxed); position: relative; }
.testimonial cite {
  display: block;
  margin-block-start: var(--space-4);
  font-style: normal;
  font-weight: var(--fw-semibold);
  color: var(--color-fg);
}
.rating {
  color: var(--color-accent);
  font-size: var(--fs-lg);
  margin-block-start: var(--space-2);
}
.review-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-block-start: var(--space-3);
  margin-block-end: 0;
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
}
.review-source {
  display: inline-flex;
  align-items: center;
  color: inherit;
}
.review-source img {
  width: 16px;
  height: 16px;
  display: block;
}
.review-meta time { color: inherit; }
.testimonials-grid > .testimonial:nth-child(1) .review-meta,
.testimonials-grid > .testimonial:nth-child(1) .review-source { color: rgba(247, 242, 235, 0.75); }

@media (min-width: 880px) {
  .testimonials-grid {
    grid-template-columns: repeat(12, 1fr);
    align-items: stretch;
  }
  .testimonials-grid > .testimonial:nth-child(1) {
    grid-column: span 6;
    background: var(--color-primary);
    color: var(--color-fg-inverse);
    border-color: var(--color-primary);
  }
  .testimonials-grid > .testimonial:nth-child(1)::before {
    color: var(--color-fg-inverse);
    opacity: 0.32;
  }
  .testimonials-grid > .testimonial:nth-child(1) blockquote {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    line-height: var(--lh-snug);
  }
  .testimonials-grid > .testimonial:nth-child(1) cite { color: var(--color-fg-inverse); opacity: 0.92; }
  .testimonials-grid > .testimonial:nth-child(1) .rating { color: var(--color-accent); }
  .testimonials-grid > .testimonial:nth-child(2),
  .testimonials-grid > .testimonial:nth-child(3) { grid-column: span 3; }
  .testimonials-grid > .testimonial:nth-child(4) { grid-column: span 4; }
  .testimonials-grid > .testimonial:nth-child(5) { grid-column: span 4; }
  .testimonials-grid > .testimonial:nth-child(6) { grid-column: span 4; }
  .testimonials-grid > .testimonial:nth-child(n+7) { grid-column: span 4; }

  /* Empty-state n=1: single card spans the full row but constrained width
     and centered so it doesn't stretch absurdly wide on a 12-col grid. */
  .testimonials-grid:has(> .testimonial:only-child) > .testimonial:only-child {
    grid-column: span 12;
    max-width: 720px;
    margin-inline: auto;
  }

  /* Empty-state n=2: split 50/50; both cards span 6.
     The first card keeps the featured-style slate background from the rule above. */
  .testimonials-grid:has(> .testimonial:nth-child(2):last-child) > .testimonial:nth-child(1),
  .testimonials-grid:has(> .testimonial:nth-child(2):last-child) > .testimonial:nth-child(2) {
    grid-column: span 6;
  }
}

/* ===== Areas list ===== */

.areas-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-2);
  margin-block: var(--space-6);
}
.areas-list a {
  display: block;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  color: var(--color-secondary);
  font-weight: var(--fw-medium);
}
.areas-list a:hover {
  background: var(--color-primary);
  color: var(--color-primary-fg);
}
.areas-list-extras {
  grid-column: 1 / -1;
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  line-height: 1.5;
}

/* ===== CTA band ===== */

.cta-band {
  background-image: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: var(--color-primary-fg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(247, 242, 235, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.cta-band > .container { position: relative; z-index: 1; }
.cta-band h2 {
  color: var(--color-primary-fg);
  margin-block-end: var(--space-3);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
.cta-band p {
  font-size: var(--fs-lg);
  margin-block-end: var(--space-8);
  opacity: 0.95;
}
.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}
.cta-band .btn--primary {
  background: var(--color-bg);
  color: var(--color-primary);
  border-color: var(--color-bg);
}
.cta-band .btn--primary:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.cta-band .btn--secondary {
  background: transparent;
  color: var(--color-fg-inverse);
  border-color: var(--color-fg-inverse);
}
.cta-band .btn--secondary:hover {
  background: var(--color-fg-inverse);
  color: var(--color-primary);
}

@media (max-width: 700px) {
  .cta-band {
    padding-block: var(--space-12);
  }
  .cta-band h2 { font-size: var(--fs-3xl); }
  .cta-band p { font-size: var(--fs-base); margin-block-end: var(--space-6); }
  .cta-band-actions { flex-direction: column; gap: var(--space-3); }
  .cta-band-actions .btn { width: 100%; }
}

/* ===== Footer ===== */

.site-footer {
  background-color: var(--color-bg-dark);
  background-image:
    linear-gradient(180deg, rgba(31, 37, 48, 0.55) 0%, var(--color-bg-dark) 70%),
    image-set(
      url("/portfolio/pennine-roof-co/images/dist/footer-roofline/1024w.avif") type("image/avif"),
      url("/portfolio/pennine-roof-co/images/dist/footer-roofline/1024w.webp") type("image/webp"),
      url("/portfolio/pennine-roof-co/images/dist/footer-roofline/1024w.jpg") type("image/jpeg")
    );
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--color-fg-inverse);
  padding-block: var(--space-20) var(--space-8);
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-10);
  margin-block-end: var(--space-12);
}

.footer-col h3, .footer-col h4 {
  color: var(--color-fg-inverse);
  font-size: var(--fs-base);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-block-end: var(--space-4);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.footer-brand .logo-mark {
  height: 48px;
  /* width: auto and aspect-ratio inherited from .logo-mark */
}

.footer-col ul { display: flex; flex-direction: column; gap: var(--space-2); }

.footer-col a {
  color: var(--color-fg-inverse);
  opacity: 0.7;
  font-size: var(--fs-sm);
}
.footer-col a:hover { opacity: 1; color: var(--color-accent); }

.footer-col p, .footer-col address {
  color: var(--color-fg-inverse);
  opacity: 0.7;
  font-size: var(--fs-sm);
  font-style: normal;
}

.footer-cert { margin-block-start: var(--space-3); font-size: var(--fs-xs); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-block-start: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-xs);
}

.footer-bottom p { color: var(--color-fg-inverse); opacity: 0.5; }

.legal-links { display: flex; gap: var(--space-4); }
.legal-links a {
  color: var(--color-fg-inverse);
  opacity: 0.5;
  font-size: var(--fs-xs);
}
.legal-links a:hover { opacity: 1; }

/* ===== Cookie consent pill ===== */

.cookie-pill {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-bg-dark);
  color: var(--color-fg-inverse);
  border: 1px solid rgba(247, 242, 235, 0.1);
  border-radius: 9999px;
  padding: 6px 6px 6px 22px;
  box-shadow:
    0 16px 36px rgba(31, 37, 48, 0.32),
    0 4px 10px rgba(31, 37, 48, 0.18);
  z-index: var(--z-cookie);
  font-size: var(--fs-sm);
  max-width: calc(100vw - var(--space-6) * 2);
  cursor: pointer;
  transition:
    transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    opacity var(--duration-base) var(--ease-out);
  animation: cookiePillIn 420ms var(--ease-out) both;
}
.cookie-pill[hidden] { display: none !important; }
.cookie-pill.is-dismissing {
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 16px);
}
.cookie-pill:hover {
  transform: translate(-50%, -2px);
  box-shadow:
    0 22px 44px rgba(31, 37, 48, 0.38),
    0 6px 14px rgba(31, 37, 48, 0.2);
}
.cookie-pill:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.cookie-pill-text {
  white-space: nowrap;
  font-weight: var(--fw-medium);
  letter-spacing: 0.01em;
}
.cookie-pill-text a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.cookie-pill-text a:hover { color: var(--color-fg-inverse); }

.cookie-pill-decline,
.cookie-pill-accept {
  appearance: none;
  border: none;
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 9999px;
  padding: 8px 16px;
  white-space: nowrap;
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out);
}
.cookie-pill-decline {
  background: transparent;
  color: var(--color-fg-inverse);
  opacity: 0.7;
}
.cookie-pill-decline:hover { opacity: 1; background: rgba(247, 242, 235, 0.08); }

.cookie-pill-accept {
  background: var(--color-accent);
  color: var(--color-bg-dark);
}
.cookie-pill-accept:hover {
  background: var(--color-fg-inverse);
  color: var(--color-bg-dark);
}

@keyframes cookiePillIn {
  from { opacity: 0; transform: translate(-50%, 32px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 560px) {
  /* Logo sizing on phones. The wordmark text below is sr-only at this width
     so the mark is the only visible brand element. Near-fills the bar with
     minimal padding so the mark earns the full vertical brand space. */
  .site-header-inner { padding-block: 4px; }
  .site-header .logo-mark { height: 64px; }
  .footer-brand .logo-mark { height: 40px; }
  /* Hide the business-name text in the header on narrow viewports. The logo
     mark, hamburger, and Free Quote CTA already compete for limited space.
     Uses sr-only pattern so screen readers still announce the business name
     when the logo link receives focus. */
  .site-header .logo-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .cookie-pill {
    bottom: var(--space-3);
    padding: 5px 5px 5px 16px;
    font-size: var(--fs-xs);
    gap: var(--space-2);
  }
  .cookie-pill-decline,
  .cookie-pill-accept {
    padding: 7px 12px;
  }
}

@media (max-width: 380px) {
  .cookie-pill-text { display: none; }
  .cookie-pill {
    padding-inline-start: var(--space-3);
  }
  .cookie-pill::before {
    content: "Cookies";
    font-weight: var(--fw-medium);
    margin-inline-end: var(--space-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-pill { animation: none; transition: opacity 200ms ease; }
  .cookie-pill:hover { transform: translateX(-50%); box-shadow: 0 16px 36px rgba(31, 37, 48, 0.32); }
}

/* ===== Back to top ===== */

.back-to-top {
  position: fixed;
  bottom: calc(var(--space-6) + 80px);
  right: var(--space-6);
  width: 44px; height: 44px;
  background: var(--color-bg-alt);
  color: var(--color-fg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--fs-base);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: var(--z-back-to-top);
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.back-to-top:hover {
  background: var(--color-bg);
  transform: translateY(-2px);
}

/* ===== Floating WhatsApp button ===== */

.floating-contact {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-back-to-top);
}
.floating-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: var(--shadow-xl);
  transition: transform var(--duration-base) var(--ease-out);
  animation: floatingPulse 2.4s ease-in-out infinite;
}
.floating-contact-btn--whatsapp {
  background: #25D366;
  color: #ffffff;
}
.floating-contact-btn:hover {
  transform: scale(1.1);
  animation-play-state: paused;
}
.floating-contact-btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

@keyframes floatingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55), var(--shadow-xl); }
  50% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0), var(--shadow-xl); }
}

@media (max-width: 700px) {
  .floating-contact {
    bottom: var(--space-4);
    right: var(--space-4);
  }
  .floating-contact-btn {
    width: 52px;
    height: 52px;
  }
  .back-to-top { bottom: calc(var(--space-4) + 76px); }
}

@media (prefers-reduced-motion: reduce) {
  .floating-contact-btn {
    transition: none;
    animation: none;
  }
}

/* ===== Page header (sub-pages) ===== */

.page-header {
  background: var(--color-bg-alt);
  padding-block: var(--space-16);
  text-align: center;
}
.page-header h1 { margin-block-end: var(--space-3); }
.page-header > .container > p {
  color: var(--color-fg-muted);
  max-width: 65ch;
  margin-inline: auto;
}

.breadcrumb {
  display: flex;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  margin-block-end: var(--space-4);
  justify-content: center;
}
.breadcrumb a { color: var(--color-fg-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb-sep { opacity: 0.5; }

/* ===== Prose (long-form text) ===== */

.prose {
  max-width: 65ch;
  margin-inline: auto;
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
}
.prose h2 { font-size: var(--fs-3xl); margin-block: var(--space-12) var(--space-4); }
.prose h3 { font-size: var(--fs-xl); margin-block: var(--space-8) var(--space-3); }
.prose ul, .prose ol {
  list-style: revert;
  padding-inline-start: var(--space-6);
  margin-block: var(--space-4);
}
.prose ul li, .prose ol li { margin-block: var(--space-2); }

/* ===== Quote wizard ===== */

.wizard {
  max-width: 600px;
  margin-inline: auto;
}

.wizard-progress-sticky {
  margin-block-end: var(--space-4);
}
@media (max-width: 640px) {
  .wizard-progress-sticky {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--color-bg);
    padding-block: var(--space-2);
    margin-inline: calc(var(--space-6) * -1);
    padding-inline: var(--space-6);
  }
}

.wizard-progress {
  height: 8px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-block-end: var(--space-2);
}
@media (min-width: 640px) {
  .wizard-progress { height: 10px; }
}
.wizard-progress-bar {
  height: 100%;
  width: 20%;
  background: var(--color-primary);
  transition: width 300ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .wizard-progress-bar { transition: none; }
}

.wizard-step-counter {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  margin-block-end: 0;
}

.wizard-time-estimate {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  text-align: center;
  margin-block-end: var(--space-2);
}
.wizard-time-icon {
  font-size: 2em;
  line-height: 1;
  vertical-align: -0.3em;
  margin-inline-end: 2px;
}

.wizard-testimonial {
  margin-block-end: var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-secondary);
}
.wizard-testimonial-body {
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--color-fg);
  margin-block-end: var(--space-1);
}
.wizard-testimonial-author {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-fg-muted);
}

@keyframes wizard-step-in-forward {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes wizard-step-in-back {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wizard-step[data-anim="forward"] { animation: wizard-step-in-forward 200ms ease both; }
.wizard-step[data-anim="back"]    { animation: wizard-step-in-back 200ms ease both; }
@media (prefers-reduced-motion: reduce) {
  .wizard-step[data-anim] { animation: none; }
}

.wizard-step h2 { margin-block-end: var(--space-2); }
.wizard-step > p { color: var(--color-fg-muted); margin-block-end: var(--space-8); }

.wizard-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
@media (max-width: 380px) {
  .wizard-options { grid-template-columns: 1fr; }
}

.wizard-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: var(--space-2);
  min-height: 124px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-3);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  font-family: inherit;
  width: 100%;
  color: var(--color-fg);
}
.wizard-option:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.wizard-option[data-selected="true"] {
  background: var(--color-primary);
  color: var(--color-fg-inverse);
  border-color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(58, 86, 115, 0.18);
}
.wizard-option-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--color-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}
.wizard-option[data-selected="true"] .wizard-option-icon {
  color: var(--color-fg-inverse);
}
.wizard-option strong {
  font-size: var(--fs-base);
  color: var(--color-fg);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.005em;
}
.wizard-option span {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  line-height: var(--lh-snug);
}
.wizard-option[data-selected="true"] strong { color: var(--color-fg-inverse); }
.wizard-option[data-selected="true"] span { color: rgba(247, 242, 235, 0.78); }

.wizard-form p { margin-block-end: var(--space-4); }
.wizard-form--inline {
  margin-block-start: var(--space-6);
  max-width: 320px;
}
.wizard-form--inline p:last-child { margin-block-end: 0; }

.wizard-photo-upload { margin-block-start: var(--space-2); }
.wizard-photo-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  padding: var(--space-5) var(--space-4);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.wizard-photo-trigger:hover {
  border-color: var(--color-primary);
  background: rgba(58, 86, 115, 0.04);
}
.wizard-photo-trigger:focus-within {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.wizard-photo-icon {
  width: 28px;
  height: 28px;
  color: var(--color-secondary);
}
.wizard-photo-label {
  font-weight: var(--fw-semibold);
  color: var(--color-fg);
}
.wizard-photo-hint {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
}
.wizard-photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-3);
  padding: 0;
  list-style: none;
}
.wizard-photo-previews li {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-muted, #ece6dc);
}
.wizard-photo-previews img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wizard-photo-previews .wizard-photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(31, 37, 48, 0.78);
  color: var(--color-fg-inverse);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.wizard-photo-previews .wizard-photo-remove:hover { background: var(--color-danger); }

.wizard-photo-pickers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-block-end: var(--space-2);
}
@media (max-width: 380px) {
  .wizard-photo-pickers { grid-template-columns: 1fr; }
}
.wizard-photo-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  padding: var(--space-4) var(--space-3);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-fg);
}
.wizard-photo-picker:hover {
  border-color: var(--color-primary);
  background: rgba(58, 86, 115, 0.04);
}
.wizard-photo-picker:focus-within {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.wizard-photo-picker svg {
  width: 24px;
  height: 24px;
  color: var(--color-secondary);
}
/* Busy state while client-side compression runs. Disables further input,
   overlays a brief "Processing photos…" label. Usually <1s; longer on
   multi-megapixel photos picked from a flagship Android camera. */
.wizard-photo-pickers.is-busy {
  pointer-events: none;
  opacity: 0.55;
  position: relative;
}
.wizard-photo-pickers.is-busy::after {
  content: "Processing photos…";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium, 500);
  color: var(--color-fg);
  background: rgba(247, 242, 235, 0.85);
  border-radius: var(--radius-md);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .wizard-photo-pickers.is-busy { transition: none; }
}
.wizard-photos-trust {
  font-size: var(--fs-xs);
  color: var(--color-fg-muted);
  margin-block-start: var(--space-2);
  margin-block-end: var(--space-2);
}

/* Photos step: container + step-local nav row (Skip / Continue). */
.wizard-photos-step {
  margin-block-end: var(--space-2);
}
.wizard-photos-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-block-start: var(--space-6);
}

/* Emergency triage: interstitial panel that replaces the urgency option grid
   when the user picks "Emergency". Amber-tinted, prominent call CTA. */
.wizard-emergency-triage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: rgba(217, 154, 57, 0.08);
  text-align: center;
}
.wizard-triage-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-fg-inverse);
  flex-shrink: 0;
}
.wizard-triage-icon svg { width: 28px; height: 28px; }
.wizard-emergency-triage h3 {
  font-size: var(--fs-xl);
  margin: 0;
  color: var(--color-fg);
}
.wizard-emergency-triage p {
  margin: 0;
  color: var(--color-fg-muted);
  max-width: 480px;
}
.wizard-triage-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: stretch;
  width: 100%;
  max-width: 320px;
  margin-block-start: var(--space-2);
}

/* Repairs detail: interstitial sub-panel shown when user picks "Repairs" on the
   service step. Mirrors the emergency-triage in-place swap pattern. */
.wizard-repairs-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  text-align: center;
  margin-block-start: var(--space-4);
}
.wizard-repairs-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-secondary);
  color: var(--color-fg-inverse);
  flex-shrink: 0;
}
.wizard-repairs-icon svg { width: 28px; height: 28px; }
.wizard-repairs-detail h3 {
  font-size: var(--fs-xl);
  margin: 0;
  color: var(--color-fg);
}
.wizard-repairs-detail > p {
  margin: 0;
  color: var(--color-fg-muted);
}

/* Sub-option list inside repairs detail: 1-col vertical stack, left-aligned,
   row layout so label + subtitle sit side-by-side inline. Wordier than the
   main service options so reduced min-height and padding. */
.wizard-options--sub {
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 400px;
  text-align: left;
}
.wizard-options--sub .wizard-option {
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  min-height: unset;
  padding: var(--space-3) var(--space-4);
  gap: var(--space-4);
}
.wizard-options--sub .wizard-option strong { font-size: var(--fs-sm); }
.wizard-options--sub .wizard-option span  { font-size: var(--fs-xs); }

.wizard-captcha {
  margin-block-start: var(--space-4);
}
.wizard-captcha .cf-turnstile {
  display: inline-block;
}
.wizard-captcha .form-error {
  display: block;
  margin-block-start: var(--space-1);
}
.wizard-submit-error {
  margin-block-start: var(--space-3);
  padding: var(--space-3);
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: #b91c1c;
}
.wizard-submit-error p { margin: 0; }
.wizard-submit-error a { color: inherit; font-weight: var(--fw-medium); }

.wizard-form label {
  display: block;
  font-weight: var(--fw-medium);
  color: var(--color-secondary);
}
.wizard-form input:not([hidden]):not([type="hidden"]),
.wizard-form textarea {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  margin-block-start: var(--space-2);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  color: var(--color-fg);
  transition: border-color var(--duration-fast) var(--ease-out);
}
.wizard-form input:focus,
.wizard-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.wizard-form input:user-invalid,
.wizard-form textarea:user-invalid,
.wizard-form input[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.form-error {
  display: block;
  color: var(--color-danger);
  font-size: var(--fs-sm);
  margin-block-start: var(--space-1);
  font-weight: var(--fw-medium, 500);
}

.wizard-field-note {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  margin-block-start: var(--space-2);
  margin-block-end: var(--space-4);
}

.wizard-trust-list {
  list-style: none;
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: var(--fs-xs);
  color: var(--color-fg-muted);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.wizard-trust-list li::before {
  content: '✓ ';
  color: var(--color-primary);
}
.wizard-trust-list a {
  color: inherit;
  text-decoration: underline;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-start: var(--space-8);
  gap: var(--space-3);
}
.wizard-nav button[hidden] { display: none; }
.wizard-nav button:only-child { margin-inline-start: auto; }

.wizard-success {
  padding-block: var(--space-6);
}
.wizard-success-heading {
  font-size: var(--fs-3xl);
  color: var(--color-primary);
  margin-block-end: var(--space-3);
}
.wizard-success .lede {
  font-size: var(--fs-lg);
  color: var(--color-fg);
  margin-block: 0 var(--space-6);
}
.wizard-success-emailed {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  margin-block-end: var(--space-4);
}
.wizard-success-reference {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-primary);
  color: var(--color-primary-fg);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-block-end: var(--space-6);
  width: fit-content;
}
.wizard-success-reference-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
  white-space: nowrap;
}
.wizard-success-reference code {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
  font-size: var(--fs-base);
  font-weight: 600;
  user-select: all;
  -webkit-user-select: all;
}
.wizard-success-recap {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-block-end: var(--space-5);
}
.wizard-success-recap dt {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-fg-muted);
  padding-block: var(--space-1);
  align-self: center;
}
.wizard-success-recap dd {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-fg);
  margin: 0;
  padding-block: var(--space-1);
  align-self: center;
}
@media (min-width: 560px) {
  .wizard-success-recap {
    grid-template-columns: repeat(2, max-content 1fr);
  }
}

/* Wrapper for the conditional Issue dt+dd pair. display:contents makes the
   div transparent to the parent grid so dt and dd participate as direct
   grid children. The [hidden] override restores display:none to hide the pair. */
.wizard-success-recap-row {
  display: contents;
}
.wizard-success-recap-row[hidden] {
  display: none;
}
.wizard-success-emergency {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  margin-block-end: var(--space-5);
}
.wizard-success-crosssell {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-block-end: var(--space-6);
}
.wizard-success-crosssell > p {
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
  margin-block-end: var(--space-2);
}
.wizard-success-crosssell ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}
.wizard-success-crosssell a {
  font-size: var(--fs-sm);
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wizard-fallback {
  text-align: center;
  margin-block-start: var(--space-8);
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
}

/* ===== Project detail meta ===== */

.project-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: var(--space-6);
  row-gap: var(--space-3);
  margin-block: var(--space-5);
  padding: var(--space-5);
  background: var(--color-bg-muted, var(--color-bg));
  border: 1px solid var(--color-border, rgba(0,0,0,0.08));
  border-radius: var(--radius-md, 0.5rem);
}
.project-meta dt {
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--fs-sm);
  color: var(--color-fg-muted);
}
.project-meta dd { margin: 0; color: var(--color-fg); }

/* ===== Gallery item (clickable) ===== */

.gallery-item {
  display: block;
  width: 100%;
  height: 100%;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-base) var(--ease-out);
}
.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.05);
}
.gallery-item:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* ===== Lightbox ===== */

.lightbox {
  border: none;
  background: transparent;
  padding: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
}
.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}
.lightbox[open] {
  display: grid;
  place-items: center;
  animation: lightboxIn var(--duration-base) var(--ease-out);
}
@keyframes lightboxIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  width: min(720px, 90vw);
  background: rgba(247, 242, 235, 0.06);
  border: 1px solid rgba(247, 242, 235, 0.12);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  color: rgba(247, 242, 235, 0.92);
  font-size: var(--fs-sm);
  backdrop-filter: blur(6px);
}
.lightbox-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3) var(--space-6);
  margin: 0;
}
.lightbox-meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lightbox-meta dt {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(247, 242, 235, 0.55);
  font-weight: var(--fw-semibold);
}
.lightbox-meta dd {
  margin: 0;
  color: rgba(247, 242, 235, 0.95);
  font-weight: var(--fw-medium);
}
.lightbox:not(.has-caption) .lightbox-caption { display: none; }
.lightbox:not(.has-caption) .lightbox-img { max-height: 85vh; }

.lightbox-close,
.lightbox-nav {
  position: fixed;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
  line-height: 1;
  transition: background var(--duration-fast) var(--ease-out);
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lightbox-close {
  top: var(--space-6);
  right: var(--space-6);
  width: 44px; height: 44px;
  font-size: var(--fs-2xl);
}

.lightbox-nav {
  top: 50%;
  width: 56px; height: 56px;
  font-size: var(--fs-3xl);
  transform: translateY(-50%);
}
.lightbox-prev { left: var(--space-6); }
.lightbox-next { right: var(--space-6); }

.lightbox-counter {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  margin: 0;
}

@media (max-width: 700px) {
  .lightbox-nav { width: 44px; height: 44px; font-size: var(--fs-2xl); }
  .lightbox-prev { left: var(--space-3); }
  .lightbox-next { right: var(--space-3); }
  .lightbox-close { top: var(--space-3); right: var(--space-3); }
}

/* ===== Details / FAQ accordion ===== */

.prose details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-block: var(--space-2);
  background: var(--color-bg);
}
.prose details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  color: var(--color-secondary);
  background: var(--color-bg-alt);
  transition: background var(--duration-fast);
  list-style: none;
  user-select: none;
}
.prose details summary::-webkit-details-marker { display: none; }
.prose details summary::marker { content: ""; }
.prose details summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: var(--fs-2xl);
  font-weight: var(--fw-normal);
  color: var(--color-primary);
  transition: transform var(--duration-base) var(--ease-out);
  flex-shrink: 0;
  margin-inline-start: var(--space-3);
  line-height: 1;
}
.prose details[open] summary::after {
  transform: rotate(45deg);
}
.prose details summary:hover {
  background: var(--color-bg);
}
.prose details > *:not(summary) {
  padding: var(--space-4) var(--space-5);
  margin-block: 0;
  animation: detailsContentIn var(--duration-base) var(--ease-out);
}
@keyframes detailsContentIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Testimonials carousel (mobile only) ===== */

@media (max-width: 700px) {
  .testimonials-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--space-4);
    margin-inline: calc(-1 * var(--container-padding));
    padding: 0 var(--container-padding) var(--space-4);
    scroll-padding-inline: var(--container-padding);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .testimonials-grid::-webkit-scrollbar {
    display: none;
  }
  .testimonials-grid > .testimonial {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }
}

/* ===== Page image band (sub-page hero photo) ===== */

.page-image-band {
  padding-block: 0 var(--space-12);
  background: var(--color-bg-alt);
}
.page-image-band img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ===== Blog post hero image ===== */

.post-hero {
  margin-block: 0 var(--space-12);
}
.post-hero img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ===== Reveal animations ===== */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 380ms var(--ease-out),
    transform 380ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
