:root {
  /* The animated ember gradient (bg.js) is dark, so the site always uses light-on-dark colours. */
  --bg: #1c0806;
  --bg-alt: #2b0e0a;
  --panel: rgba(30, 9, 6, .58);
  --panel-strong: rgba(30, 9, 6, .78);
  --text: #fbf1dc;
  --muted: #ecd3a8;
  --accent: #f4b942;
  --accent-hover: #f8c865;
  --on-accent: #2a0905;
  --ember: #c8321f;
  --line: rgba(244, 185, 66, .18);
  --edge: rgba(255, 236, 200, .08);
  --shadow: 0 18px 40px -18px rgba(12, 2, 1, .85);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --z-bg: -1;
  --z-header: 10;
  --z-grain: 30;

  --font-display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth; scroll-padding-top: 80px;
  -webkit-tap-highlight-color: transparent; /* no grey flash on tap; every control has its own :active */
  -webkit-text-size-adjust: 100%;           /* no font inflation in landscape */
}

/* Controls respond on tap without the double-tap-zoom wait, and long-press doesn't select their labels */
a, button, .ba-frame {
  touch-action: manipulation;
}
.btn, .nav-toggle, .nav-call, .nav-links a, .link-arrow, .logo, .ba-frame {
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Film grain over the gradient so large flat areas don't feel digital */
body::after {
  content: ""; position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none;
  opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--z-bg); display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: calc(var(--z-header) + 1);
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px));
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember) 25%, var(--accent) 75%, transparent);
  opacity: .7;
}
.nav { display: flex; align-items: center; gap: 10px; height: 68px; }
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em;
  margin-right: auto;
}
.logo svg { width: 22px; height: 22px; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) {
  position: relative; color: var(--muted); font-weight: 500; font-size: .95rem;
  transition: color .2s var(--ease-out);
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 42px; height: 42px; font-size: 1.2rem; color: var(--text); cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--on-accent);
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; letter-spacing: -.005em;
  box-shadow: 0 10px 24px -12px rgba(244, 185, 66, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: background .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.btn:active { transform: scale(.97); transition-duration: .12s; }
.btn-small { padding: 9px 18px; font-size: .92rem; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px rgba(244, 185, 66, .55); }
.btn-outline:active { background: rgba(244, 185, 66, .12); }

/* Phone: number in the desktop menu, a call button beside the menu toggle on phones */
.nav-phone { font-variant-numeric: tabular-nums; }
.nav-call {
  display: none; width: 42px; height: 42px; place-items: center; border-radius: var(--radius-sm);
  color: var(--on-accent); background: var(--accent);
  transition: transform .12s var(--ease-out);
}
.nav-call svg { width: 20px; height: 20px; }
.nav-call:active { transform: scale(.94); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text);
  padding: 14px 4px;
}
.link-arrow span { transition: transform .25s var(--ease-out); }
.link-arrow:active, .nav-links a:not(.btn):active, .site-footer a:active, .contact-email:active { opacity: .7; }
.nav-toggle { transition: transform .12s var(--ease-out), background .12s var(--ease-out); }
.nav-toggle:active { transform: scale(.94); background: rgba(255, 236, 200, .08); }

/* Hero */
.hero { padding: clamp(88px, 14vw, 160px) 0 clamp(96px, 14vw, 170px); text-shadow: 0 2px 24px rgba(20, 4, 2, .55); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent); font-weight: 500; font-size: 1rem; margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero h1 {
  font-size: clamp(2.9rem, 8vw, 6rem); line-height: .98; letter-spacing: -.045em; font-weight: 800;
  max-width: 11ch; margin-bottom: 28px;
}
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 34rem; }
.hero-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-art { justify-self: center; width: 100%; max-width: 460px; }
.hero-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(12, 2, 1, .6)); }
.hero-points {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 48px;
  color: var(--muted); font-size: .95rem;
}
.hero-points li { display: inline-flex; align-items: center; gap: 10px; }
.hero-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Sections */
.section { padding: clamp(72px, 10vw, 112px) 0 clamp(84px, 11vw, 128px); }
.section-alt { background: var(--panel); }
.section h2 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.05; letter-spacing: -.03em; margin-bottom: 24px; }
.section p { color: var(--muted); max-width: 65ch; }
.section p + p { margin-top: 14px; }
.section-intro { margin-top: -8px; margin-bottom: 40px; }

.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }

/* Benefits: a ruled list instead of cards */
.stats { list-style: none; }
.stats li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 20px; align-items: baseline; padding: 22px 0; border-top: 1px solid var(--line); }
.stats li:last-child { border-bottom: 1px solid var(--line); }
.stats strong { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; color: var(--accent); }
.stats span { color: var(--muted); }

/* Glass panel */
.card {
  position: relative; background: var(--panel-strong);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.card-icon {
  width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 22px;
  border-radius: 12px; color: var(--accent); background: rgba(244, 185, 66, .1);
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.3rem; letter-spacing: -.015em; margin-bottom: 10px; }

/* Services: featured deep clean + two stacked */
.services { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; }
.card-stack { display: flex; flex-direction: column; }
.card-feature { display: flex; flex-direction: column; padding: clamp(32px, 4vw, 48px); }
.card-feature h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.03em; }
.card-feature .card-icon { width: 56px; height: 56px; }
.card-feature .card-icon svg { width: 28px; height: 28px; }
.parts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 32px; }
.parts li {
  padding: 6px 12px; border-radius: var(--radius-sm); font-size: .88rem; font-weight: 500;
  color: var(--text); background: rgba(255, 236, 200, .06); box-shadow: inset 0 0 0 1px var(--edge);
}

/* Before and after sliders: one large, two stacked */
.ba-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.ba { margin: 0; display: flex; flex-direction: column; }
.ba-feature { grid-row: span 2; }
.ba-frame {
  --pos: 50%;
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius); background: var(--bg);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--edge);
}
.ba-feature .ba-frame { aspect-ratio: auto; flex: 1; min-height: 320px; }
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: var(--accent); pointer-events: none;
}
.ba-handle::after {
  content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
  box-shadow: 0 6px 18px -4px rgba(12, 2, 1, .7), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .2s var(--ease-out);
}
.ba-label {
  position: absolute; top: 12px; padding: 4px 10px; border-radius: 6px;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  background: rgba(20, 5, 3, .6); color: var(--text); pointer-events: none;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ba-label-before { left: 12px; }
.ba-label-after { right: 12px; }
.ba-frame { cursor: ew-resize; touch-action: pan-y; /* we own horizontal drags, the page keeps vertical scroll */ }
.ba-frame img { -webkit-user-drag: none; }
.ba-range {
  /* Keyboard and screen-reader control; pointer and touch drags are handled on the frame in JS */
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; pointer-events: none;
}
.ba-frame.dragging .ba-handle::after { transform: translate(-50%, -50%) scale(.92); transition-duration: .1s; }
.ba-frame:has(.ba-range:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.ba figcaption { margin-top: 12px; font-weight: 500; color: var(--muted); }

/* How it works: numbered steps, no cards */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); counter-reset: step; }
.steps li { counter-increment: step; padding-top: 24px; border-top: 1px solid var(--line); }
.steps li::before {
  content: "0" counter(step); display: block; margin-bottom: 18px;
  font-family: var(--font-display); font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 800; line-height: 1;
  letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px var(--accent);
}
.steps h3 { font-size: 1.3rem; letter-spacing: -.015em; margin-bottom: 8px; }

/* Contact */
.contact-panel {
  display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center;
  padding: clamp(32px, 6vw, 64px); border-radius: var(--radius-lg);
  background: var(--panel-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge);
}
.contact-panel h2 { margin-bottom: 14px; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.contact-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-email-line { color: var(--muted); font-size: .95rem; }
.contact-email { color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.contact-panel .lead { font-size: 1.1rem; }

/* Footer */
.site-footer { padding: 32px 0 calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: .9rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; }

/* Hover only where a precise pointer can hover; on touch the tap would leave it stuck */
@media (hover: hover) and (pointer: fine) {
  .contact-email:hover { color: var(--text); text-decoration-color: currentColor; }
  .btn-outline:hover { background: rgba(244, 185, 66, .12); box-shadow: inset 0 0 0 1.5px var(--accent); }
  .nav-links a:not(.btn):hover { color: var(--text); }
  .btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(244, 185, 66, .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
  .btn:active { transform: scale(.97); }
  .link-arrow:hover span { transform: translateX(4px); }
  .card:hover { transform: translateY(-3px); box-shadow: 0 26px 48px -20px rgba(12, 2, 1, .9), inset 0 1px 0 var(--edge), inset 0 0 0 1px rgba(244, 185, 66, .2); }
  .ba-frame:hover:not(.dragging) .ba-handle::after { transform: translate(-50%, -50%) scale(1.08); }
  .site-footer a:hover { color: var(--text); }
}

/* Scroll reveal (only when JS runs and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0; transform: translateY(18px);
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Tablet */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .ba-grid { grid-template-columns: 1fr 1fr; }
  .ba-feature { grid-column: 1 / -1; grid-row: auto; }
  .ba-feature .ba-frame { aspect-ratio: 16 / 10; min-height: 0; }
}

/* Mobile */
@media (max-width: 760px) {
  .nav-toggle, .nav-call { display: grid; place-items: center; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 20px;
    padding: 24px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px));
    background: var(--panel-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .split, .services, .ba-grid, .steps, .contact-panel { grid-template-columns: 1fr; }
  .hero-art { max-width: 300px; margin-top: 8px; }
  .stats li { grid-template-columns: 1fr; gap: 4px; }
  .ba-feature .ba-frame { aspect-ratio: 4 / 3; }
  .card { padding: 26px; }
}
