/* REBEL — components: nav, footer, buttons, cards, pricing, gallery, trust */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-standard),
              background-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--coral-btn);
  color: var(--on-coral);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--coral-dark); color: var(--on-coral); box-shadow: var(--shadow-md); }
.btn-primary:active { background: var(--coral-darker); }

.btn-ghost {
  background: transparent;
  color: var(--heading);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--coral); color: var(--coral-text); }

.btn-on-dark {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(255,255,255,0.35);
}
.btn-on-dark:hover { border-color: var(--on-dark); color: var(--on-dark); background: rgba(255,255,255,0.08); }

.btn-lg { padding: 1.05rem 2rem; font-size: var(--text-lg); }

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--offwhite) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
}

.brand { display: flex; align-items: center; gap: var(--space-2); }
.brand img { height: 28px; width: auto; }

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.nav-links a:hover { color: var(--coral-text); }
.nav-links a[aria-current="page"] { color: var(--coral-text); }

.nav-actions { display: flex; align-items: center; gap: var(--space-4); }
.nav-actions .btn { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--heading); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-6) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--offwhite);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  padding: var(--space-3) 0;
  color: var(--ink);
  font-size: var(--text-base);
  border-bottom: 1px solid var(--border);
}
.mobile-menu .btn { margin-top: var(--space-3); justify-content: center; }

@media (min-width: 980px) {
  .nav-links { display: flex; }
  .nav-actions .btn { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* ---- Hero ---- */
.hero {
  padding-block: var(--space-24) var(--space-16);
  background:
    radial-gradient(1200px 480px at 85% -10%, var(--coral-light), transparent 60%),
    var(--offwhite);
}
.hero-grid {
  display: grid;
  gap: var(--space-8);
}
.hero h1 { max-width: 14ch; letter-spacing: -0.01em; }
@media (min-width: 1180px) {
  .hero h1 { font-size: var(--text-6xl); }
}
.hero .lead { max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-6); }
.hero-badges {
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6);
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}
.hero-badge { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--muted); }
.hero-badge strong { color: var(--heading); font-weight: var(--weight-semibold); }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}

/* ---- Hero: full-bleed background photo ---- */
.hero--bg {
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding-block: var(--space-16);
  background: var(--charcoal);
}
.hero-bg-photo { position: absolute; inset: 0; z-index: 0; }
.hero-bg-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; display: block; }
.hero-bg-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28,24,21,0.35) 0%, rgba(28,24,21,0.55) 45%, rgba(28,24,21,0.88) 100%),
    linear-gradient(90deg, rgba(28,24,21,0.75) 0%, rgba(28,24,21,0.25) 60%);
}
.hero--bg .container { position: relative; z-index: 1; }
.hero--bg .eyebrow { color: var(--coral-on-photo); }
.hero--bg h1 { color: var(--on-dark); }
.hero--bg .lead { color: rgba(255,255,255,0.82); }
.hero--bg .hero-badges { border-top-color: rgba(255,255,255,0.2); }
.hero--bg .hero-badge { color: var(--on-dark-dim); }
.hero--bg .hero-badge strong { color: var(--on-dark); }

/* ---- Page header (inner pages) ---- */
.page-header {
  padding-block: var(--space-16) var(--space-8);
  border-bottom: 1px solid var(--border);
}
.page-header h1 { max-width: 24ch; }
.breadcrumbs { font-size: var(--text-sm); color: var(--muted); margin-bottom: var(--space-4); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--coral-text); }

/* ---- Cards / grid ---- */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 980px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--coral-line); }
.card h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.card .price {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--coral-text);
  font-weight: var(--weight-medium);
  margin: var(--space-3) 0;
  display: block;
}

/* ---- Photo-led service cards ----
   Clean photo at rest (the first impression is the finished work); hover or
   keyboard focus crossfades to the grime-filtered "before" treatment of the
   same photo. Touch and reduced-motion show the clean photo permanently. */
.photo-card { padding: 0; overflow: hidden; display: block; }
.photo-card h3 { margin: var(--space-4) var(--space-6) var(--space-2); }
.photo-card .muted { margin: 0 var(--space-6); }
.photo-card .price { margin: var(--space-3) var(--space-6) var(--space-6); }
.card-photo { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.card-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-photo-before {
  filter: grayscale(0.55) sepia(0.25) brightness(0.72) contrast(0.92) saturate(1.3);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}
.photo-card:hover .card-photo-before,
.photo-card:focus-visible .card-photo-before { opacity: 1; }
/* Touch devices have no hover — always show the clean photo there. */
@media (hover: none) {
  .card-photo-before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .card-photo-before { display: none; }
}

.type-card .feature-index { display: block; margin-bottom: var(--space-3); }

/* ---- Pricing table ---- */
.pricing-table { width: 100%; border-collapse: collapse; margin-block: var(--space-8); }
.pricing-table th, .pricing-table td {
  text-align: left;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-base);
}
.pricing-table th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: var(--weight-medium);
}
.pricing-table td.price { font-family: var(--font-mono); color: var(--coral-text); font-weight: var(--weight-medium); white-space: nowrap; }
.pricing-table td.note { color: var(--muted); font-size: var(--text-sm); }
.pricing-note {
  font-size: var(--text-sm);
  color: var(--muted);
  border-left: 3px solid var(--gold);
  background: var(--gold-light);
  padding: var(--space-4);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---- Trust strip ---- */
.trust-strip {
  background: var(--cardbg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-strip .grid { align-items: start; }

/* ---- CTA banner ---- */
.cta-banner {
  background: var(--charcoal);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-16) var(--space-8);
  text-align: center;
}
.cta-banner h2 { color: var(--on-dark); }
.cta-banner p { color: rgba(255,255,255,0.72); max-width: 48ch; margin-inline: auto; }
.cta-banner .hero-actions { justify-content: center; }

/* ---- Real photos ---- */
.hero-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.photo-tile {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.photo-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin: var(--space-8) 0;
}

.video-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  aspect-ratio: 9 / 16;
  max-width: 340px;
  margin-inline: auto;
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The window/screen clips are vertical phone footage; the pressure washing
   clip is landscape. Without this it gets cropped to a narrow portrait slot. */
.video-frame--wide { aspect-ratio: 16 / 9; max-width: 100%; }

.gallery-section + .gallery-section { margin-top: var(--space-16); }
.gallery-section h2 { margin-bottom: var(--space-2); }

/* ---- Gallery ---- */
.gallery-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--border);
  background: var(--cardbg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: center;
  padding: var(--space-4);
}
.gallery-placeholder svg { width: 28px; height: 28px; stroke: var(--muted); }

/* ---- Footer ---- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.65);
  padding-block: var(--space-16) var(--space-8);
  margin-top: var(--space-24);
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--coral-on-dark); }
.footer-grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1fr;
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-4);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  justify-content: space-between; align-items: center;
  padding-top: var(--space-6);
  font-size: var(--text-sm);
}
.footer-brand img { height: 24px; margin-bottom: var(--space-3); }
.footer-brand p { max-width: 32ch; color: rgba(255,255,255,0.55); font-size: var(--text-sm); }

.contact-placeholder {
  color: rgba(255,255,255,0.4);
  font-style: italic;
}

/* ---- Why REBEL: feature list + real crew photo ---- */
.why-grid {
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-8);
  align-items: start;
}
@media (min-width: 900px) {
  .why-grid { grid-template-columns: 1.2fr 0.8fr; }
  .why-grid .feature-list { margin-top: 0; }
}
.why-photo .photo-tile { aspect-ratio: 3 / 4; }

/* ---- Feature list (distinct from card grid, avoids repetition) ---- */
.feature-list {
  margin-top: var(--space-12);
  display: flex;
  flex-direction: column;
}
.feature-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-6);
  padding-block: var(--space-8);
  border-top: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: 1px solid var(--border); }
.feature-index {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--coral-numeral);
  line-height: 1;
}

/* ---- Sub-services (merged service page: Soft Wash) ----
   Same numbered-row rhythm as .feature-row, with a price rail so each surface
   keeps its own real range instead of collapsing into one vague number. */
.subservice-list { margin-top: var(--space-12); display: flex; flex-direction: column; }
.subservice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4) var(--space-6);
  padding-block: var(--space-8);
  border-top: 1px solid var(--border);
  scroll-margin-top: var(--space-24);
}
.subservice:last-child { border-bottom: 1px solid var(--border); }
.subservice-body h3 { margin-bottom: var(--space-3); }
.subservice-body p:last-child { margin-bottom: 0; }
.subservice-price { grid-column: 2; }
.subservice-price .price {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--coral-text);
  font-weight: var(--weight-medium);
  display: block;
  margin-bottom: var(--space-1);
}
.subservice-price p { font-size: var(--text-sm); margin: 0; }
@media (min-width: 900px) {
  .subservice { grid-template-columns: auto 1fr auto; align-items: start; }
  .subservice-price { grid-column: 3; text-align: right; min-width: 15ch; }
}

/* ---- Booking page background ----
   Same photo and the same .hero-bg-scrim as the homepage hero, scoped to the
   page body rather than the viewport so it never sits under the sticky header
   (the header is translucent, and a dark photo behind it would put --ink nav
   links on a dark backdrop — the exact black-on-black failure mode). */
/* Charcoal base, matching .hero--bg. If the photo fails to load or is still
   decoding, the header's fixed light text lands on charcoal rather than on the
   light page background — which in light mode would be white-on-white. */
.book-page { position: relative; background: var(--charcoal); }
.book-page > section { position: relative; z-index: 1; }
.book-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--charcoal); /* covers the gap before the photo decodes */
}
/* Viewport-height band at the top of the page, framed exactly like the hero.
   Stretching the photo over the full ~1800px page instead would flatten the
   scrim's ramp and bury the image in near-solid charcoal. Deliberately NOT
   position:sticky — its scroll container (.book-bg) never scrolls, so sticky
   resolves to static anyway; .book-page's charcoal carries the rest. */
.book-bg-layer { height: 100vh; }
.book-bg-layer picture { display: block; height: 100%; }
.book-bg-layer img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; display: block; }

/* Same two-gradient scrim as the hero, but eased. The hero's ramp runs to 0.88
   because its text is centred over the whole 88vh panel; here the only text on
   the photo is the page header (top-left) — the form has its own opaque panel —
   so the photo can stay visible below. Stop values are set from the measured
   contrast of white text over the brightest pixels in the header band, not by
   eye. See .page-header--on-photo below for the text roles. */
.book-bg .hero-bg-scrim {
  background:
    linear-gradient(180deg,
      rgba(28,24,21,0.90) 0%,
      rgba(28,24,21,0.86) 28.5%, /* holds through the header text (ends at 28%) */
      rgba(28,24,21,0.18) 34%,   /* opens up in the gap before the form panel */
      rgba(28,24,21,0.12) 100%),
    linear-gradient(90deg, rgba(28,24,21,0.30) 0%, rgba(28,24,21,0.04) 55%);
}

/* Header text sits directly on the photo, so it uses fixed on-dark roles —
   never --heading/--ink, which flip and would vanish here in light mode. */
.page-header--on-photo { border-bottom: none; }
/* Full white rather than --on-dark-dim: at 14px over the photo the dimmed
   variant measured 3.4:1 once the scrim was opened up enough to see the image. */
.page-header--on-photo .breadcrumbs,
.page-header--on-photo .breadcrumbs a { color: var(--on-dark); }
.page-header--on-photo .breadcrumbs a:hover { color: var(--coral-on-photo); }
.page-header--on-photo .eyebrow { color: var(--coral-on-photo); }
.page-header--on-photo h1 { color: var(--on-dark); }
/* Full white, not the hero's 0.82 alpha: at 390px the photo crops to brighter
   sky behind this line and the translucent version measured 4.35:1. */
.page-header--on-photo .lead { color: var(--on-dark); }

/* The form rides on an opaque panel so every label, input, and status message
   keeps its normal theme contrast instead of competing with the photo. */
.booking-panel {
  background: var(--cardbg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 700px) {
  .booking-panel { padding: var(--space-12); }
}

/* ---- Booking form ----
   Every value here resolves to a token, so the form inherits both themes and
   the site's motion timings for free. Fields borrow the .card surface
   treatment so the page reads as one system, not an embedded widget. */
.booking-grid { display: grid; gap: var(--space-8); align-items: start; }
@media (min-width: 900px) {
  .booking-grid { grid-template-columns: 1.35fr 0.65fr; gap: var(--space-12); }
}

.field-grid { display: grid; gap: var(--space-4); }
@media (min-width: 700px) {
  .field-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--heading);
}
.field .field-hint { font-size: var(--text-xs); color: var(--muted); }
.field-required { color: var(--coral-text); }

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem var(--space-4);
  width: 100%;
  transition: border-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.field textarea { resize: vertical; min-height: 6.5rem; line-height: var(--leading-normal); }
.field select { appearance: none; cursor: pointer;
  /* caret drawn with a token color so it flips with the theme */
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.8rem) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: var(--space-12);
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--coral-line); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-light);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error); }

.booking-actions { margin-top: var(--space-8); display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.booking-actions .btn[disabled] { opacity: 0.65; cursor: progress; }
.booking-fineprint { font-size: var(--text-sm); color: var(--muted); margin: var(--space-4) 0 0; }

/* Status messages — both states keep the user's input on screen. */
.form-status { border-radius: var(--radius-md); padding: var(--space-6); margin-bottom: var(--space-8); }
.form-status h2 { font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.form-status p:last-child { margin-bottom: 0; }
.form-status--success { background: var(--success-bg); border-left: 3px solid var(--success); }
.form-status--success h2 { color: var(--success); }
.form-status--error { background: var(--error-bg); border-left: 3px solid var(--error); }
.form-status--error h2 { color: var(--error); }
.form-status a { color: var(--coral-text); font-weight: var(--weight-medium); }

.booking-aside { position: sticky; top: calc(var(--space-16) + var(--space-8)); }
.booking-aside .card + .card { margin-top: var(--space-4); }
.booking-aside h3 { font-size: var(--text-lg); }
.booking-aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.booking-aside li { font-size: var(--text-sm); color: var(--muted); }
.booking-aside a { color: var(--coral-text); }

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--coral-light);
  color: var(--coral-dark);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  font-weight: var(--weight-medium);
}

/* ---- Full-bleed: break a section out of the container ---- */
.full-bleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* ---- Reveal compare: shared stacked-image + clip-path mechanic used by
   both the scroll-driven hero moment and the drag-to-compare sliders. The
   "before" layer is the SAME real photo with a stylized grime filter, not a
   different photo — REBEL doesn't have matched before/after shots yet, so
   this illustrates the concept honestly rather than faking a documented
   pair. --reveal is the visible width (%) of the before/grime layer. ---- */
.reveal-compare {
  position: relative;
  overflow: hidden;
  --reveal: 50%;
}
.reveal-compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}
.reveal-compare .reveal-before {
  clip-path: inset(0 calc(100% - var(--reveal)) 0 0);
  filter: grayscale(0.55) sepia(0.25) brightness(0.72) contrast(0.92) saturate(1.3);
}
.reveal-compare .reveal-tag {
  position: absolute;
  top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  background: rgba(28, 24, 21, 0.65);
  color: var(--on-dark);
  pointer-events: none;
}
.reveal-compare .reveal-tag-before { left: var(--space-3); }
.reveal-compare .reveal-tag-after { right: var(--space-3); }

/* Real-pair variant: the before layer is a genuine "before" photo, so no
   simulated grime filter is applied. */
.reveal-compare--real .reveal-before { filter: none; }

/* Drag variant: native range input drives --reveal, styled as a visible handle */
.reveal-compare--drag .reveal-line {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--reveal);
  width: 3px;
  background: var(--white);
  transform: translateX(-1.5px);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.reveal-compare--drag .reveal-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
}
.reveal-compare--drag .reveal-input::-webkit-slider-runnable-track { appearance: none; background: transparent; height: 100%; }
.reveal-compare--drag .reveal-input::-moz-range-track { background: transparent; height: 100%; border: none; }
.reveal-compare--drag .reveal-input::-webkit-slider-thumb {
  appearance: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--coral);
  box-shadow: var(--shadow-md);
  cursor: ew-resize;
}
.reveal-compare--drag .reveal-input::-moz-range-thumb {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--coral);
  box-shadow: var(--shadow-md);
  cursor: ew-resize;
}
.reveal-compare--drag .reveal-input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--coral); outline-offset: 2px; }

.gallery-featured {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-6);
}
@media (min-width: 700px) {
  .gallery-featured { aspect-ratio: 21 / 9; }
}
/* Portrait override for single real photos shot vertically — avoids
   forcing a wide crop that would cut off the subject. */
.gallery-featured-portrait {
  aspect-ratio: 3 / 4;
  max-width: 480px;
  margin-inline: auto;
}
@media (min-width: 700px) {
  .gallery-featured-portrait { aspect-ratio: 3 / 4; }
}

/* Scroll variant: no handle, JS updates --reveal from scroll position */
.reveal-compare--scroll .reveal-before { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal-compare--scroll { --reveal: 0% !important; }
}

/* ---- REBEL Difference showcase (full-bleed, asymmetric) ---- */
.difference-showcase {
  background: var(--charcoal);
  padding-block: var(--space-24);
}
.difference-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .difference-grid {
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto;
  }
  .difference-grid .reveal-compare:first-child { grid-row: 1 / 3; aspect-ratio: 3 / 4; }
  .difference-grid .reveal-compare:not(:first-child) { aspect-ratio: 16 / 10; }
}
.difference-grid .reveal-compare:not(:first-child) { aspect-ratio: 4 / 3; }
.difference-grid .reveal-compare {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.difference-header { max-width: 60ch; margin-bottom: var(--space-12); }
.difference-header .eyebrow { color: var(--coral-on-dark); }
.difference-header h2 { color: var(--on-dark); }
.difference-header p { color: rgba(255, 255, 255, 0.7); }
.difference-caption {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
}

/* ---- Stat counters (trust strip) ---- */
.stat-item { text-align: left; }
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  color: var(--coral-text);
  line-height: 1;
  display: block;
}
.stat-label { color: var(--muted); font-size: var(--text-sm); margin-top: var(--space-2); display: block; }
.stat-label-eyebrow { margin-top: 0; }
.stat-number-text { font-size: var(--text-xl); line-height: 1.25; }
.chip-list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: var(--space-2) 0 0; }
.badge-link {
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.badge-link:hover,
.badge-link:focus-visible {
  background: var(--coral-btn);
  color: var(--on-coral);
}

/* ---- City ticker ---- */
.city-ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-4);
  background: var(--cardbg);
}
.city-ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
}
.city-ticker-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-inline: var(--space-6);
  white-space: nowrap;
}
.city-ticker-item::after { content: '\2022'; color: var(--coral-line); margin-left: var(--space-6); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .city-ticker-track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
  .city-ticker-track .city-ticker-item:nth-child(n + 6) { display: none; }
}


/* ---- Ambient background layer ----
   Every effect maps to something physically real in REBEL's world:
   - hero warmth drift = low desert sun moving across stucco
   - glass sweep = sunlight catching a just-cleaned pane
   - photo drift = slow approach toward the house (cinematic depth)
   All compositor-only (transform/opacity), disabled under reduced motion,
   paused when the tab is hidden (html.page-hidden set by js/main.js). */
@media (prefers-reduced-motion: no-preference) {
  .hero { position: relative; overflow: hidden; }
  .hero .container { position: relative; z-index: 1; }
  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(720px 420px at 18% 108%, var(--coral-light), transparent 65%);
    opacity: 0.4;
    transform: translate3d(-4%, 2%, 0);
    animation: hero-warmth 38s ease-in-out infinite alternate;
    pointer-events: none;
  }
  @keyframes hero-warmth {
    from { transform: translate3d(-4%, 2%, 0) scale(1); opacity: 0.3; }
    to { transform: translate3d(3%, -3%, 0) scale(1.1); opacity: 0.55; }
  }

  .cta-banner, .site-footer { position: relative; overflow: hidden; }
  .cta-banner::after, .site-footer::after {
    content: '';
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: 0;
    width: 45%;
    background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.04) 50%, transparent 80%);
    transform: translateX(-140%) skewX(-12deg);
    animation: glass-sweep 16s linear infinite;
    pointer-events: none;
  }
  .site-footer::after {
    animation-duration: 23s;
    animation-delay: -9s;
    background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.028) 50%, transparent 80%);
  }
  @keyframes glass-sweep {
    0% { transform: translateX(-140%) skewX(-12deg); }
    13% { transform: translateX(340%) skewX(-12deg); }
    100% { transform: translateX(340%) skewX(-12deg); }
  }

  .ambient-drift {
    animation: photo-drift 42s ease-in-out infinite alternate;
    transform-origin: 50% 60%;
  }
  @keyframes photo-drift {
    from { transform: scale(1); }
    to { transform: scale(1.045); }
  }

  .page-hidden .hero::before,
  .page-hidden .cta-banner::after,
  .page-hidden .site-footer::after,
  .page-hidden .ambient-drift,
  .page-hidden .city-ticker-track {
    animation-play-state: paused;
  }
}

/* ---- Parallax hero photo ---- */
.hero-photo[data-parallax] { will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .hero-photo[data-parallax] { transform: none !important; }
}

/* ---- Split-proof: the half-done photo, hero-grade ----
   One real photo, left pane cleaned, right pane not. The coral divider
   traces the actual clean/dirty boundary as the section enters view. */
.split-proof {
  background: var(--charcoal);
  padding-block: var(--space-24);
}
.split-grid {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}
@media (min-width: 900px) {
  .split-grid { grid-template-columns: 1.1fr 0.9fr; }
}
.split-frame {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  justify-self: center;
}
.split-frame img { width: 100%; height: auto; display: block; }
.split-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--coral);
  box-shadow: 0 0 12px rgba(234, 67, 51, 0.55);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.4s var(--ease-out) 0.4s;
}
.split-frame.is-visible .split-divider { transform: scaleY(1); }
.split-tag {
  position: absolute;
  top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  background: rgba(28, 24, 21, 0.7);
  color: var(--on-dark);
  pointer-events: none;
}
.split-tag-clean { left: var(--space-3); }
.split-tag-dusty { right: var(--space-3); }
.split-copy .eyebrow { color: var(--coral-on-dark); }
.split-copy h2 { color: var(--on-dark); }
.split-copy .lead { color: rgba(255, 255, 255, 0.72); }
@media (prefers-reduced-motion: reduce) {
  .split-divider { transform: scaleY(1); transition: none; }
}

/* ---- Job loops toggle (During / The finish) ---- */
.job-loops { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.job-loops .difference-caption { text-align: center; max-width: 40ch; }
.method-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  background: var(--white);
}
.method-btn {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.method-btn.is-active { background: var(--coral-btn); color: var(--on-coral); }
.method-btn:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* ---- FAQ accordion (native <details>, no icon library) ---- */
.faq-group + .faq-group { margin-top: var(--space-16); }
.faq-group h2 { margin-bottom: var(--space-6); }
.faq-list { border-top: 1px solid var(--border); }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-6);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--heading);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }
.faq-item summary:hover span:first-child { color: var(--coral-text); }
.faq-item summary span:first-child { transition: color var(--duration-fast) var(--ease-standard); }
.faq-toggle {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.faq-toggle::before,
.faq-toggle::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  background: var(--coral);
  transition: transform var(--duration-base) var(--ease-standard);
}
.faq-toggle::before { width: 14px; height: 2px; transform: translate(-50%, -50%); }
.faq-toggle::after { width: 2px; height: 14px; transform: translate(-50%, -50%); }
.faq-item[open] .faq-toggle::after { transform: translate(-50%, -50%) rotate(90deg) scaleY(0); }
.faq-item p {
  padding-bottom: var(--space-6);
  margin: 0;
  max-width: 65ch;
}
@media (prefers-reduced-motion: reduce) {
  .faq-toggle::before, .faq-toggle::after { transition: none; }
}
