/* ═════════════════════════════════════════════════════════════════════════
   PIXEL HEAVEN — PREMIUM PLUS LAYER
   Loads after style.css + theme.css + premium.css.
   Adds 15 super-premium homepage upgrades:
     1.  L9 cinematic hero background (video + animated mesh fallback)
     2.  ROI calculator panel
     3.  Editorial process timeline
     4.  Work strip (live client showcase)
     5.  Theme showcase / "remix this page" section
     6.  Sticky mobile action bar
     7.  Interactive pricing tier comparator
     8.  Behind-the-work code peek
     9.  Side-gutter section numerals
     10. SVG line-draw section dividers
     11. Section-aware dynamic theme-color (JS-driven)
     12. Booking microcopy
     13. Caveat asides (.aside-note)
     14. Counter-scroll eyebrow effect
     15. Source-peek code block styling
   ════════════════════════════════════════════════════════════════════════ */


/* ── 1. L9 CINEMATIC HERO ────────────────────────────────────────────────
   Full-bleed background layer behind the hero. Supports an optional
   <video> for video-driven hero, or falls back to an animated CSS mesh
   gradient. Text stays perfectly readable thanks to a vignette overlay.
   ──────────────────────────────────────────────────────────────────────── */
.hero.hero-cinematic {
  position: relative;
  min-height: 78vh;
  max-width: none;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(80px, 12vh, 160px) clamp(20px, 5vw, 60px) clamp(60px, 8vh, 120px);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero-bg video,
.hero-bg .hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-bg .hero-bg-mesh {
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 25% 30%, color-mix(in srgb, var(--brand) 55%, transparent), transparent 60%),
    radial-gradient(ellipse 50% 40% at 75% 70%, color-mix(in srgb, var(--brand-2) 50%, transparent), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 90%, color-mix(in srgb, var(--brand) 32%, transparent), transparent 60%),
    radial-gradient(ellipse 40% 30% at 90% 20%, color-mix(in srgb, var(--brand-2) 40%, transparent), transparent 60%);
  filter: blur(40px);
  animation: meshDrift 28s ease-in-out infinite alternate;
}
@keyframes meshDrift {
  0%   { transform: translate3d(0, 0, 0)        scale(1.0)  rotate(0deg); }
  33%  { transform: translate3d(-3%, 2%, 0)     scale(1.08) rotate(2deg); }
  66%  { transform: translate3d(2%, -3%, 0)     scale(1.05) rotate(-1deg); }
  100% { transform: translate3d(-1%, 1%, 0)     scale(1.10) rotate(1.5deg); }
}
/* Vignette overlay: keeps copy contrast strong. Uses theme bg colour so it
   darkens on dark themes and lightens on light themes (beauty). */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at center, transparent 0%, color-mix(in srgb, var(--bg) 55%, transparent) 75%, color-mix(in srgb, var(--bg) 95%, transparent) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 40%, transparent) 0%, color-mix(in srgb, var(--bg) 20%, transparent) 50%, color-mix(in srgb, var(--bg) 85%, transparent) 100%);
  pointer-events: none;
}
/* Hero copy lifts above the bg, gets a subtle text shadow for legibility */
.hero.hero-cinematic > *:not(.hero-bg) {
  position: relative;
  z-index: 1;
}
.hero.hero-cinematic h1 {
  text-shadow: 0 4px 30px color-mix(in srgb, var(--bg) 60%, transparent);
}
.hero.hero-cinematic .lead {
  max-width: 60ch;
  margin: 0 auto;
  text-shadow: 0 2px 18px color-mix(in srgb, var(--bg) 50%, transparent);
}
/* Light themes don't need text shadows — kill them */
:root[data-theme="beauty"] .hero.hero-cinematic h1,
:root[data-theme="beauty"] .hero.hero-cinematic .lead {
  text-shadow: none;
}
/* Booking microcopy under the hero CTAs — block-level so it wraps cleanly
   on narrow screens instead of forcing horizontal scroll. */
.hero-booking {
  margin: 22px auto 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  max-width: min(100%, 520px);
  text-align: center;
}
.hero-booking::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.3); }
}


/* ── 2. ROI CALCULATOR ───────────────────────────────────────────────────
   Pure CSS slider, JS-updated output. Sells the maths.
   ──────────────────────────────────────────────────────────────────────── */
.roi-panel {
  max-width: 880px;
  margin: 0 auto;
  padding: 44px clamp(24px, 4vw, 56px);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(168,85,247,0.06));
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.roi-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(168,85,247,0.10), transparent 50%);
  pointer-events: none;
}
.roi-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.roi-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.roi-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.roi-controls {
  display: grid;
  gap: 22px;
  margin-bottom: 28px;
}
.roi-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.roi-row label {
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.roi-row label .roi-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.roi-row input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  outline: none;
  cursor: pointer;
}
.roi-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple-2));
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 16px rgba(59,130,246,0.4);
  cursor: pointer;
  transition: transform 0.15s;
}
.roi-row input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.roi-row input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple-2));
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 16px rgba(59,130,246,0.4);
  cursor: pointer;
}
.roi-results {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.roi-stat {
  text-align: center;
}
.roi-stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.roi-stat-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--blue-2), var(--purple-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: filter 0.3s;
}
.roi-stat-value.flash { animation: roiFlash 0.4s ease-out; }
@keyframes roiFlash {
  0%   { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  50%  { filter: brightness(1.4) drop-shadow(0 0 16px rgba(168,85,247,0.6)); }
  100% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
}
.roi-stat.negative .roi-stat-value {
  background: linear-gradient(135deg, #f87171, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.roi-footnote {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 22px;
}
@media (max-width: 620px) {
  .roi-results { grid-template-columns: 1fr; gap: 22px; }
}


/* ── 3. EDITORIAL PROCESS TIMELINE ───────────────────────────────────────
   Replaces the three feature cards with a magazine-style numbered timeline.
   Giant numerals, gradient connecting line, hand-note on step 2.
   ──────────────────────────────────────────────────────────────────────── */
.process-timeline {
  position: relative;
  display: grid;
  gap: clamp(48px, 8vw, 96px);
  max-width: 980px;
  margin: 60px auto 0;
  padding: 0 12px;
}
.process-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
  padding: 8px 0;
}
.process-step:nth-child(even) {
  grid-template-columns: 1fr minmax(140px, 200px);
}
.process-step:nth-child(even) .process-num {
  order: 2;
  text-align: left;
}
.process-step:nth-child(even) .process-body {
  text-align: right;
}
.process-num {
  font-family: var(--font-display);
  /* Was clamp(96px, 14vw, 200px) — too big for the 200px column at wide
     viewports, which is what was causing the right-side cut-off. Reduced
     the ceiling to 150px so the numerals always fit naturally inside their
     column with breathing room. */
  font-size: clamp(84px, 10vw, 150px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.04em;
  padding-top: 0.08em;
  padding-bottom: 0.06em;
  /* Belt-and-suspenders: gradient sized 120% with -10% offset so it overhangs
     every edge of the text box. Catches any sub-pixel rendering or font
     side-bearing overflow that would otherwise be clipped to transparent. */
  background: linear-gradient(135deg, var(--blue-2), var(--purple-2));
  background-size: 120% 120%;
  background-position: -10% -10%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: right;
  position: relative;
  overflow: visible;
}
.process-num::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-2), var(--purple-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: blur(22px);
  opacity: 0.4;
  z-index: -1;
}
.process-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-2);
  margin-bottom: 14px;
  display: inline-block;
}
.process-body h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}
.process-body p {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.65;
  max-width: 52ch;
}
.process-step:nth-child(even) .process-body p {
  margin-left: auto;
}
/* Aside note inside .process-body flows after the paragraph — never absolute,
   so it can never get clipped by the timeline connector or the container edge.
   Sized to wrap on narrow screens instead of overflowing. */
.process-step .process-body .aside-note {
  display: inline-block;
  margin-top: 18px;
  max-width: min(28ch, 100%);
  white-space: normal;
  word-wrap: break-word;
  font-family: 'Caveat', cursive;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  color: var(--purple-2);
  transform: rotate(-2deg);
  pointer-events: none;
}
/* Right-aligned body (step 2) — anchor the note to its content edge */
.process-step:nth-child(even) .process-body .aside-note {
  transform: rotate(-3deg);
}
/* Connecting gradient line behind the timeline */
.process-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 6%;
  bottom: 6%;
  width: 2px;
  background: linear-gradient(180deg, var(--blue), var(--purple-2), transparent);
  opacity: 0.3;
  transform: translateX(-50%);
  z-index: -1;
}
@media (max-width: 720px) {
  .process-step,
  .process-step:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .process-step:nth-child(even) .process-num { order: 0; text-align: left; }
  .process-step:nth-child(even) .process-body { text-align: left; }
  .process-step:nth-child(even) .process-body p { margin-left: 0; }
  .process-num { font-size: clamp(80px, 18vw, 130px); text-align: left; }
  .process-timeline::before { left: 14px; transform: none; }
}


/* ── 4. WORK STRIP ───────────────────────────────────────────────────────
   Three-card horizontal showcase of live client sites.
   Hover lifts + gradient glow + reveals 'visit live' overlay.
   ──────────────────────────────────────────────────────────────────────── */
.work-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.work-tile {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1),
              box-shadow 0.4s,
              border-color 0.3s;
  text-decoration: none;
  color: inherit;
}
.work-tile:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.6),
    0 0 60px -10px rgba(168,85,247,0.25);
}
.work-tile-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(168,85,247,0.12));
}
.work-tile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.7s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.work-tile:hover .work-tile-frame img { transform: scale(1.06); }
.work-tile-frame::after {
  content: 'See live ↗';
  position: absolute;
  inset: auto 14px 14px auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 7px 12px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.work-tile:hover .work-tile-frame::after { opacity: 1; transform: translateY(0); }
.work-tile-meta {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.work-tile-trade {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-3);
}
.work-tile-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.work-tile-snippet {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .work-strip { grid-template-columns: 1fr; }
}


/* ── 5. THEME SHOWCASE ───────────────────────────────────────────────────
   Promote the hidden theme switcher into a centrepiece. Click a tile,
   the whole page morphs via View Transitions API (already wired).
   ──────────────────────────────────────────────────────────────────────── */
.theme-showcase {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-top: 48px;
}
.theme-tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0;
  font-family: inherit;
  color: inherit;
  text-align: left;
  transition: transform 0.4s, border-color 0.3s, box-shadow 0.3s;
}
.theme-tile:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--line-strong);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}
.theme-tile-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s;
}
.theme-tile:hover .theme-tile-bg { transform: scale(1.08); }
.theme-tile[data-preview="default"]   .theme-tile-bg { background: linear-gradient(135deg, #04060f 0%, #1e3a8a 40%, #7c3aed 100%); }
.theme-tile[data-preview="plumber"]   .theme-tile-bg { background: linear-gradient(135deg, #060e1a 0%, #0d1a30 40%, #dc2626 100%); }
.theme-tile[data-preview="builder"]   .theme-tile-bg { background: linear-gradient(135deg, #161517 0%, #29282d 40%, #ea580c 100%); }
.theme-tile[data-preview="beauty"]    .theme-tile-bg { background: linear-gradient(135deg, #faf6f0 0%, #f4e4d9 50%, #d4748d 100%); }
.theme-tile[data-preview="solicitor"] .theme-tile-bg { background: linear-gradient(135deg, #0d1119 0%, #1f2638 40%, #c9a47a 100%); }
.theme-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}
.theme-tile[data-preview="beauty"] .theme-tile-overlay {
  background: linear-gradient(180deg, transparent 30%, rgba(20,15,30,0.55) 100%);
}
.theme-tile-meta {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 18px 18px 22px;
}
.theme-tile-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 5px;
}
.theme-tile-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.theme-tile.active {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 2px var(--brand-2), 0 0 60px -10px var(--purple-glow);
}
.theme-tile.active::after {
  content: '✓ now showing';
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 5px 9px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 5px;
}
@media (max-width: 1100px) {
  .theme-showcase { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .theme-showcase { grid-template-columns: repeat(2, 1fr); }
}


/* ── 6. STICKY MOBILE ACTION BAR ─────────────────────────────────────────
   Bottom-fixed thumb-zone bar with WhatsApp + Call + Mockup.
   Hides on scroll-up, slides back on scroll-down. Mobile only.
   ──────────────────────────────────────────────────────────────────────── */
.mobile-action-bar {
  display: none;
}
@media (max-width: 760px) {
  .mobile-action-bar {
    display: grid;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 80;
    grid-template-columns: 1.15fr 0.85fr 1.3fr;
    gap: 5px;
    padding: 7px;
    background: rgba(7,10,24,0.92);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 16px 40px -8px rgba(0,0,0,0.7);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.3s;
  }
  .mobile-action-bar.hidden {
    transform: translateY(140%);
    opacity: 0;
  }
  .mobile-action-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 11px 6px;
    border-radius: 9px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    transition: background 0.2s, border-color 0.2s;
    /* Defensive: clip any label that's still too long for its column */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .mobile-action-bar a:active { background: rgba(255,255,255,0.10); }
  .mobile-action-bar .mab-whatsapp { color: #25D366; }
  .mobile-action-bar .mab-call     { color: var(--blue-2); }
  .mobile-action-bar .mab-mockup {
    background: linear-gradient(135deg, var(--blue), var(--purple-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px -4px var(--blue-glow);
  }
  .mobile-action-bar svg {
    width: 16px; height: 16px;
    flex-shrink: 0;
    stroke: currentColor; fill: none; stroke-width: 2.4;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .mobile-action-bar .mab-whatsapp svg { fill: currentColor; stroke: none; }
  body { padding-bottom: 80px; }
}
/* Very narrow phones (≤400px) — hide the "WhatsApp" wordmark so the icon
   alone speaks. Icon is universally recognised. */
@media (max-width: 400px) {
  .mobile-action-bar { grid-template-columns: 0.75fr 0.75fr 1.5fr; }
  .mobile-action-bar .mab-whatsapp { font-size: 0; }
  .mobile-action-bar .mab-whatsapp svg { width: 20px; height: 20px; }
}


/* ── 7. TIER COMPARATOR ──────────────────────────────────────────────────
   Hover/click a tier card — it expands and reveals features, the others
   shrink subtly. Pure CSS via :has() with JS fallback for older browsers.
   ──────────────────────────────────────────────────────────────────────── */
.tier-comparator {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.tier-card {
  position: relative;
  padding: 28px 22px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  /* All visual properties on the same 0.4s ease-out so transitions stay in
     lockstep — no property snapping while another transitions. */
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1),
              opacity   0.4s cubic-bezier(0.2, 0.9, 0.2, 1),
              border-color 0.4s ease,
              box-shadow   0.4s ease;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  /* Overflow stays visible so the .tier-popular flag can poke above the card.
     The .tier-features list clips itself via its own overflow: hidden. */
}
/* Gradient overlay for the expanded state — pseudo-element so it can fade
   via opacity (CSS can't transition between background gradients directly,
   so cross-fading via a layered pseudo is the smooth path). */
.tier-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-2) 14%, transparent), var(--surface) 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}
.tier-card.expanded::before { opacity: 1; }
/* Lift the card's actual content above the gradient overlay */
.tier-card > * { position: relative; z-index: 1; }
.tier-card .tier-features {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.2, 0.9, 0.2, 1),
              opacity 0.3s ease 0.1s,
              margin-top 0.4s;
  margin-top: 0;
  list-style: none;
  padding: 0;
  font-size: 14px;
  color: var(--text-2);
}
.tier-card .tier-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  line-height: 1.4;
}
.tier-card .tier-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}
.tier-card.expanded {
  border-color: var(--brand-2);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5), 0 0 60px -10px var(--purple-glow);
}
.tier-card.expanded .tier-features {
  max-height: 400px;
  opacity: 1;
  margin-top: 18px;
}
/* Softer dim/shrink for the non-expanded cards so cross-fades feel smooth
   rather than hard. Subtle scale change reduces visual flutter. */
.tier-comparator:has(.tier-card.expanded) .tier-card:not(.expanded) {
  opacity: 0.65;
  transform: scale(0.985);
}
.tier-card .tier-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(96,165,250,0.12);
  color: var(--blue-3);
  border: 1px solid rgba(96,165,250,0.2);
  width: max-content;
  margin-bottom: 14px;
}
.tier-card[data-tier="customers"] .tier-tag { background: rgba(168,85,247,0.15); color: var(--purple-3); border-color: rgba(168,85,247,0.3); }
.tier-card[data-tier="own"]       .tier-tag { background: rgba(252,211,77,0.12); color: var(--gold); border-color: rgba(252,211,77,0.3); }
.tier-card[data-tier="custom"]    .tier-tag { background: rgba(110,231,183,0.12); color: var(--green); border-color: rgba(110,231,183,0.3); }
.tier-card .tier-price {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.tier-card .tier-monthly {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
}
.tier-card .tier-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tier-card .tier-summary {
  font-size: 13.5px;
  color: var(--text-3);
  line-height: 1.55;
}
.tier-card .tier-popular {
  position: absolute;
  top: -10px;
  right: 18px;
  font-family: 'Caveat', cursive;
  font-size: 20px;
  font-weight: 700;
  color: var(--purple-2);
  background: var(--bg);
  padding: 2px 10px;
  transform: rotate(-4deg);
  white-space: nowrap;
}
@media (max-width: 960px) {
  .tier-comparator { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .tier-comparator { grid-template-columns: 1fr; }
  .tier-comparator:has(.tier-card.expanded) .tier-card:not(.expanded) { opacity: 1; transform: none; }
}


/* ── 8. SOURCE PEEK ──────────────────────────────────────────────────────
   "See the code behind this page" — collapsed details, expands to a
   syntax-highlighted snippet of THIS page's actual HTML.
   ──────────────────────────────────────────────────────────────────────── */
.source-peek {
  max-width: 880px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.25);
  overflow: hidden;
}
.source-peek-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
}
.source-peek-summary::-webkit-details-marker { display: none; }
.source-peek-summary:hover { background: rgba(255,255,255,0.03); }
.source-peek-summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 300;
  color: var(--text-3);
  transition: transform 0.3s;
}
.source-peek[open] .source-peek-summary::after {
  content: '−';
  color: var(--blue-2);
}
.source-peek-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-right: 8px;
}
.source-peek-content {
  padding: 0 22px 22px;
  border-top: 1px solid var(--line);
}
.source-peek-content > p {
  font-size: 14px;
  color: var(--text-2);
  margin: 18px 0;
  line-height: 1.6;
}
.source-peek pre {
  background: color-mix(in srgb, var(--bg) 65%, black);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
  max-height: 360px;
  overflow-y: auto;
}
.source-peek pre .tag-open,
.source-peek pre .tag-close { color: var(--brand); }
.source-peek pre .attr      { color: var(--brand-2); }
.source-peek pre .str       { color: var(--accent); }
.source-peek pre .comment   { color: var(--text-3); font-style: italic; }


/* ── 9. SIDE-GUTTER NUMERALS ─────────────────────────────────────────────
   Section index 01 / 02 / 03 down the left side, brightens when its
   matching section is in view.
   ──────────────────────────────────────────────────────────────────────── */
.gutter-index {
  display: none;
}
@media (min-width: 1280px) {
  .gutter-index {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: fixed;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    pointer-events: none;
  }
  .gutter-index a {
    color: var(--text-3);
    opacity: 0.45;
    transition: opacity 0.3s, color 0.3s, transform 0.3s;
    pointer-events: auto;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .gutter-index a::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 1px;
    background: currentColor;
    transition: width 0.3s, background 0.3s;
  }
  .gutter-index a.active {
    opacity: 1;
    color: var(--blue-3);
    transform: translateX(4px);
  }
  .gutter-index a.active::before {
    width: 32px;
    background: linear-gradient(90deg, var(--blue), var(--purple-2));
    height: 2px;
  }
  .gutter-index a:hover {
    opacity: 1;
    color: var(--text);
  }
}


/* ── 10. SVG LINE-DRAW SECTION DIVIDERS ──────────────────────────────────
   Subtle gradient line that "draws" itself in via stroke-dashoffset
   when the divider scrolls into view.
   ──────────────────────────────────────────────────────────────────────── */
.section-divider {
  display: block;
  margin: 0 auto;
  max-width: 200px;
  height: 24px;
  opacity: 0.6;
}
.section-divider path {
  fill: none;
  stroke: url(#section-divider-grad);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.section-divider.drawn path {
  stroke-dashoffset: 0;
}


/* ── 13. CAVEAT ASIDES (.aside-note) ─────────────────────────────────────
   Founder-voice handwriting at decision points. Reuse premium.css hand-note
   styles but allow positional placement.
   ──────────────────────────────────────────────────────────────────────── */
.aside-note {
  font-family: 'Caveat', cursive;
  font-weight: 500;
  font-size: 24px;
  color: var(--purple-2);
  display: inline-block;
  transform: rotate(-3deg);
  position: relative;
  max-width: min(28ch, 100%);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.15;
}
.aside-note.right { transform: rotate(2deg); }
.aside-note.tilt-strong { transform: rotate(-6deg); font-size: 28px; }
.aside-note::before {
  content: '↳';
  font-family: var(--font-display);
  margin-right: 6px;
  font-size: 18px;
  color: var(--blue-3);
  vertical-align: 0.05em;
}


/* ── 14. COUNTER-SCROLL EYEBROW ──────────────────────────────────────────
   Section eyebrow slides slightly horizontally as you scroll the section.
   Pure CSS via scroll-driven animations (modern browsers), with a no-op
   fallback for older.
   ──────────────────────────────────────────────────────────────────────── */
.eyebrow.counter-scroll {
  display: inline-block;
  will-change: transform;
}
@supports (animation-timeline: view()) {
  .eyebrow.counter-scroll {
    animation: counterDrift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  @keyframes counterDrift {
    from { transform: translateX(-30px); }
    to   { transform: translateX(30px); }
  }
}


/* ── 15. SOURCE-PEEK SUBTLE STYLING ALREADY HANDLED ABOVE ────────────────
   See section 8. */


/* ── REVEAL-ON-SCROLL UTILITY (used by sections that should animate in) ──
   Used by anything tagged data-reveal. JS adds .in-view when intersecting.
   ──────────────────────────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.9, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.9, 0.2, 1);
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal][data-reveal-delay="100"] { transition-delay: 0.10s; }
[data-reveal][data-reveal-delay="200"] { transition-delay: 0.20s; }
[data-reveal][data-reveal-delay="300"] { transition-delay: 0.30s; }
[data-reveal][data-reveal-delay="400"] { transition-delay: 0.40s; }


/* ── REDUCED MOTION OVERRIDES ────────────────────────────────────────────
   Strip the heavy motion for accessibility.
   ──────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-bg .hero-bg-mesh { animation: none; }
  .roi-stat-value.flash { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .section-divider path { stroke-dashoffset: 0; transition: none; }
  .hero-booking::before { animation: none; }
}


/* ═════════════════════════════════════════════════════════════════════════
   PER-THEME AESTHETIC OVERHAUL
   Each theme below gets its own signature hero treatment, decorative
   pattern, surface tones and typographic flourishes.
   ════════════════════════════════════════════════════════════════════════ */


/* ── DECORATIVE LAYER SLOT ───────────────────────────────────────────────
   Empty by default — per-theme rules below paint the pattern onto it. */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}


/* ═══════════════════ PLUMBER — Emergency / Reliable ═════════════════════
   Brand: deep navy + emergency red + amber accent.
   Mood: 24/7 emergency callout, urgent but reliable.
   Signature: faint blueprint grid + red diagonal accent strip.
   ════════════════════════════════════════════════════════════════════════ */
:root[data-theme="plumber"] .hero.hero-cinematic {
  min-height: 82vh;
}
:root[data-theme="plumber"] .hero-bg .hero-bg-mesh {
  background:
    radial-gradient(ellipse 65% 50% at 30% 25%, rgba(220,38,38,0.50), transparent 55%),
    radial-gradient(ellipse 55% 45% at 78% 75%, rgba(251,191,36,0.32), transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(220,38,38,0.30), transparent 55%),
    radial-gradient(circle 320px at 88% 18%, rgba(239,68,68,0.45), transparent 55%);
  filter: blur(50px);
}
:root[data-theme="plumber"] .hero-bg::before {
  background:
    /* Blueprint grid */
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px),
    /* Subtle red diagonal flare bottom-left */
    linear-gradient(115deg, transparent 0%, transparent 40%, rgba(220,38,38,0.10) 50%, transparent 60%);
  background-size: 56px 56px, 56px 56px, 100% 100%;
  opacity: 1;
}
/* Emergency stripe — thin red line along the top of the hero */
:root[data-theme="plumber"] .hero.hero-cinematic::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand) 30%, var(--brand-2) 70%, transparent);
  z-index: 2;
}
/* Hero booking dot becomes amber-on-red for that emergency feel */
:root[data-theme="plumber"] .hero-booking::before {
  background: var(--brand-2);
  box-shadow: 0 0 12px var(--brand-2);
}
:root[data-theme="plumber"] .hero-booking {
  color: var(--text-2);
  letter-spacing: 0.18em;
}
/* Promise panel gets red corner accent */
:root[data-theme="plumber"] .promise {
  border-left: 3px solid var(--brand);
  background:
    linear-gradient(135deg, rgba(220,38,38,0.05), transparent 40%),
    var(--surface);
}
/* Process timeline numerals — bold sans, stencil feel */
:root[data-theme="plumber"] .process-num {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
:root[data-theme="plumber"] .process-tag {
  color: var(--brand);
  font-family: var(--font-mono);
  font-weight: 700;
}
/* Cards — squared, sharp red accent on left */
:root[data-theme="plumber"] .card,
:root[data-theme="plumber"] .tier-card,
:root[data-theme="plumber"] .work-tile {
  border-radius: 4px;
  border-width: 1px;
  border-left: 3px solid var(--brand);
  background: var(--surface);
}
:root[data-theme="plumber"] .tier-card.expanded {
  border-left-color: var(--brand-2);
  background: linear-gradient(180deg, rgba(251,191,36,0.10), var(--surface) 60%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7), 0 0 60px -10px rgba(220,38,38,0.35);
}
:root[data-theme="plumber"] .tier-card .tier-tag {
  background: rgba(220,38,38,0.15);
  color: var(--brand-2);
  border: 1px solid rgba(220,38,38,0.4);
  border-radius: 2px;
  text-transform: uppercase;
}
:root[data-theme="plumber"] .work-tile:hover {
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7), 0 0 60px -10px rgba(220,38,38,0.35);
}
/* ROI panel — red border accent, no rounded purple gradient */
:root[data-theme="plumber"] .roi-panel {
  background: linear-gradient(135deg, rgba(220,38,38,0.06), rgba(251,191,36,0.05));
  border-radius: 6px;
  border-top: 3px solid var(--brand);
}
:root[data-theme="plumber"] .roi-row input[type="range"]::-webkit-slider-thumb {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 16px rgba(220,38,38,0.5);
}
/* Section divider — red stroke instead of gradient */
:root[data-theme="plumber"] .section-divider path {
  stroke: var(--brand);
  stroke-width: 2;
}
/* Aside note — uppercase bold, no script */
:root[data-theme="plumber"] .aside-note {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-2);
  transform: rotate(0);
  border-left: 2px solid var(--brand);
  padding-left: 10px;
}
:root[data-theme="plumber"] .aside-note.tilt-strong { transform: rotate(0); font-size: 14px; }
:root[data-theme="plumber"] .aside-note::before { content: ''; margin: 0; }
:root[data-theme="plumber"] .tier-popular {
  font-family: var(--font-display);
  font-weight: 400;
  transform: rotate(0);
  background: var(--brand);
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
}


/* ═══════════════════ BUILDER — Construction / Industrial ════════════════
   Brand: warm concrete + safety orange + amber.
   Mood: hard-working, premium tools, job-site authentic.
   Signature: hazard-tape stripe diagonal + heavy black borders + grid.
   ════════════════════════════════════════════════════════════════════════ */
:root[data-theme="builder"] .hero.hero-cinematic {
  min-height: 84vh;
}
:root[data-theme="builder"] .hero-bg .hero-bg-mesh {
  background:
    radial-gradient(ellipse 70% 55% at 30% 30%, rgba(234,88,12,0.42), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(251,191,36,0.35), transparent 55%),
    radial-gradient(ellipse 90% 60% at 50% 105%, rgba(234,88,12,0.32), transparent 55%);
  filter: blur(55px);
}
:root[data-theme="builder"] .hero-bg::before {
  background:
    /* Hazard stripe in the lower-right corner */
    repeating-linear-gradient(135deg,
      transparent 0 30px,
      rgba(251,191,36,0.08) 30px 50px,
      transparent 50px 80px,
      rgba(0,0,0,0.30) 80px 110px),
    /* Subtle engineering grid */
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 200% 200%, 80px 80px, 80px 80px;
  background-position: bottom right, 0 0, 0 0;
  opacity: 1;
}
/* Builder gets a heavy black border around the hero — bolted-on feel */
:root[data-theme="builder"] .hero.hero-cinematic::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(0,0,0,0.4);
  pointer-events: none;
  z-index: 2;
}
:root[data-theme="builder"] .hero.hero-cinematic::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 60px;
  height: 60px;
  border-top: 4px solid var(--brand);
  border-left: 4px solid var(--brand);
  z-index: 3;
}
:root[data-theme="builder"] .hero-booking::before {
  background: var(--brand);
  box-shadow: 0 0 14px var(--brand);
}
:root[data-theme="builder"] .promise {
  border: 2px solid var(--text-3);
  background: var(--surface);
  border-radius: 0;
  position: relative;
}
:root[data-theme="builder"] .promise::before {
  content: '';
  position: absolute;
  top: -2px; right: -2px;
  width: 40px; height: 40px;
  background: var(--brand);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}
:root[data-theme="plumber"] .promise {
  position: relative;
}
:root[data-theme="builder"] .process-num {
  background: linear-gradient(180deg, var(--brand) 30%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 0 rgba(0,0,0,0.3);
  letter-spacing: -0.03em;
}
:root[data-theme="builder"] .process-tag {
  background: var(--brand);
  color: #fff;
  padding: 4px 10px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  display: inline-block;
}
:root[data-theme="builder"] .card,
:root[data-theme="builder"] .tier-card,
:root[data-theme="builder"] .work-tile {
  border-radius: 0;
  border-width: 2px;
  background: var(--surface);
  box-shadow: 4px 4px 0 0 rgba(0,0,0,0.35);
}
:root[data-theme="builder"] .card:hover,
:root[data-theme="builder"] .work-tile:hover {
  box-shadow: 6px 6px 0 0 rgba(234,88,12,0.5);
  transform: translateY(-4px) translateX(-2px);
}
:root[data-theme="builder"] .tier-card.expanded {
  background: linear-gradient(180deg, rgba(234,88,12,0.10), var(--surface) 60%);
  box-shadow: 6px 6px 0 0 var(--brand);
}
:root[data-theme="builder"] .tier-card .tier-tag {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 5px 10px;
  text-transform: uppercase;
  font-weight: 700;
}
:root[data-theme="builder"] .tier-card[data-tier="customers"] .tier-tag { background: var(--brand-2); color: #1f1e21; }
:root[data-theme="builder"] .tier-card[data-tier="own"] .tier-tag       { background: #e3a008; color: #1f1e21; }
:root[data-theme="builder"] .tier-card[data-tier="custom"] .tier-tag    { background: #5a5450; color: #fff; }
:root[data-theme="builder"] .roi-panel {
  background: linear-gradient(135deg, rgba(234,88,12,0.06), rgba(251,191,36,0.05));
  border-radius: 0;
  border: 2px solid var(--text-3);
  border-top: 6px solid var(--brand);
}
:root[data-theme="builder"] .roi-row input[type="range"]::-webkit-slider-thumb {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 0;
  box-shadow: 2px 2px 0 0 rgba(0,0,0,0.4);
}
:root[data-theme="builder"] .section-divider {
  max-width: 280px;
}
:root[data-theme="builder"] .section-divider path {
  stroke: var(--brand);
  stroke-width: 3;
}
:root[data-theme="builder"] .aside-note {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand);
  transform: rotate(0);
  background: rgba(251,191,36,0.10);
  padding: 6px 12px;
  border-left: 4px solid var(--brand);
}
:root[data-theme="builder"] .aside-note::before {
  content: '►';
  font-size: 11px;
  color: var(--brand);
  vertical-align: 0.1em;
  margin-right: 6px;
}
:root[data-theme="builder"] .aside-note.tilt-strong { transform: rotate(0); font-size: 15px; }
:root[data-theme="builder"] .tier-popular {
  font-family: var(--font-display);
  font-weight: 400;
  transform: rotate(0);
  background: #fbbf24;
  color: #1f1e21;
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 0;
  text-transform: uppercase;
}
/* Builder eyebrow gets a stencil block */
:root[data-theme="builder"] .eyebrow.counter-scroll {
  background: var(--brand);
  color: #fff;
  padding: 4px 12px;
  font-weight: 700;
}
/* Theme tile gets sharp edges for builder */
:root[data-theme="builder"] .theme-tile { border-radius: 0; }


/* ═══════════════════ SOLICITOR — Classical / Distinguished ══════════════
   Brand: deep navy + warm gold + sage green.
   Mood: scholarly, gilded, timeless, trustworthy.
   Signature: thin gold rule borders + serif italics + classical ornaments.
   ════════════════════════════════════════════════════════════════════════ */
:root[data-theme="solicitor"] .hero.hero-cinematic {
  min-height: 80vh;
}
:root[data-theme="solicitor"] .hero-bg .hero-bg-mesh {
  background:
    radial-gradient(ellipse 55% 45% at 50% 35%, rgba(201,164,122,0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(13,17,25,0.7), transparent 60%),
    radial-gradient(circle 280px at 18% 22%, rgba(135,161,125,0.18), transparent 60%),
    radial-gradient(circle 280px at 82% 78%, rgba(201,164,122,0.20), transparent 60%);
  filter: blur(60px);
}
:root[data-theme="solicitor"] .hero-bg::before {
  background:
    /* Subtle paper grain — very faint cross-hatch */
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 6px);
  opacity: 1;
}
/* Top + bottom gold rules — gilded frame */
:root[data-theme="solicitor"] .hero.hero-cinematic::before {
  content: '';
  position: absolute;
  top: 30px; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand) 25%, var(--brand) 75%, transparent);
  z-index: 2;
}
:root[data-theme="solicitor"] .hero.hero-cinematic::after {
  content: '❦';
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--brand);
  z-index: 2;
}
:root[data-theme="solicitor"] .hero h1 {
  font-style: italic;
  font-weight: 600;
}
:root[data-theme="solicitor"] .hero-booking::before {
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand);
}
:root[data-theme="solicitor"] .hero-booking {
  font-family: 'Lora', Georgia, serif;
  text-transform: none;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
:root[data-theme="solicitor"] .promise {
  border: 1px solid var(--brand);
  background:
    linear-gradient(135deg, rgba(201,164,122,0.04), transparent 50%),
    var(--surface);
  position: relative;
}
:root[data-theme="solicitor"] .promise::before,
:root[data-theme="solicitor"] .promise::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border: 1px solid var(--brand);
}
:root[data-theme="solicitor"] .promise::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
:root[data-theme="solicitor"] .promise::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }
:root[data-theme="solicitor"] .process-num {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-style: italic;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
:root[data-theme="solicitor"] .process-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--brand);
  font-size: 14px;
}
:root[data-theme="solicitor"] .process-tag::before {
  content: '❦ ';
  margin-right: 4px;
}
:root[data-theme="solicitor"] .card,
:root[data-theme="solicitor"] .tier-card,
:root[data-theme="solicitor"] .work-tile {
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 0 var(--brand-soft);
  position: relative;
}
:root[data-theme="solicitor"] .card::before,
:root[data-theme="solicitor"] .work-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 18px; right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand) 50%, transparent);
  opacity: 0.6;
}
:root[data-theme="solicitor"] .tier-card.expanded {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(201,164,122,0.06), var(--surface) 60%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5), 0 0 60px -10px rgba(201,164,122,0.30);
}
:root[data-theme="solicitor"] .tier-card .tier-tag {
  background: rgba(201,164,122,0.10);
  color: var(--brand);
  border: 1px solid rgba(201,164,122,0.4);
  border-radius: 999px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  padding: 4px 14px;
}
:root[data-theme="solicitor"] .tier-card .tier-price {
  font-style: italic;
  font-weight: 700;
}
:root[data-theme="solicitor"] .roi-panel {
  background: linear-gradient(135deg, rgba(201,164,122,0.05), rgba(135,161,125,0.05));
  border: 1px solid var(--brand);
  border-radius: 6px;
}
:root[data-theme="solicitor"] .roi-stat-value {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
}
:root[data-theme="solicitor"] .roi-row input[type="range"]::-webkit-slider-thumb {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 16px rgba(201,164,122,0.4);
}
:root[data-theme="solicitor"] .section-divider {
  max-width: 240px;
  opacity: 0.7;
}
:root[data-theme="solicitor"] .section-divider path {
  stroke: var(--brand);
  stroke-dasharray: 200;
}
/* Add an ornament centre-piece on the divider */
:root[data-theme="solicitor"] .section-divider {
  position: relative;
}
:root[data-theme="solicitor"] .aside-note {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  color: var(--brand);
  transform: rotate(0);
  font-size: 22px;
}
:root[data-theme="solicitor"] .aside-note::before {
  content: '— ';
  color: var(--brand);
}
:root[data-theme="solicitor"] .aside-note.tilt-strong { transform: rotate(0); font-size: 24px; }
:root[data-theme="solicitor"] .tier-popular {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  color: var(--brand);
  background: var(--bg);
  transform: rotate(0);
  padding: 0 8px;
}


/* ═══════════════════ BEAUTY — Editorial / Soft ══════════════════════════
   User likes this one — only fixing the hero background which clashed with
   the cream surface and the dark vignette.
   ════════════════════════════════════════════════════════════════════════ */
:root[data-theme="beauty"] .hero.hero-cinematic {
  min-height: 84vh;
  background: var(--bg);
}
/* Cream + blush gradient — no dark colors */
:root[data-theme="beauty"] .hero-bg .hero-bg-mesh {
  background:
    radial-gradient(ellipse 60% 50% at 25% 30%, rgba(201,122,139,0.30), transparent 55%),
    radial-gradient(ellipse 55% 45% at 78% 72%, rgba(212,165,116,0.28), transparent 55%),
    radial-gradient(ellipse 90% 65% at 50% 105%, rgba(244,236,225,0.85), transparent 55%),
    radial-gradient(circle 300px at 88% 18%, rgba(184,134,11,0.18), transparent 55%);
  filter: blur(60px);
}
/* Vignette inverts to cream */
:root[data-theme="beauty"] .hero-bg::after {
  background:
    radial-gradient(ellipse 100% 80% at center, transparent 0%, rgba(250,246,240,0.65) 75%, rgba(250,246,240,0.98) 100%),
    linear-gradient(180deg, rgba(250,246,240,0.30) 0%, rgba(250,246,240,0.10) 50%, rgba(250,246,240,0.85) 100%);
}
/* Subtle pattern — fine cross-hatch like fine printed paper */
:root[data-theme="beauty"] .hero-bg::before {
  background:
    repeating-linear-gradient(45deg, rgba(201,122,139,0.04) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(-45deg, rgba(212,165,116,0.03) 0 1px, transparent 1px 10px);
  opacity: 0.9;
}
/* Subtle gilded rule above the hero headline */
:root[data-theme="beauty"] .hero.hero-cinematic::before {
  content: '';
  position: absolute;
  top: 80px; left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-2), transparent);
  z-index: 2;
}
:root[data-theme="beauty"] .hero-booking::before {
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand);
}
:root[data-theme="beauty"] .hero-booking {
  font-family: 'Cormorant Garamond', serif;
  text-transform: none;
  font-style: italic;
  font-size: 14px;
  color: var(--text-2);
  letter-spacing: 0.02em;
}
/* Process timeline — serif italics with gold accent */
:root[data-theme="beauty"] .process-num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
:root[data-theme="beauty"] .process-tag {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--brand);
  font-size: 15px;
}
:root[data-theme="beauty"] .process-tag::before {
  content: '— ';
  color: var(--brand-2);
}
/* Aside notes — Caveat works on beauty too */
:root[data-theme="beauty"] .aside-note {
  color: var(--brand);
  font-family: 'Caveat', cursive;
}
:root[data-theme="beauty"] .aside-note::before {
  content: '↳';
  color: var(--brand-2);
}
/* Tier comparator — gilded edges */
:root[data-theme="beauty"] .tier-card {
  background: var(--surface);
  border: 1px solid var(--line);
}
:root[data-theme="beauty"] .tier-card.expanded {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(212,165,116,0.06), var(--surface) 60%);
  box-shadow: 0 30px 60px -20px rgba(40,30,30,0.18), 0 0 60px -10px rgba(212,165,116,0.30);
}
:root[data-theme="beauty"] .tier-card .tier-tag {
  background: rgba(201,122,139,0.10);
  color: var(--brand);
  border: 1px solid rgba(201,122,139,0.30);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  padding: 4px 14px;
}
:root[data-theme="beauty"] .tier-card .tier-price,
:root[data-theme="beauty"] .tier-card .tier-name {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
}
:root[data-theme="beauty"] .tier-popular {
  font-family: 'Caveat', cursive;
  color: var(--brand);
  background: var(--bg);
}
/* Source-peek on light theme — invert */
:root[data-theme="beauty"] .source-peek {
  background: var(--surface-2);
}
:root[data-theme="beauty"] .source-peek pre {
  background: #fdfaf5;
  color: #4a3a3a;
  border-color: var(--line);
}
:root[data-theme="beauty"] .source-peek pre .tag-open,
:root[data-theme="beauty"] .source-peek pre .tag-close { color: var(--brand); }
:root[data-theme="beauty"] .source-peek pre .attr      { color: var(--brand-2); }
:root[data-theme="beauty"] .source-peek pre .str       { color: #8b6f47; }
/* ROI panel — soft gilded */
:root[data-theme="beauty"] .roi-panel {
  background: linear-gradient(135deg, rgba(201,122,139,0.05), rgba(212,165,116,0.05));
  border: 1px solid var(--brand-2);
}
:root[data-theme="beauty"] .roi-stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 700;
}
:root[data-theme="beauty"] .roi-row input[type="range"] {
  background: rgba(40,30,30,0.10);
}
:root[data-theme="beauty"] .roi-row input[type="range"]::-webkit-slider-thumb {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 16px rgba(201,122,139,0.35);
  border-color: #fff;
}
:root[data-theme="beauty"] .section-divider {
  max-width: 200px;
}
:root[data-theme="beauty"] .section-divider path {
  stroke: var(--brand-2);
}
:root[data-theme="beauty"] .roi-row label .roi-value,
:root[data-theme="beauty"] .roi-row select {
  background: rgba(40,30,30,0.06) !important;
  color: var(--text);
  border-color: var(--line) !important;
}


/* ═══════════════════ DEFAULT — Add signature decorative layer ═══════════
   Default already looked good — adding a faint dot grid for texture so it
   sits in the same visual family as the other themes' decorative layers.
   ════════════════════════════════════════════════════════════════════════ */
:root[data-theme="default"] .hero-bg::before,
:root:not([data-theme]) .hero-bg::before {
  background-image: radial-gradient(circle at center, rgba(255,255,255,0.05) 1px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: 0.6;
}


/* ── SHARED FIX: SOURCE PEEK PRE on light themes ─────────────────────────
   The hard-coded #060914 background was a black box on cream beauty bg.
   Above we override per-theme.
   ──────────────────────────────────────────────────────────────────────── */

/* Tier-card expanded purple wash — replace hardcoded value with theme var */
.tier-card.expanded {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-2) 12%, transparent), var(--surface) 60%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5),
              0 0 60px -10px color-mix(in srgb, var(--brand-2) 35%, transparent);
}

/* Work tile hover glow — theme-aware */
.work-tile:hover {
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.6),
    0 0 60px -10px color-mix(in srgb, var(--brand-2) 30%, transparent);
}

/* Tier-card default tag colour — theme-aware */
.tier-card .tier-tag {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
}
.tier-card[data-tier="customers"] .tier-tag {
  background: color-mix(in srgb, var(--brand-2) 16%, transparent);
  color: var(--brand-2);
  border-color: color-mix(in srgb, var(--brand-2) 32%, transparent);
}
