/* ZigZag Junk — shared UI components: buttons, hero, trust bar, services,
 * process, service area, pricing, CTA strip, quote form, footer. */

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  position: relative;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    opacity var(--dur-base) var(--ease-out);
}

.btn:active {
  transform: scale(0.98);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-text);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
}

/* On a yellow button, a yellow focus ring would disappear — use ink instead. */
.btn--primary:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-text);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
}

.btn--ghost:hover {
  background: var(--color-surface-2);
}

.btn--invert {
  background: var(--color-ink);
  color: var(--color-on-ink);
}

.btn--invert:hover {
  opacity: 0.9;
}

/* Loading state — text fades, ::after spinner takes over. */
.btn.is-loading {
  color: transparent;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  margin-top: -0.5rem;
  margin-left: -0.5rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  opacity: 0.85;
  color: currentColor;
  animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn.is-loading::after {
    transition: none;
    animation-duration: 1.6s;
  }
}

/* ===========================================================================
 * Hero — full-bleed Detroit skyline with legibility overlay
 * (Per SCAFFOLD_CONTRACT §2: #FFFFFF + rgba(10,10,10,*) + rgba(255,255,255,*)
 * are the only raw color values permitted in this section, used to guarantee
 * ≥4.5:1 contrast against the photographic background.)
 * ======================================================================== */

/*
 * Responsive hero background: mobile-first.
 * - <481px:   760px variant (~45 KB) — phones
 * - <961px:   960px variant (~76 KB) — large phones, tablets
 * - ≥961px:   full 2013px source (~123 KB) — desktops, retina
 * Switching via media queries (CSS `image-set()` only handles DPR, not viewport).
 */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(520px, 80dvh, 880px);
  padding-block: clamp(4rem, 9vw, 8rem);
  background-image: url("/assets/images/hero-detroit-760.jpg");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  color: #FFFFFF;
  overflow: hidden;
}

@media (min-width: 481px) {
  .hero {
    background-image: url("/assets/images/hero-detroit-960.jpg");
  }
}

@media (min-width: 961px) {
  .hero {
    min-height: clamp(560px, 92dvh, 880px);
    padding-block: clamp(5rem, 10vw, 8rem);
    background-image: url("/assets/images/hero-detroit.jpg");
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      115deg,
      rgba(10, 10, 10, 0.82) 0%,
      rgba(10, 10, 10, 0.55) 45%,
      rgba(10, 10, 10, 0.35) 100%
    );
  box-shadow: inset 0 -120px 160px rgba(10, 10, 10, 0.55);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(10, 10, 10, 0.5);
}

.hero__eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.5rem;
  background: var(--color-accent);
}

.hero__title {
  margin: 0;
  margin-top: var(--space-4);
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.hero__subtitle {
  margin: 0;
  margin-top: var(--space-6);
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-lg);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-10);
}

/* Secondary button override for the dark hero — white-alpha border. */
.hero .btn--secondary {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.6);
}

.hero .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #FFFFFF;
}

/* 4 px yellow brand stripe across the bottom of the hero. */
.hero__stripe {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--color-accent);
  z-index: 2;
}

.hero__scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  pointer-events: none;
  color: rgba(255, 255, 255, 0.7);
}

.hero__scroll-cue::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin-top: -6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__scroll-cue {
    animation: hero-bob 1.8s var(--ease-in-out) infinite;
  }
}

/* ===========================================================================
 * Trust bar — full-bleed dark strip directly under the hero
 * ======================================================================== */

section.trust-bar {
  background: var(--color-ink);
  color: var(--color-on-ink);
  padding-block: var(--space-5);
}

.trust-bar__inner {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6) var(--space-8);
}

.trust-bar__item {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-on-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.2;
}

.trust-bar__item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  stroke-width: 2;
}

@media (max-width: 720px) {
  .trust-bar__inner {
    gap: var(--space-4);
    justify-content: flex-start;
  }
}

/* ===========================================================================
 * Service grid — homepage "What we haul"
 * ======================================================================== */

.service-grid {
  display: grid;
  /* min(220px, 100%) collapses to a single column when the container is
     narrower than 220 px content area — prevents the cards from overflowing
     the viewport on small phones (≤390 px). On tablets+ the grid auto-fits
     to as many 220 px+ columns as will fit. */
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: var(--space-4);
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition:
    transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}

.service-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background var(--dur-base) var(--ease-out);
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.service-card:hover::before,
.service-card:focus-within::before {
  background: var(--color-accent);
}

.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-radius: var(--radius-sm);
}

.service-card__icon svg {
  width: 22px;
  height: 22px;
}

.service-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

.service-card__body {
  margin: 0;
  color: var(--color-text-body);
  font-size: var(--text-sm);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .service-card,
  .service-card::before {
    transition: none;
  }
  .service-card:hover,
  .service-card:focus-within {
    transform: none;
  }
}

/* ===========================================================================
 * Process — "How it works" 3 steps
 * ======================================================================== */

.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-10);
}

.process-step {
  position: relative;
  padding-top: var(--space-12);
}

.process-step__number {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-accent);
}

.process-step__title {
  margin: 0;
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

.process-step__body {
  margin: 0;
  color: var(--color-text-body);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .process {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ===========================================================================
 * Service area grid — "Where we haul" by county
 * ======================================================================== */

.area {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.area-county {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.area-county__name {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.area-county__name::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  background: var(--color-accent);
  border-radius: 2px;
}

.area-county__list {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: var(--space-4);
  color: var(--color-text-body);
  font-size: var(--text-sm);
}

.area-county__list li {
  padding-block: 0.25rem;
  break-inside: avoid;
}

@media (max-width: 720px) {
  .area {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 479px) {
  .area-county__list {
    columns: 1;
  }
}

/* ===========================================================================
 * Pricing — three tiers, middle is featured
 * ======================================================================== */

.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.pricing-card--featured {
  border: 2px solid var(--color-accent);
  /* Compensate for the extra 1 px of border so card heights still match. */
  padding: calc(var(--space-8) - 1px);
}

.pricing-card__pill {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pricing-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.pricing-card__price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
}

.pricing-card__price-prefix {
  display: inline-block;
  margin-right: 0.125rem;
  font-size: 1.25rem;
  vertical-align: top;
  opacity: 0.5;
}

.pricing-card__desc {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.pricing-card__includes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--color-text-body);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.pricing-card__includes li {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-2);
}

.pricing-card__includes li > svg {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  color: var(--color-accent);
  stroke-width: 2.5;
}

.pricing-card__cta {
  width: 100%;
  margin-top: auto;
}

@media (max-width: 900px) {
  .pricing {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================================
 * CTA strip — full-bleed yellow band before the footer
 * ======================================================================== */

section.cta-strip {
  background: var(--color-accent);
  color: var(--color-accent-text);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.cta-strip__inner {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.cta-strip__title {
  margin: 0;
  max-width: 30ch;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-accent-text);
}

.cta-strip__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* On the yellow strip, the secondary outline reads against the yellow bg
 * using black-alpha values rather than the default neutral border. */
.cta-strip .btn--secondary {
  color: var(--color-ink);
  border-color: rgba(10, 10, 10, 0.5);
  background: transparent;
}

.cta-strip .btn--secondary:hover {
  background: rgba(10, 10, 10, 0.05);
  border-color: var(--color-ink);
}

/* ===========================================================================
 * Quote form (replaces .contact-form)
 * ======================================================================== */

.quote-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 640px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

@media (min-width: 720px) {
  .form-row--split {
    flex-direction: row;
    gap: var(--space-5);
  }
  .form-row--split > * {
    flex: 1 1 0;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-field__label {
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
}

.form-field__required {
  margin-left: 0.25rem;
  color: var(--color-accent);
}

.form-field__control {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-base);
  line-height: 1.4;
  transition:
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.form-field__control::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}

.form-field__control:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 30%, transparent);
  outline: none;
}

textarea.form-field__control {
  min-height: 140px;
  resize: vertical;
}

.form-field__hint {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.form-field__error {
  display: none;
  color: var(--color-error);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.form-field.has-error .form-field__error {
  display: block;
}

.form-field.has-error .form-field__control {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-error) 20%, transparent);
}

.form-submit {
  width: 100%;
}

@media (min-width: 720px) {
  .form-submit {
    width: auto;
    align-self: flex-start;
  }
}

.form-status {
  display: none;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.form-status::before {
  content: "•";
  display: inline-block;
  margin-right: var(--space-2);
  font-weight: 700;
}

.form-status[data-state="success"],
.form-status.form-status--success {
  display: block;
  background: var(--color-success-bg);
  color: var(--color-success);
}

.form-status[data-state="success"]::before,
.form-status.form-status--success::before {
  content: "✓";
}

.form-status[data-state="error"],
.form-status.form-status--error {
  display: block;
  background: var(--color-error-bg);
  color: var(--color-error);
}

.form-status[data-state="error"]::before,
.form-status.form-status--error::before {
  content: "!";
}

/* Quote page two-column layout: form (left) + sidebar (right). */
.quote-form-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 900px) {
  .quote-form-layout {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
}

.quote-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.quote-card {
  padding: var(--space-6);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.quote-card__eyebrow {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quote-card__title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.quote-card__steps {
  list-style: none;
  counter-reset: quote-step;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.quote-card__steps li {
  counter-increment: quote-step;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--color-text-body);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.quote-card__steps li::before {
  content: counter(quote-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1;
}

.quote-card__badges {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.quote-card__badges li {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-body);
  font-size: var(--text-sm);
}

.quote-card__badges svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  stroke-width: 2;
}

/* ===========================================================================
 * Footer — dark surface
 * ======================================================================== */

.site-footer {
  padding-block: var(--space-16);
  background: var(--color-ink);
  color: var(--color-on-ink);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
}

@media (max-width: 900px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }
}

@media (max-width: 600px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.site-footer__brand-link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-on-ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-footer__brand-link:hover {
  color: var(--color-accent);
}

.site-footer__tagline {
  margin: var(--space-4) 0;
  max-width: 42ch;
  color: var(--color-on-ink-muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.site-footer__phone {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}

.site-footer__phone:hover {
  opacity: 0.9;
}

.site-footer__hours {
  margin: var(--space-2) 0 0;
  color: var(--color-on-ink-muted);
  font-size: var(--text-sm);
}

.site-footer__heading {
  margin: 0 0 var(--space-3);
  color: var(--color-on-ink);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-footer__links a {
  color: var(--color-on-ink-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.site-footer__links a:hover {
  color: var(--color-accent);
}

.site-footer__bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__copy {
  margin: 0;
  color: var(--color-on-ink-muted);
  font-size: var(--text-sm);
}

/* ===========================================================================
 * Mobile sticky CTA bar — fixed bottom bar with Call + Quote buttons.
 * Only rendered/visible on phones (≤767 px) and only on pages where it adds
 * value — opt-in per page via the `body[data-mobile-cta]` attribute. The
 * quote page sets `data-mobile-cta="off"` since the user is already converting.
 * ======================================================================== */

.mobile-cta {
  display: none;
}

@media (max-width: 767px) {
  body[data-mobile-cta="on"] .mobile-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-nav);
    gap: var(--space-2);
    padding:
      var(--space-3)
      max(var(--space-3), env(safe-area-inset-right))
      calc(var(--space-3) + env(safe-area-inset-bottom))
      max(var(--space-3), env(safe-area-inset-left));
    background: color-mix(in srgb, var(--color-surface) 96%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -6px 24px rgba(10, 10, 10, 0.06);
  }

  body[data-mobile-cta="on"] .mobile-cta .btn {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 0.75rem;
    font-size: var(--text-sm);
  }

  /* Reserve space at the bottom of the page so fixed bar doesn't cover content. */
  body[data-mobile-cta="on"] {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  /* Hide the scroll-cue on phones — replaced by the sticky CTA. */
  .hero__scroll-cue {
    display: none;
  }
}

/* ===========================================================================
 * Mobile nav backdrop scrim — appears under the slide-in sheet so users can
 * tap outside to close. Pure CSS; main.js attaches the click handler.
 * ======================================================================== */

.nav-backdrop {
  display: none;
}

@media (max-width: 767px) {
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 4.25rem 0 0 0;
    z-index: calc(var(--z-nav) - 1);
    background: rgba(10, 10, 10, 0);
    pointer-events: none;
    transition: background var(--dur-base) var(--ease-out);
  }

  body.nav-open .nav-backdrop {
    background: rgba(10, 10, 10, 0.45);
    pointer-events: auto;
  }
}

/* ===========================================================================
 * Mobile typography & spacing refinements (≤640 px)
 * ======================================================================== */

@media (max-width: 640px) {
  /* Tighter section rhythm — fewer empty pixels to scroll through. */
  .section {
    padding-block: clamp(2.75rem, 9vw, 4rem);
  }
  .section__header {
    margin-bottom: var(--space-8);
  }
  .section__title {
    font-size: clamp(1.75rem, 6vw + 0.5rem, 2.25rem);
  }
  .section__subtitle {
    font-size: var(--text-base);
  }

  /* Hero buttons stack full-width on small phones so the primary action is
     the largest, most obvious tap target. */
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    margin-top: var(--space-8);
  }
  .hero__actions .btn {
    width: 100%;
  }
  .hero__subtitle {
    font-size: var(--text-base);
    margin-top: var(--space-5);
  }

  /* Trust bar: clean 2×2 grid instead of unpredictable flex-wrap. */
  .trust-bar__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3) var(--space-5);
    justify-content: stretch;
  }
  .trust-bar__item {
    font-size: var(--text-xs);
  }

  /* Service grid: force a single column at ≤640 px so cards never clip. */
  .service-grid {
    grid-template-columns: 1fr;
  }

  /* Pricing & service cards: less padding to give content more room. */
  .pricing-card {
    padding: var(--space-5);
  }
  .pricing-card--featured {
    padding: calc(var(--space-5) - 1px);
  }
  .pricing-card__price {
    font-size: 2rem;
  }
  .service-card {
    padding: var(--space-5);
  }

  /* CTA strip: stack title + button column on phones; button full-width. */
  .cta-strip__inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-5);
  }
  .cta-strip__title {
    font-size: 1.5rem;
  }
  .cta-strip__actions {
    flex-direction: column;
  }
  .cta-strip__actions .btn {
    width: 100%;
  }

  /* Process step number sits a bit smaller so titles aren't crowded. */
  .process-step {
    padding-top: var(--space-10);
  }
  .process-step__number {
    font-size: 2.5rem;
  }
}

/* Hero title balancing — use text-wrap: balance on supported browsers so the
   manual <br class="hero__br"> isn't forced on narrow screens. Hide the manual
   break on small viewports so natural wrapping wins. */
.hero__title {
  text-wrap: balance;
}

@media (max-width: 540px) {
  .hero__br {
    display: none;
  }
}

/* Mobile nav sheet: respect safe-area at the bottom on iOS so the CTA button
   inside the sheet doesn't tuck under the home indicator. */
@media (max-width: 767px) {
  .site-nav__nav {
    padding-bottom: calc(var(--space-8) + env(safe-area-inset-bottom));
  }
}

/* On the iOS PWA / standalone display, the sticky CTA bar needs to clear the
   home indicator; the safe-area padding above handles it. Nothing else needed. */

/* hCaptcha widget — anti-spam gate on the quote form. */
.quote-form__captcha {
  margin-block: var(--space-4) var(--space-2);
  display: flex;
  justify-content: flex-start;
}
.quote-form__captcha .h-captcha {
  min-height: 78px;
}
