/* Mesa Digital v2 - "From dusk till dawn" */

:root {
  --ink: #0b0810;
  --sand: #e8dcc8;
  --sand-dim: #b9ad97;
  --terra: #c96f4a;
  --terra-hot: #e08a5f;
  --gold: #ffd9a0;
  --glass: rgba(14, 11, 16, 0.42);
  --glass-brd: rgba(232, 220, 200, 0.10);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--sand);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}
body.no-webgl { background: linear-gradient(180deg, #2b1a2e 0%, #7a3b2e 45%, #1a1016 100%); }

::selection { background: var(--terra); color: var(--ink); }

/* ---------- fixed scene + grain ---------- */
#scene {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0; display: block;
}
.grain {
  /* static film grain - animating a 200% fixed layer forced constant recomposites */
  position: fixed; inset: 0;
  z-index: 3; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
}

main, footer, .marquee { position: relative; z-index: 1; }

/* ---------- glass panel ----------
   NO backdrop-filter: blurring live WebGL each frame is the #1 jank source.
   A slightly more opaque wash reads nearly identical and costs nothing. */
.glass {
  background: rgba(15, 12, 18, 0.78);
  border: 1px solid var(--glass-brd);
  border-radius: 18px;
}

/* ---------- corner registration marks (drafting-table detail) ---------- */
.corner-marks { position: fixed; inset: 22px; pointer-events: none; z-index: 4; }
.corner-marks i {
  position: absolute; width: 13px; height: 13px; opacity: 0.35;
}
.corner-marks i::before, .corner-marks i::after { content: ""; position: absolute; background: var(--sand-dim); }
.corner-marks i::before { left: 6px; top: 0; width: 1px; height: 13px; }
.corner-marks i::after { top: 6px; left: 0; width: 13px; height: 1px; }
.corner-marks i:nth-child(1) { top: 0; left: 0; }
.corner-marks i:nth-child(2) { top: 0; right: 0; }
.corner-marks i:nth-child(3) { bottom: 0; left: 0; }
.corner-marks i:nth-child(4) { bottom: 0; right: 0; }
@media (max-width: 700px) { .corner-marks { display: none; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 4vw;
  transition: transform .45s cubic-bezier(.4,0,.2,1), background-color .4s, backdrop-filter .4s;
}
.nav.is-hidden { transform: translateY(-110%); }
.nav::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 215%;
  background: linear-gradient(180deg, rgba(11,8,16,0.95) 0%, rgba(11,8,16,0.88) 38%,
              rgba(11,8,16,0.55) 68%, rgba(11,8,16,0) 100%);
  opacity: 0; transition: opacity .4s; pointer-events: none; z-index: -1;
}
.nav.is-solid::before { opacity: 1; }
.nav-mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--sand); font-weight: 500; letter-spacing: 0.22em; font-size: 13px; }
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  color: var(--sand-dim); text-decoration: none; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  position: relative; transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 100%;
  background: var(--terra); transform: scaleX(0); transform-origin: right; transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.nav-links a:hover { color: var(--sand); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 14px; letter-spacing: 0.06em;
  padding: 16px 30px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .25s, background-color .3s, color .3s, border-color .3s, box-shadow .3s;
  will-change: transform;
}
.btn-arrow { display: inline-block; transition: transform .3s cubic-bezier(.4,0,.2,1); }
.btn:hover .btn-arrow { transform: translateX(5px); }
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--terra); color: #14100d; box-shadow: 0 0 0 rgba(201,111,74,0); }
.btn-primary:hover { background: var(--terra-hot); box-shadow: 0 8px 40px rgba(201,111,74,0.35); }
.btn-ghost { border-color: rgba(232,220,200,0.28); color: var(--sand); }
.btn-ghost:hover { border-color: var(--sand); background: rgba(232,220,200,0.07); }
.btn-small { padding: 11px 22px; font-size: 12.5px; background: rgba(232,220,200,0.08); border-color: rgba(232,220,200,0.2); color: var(--sand); }
.btn-small:hover { background: var(--terra); color: #14100d; border-color: var(--terra); }
.btn-full { width: 100%; justify-content: center; }
.btn-big { padding: 20px 44px; font-size: 16px; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 5vw; position: relative;
}
.hero-inner { max-width: 1100px; }
.hero-kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--sand-dim);
  margin-bottom: 3vh;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--terra); flex: none; animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,111,74,0.5); } 50% { box-shadow: 0 0 0 9px rgba(201,111,74,0); } }
.hero-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(46px, 8vw, 112px);
  line-height: 0.98; letter-spacing: -0.015em; color: var(--sand);
  text-shadow: 0 2px 60px rgba(11,8,16,0.5);
}
.ht-line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.ht-chars { display: inline-block; }
.ht-chars .ch { display: inline-block; will-change: transform; }
.ht-chars.accent { font-style: italic; color: var(--terra-hot); }
.hero-sub { margin-top: 3.4vh; font-size: clamp(15px, 1.15vw, 17px); color: var(--sand-dim); max-width: 560px; }
.hero-sub em { color: #86c9a8; font-style: normal; font-weight: 500; }
.hero-ctas { display: flex; gap: 16px; margin-top: 4.2vh; flex-wrap: wrap; }
.hero-coords {
  position: absolute; right: 2.4vw; top: 50%;
  transform: translateY(-50%) rotate(90deg); transform-origin: center;
  font-size: 11px; letter-spacing: 0.28em; color: rgba(232,220,200,0.35); white-space: nowrap;
}
.hero-scrollcue {
  position: absolute; bottom: 4vh; left: 5vw;
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(232,220,200,0.45);
  transition: opacity .5s;
}
.hero-scrollcue span { display: block; width: 44px; height: 1px; background: var(--terra); animation: cue 2s ease-in-out infinite; transform-origin: left; }
@keyframes cue { 0%,100% { transform: scaleX(0.3); opacity: .4; } 50% { transform: scaleX(1); opacity: 1; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; padding: 26px 0; border-top: 1px solid rgba(232,220,200,0.08); border-bottom: 1px solid rgba(232,220,200,0.08); background: rgba(11,8,16,0.45); }
.marquee-track { display: flex; white-space: nowrap; animation: marq 36s linear infinite; }
.marquee-track span { font-family: var(--serif); font-size: 15px; font-weight: 300; letter-spacing: 0.16em; color: rgba(232,220,200,0.5); }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- manifesto ---------- */
.manifesto { padding: clamp(36px, 6vh, 66px) 5vw; max-width: 1150px; margin: 0 auto; position: relative; }
.mani-time { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--terra); margin-bottom: 4vh; opacity: .85; }
.manifesto::before {
  content: ""; position: absolute; inset: 8vh 0;
  background: radial-gradient(ellipse 72% 60% at 50% 50%, rgba(11,8,16,0.74),
              rgba(11,8,16,0.36) 58%, transparent 80%);
  pointer-events: none;
}
.mani-time, .manifesto-text { position: relative; }
.manifesto-text {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(22px, 2.4vw, 34px); line-height: 1.4; color: var(--sand);
}
.manifesto-text .w { opacity: 0.13; transition: opacity 0.4s; }
.manifesto-text .w.on { opacity: 1; }

/* ---------- stats ---------- */
.stats { padding: clamp(36px, 6vh, 66px) 5vw; position: relative; }
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; max-width: 720px; margin: 0 auto; position: relative; }
.stat { position: relative; padding-top: 22px; }
.stat::before { content: "✦"; position: absolute; top: -4px; left: 0; color: var(--gold); font-size: 13px; opacity: .9; text-shadow: 0 0 14px rgba(255,217,160,.8); }
.stat-top { display: flex; align-items: baseline; gap: 6px; }
.stat-num { font-family: var(--serif); font-size: clamp(40px, 4vw, 60px); font-weight: 300; color: var(--sand); font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terra-hot); }
.stat p { margin-top: 8px; font-size: 14px; color: var(--sand-dim); max-width: 240px; }

/* ---------- sections shared ---------- */
.section-head { max-width: 1300px; margin: 0 auto 40px; padding: 0 0; }
.sec-index { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--terra); margin-bottom: 2.4vh; }
.section-title { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 4.4vw, 62px); line-height: 1.04; letter-spacing: -0.015em; text-shadow: 0 2px 30px rgba(11,8,16,0.55); }
.st-mask { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.st-mask > span { display: inline-block; }
.section-sub { margin-top: 2.4vh; color: var(--sand-dim); font-size: 15.5px; max-width: 520px; text-shadow: 0 1px 16px rgba(11,8,16,0.9), 0 0 3px rgba(11,8,16,0.5); }

/* ---------- work / BA slider ---------- */
.work { padding: clamp(36px, 6vh, 66px) 5vw; }
.ba { position: relative; max-width: 1300px; margin: 0 auto; height: min(70vh, 664px); overflow: hidden; user-select: none; -webkit-user-select: none; -moz-user-select: none; touch-action: pan-y; cursor: ew-resize; }
.ba, .ba * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ba img, .ba .mock { -webkit-user-drag: none; user-drag: none; }
body.ba-dragging, body.ba-dragging * { -webkit-user-select: none !important; user-select: none !important; cursor: ew-resize !important; }
.ba-pane { position: absolute; inset: 0; padding: clamp(12px, 2.2vw, 30px); }
.ba-after { z-index: 1; }
.ba-before { clip-path: inset(0 0 0 50%); z-index: 2; }
.mock { height: 100%; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: #1c1917; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a352f; }
.mock-bar em { margin-left: 10px; font-style: normal; font-size: 11.5px; color: #8a8378; font-family: var(--sans); letter-spacing: .04em; }
.mock-body { flex: 1; }
/* the AFTER mock is a CLIENT's brand, deliberately not Mesa's: deep petrol teal + amber */
.mock-after .mock-body {
  position: relative; overflow: hidden;
  padding: clamp(16px, 2.2vw, 32px); display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(110% 80% at 8% -8%, rgba(96,148,196,0.13), transparent 58%),
    linear-gradient(165deg, #13273c 0%, #102134 52%, #0c1a29 100%);
}
.mock-after .mock-body::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(85% 75% at 28% 15%, #000 10%, transparent 78%);
          mask-image: radial-gradient(85% 75% at 28% 15%, #000 10%, transparent 78%);
}
.mock-after .mock-body::after {
  content: ""; position: absolute; right: -14%; top: -22%; width: 58%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(120,160,200,0.10), transparent 62%);
  pointer-events: none;
}
.mock-after .mock-body > * { position: relative; z-index: 1; }
.mock-after .mock-bar { background: linear-gradient(#17293c, #101d2c); border-bottom: 1px solid rgba(255,255,255,0.06); }
.mock-after .mock-bar i { background: rgba(255,255,255,0.15); }
.mock-after .mock-bar em { color: #7f8fa3; }
.ma-badge {
  display: inline-block; width: fit-content; padding: 7px 14px; border-radius: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .01em; color: #dbe6f2;
  background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}
.ma-h1 {
  font-family: var(--sans); font-weight: 700; letter-spacing: -0.028em;
  font-size: clamp(20px, 2.3vw, 34px); line-height: 1.07; margin-top: 12px; color: #f2f7fc;
  text-shadow: 0 2px 26px rgba(3,18,26,0.5);
}
.ma-sub { color: #9aabbf; margin-top: 10px; font-size: 14px; max-width: 46ch; line-height: 1.5; }
.ma-cta {
  margin-top: 18px; width: fit-content; padding: 14px 24px; border-radius: 10px;
  font-weight: 600; font-size: 14px; letter-spacing: .01em;
  background: linear-gradient(180deg, #d98c2b 0%, #c2761d 100%);
  color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}
.ma-row { display: flex; gap: 10px; flex-wrap: wrap; }
/* --- the after mock is laid out like a real homepage, not two blocks with a void --- */
.mock-after .mock-body { justify-content: flex-start; gap: 18px; }
.ma-nav { display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.09); }
.ma-brand { display: flex; align-items: center; gap: 9px; font-family: var(--sans); font-weight: 700;
  font-size: 14px; letter-spacing: -0.01em; color: #eef3f9; white-space: nowrap; }
.ma-mark { width: 17px; height: 17px; border-radius: 4px; flex: 0 0 17px;
  background: linear-gradient(135deg, #d9932f, #b9761c); }
.ma-links { display: flex; gap: 20px; font-size: 12px; color: #93a3b6; white-space: nowrap; }
.ma-navcta { font-size: 12.5px; font-weight: 700; color: #eaf0f7; white-space: nowrap; }
.ma-hero { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(260px,0.8fr); gap: 34px; align-items: stretch; }
.ma-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.ma-col .ma-row { margin-top: 16px; }
.ma-col .ma-trust { margin-top: 18px; }
.ma-card { background: rgba(23,42,63,0.92); border: 1px solid rgba(255,255,255,0.13); border-radius: 12px;
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.3); }
.ma-card-h { font-family: var(--sans); font-weight: 700; font-size: 14px; color: #eef3f9; margin-bottom: 2px; }
.ma-card { justify-content: center; }
.ma-field { height: 34px; border-radius: 7px; background: rgba(8,17,28,0.45); border: 1px solid rgba(255,255,255,0.11);
  display: flex; align-items: center; justify-content: space-between; padding: 0 11px; font-size: 12.5px; color: #7f8fa3; }
.ma-field span { color: #7f8fa3; }
.ma-field i { font-style: normal; color: #7f8fa3; font-size: 11px; }
.ma-card-btn { margin-top: 2px; height: 36px; border-radius: 7px; background: linear-gradient(180deg, #d98c2b 0%, #c2761d 100%);
  color: #fff; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.ma-card-note { font-size: 10.5px; color: #7f8fa3; text-align: center; }
.ma-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ma-cta2 { margin-top: 18px; padding: 14px 22px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: #d3dfec; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.17); }
.ma-trust { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 16px; font-size: 12px; color: #8fb8c9; }
.ma-trust span { position: relative; padding-left: 17px; }
.ma-trust span::before { content: "✓"; position: absolute; left: 0; color: #5fd6a4; font-weight: 700; }
.ma-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.ma-stats { display: flex; gap: 26px; flex-wrap: wrap; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.09); font-size: 11.5px; color: #8496a9; letter-spacing: .02em; }
.ma-stats b { color: #e6eef7; font-weight: 700; font-size: 13px; }

.ma-chip {
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06);
  color: #c3d1e0; border-radius: 6px; padding: 8px 14px; font-size: 12.5px; font-weight: 500;
}
.mock-before .mock-body { background: #efeadf; padding: 20px; font-family: "Times New Roman", serif; }
.mb-title { color: #0000cc; font-family: 'Times New Roman', Times, serif; font-size: clamp(16px, 2.2vw, 27px); font-weight: 700; text-decoration: underline; text-align: center; margin-top: 6px; }
.mb-img { margin: 10px auto; width: 46%; height: 74px; border: 2px dashed #888; display: flex; align-items: center; justify-content: center; color: #555; font-size: 11px; background: #e8e8e8; font-family: "Times New Roman", serif; }
.mb-text { height: 9px; background: #c9c4b8; margin: 8px 12%; }
.mb-text.short { width: 46%; margin-right: auto; }
.mb-counter { text-align: center; color: #000; font-size: 11px; margin-top: 10px; font-family: "Courier New", monospace; background: #000; color: #0f0; width: fit-content; margin-left: auto; margin-right: auto; padding: 2px 7px; border: 1px solid #666; }
.ba-label { position: absolute; top: 18px; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; z-index: 2; }
.ba-label-after { left: 18px; background: var(--terra); color: #14100d; }
.ba-label-before { right: 18px; background: rgba(20,16,12,0.55); color: #efe9db; border: 1px solid rgba(239,233,219,0.35); }
@media (max-width: 700px) {
  .ba-label { font-size: 9px; padding: 6px 10px; letter-spacing: 0.18em; }
  .ba-label-before { top: auto; bottom: 14px; }
}

/* --- AFTER mock on phones -------------------------------------------------
   It was only ever laid out for desktop. The hero grid's second column carried
   a 260px minimum, which cannot fit a ~300px mock body, so the text column
   collapsed to roughly one word per line, the hero grew to ~930px inside a
   ~456px frame, and `overflow:hidden` cut the rest — leaving a bare gradient
   panel with nothing in it. Reported 2026-09-09.
   On a phone a real homepage IS one column with the form below the fold, so
   stacking and dropping the secondary rows is faithful, not a compromise. --- */
@media (max-width: 700px) {
  .ma-hero { grid-template-columns: 1fr; gap: 12px; }
  .ma-card, .ma-trust, .ma-stats, .ma-links { display: none; }
  .mock-after .mock-body { gap: 10px; padding: 13px; }
  .ma-nav { padding-bottom: 10px; }
  .ma-badge { font-size: 10.5px; padding: 5px 10px; }
  .ma-h1 { font-size: 19px; line-height: 1.12; margin-top: 8px; }
  .ma-sub { font-size: 12px; margin-top: 7px; line-height: 1.42; }
  .ma-cta, .ma-cta2 { margin-top: 10px; padding: 10px 16px; font-size: 12.5px; }
  .ma-col .ma-row { margin-top: 10px; }
}
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--terra); z-index: 3; cursor: ew-resize;
  display: flex; align-items: center; justify-content: center;
}
.ba-handle span {
  width: 54px; height: 54px; flex: none; border-radius: 50%; background: var(--terra); color: #14100d;
  display: flex; align-items: center; justify-content: center; font-size: 15px; letter-spacing: -1px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.45); transition: transform .25s;
}
.ba-handle:hover span { transform: scale(1.12); }

/* ---------- rail ---------- */
.rail-wrap { max-width: none; margin-top: 7vh; }
.rail-head { max-width: 1300px; margin: 0 auto 5vh; padding: 0; }
.rail-head h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 2vw, 28px); max-width: 780px; }
.rail-head em { color: var(--terra-hot); }
.rail-note { margin-top: 12px; font-size: 13px; color: var(--sand-dim); letter-spacing: 0.02em; }
.rail-window { overflow-x: auto; overflow-y: hidden; cursor: grab; scrollbar-width: thin;
  scrollbar-color: rgba(232,220,200,0.28) transparent; }
.rail-window::-webkit-scrollbar { height: 8px; }
.rail-window::-webkit-scrollbar-track { background: transparent; }
.rail-window::-webkit-scrollbar-thumb { background: rgba(232,220,200,0.24); border-radius: 99px; }
.rail-window::-webkit-scrollbar-thumb:hover { background: rgba(232,220,200,0.4); }
.rail-window:active { cursor: grabbing; }
.rail { display: flex; gap: 24px; padding: 10px 0 30px; will-change: transform; width: max-content; }
.card {
  width: clamp(270px, 26vw, 360px); flex: none; border-radius: 18px; padding: 18px;
  background: rgba(18, 14, 20, 0.82); border: 1px solid var(--glass-brd);
  transform-style: preserve-3d; position: relative; overflow: hidden;
  transition: border-color .3s;
  display: block; text-decoration: none; color: inherit;
}
.card:hover { border-color: rgba(201,111,74,0.5); }
.cm-bar { display: flex; align-items: center; gap: 5px; margin-bottom: auto; opacity: .8; }
.cm-bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(232,220,200,0.25); }
.cm-bar em { margin-left: 6px; font-style: normal; font-size: 10px; color: rgba(232,220,200,0.45); letter-spacing: .04em; }
.cm-stars { font-size: 11px; color: var(--gold); letter-spacing: .12em; }
.cm-stars span { color: rgba(232,220,200,0.55); letter-spacing: .02em; margin-left: 4px; }
.cm-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cm-chips span { font-size: 10px; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(232,220,200,0.22); color: rgba(232,220,200,0.7); }
.card-live {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--terra-hot);
}
.card-live i { font-style: normal; transition: transform .3s cubic-bezier(.22,1,.36,1); }
.card:hover .card-live i { transform: translateX(5px); }
.card-glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(600px circle at var(--gx,50%) var(--gy,50%), rgba(232,220,200,0.14), transparent 45%);
  transition: opacity .3s;
}
.card:hover .card-glare { opacity: 1; }
.card-tag { position: absolute; top: 16px; right: 16px; z-index: 2; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; background: rgba(232,220,200,0.1); color: var(--sand-dim); }
.card-mock { height: 230px; border-radius: 12px; padding: 16px 18px 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; margin-bottom: 14px; transform: translateZ(28px); }
.t-hvac  .card-mock { background: linear-gradient(150deg, #0d2233, #17394f); }
.t-roof  .card-mock { background: linear-gradient(150deg, #2a160e, #4b2717); }
.t-land  .card-mock { background: linear-gradient(150deg, #14230f, #2b451c); }
.t-plumb .card-mock { background: linear-gradient(150deg, #101a2b, #1e3050); }
.t-rest  .card-mock { background: linear-gradient(150deg, #2b1010, #4d1f1a); }
.t-spa   .card-mock { background: linear-gradient(150deg, #221a26, #3a2e42); }
.cm-you { background: linear-gradient(150deg, #241a2c, #3d2440) !important; border: 1px dashed rgba(232,220,200,0.3); }
.cm-h1 { font-family: var(--serif); font-size: 23px; color: #f2ead9; line-height: 1.08; }
.cm-cta { width: fit-content; font-size: 12px; padding: 8px 14px; border-radius: 999px; background: rgba(232,220,200,0.92); color: #17130f; font-weight: 500; }
.card h4 { font-family: var(--serif); font-weight: 400; font-size: 19px; }
.card p { font-size: 14px; color: var(--sand-dim); margin-top: 5px; }

/* ---------- offer ---------- */
.offer { padding: clamp(36px, 6vh, 66px) 5vw; --fire-glow: 0; }
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: 1300px; margin: 0 auto; align-items: stretch; }
.tier { padding: 30px 24px; display: flex; flex-direction: column; position: relative; transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .35s; }
.tier:hover { transform: translateY(-6px); border-color: rgba(232,220,200,0.22); }
.tier-star:hover { transform: translateY(-14px); }
.tier h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; }
.tier-kind { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--terra); margin-bottom: 12px; }
.tier-price { margin: 14px 0 12px; font-family: var(--serif); font-size: 32px; font-weight: 300; color: var(--sand); }
.price-once { font-family: var(--sans); font-size: 13px; color: var(--sand-dim); margin-left: 7px; }
.tier-mo {
  font-size: 14px; line-height: 1.55; color: var(--sand-dim);
  padding-bottom: 18px; margin-bottom: 6px; border-bottom: 1px solid rgba(232,220,200,0.1);
}
.tier-mo b { color: var(--sand); font-weight: 500; }
.tier-mo-svc b { color: var(--gold); }
.offer-note { max-width: 1300px; margin: 20px auto 0; font-size: 14px; line-height: 1.6; color: var(--sand-dim); }
.offer-note b { color: var(--sand); font-weight: 500; }
.tier-price span:last-child { font-family: var(--sans); font-size: 13.5px; color: var(--sand-dim); margin-left: 6px; }
.tier ul { list-style: none; margin-bottom: 28px; flex: 1; }
.tier li { padding: 9px 0 9px 26px; position: relative; font-size: 14px; color: var(--sand-dim); border-bottom: 1px dashed rgba(232,220,200,0.09); }
.tier li::before { content: "→"; position: absolute; left: 0; color: var(--terra); }
.tier li b { color: var(--sand); font-weight: 500; }
.tier-star {
  border-color: rgba(201,111,74,0.55);
  box-shadow: 0 0 calc(20px + 40px * var(--fire-glow, 0)) rgba(201,111,74, calc(0.12 + 0.25 * var(--fire-glow, 0)));
  transform: translateY(-8px);
}
.tier-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--terra); color: #14100d; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 16px; border-radius: 999px; white-space: nowrap; }
.care-strip { max-width: 1300px; margin: 26px auto 0; padding: 26px 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.care-item { font-size: 14px; color: var(--sand-dim); }
.care-item b { color: var(--sand); font-weight: 500; }
.care-noh b { color: #86c9a8; }

/* ---------- process ---------- */
.process { padding: clamp(36px, 6vh, 66px) 5vw; position: relative; }
.sun-arc { max-width: 1300px; margin: 0 auto -30px; }
.sun-arc svg { width: 100%; height: clamp(80px, 10vw, 140px); display: block; }
#arc-sun { filter: drop-shadow(0 0 14px rgba(255,217,160,0.9)); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; max-width: 1300px; margin: 0 auto; counter-reset: step; }
.step { padding: 26px 20px; opacity: 0.35; transform: translateY(14px); transition: opacity .38s ease-out, transform .38s ease-out, border-color .38s; }
.step.on { opacity: 1; transform: translateY(0); border-color: rgba(201,111,74,0.4); }
.step-day { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--terra-hot); margin-bottom: 12px; }
.step h4 { font-family: var(--serif); font-weight: 400; font-size: 19px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--sand-dim); }

/* ---------- guarantee ---------- */
.guarantee { padding: clamp(36px, 6vh, 66px) 5vw; }
.g-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1300px; margin: 0 auto; }
.g-card { padding: 34px 30px; }
.g-num { font-family: var(--serif); font-size: 15px; color: var(--terra); margin-bottom: 16px; }
.g-card h4 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin-bottom: 10px; }
.g-card p { font-size: 14px; color: var(--sand-dim); }

/* ---------- about ---------- */
.about { padding: clamp(36px, 6vh, 66px) 5vw; position: relative; }
.about::before {
  content: ""; position: absolute; inset: 2vh 0;
  background: radial-gradient(ellipse 58% 78% at 50% 50%, rgba(11,8,16,0.66),
              rgba(11,8,16,0.30) 56%, transparent 78%);
  pointer-events: none;
}
.about-inner { max-width: 880px; margin: 0 auto; text-align: left; position: relative; display: flex; align-items: center; gap: 40px; }
.about-photo { width: 172px; height: 172px; flex: 0 0 172px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(232,220,200,0.22); box-shadow: 0 12px 44px rgba(11,8,16,0.62); }
.about-copy { flex: 1 1 auto; min-width: 0; }
.about-contact { display: flex; gap: 24px; flex-wrap: wrap; }
.about-contact a { color: var(--sand); border-bottom: 1px solid rgba(232,220,200,0.32); padding-bottom: 2px; text-shadow: 0 1px 14px rgba(11,8,16,0.85); }
.about-contact a:hover { color: var(--terra-hot); border-bottom-color: var(--terra-hot); }
.about-inner .section-title { text-shadow: 0 2px 34px rgba(11,8,16,0.8); }
.about-inner p { margin-top: 3.4vh; font-size: clamp(15px, 1.1vw, 17px); color: var(--sand); opacity: .92; text-shadow: 0 1px 14px rgba(11,8,16,0.85); }
.about-sig { font-family: var(--serif); font-style: italic; color: var(--terra-hot) !important; }

/* ---------- CTA ----------
   the dawn sky behind this section is BRIGHT - text sits on a soft dark scrim
   so it reads at every phase of the transition */
.preview-cta { padding: clamp(36px, 6vh, 66px) 5vw; position: relative; }
.preview-cta::before {
  content: ""; position: absolute; inset: 6vh 0;
  background: radial-gradient(ellipse 62% 78% at 50% 42%, rgba(11,8,16,0.62), rgba(11,8,16,0.28) 55%, transparent 78%);
  pointer-events: none;
}
.pc-inner { max-width: 860px; margin: 0 auto; text-align: center; position: relative; }
.pc-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 3vh; text-shadow: 0 1px 18px rgba(11,8,16,0.9); }
.pc-title { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 4.4vw, 62px); line-height: 1.03; text-shadow: 0 2px 34px rgba(11,8,16,0.65); }
.pc-title em { color: var(--terra-hot); }
.pc-sub { margin: 3.4vh auto 5vh; color: var(--sand); opacity: 0.92; max-width: 560px; font-size: 16px; text-shadow: 0 1px 14px rgba(11,8,16,0.8); }
.pc-form { padding: clamp(22px, 3.4vw, 44px); text-align: left; }
.pc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.pc-field { display: flex; flex-direction: column; gap: 8px; }
.pc-field span { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sand-dim); }
.pc-field input {
  background: rgba(232,220,200,0.05); border: 1px solid rgba(232,220,200,0.14); border-radius: 12px;
  padding: 15px 16px; color: var(--sand); font-family: var(--sans); font-size: 15px; outline: none;
  transition: border-color .3s, background-color .3s, box-shadow .3s;
}
.pc-field input::placeholder { color: rgba(185,173,151,0.45); }
.pc-field input:focus { border-color: var(--terra); background: rgba(232,220,200,0.09); box-shadow: 0 0 0 4px rgba(201,111,74,0.12); }
.pc-form .btn-big { width: 100%; justify-content: center; margin-top: 8px; }
.pc-alt { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--sand-dim); }
.pc-alt a { color: var(--sand); }

/* ---------- footer ---------- */
.footer { padding: clamp(36px, 6vh, 66px) 5vw clamp(24px, 4vh, 40px); border-top: 1px solid rgba(232,220,200,0.08); background: rgba(11,8,16,0.55); }
.f-word {
  font-family: var(--serif); font-weight: 300; letter-spacing: 0.04em;
  font-size: clamp(40px, 7vw, 104px); line-height: 0.95; text-align: center;
  color: transparent; -webkit-text-stroke: 1px rgba(232,220,200,0.25);
  transition: color .6s;
  display: flex; justify-content: center; gap: 0.22em; flex-wrap: wrap;
}
.f-word:hover { color: rgba(232,220,200,0.9); -webkit-text-stroke: 1px transparent; }
.f-word .f-accent:hover { color: var(--terra-hot); }
.f-meta { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 5vh; font-size: 12px; letter-spacing: 0.1em; color: rgba(232,220,200,0.4); }
.f-meta a { color: inherit; }
.f-meta a:hover { color: var(--sand); }

/* ---------- reveal primitives (JS adds .in) ---------- */
.js .reveal, .js .reveal-up { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); }
.js .reveal.in, .js .reveal-up.in { opacity: 1; transform: translateY(0); }
.js .st-mask > span { transform: translateY(110%); transition: transform .9s cubic-bezier(.22,1,.36,1); }
.js .st-mask.in > span { transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 7vw 5vw; }
  .tiers { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
  .tier-star { transform: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .g-cards { grid-template-columns: 1fr; max-width: 560px; }
  .care-strip { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .tiers { grid-template-columns: 1fr; max-width: 460px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .stat p { max-width: none; }
  .nav { padding: 16px 5vw; }
  .nav-links { display: none; }
  .hero-coords { display: none; }
  .pc-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .ba { height: 62vh; }
  .about-inner { flex-direction: column; text-align: center; gap: 26px; }
  .about-contact { justify-content: center; }
  .about-photo { width: 132px; height: 132px; flex-basis: 132px; }
  .marquee-track span { font-size: 13px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .pulse-dot { animation: none; }
  .hero-scrollcue span { animation: none; }
  .js .reveal, .js .reveal-up, .js .st-mask > span { opacity: 1 !important; transform: none !important; transition: none !important; }
  .step { opacity: 1; transform: none; }
}

/* the mock has a fixed height, so on a short window it sheds its optional rows instead of overflowing */
@media (max-height: 900px) {
  .mock-after .mock-body { padding: clamp(14px, 2vw, 24px); gap: 14px; }
  .ma-trust { display: none; }
}
@media (max-height: 760px) {
  .ma-stats { display: none; }
  .ma-links { display: none; }
}

/* the BEFORE pane: an authentically bad 1998 page */
.mock-before .mock-body { background: #cfe8cf; font-family: "Times New Roman", Times, serif; padding: 10px 14px; overflow: hidden; }
.mock-before .mock-bar { background: #c9c9c9; }
.mock-before .mock-bar i { background: #9a9a9a; }
.mock-before .mock-bar em { color: #444; font-family: "Times New Roman", Times, serif; }
.mb-banner { text-align: center; background: #ffff00; color: #cc0000; font-weight: 700; font-size: 12px; letter-spacing: .06em; padding: 3px; border: 2px ridge #cc0000; }
.mb-sub { text-align: center; color: #006600; font-size: 12.5px; font-style: italic; margin-top: 4px; }
.mb-nav { text-align: center; margin: 8px 0; font-size: 13px; color: #333; }
.mb-nav a { color: #0000ee; text-decoration: underline; }
.mb-para { color: #000; font-size: 13px; line-height: 1.35; margin: 8px 6%; text-align: center; }
.mb-blink { text-align: center; color: #cc0000; font-weight: 700; font-size: 15px; margin-top: 8px; animation: mbblink 1.1s steps(1) infinite; }
@keyframes mbblink { 0%,49% { opacity: 1 } 50%,100% { opacity: .15 } }
.mb-hr { height: 4px; margin: 10px 8%; background: repeating-linear-gradient(90deg, #cc0000 0 10px, #0000cc 10px 20px); }
.mb-updated { text-align: center; color: #444; font-size: 10.5px; margin-top: 6px; font-family: "Times New Roman", Times, serif; }
@media (prefers-reduced-motion: reduce) { .mb-blink { animation: none; } }

/* ---------- process reads as a TIMELINE, not five identical boxes ---------- */
.steps { position: relative; padding-top: 38px; }
.steps::before {
  content: ""; position: absolute; top: 8px; left: 9%; right: 9%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,111,74,0.5) 10%, rgba(201,111,74,0.5) 90%, transparent);
}
.step { position: relative; }
.step::before {
  content: ""; position: absolute; top: -34px; left: 50%; margin-left: -5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(201,111,74,0.35); box-shadow: 0 0 0 4px rgba(11,8,16,0.9);
  transition: background .38s ease-out, transform .38s ease-out;
}
.step.on::before { background: var(--terra); transform: scale(1.18); }
/* day 7 is the payoff, so it terminates the line instead of repeating it */
.step:last-child { border-color: rgba(232,220,200,0.3); background: rgba(28,22,20,0.82); }
.step:last-child.on::before {
  background: #f3e8d4; box-shadow: 0 0 0 4px rgba(11,8,16,0.9), 0 0 16px rgba(243,232,212,0.55);
  transform: scale(1.5);
}
@media (max-width: 900px) { .steps::before, .step::before { display: none; } .steps { padding-top: 0; } }

/* ---------- the guarantee row is EDITORIAL, deliberately not another card row ---------- */
.g-card {
  background: none; border: none; border-radius: 0;
  border-top: 1px solid rgba(232,220,200,0.22);
  padding: 22px 0 0; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.g-num {
  font-family: var(--serif); font-size: 34px; line-height: 1;
  color: var(--terra); opacity: .55; margin-bottom: 14px;
}
.g-card h4 { font-size: 23px; }

/* the guarantee row is editorial, but it sits over the brightest part of the sky,
   so it needs its own scrim rather than a card behind each item */
.guarantee { position: relative; }
.guarantee::before {
  content: ""; position: absolute; inset: -2vh 0;
  background: radial-gradient(ellipse 70% 92% at 50% 50%, rgba(11,8,16,0.72), rgba(11,8,16,0.42) 58%, transparent 82%);
  pointer-events: none;
}
.g-cards { position: relative; }
.g-card h4 { text-shadow: 0 1px 18px rgba(11,8,16,0.9); }
.g-card p { color: #d8cdb9; text-shadow: 0 1px 14px rgba(11,8,16,0.95), 0 0 3px rgba(11,8,16,0.7); }
.g-num { text-shadow: 0 1px 14px rgba(11,8,16,0.85); }
.g-card { border-top-color: rgba(232,220,200,0.34); }

/* ---------- demo card mocks wear their real site's palette ----------
   a preview that does not look like the page it opens is a broken promise */
.t-griego .card-mock { background: linear-gradient(150deg, #151A1F 0%, #0B0F12 100%); }
.t-griego .cm-bar i { background: rgba(255,255,255,0.18); }
.t-griego .cm-bar em { color: rgba(226,232,238,0.5); }
.t-griego .cm-h1 { font-family: var(--sans); font-weight: 700; letter-spacing: -0.02em; color: #FFFFFF; }
.t-griego .cm-chips span { border-color: rgba(255,255,255,0.2); color: rgba(214,223,231,0.78); border-radius: 6px; }
.t-griego .cm-cta { background: #C21E32; color: #fff; font-weight: 600; border-radius: 8px; }

.t-sereno .card-mock { background: linear-gradient(150deg, #FBF9F5 0%, #F0EDE6 100%); }
.t-sereno .cm-bar i { background: #CFC7B8; }
.t-sereno .cm-bar em { color: #877F71; }
.t-sereno .cm-h1 { color: #1E2721; }
.t-sereno .cm-chips span { border-color: rgba(30,39,33,0.22); color: #4C5B51; }
.t-sereno .cm-cta { background: #3B5245; color: #F7F4EF; }

/* Montoya's real site is warm charcoal on oat paper with IBM Plex, NOT the verdigris
   invented here first: side by side with Sereno the two cards read as one design. */
.t-montoya .card-mock { background: linear-gradient(150deg, #EDE9E0 0%, #DED8C9 100%); }
.t-montoya .cm-bar i { background: #BDB5A4; }
.t-montoya .cm-bar em { color: #6F695C; font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0; }
.t-montoya .cm-h1 { color: #3A3830; }
.t-montoya .cm-chips span {
  border: none; border-left: 2px solid #8C877C; border-radius: 0; padding: 3px 0 3px 8px;
  color: #55503F; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px;
  letter-spacing: .04em; text-transform: uppercase; background: none;
}
.t-montoya .cm-chips { gap: 14px; }
.t-montoya .cm-cta {
  background: none; color: #3A3830; border-radius: 0; padding: 7px 0;
  border-top: 1px solid #3A3830; border-bottom: 1px solid #3A3830;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
}
