/* =============================================================
   LONGHORN IRRIGATION CO.  ·  AI SYSTEMS
   Brand-matched: white page · black type · blue water · tan horn
   ============================================================= */

:root {
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --bg-3: #eef1f5;

  --ink: #0a0a0a;
  --ink-2: #1c1f24;
  --text: #0a0a0a;
  --muted: #5a6577;
  --muted-2: #8a96a8;

  --surface: rgba(10, 16, 30, 0.035);
  --surface-2: rgba(10, 16, 30, 0.06);
  --line: rgba(10, 16, 30, 0.10);
  --line-strong: rgba(10, 16, 30, 0.18);

  --water: #1f6fd0;        /* logo water-droplet blue */
  --water-2: #4a9eff;      /* lighter water highlight  */
  --horn:  #caa977;        /* logo horn / bone tan     */
  --horn-2:#a07e44;        /* darker horn outline      */
  --accent: var(--water);
  --accent-2: var(--water-2);
  --accent-3: var(--horn);

  --display-bg: #07121f;   /* dark "monitor" inset bg  */
  --display-bg-2:#0c1a2c;

  --shadow-soft: 0 2px 6px rgba(10,16,30,.04), 0 18px 40px -18px rgba(10,16,30,.12);
  --shadow-deep: 0 6px 14px rgba(10,16,30,.06), 0 36px 80px -22px rgba(10,16,30,.18);
  --shadow-display: 0 30px 80px -20px rgba(7,18,31,.55), inset 0 1px 0 rgba(255,255,255,.06);

  --r: 14px;
  --r-lg: 22px;
  --container: 1280px;
  --pad: clamp(20px, 4vw, 40px);
  --section-y: clamp(80px, 12vh, 140px);
  --ease: cubic-bezier(.22,.8,.2,1);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
*::selection { background: rgba(31,111,208,.22); color: var(--ink); }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  perspective: 1600px;
  perspective-origin: 50% 30%;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(31,111,208,.10), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(202,169,119,.12), transparent 60%),
    var(--bg);
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: 2;
}

.skip {
  position: fixed; top: -100px; left: 16px; z-index: 1000;
  background: var(--water); color: #fff; padding: 10px 16px;
  border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 16px; }

/* ============ GLOBAL BACKDROP FX ============ */
.bg-fx {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.bg-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(10,16,30,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,16,30,0.045) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  animation: gridDrift 80s linear infinite;
}
@keyframes gridDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 600px, 600px 0; }
}
.bg-glow {
  position: absolute;
  width: 760px; height: 760px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: .45;
}
.glow-1 {
  background: radial-gradient(circle, rgba(31,111,208,.7), transparent 60%);
  top: -260px; left: -240px;
}
.glow-2 {
  background: radial-gradient(circle, rgba(202,169,119,.7), transparent 60%);
  bottom: -260px; right: -200px;
}
.bg-noise { display: none; }

/* ============ HEADER / NAV ============ */
#site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: all .4s var(--ease);
}
#site-header.scrolled {
  padding: 10px 0;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 50px -30px rgba(10,16,30,.25);
}
.nav-row { display: flex; align-items: center; gap: 24px; }

.brand {
  display: flex; align-items: center; gap: 14px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-mark {
  width: 56px; height: 36px;
  filter: drop-shadow(0 4px 10px rgba(10,16,30,.15));
}
.brand-text {
  display: flex; flex-direction: column;
  font-weight: 800; letter-spacing: .12em; font-size: 14px;
  line-height: 1;
  color: var(--ink);
}
.brand-sub {
  font-weight: 500; font-size: 9px; letter-spacing: .22em;
  color: var(--muted); margin-top: 4px;
}
#primary-nav { margin-left: auto; }
#primary-nav ul { display: flex; gap: 6px; }
#primary-nav a {
  display: block;
  padding: 10px 16px;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted);
  border-radius: 999px;
  transition: all .25s var(--ease);
}
#primary-nav a:hover { color: var(--ink); background: var(--surface); }
.nav-cta { white-space: nowrap; }

.hamburger {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 42px; height: 42px;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid transparent;
  transition: all .35s var(--ease);
  transform-style: preserve-3d;
  position: relative;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn-primary {
  background: linear-gradient(180deg, #2f86e6, #1554a8);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    0 14px 30px -10px rgba(31,111,208,.45),
    0 0 0 1px rgba(31,111,208,.35);
}
.btn-primary:hover {
  transform: translateY(-2px) translateZ(20px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    0 22px 50px -10px rgba(31,111,208,.6),
    0 0 0 1px rgba(31,111,208,.55);
}
.btn-ghost {
  background: rgba(255,255,255,.7);
  border-color: var(--line-strong);
  color: var(--ink);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: #fff;
  border-color: var(--water);
  transform: translateY(-2px);
}
.btn-block { width: 100%; justify-content: center; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 0; color: var(--ink); }
.display {
  font-size: clamp(54px, 9vw, 132px);
  display: flex; flex-direction: column;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.display span:first-child { color: var(--ink); }
.display-2 {
  font-size: clamp(34px, 5.4vw, 68px);
  letter-spacing: -.025em;
}
.grad {
  background: linear-gradient(120deg, #1f6fd0 0%, #4a9eff 55%, #caa977 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
h3 { font-size: 20px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--water);
  margin: 0 0 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--water);
  box-shadow: 0 0 12px rgba(31,111,208,.7);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.85); }
}
.lede {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--muted);
  max-width: 720px;
  margin: 18px 0 0;
}
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--muted); }

/* ============ SCENE / SECTION DEPTH ============ */
.scene {
  position: relative;
  transform-style: preserve-3d;
}
.section { padding: var(--section-y) 0; position: relative; }
.section-head { max-width: 880px; margin: 0 0 60px; }
.section-head .lede { margin-top: 24px; }

.reveal { opacity: 0; transform: translate3d(0, 60px, -80px) rotateX(6deg); transition: all 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: translate3d(0,0,0) rotateX(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bg-grid { animation: none; }
}

/* ============ HERO ============ */
.scene-hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(31,111,208,.06), transparent 70%),
    linear-gradient(180deg, #fafbfd 0%, #ffffff 60%);
}
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.scene-fog {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(255,255,255,.65) 85%),
    linear-gradient(180deg, transparent 70%, #ffffff 100%);
  z-index: 1; pointer-events: none;
}
.hero-inner {
  text-align: center;
  z-index: 3;
  padding-top: 40px;
}
.hero-inner .display { align-items: center; }
.tagline {
  font-size: clamp(16px, 1.6vw, 22px);
  color: var(--muted);
  margin: 24px auto 36px;
  letter-spacing: .01em;
}
.hero-ctas {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 880px;
  margin: 0 auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-deep);
}
.hero-stats > div {
  background: rgba(255,255,255,.85);
  padding: 22px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.hero-stats strong {
  font-size: clamp(22px, 3vw, 34px); font-weight: 800;
  background: linear-gradient(180deg, #0a0a0a, #5a6577);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-stats span { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.hud-corner {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--water);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(31,111,208,.25);
  padding: 6px 10px;
  border-radius: 6px;
  z-index: 4;
  backdrop-filter: blur(8px);
}
.hud-corner.tl { top: 92px; left: 24px; }
.hud-corner.tr { top: 92px; right: 24px; }
.hud-corner.bl { bottom: 90px; left: 24px; }
.hud-corner.br { bottom: 90px; right: 24px; }

.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  z-index: 4;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--water);
  border-radius: 4px;
  animation: scrollBob 1.8s var(--ease) infinite;
  box-shadow: 0 0 10px rgba(31,111,208,.6);
}
@keyframes scrollBob {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(14px); opacity: .3; }
}

/* ============ PANELS / TILT / DEPTH ============ */
.panel {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #f9fafc);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  transform-style: preserve-3d;
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.panel-deep {
  position: relative;
  background: linear-gradient(180deg, var(--display-bg-2), var(--display-bg));
  border: 1px solid rgba(31,111,208,.2);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-display);
  transform-style: preserve-3d;
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
  color: #e4ecf6;
}
.panel-deep .mono { color: rgba(255,255,255,.55); }
.panel::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(31,111,208,.06), transparent 40%);
  pointer-events: none;
}
.tilt { will-change: transform; }
.panel.tilt:hover {
  border-color: rgba(31,111,208,.35);
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(31,111,208,.18);
}
.panel-deep.tilt:hover {
  border-color: rgba(74,158,255,.5);
  box-shadow: var(--shadow-display), 0 0 0 1px rgba(74,158,255,.4);
}

/* ============ PLATFORM GRID ============ */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 22px;
}
.platform-grid .panel { padding: 28px; }
.panel-num {
  font-family: var(--mono);
  font-size: 11px; color: var(--water);
  letter-spacing: .2em;
  margin-bottom: 24px;
}
.platform-grid h3 { margin-bottom: 12px; font-size: 22px; }
.platform-grid p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.panel-tag {
  display: inline-block;
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  text-transform: uppercase;
}

/* ============ FEATURE TWO COL ============ */
.two-col-feature {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
  align-items: center;
}
.two-col-feature.reverse > :first-child { order: 2; }
.feature-copy h2 { margin-bottom: 20px; }
.feature-copy p { color: var(--muted); font-size: 17px; margin: 0 0 24px; max-width: 520px; }
.check-list { display: grid; gap: 14px; }
.check-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; color: var(--ink);
  padding-left: 28px;
  position: relative;
}
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--water) 30%, transparent 35%);
  border: 1px solid rgba(31,111,208,.4);
}

/* ============ AI CALL UI ============ */
.call-ui {
  display: flex; flex-direction: column; gap: 18px;
  position: relative; z-index: 1;
}
.call-row {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: rgba(255,255,255,.5);
}
.call-status { color: var(--water-2); display: inline-flex; align-items: center; gap: 8px; }
.call-status .pulse {
  width: 8px; height: 8px; background: var(--water-2); border-radius: 50%;
  box-shadow: 0 0 12px var(--water-2);
  animation: pulse 1.5s infinite;
}
.waveform {
  height: 90px;
  display: flex; align-items: center; justify-content: center;
  gap: 3px;
  padding: 0 4px;
  border: 1px solid rgba(74,158,255,.18);
  border-radius: 12px;
  background: rgba(0,0,0,.3);
}
.waveform .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--water-2), var(--water));
  border-radius: 2px;
  min-height: 4px;
  box-shadow: 0 0 8px rgba(74,158,255,.5);
  transition: height .12s var(--ease);
}
.call-transcript {
  font-size: 13px; line-height: 1.6;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 180px; overflow: hidden;
}
.call-transcript p { margin: 0; color: rgba(255,255,255,.65); }
.call-transcript b { color: var(--water-2); font-weight: 600; margin-right: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.call-transcript p:nth-child(even) b { color: var(--horn); }
.typing { color: var(--water-2) !important; }
.dots { display: inline-flex; gap: 3px; margin-left: 4px; }
.dots span {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--water-2);
  animation: dotBob 1.2s infinite;
}
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotBob {
  0%, 100% { transform: translateY(0); opacity: .4; }
  50% { transform: translateY(-3px); opacity: 1; }
}
.call-flow {
  display: flex; align-items: center; gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em;
  color: rgba(255,255,255,.5); text-transform: uppercase;
}
.call-flow span { padding: 5px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; }
.call-flow span.ok { color: #fff; background: var(--water); border-color: var(--water); }
.call-flow i {
  flex: 1; height: 1px; background: linear-gradient(90deg, var(--water-2), transparent);
}

/* ============ LAYOUT ENGINE UI ============ */
.layout-ui { display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.layout-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: rgba(255,255,255,.5);
}
.ok-dot {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  color: var(--water-2);
  text-transform: uppercase;
}
.ok-dot::before {
  content: ""; width: 6px; height: 6px; background: var(--water-2);
  border-radius: 50%; box-shadow: 0 0 10px var(--water-2);
  animation: pulse 1.5s infinite;
}
.layout-canvas-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.4);
}
.layout-svg { width: 100%; height: auto; display: block; }
.layout-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08); border-radius: 10px; overflow: hidden;
}
.layout-stats > div {
  background: rgba(7,18,31,.85);
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.layout-stats span {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: rgba(255,255,255,.5); text-transform: uppercase;
}
.layout-stats b {
  font-size: 18px; font-weight: 700; color: #fff;
}
.head-dot { fill: var(--horn); stroke: #fff; stroke-width: 1; }

/* ============ 3D VIEWER (AUTO LOOP) ============ */

.stage-info {
  position: absolute;
  left: 22px; top: 70px; right: 22px;
  display: flex; align-items: flex-start; gap: 18px;
  pointer-events: none;
  max-width: 560px;
}
.stage-num {
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 800;
  color: var(--water-2);
  line-height: 1;
  text-shadow: 0 2px 24px rgba(31,111,208,.5);
  min-width: 70px;
}
.stage-text h4 {
  color: #fff;
  font-size: 26px;
  margin: 4px 0 8px;
  letter-spacing: -.01em;
}
.stage-text p {
  color: rgba(255,255,255,.75);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  max-width: 440px;
}
.stage-progress {
  position: absolute;
  left: 22px; right: 22px; bottom: 22px;
  display: flex; align-items: center; gap: 18px;
  pointer-events: none;
}
.stage-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  overflow: hidden;
}
.stage-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--water), var(--water-2));
  border-radius: 999px;
  transition: width .12s linear;
  box-shadow: 0 0 12px rgba(74,158,255,.6);
}
.stage-dots {
  display: flex; gap: 8px;
}
.stage-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  transition: all .25s var(--ease);
}
.stage-dots span.active {
  background: var(--water-2);
  box-shadow: 0 0 10px var(--water-2);
  transform: scale(1.3);
}

.viewer-frame {
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  padding: 0;
}
@media (max-width: 860px) {
  .viewer-scroller { height: 320vh; }
  .stage-info { top: 60px; left: 16px; right: 16px; gap: 12px; }
  .stage-num { font-size: 30px; min-width: 50px; }
  .stage-text h4 { font-size: 18px; }
  .stage-text p { font-size: 12px; }
}
.viewer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.4);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: rgba(255,255,255,.6);
}
#viewer-canvas {
  width: 100%;
  height: 520px;
  display: block;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(31,111,208,.12), transparent 60%),
    linear-gradient(180deg, #06101c, #0a1828);
}
.viewer-overlay {
  position: absolute; left: 22px; right: 22px; bottom: 22px;
  display: flex; justify-content: space-between; align-items: end;
  pointer-events: none;
}
.vlegend {
  display: flex; gap: 18px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: rgba(255,255,255,.65); text-transform: uppercase;
}
.vlegend i {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}
.vhint {
  font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,.5);
  letter-spacing: .14em; text-transform: uppercase;
}

/* ============ COST ENGINE ============ */
.cost-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.cost-card { padding: 32px; }
.cost-head {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  color: var(--muted); text-transform: uppercase;
  margin-bottom: 18px;
}
.cost-total {
  font-size: clamp(40px, 5vw, 60px); font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 26px;
  display: flex; align-items: center; gap: 14px;
  color: var(--muted-2);
}
.cost-card-ai .cost-total {
  background: linear-gradient(120deg, #1f6fd0, #4a9eff);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.cost-card-ai .cost-head { color: rgba(255,255,255,.55); }
.cost-save {
  font-size: 14px; padding: 6px 12px; border-radius: 999px;
  background: rgba(31,111,208,.16);
  color: var(--water-2);
  border: 1px solid rgba(74,158,255,.4);
  letter-spacing: .04em;
  -webkit-text-fill-color: var(--water-2);
}
.cost-rows { display: flex; flex-direction: column; }
.cost-rows li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.cost-card-ai .cost-rows li {
  border-bottom-color: rgba(255,255,255,.08);
  color: rgba(255,255,255,.55);
}
.cost-rows li:last-child { border-bottom: 0; }
.cost-rows b {
  color: var(--ink); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.cost-card-ai .cost-rows b { color: #fff; }
.cost-rows em {
  font-style: normal; font-family: var(--mono); font-size: 10px;
  color: var(--water-2); letter-spacing: .08em;
  padding: 2px 6px; background: rgba(74,158,255,.14);
  border-radius: 4px;
}

/* Cost callout — content marketing angle */
.cost-callout {
  margin-top: 28px;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 28px 30px;
}
.cost-callout-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(31,111,208,.18), rgba(202,169,119,.18));
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--water);
}
.cost-callout-icon svg { width: 26px; height: 26px; }
.cost-callout-body h4 {
  font-size: 19px;
  margin: 2px 0 8px;
  letter-spacing: -.01em;
}
.cost-callout-body p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 720px;
}
@media (max-width: 720px) {
  .cost-callout { flex-direction: column; gap: 14px; padding: 24px; }
}

/* ============ PIPELINE ============ */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pstep {
  flex: 1 1 0;
  min-width: 160px;
  padding: 24px 20px;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  border: 1px solid var(--line);
  border-radius: var(--r);
  position: relative;
  transform-style: preserve-3d;
  transition: all .4s var(--ease);
  box-shadow: var(--shadow-soft);
}
.pstep:hover {
  transform: translateY(-6px) translateZ(20px);
  border-color: rgba(31,111,208,.35);
  box-shadow: 0 20px 60px -20px rgba(31,111,208,.3);
}
.pstep.active {
  border-color: var(--water);
  box-shadow: 0 0 0 1px var(--water), 0 22px 60px -20px rgba(31,111,208,.5);
}
.pn {
  font-family: var(--mono); font-size: 11px; color: var(--water);
  letter-spacing: .18em;
}
.pstep h4 { margin: 14px 0 6px; font-size: 16px; }
.pstep p { color: var(--muted); font-size: 13px; margin: 0; }
.pline {
  flex: 0 0 30px;
  align-self: center;
  height: 1px;
  background: linear-gradient(90deg, var(--water), transparent);
  position: relative;
}
.pline::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--water); transform: translateY(-50%);
  box-shadow: 0 0 8px rgba(31,111,208,.6);
}

/* ============ DEMO ============ */
.demo-frame { padding: 0; overflow: hidden; }
.demo-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 14px;
  padding: 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.35);
  align-items: end;
}
.demo-controls label { display: flex; flex-direction: column; gap: 6px; }
.demo-controls span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  color: rgba(255,255,255,.55); text-transform: uppercase;
}
.demo-controls input,
.demo-controls select {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  color: #fff;
  outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.demo-controls input:focus,
.demo-controls select:focus {
  border-color: var(--water-2);
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 0 3px rgba(74,158,255,.2);
}
.demo-controls select option { background: #07121f; color: #fff; }
.demo-canvas-wrap {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(31,111,208,.07), transparent 70%),
    #06101c;
  padding: 20px;
}
#demoSvg { width: 100%; height: auto; display: block; border-radius: 10px; }
#demoYard rect, #demoYard path {
  fill: rgba(31,111,208,.06);
  stroke: rgba(74,158,255,.5);
  stroke-dasharray: 4 6;
}
.demo-readout {
  display: grid; grid-template-columns: repeat(5,1fr);
  gap: 1px;
  background: rgba(255,255,255,.08);
  border-top: 1px solid rgba(255,255,255,.08);
}
.demo-readout > div {
  background: rgba(7,18,31,.92);
  padding: 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.demo-readout span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  color: rgba(255,255,255,.55); text-transform: uppercase;
}
.demo-readout b {
  font-size: 22px; color: #fff; font-weight: 700;
}

/* ============ DEMO TEASER ============ */
.demo-tease { position: relative; }
.demo-tease-canvas {
  position: relative;
  padding: 30px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(31,111,208,.10), transparent 70%),
    #06101c;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.demo-tease-canvas > svg {
  width: 100%; height: auto; display: block;
  filter: blur(1.5px) saturate(.85);
  opacity: .55;
}
.demo-tease-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 40px 24px;
  gap: 14px;
  background: linear-gradient(180deg, rgba(7,18,31,.2), rgba(7,18,31,.55));
}
.lock-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(74,158,255,.4);
  background: rgba(74,158,255,.12);
  color: var(--water-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.lock-badge svg { width: 14px; height: 14px; flex-shrink: 0; }
.tease-title {
  font-size: clamp(26px, 3.4vw, 40px);
  color: #fff;
  margin: 6px 0 2px;
  letter-spacing: -.02em;
}
.tease-sub {
  font-size: 15px;
  color: rgba(255,255,255,.65);
  max-width: 460px;
  margin: 0 0 14px;
  line-height: 1.55;
}
.demo-tease-overlay .btn-primary { margin-top: 6px; }

/* ============ TESTIMONIALS ============ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.testimonial {
  display: flex; flex-direction: column;
  gap: 18px;
  padding: 32px 28px;
}
.testimonial .stars {
  color: var(--horn);
  font-size: 18px;
  letter-spacing: 4px;
}
.testimonial p {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  flex: 1;
}
.testimonial footer {
  display: flex; flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.testimonial footer strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.testimonial footer span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
}
@media (max-width: 1080px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}

/* ============ SERVICES (3D objects) ============ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 22px;
}
.service-card {
  background: linear-gradient(180deg, #ffffff, #f8fafd);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  transform-style: preserve-3d;
  transition: all .4s var(--ease);
  box-shadow: var(--shadow-soft);
  cursor: default;
}
.service-card:hover {
  border-color: rgba(31,111,208,.35);
  transform: translateY(-6px) translateZ(20px);
  box-shadow: 0 30px 70px -20px rgba(31,111,208,.25);
}
.card-3d {
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  transform-style: preserve-3d;
}
.svc-obj {
  width: 110px; height: 110px;
  filter: drop-shadow(0 18px 30px rgba(31,111,208,.25));
  animation: floatY 6s ease-in-out infinite;
  transform-style: preserve-3d;
}
.service-card:nth-child(2) .svc-obj { animation-delay: .8s; }
.service-card:nth-child(3) .svc-obj { animation-delay: 1.6s; }
.service-card:nth-child(4) .svc-obj { animation-delay: 2.4s; }
@keyframes floatY {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}
.service-card h3 { margin-bottom: 8px; }
.service-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* ============ CONTACT ============ */
.contact-wrap { align-items: start; }
.contact-direct {
  display: flex; flex-direction: column; gap: 12px;
  margin: 30px 0;
}
.contact-link {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 22px;
  border-radius: 14px;
  transition: all .35s var(--ease);
  text-decoration: none;
}
a.contact-link:hover {
  border-color: rgba(31,111,208,.4);
  transform: translateX(6px);
}
.contact-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  color: var(--water); text-transform: uppercase;
}
.contact-value { font-size: 17px; color: var(--ink); font-weight: 600; }

.map-placeholder {
  position: relative;
  height: 200px;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(circle at 40% 50%, rgba(31,111,208,.18), transparent 50%),
    #f3f6fb;
}
.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(10,16,30,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,16,30,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.map-pin {
  position: absolute; top: 50%; left: 40%;
  width: 14px; height: 14px;
  background: var(--water);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(31,111,208,.25), 0 0 0 14px rgba(31,111,208,.12), 0 0 30px var(--water);
  animation: pulse 2s infinite;
}
.map-label {
  position: absolute; bottom: 16px; left: 16px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  color: var(--muted);
}

.contact-form {
  display: flex; flex-direction: column; gap: 16px;
  padding: 30px;
}
.form-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 6px;
}
.contact-form label { display: flex; flex-direction: column; gap: 6px; }
.contact-form span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  color: rgba(255,255,255,.6); text-transform: uppercase;
}
.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  color: #fff;
  outline: none;
  transition: all .25s var(--ease);
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,.4); }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--water-2);
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 0 3px rgba(74,158,255,.2);
}
.form-status {
  margin: 4px 0 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  color: var(--water-2);
  min-height: 16px;
}

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 60px;
  background: #fbfcfe;
  position: relative;
  z-index: 2;
}
.footer-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.brand-footer { color: var(--muted); }
.legal {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: var(--muted); margin: 0;
}
.foot-links {
  display: flex; gap: 18px;
  font-size: 13px; color: var(--muted);
}
.foot-links a:hover { color: var(--ink); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .demo-readout { grid-template-columns: repeat(5,1fr); }
  .pipeline { gap: 12px; }
  .pline { display: none; }
}
@media (max-width: 860px) {
  #primary-nav {
    position: fixed; inset: 70px 16px auto 16px;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    backdrop-filter: blur(20px);
    transform-origin: top right;
    transform: scale(.95) translateY(-10px);
    opacity: 0; pointer-events: none;
    transition: all .3s var(--ease);
    box-shadow: var(--shadow-deep);
  }
  #primary-nav.open {
    transform: scale(1) translateY(0); opacity: 1; pointer-events: auto;
  }
  #primary-nav ul { flex-direction: column; gap: 0; }
  #primary-nav a { padding: 14px 16px; }
  .hamburger { display: flex; }
  .nav-cta { display: none; }
  .two-col-feature { grid-template-columns: 1fr; gap: 40px; }
  .two-col-feature.reverse > :first-child { order: 0; }
  .cost-compare { grid-template-columns: 1fr; }
  .demo-controls { grid-template-columns: repeat(2,1fr); }
  .demo-readout { grid-template-columns: repeat(3,1fr); }
  .hud-corner.bl, .hud-corner.br { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .platform-grid, .service-grid { grid-template-columns: 1fr; }
  .demo-readout { grid-template-columns: repeat(2,1fr); }
  .hud-corner { display: none; }
  .footer-row { flex-direction: column; text-align: center; }
}

/* ================================================================
   COMPREHENSIVE MOBILE OPTIMIZATIONS
   ================================================================ */
@media (max-width: 860px) {
  :root {
    --section-y: clamp(56px, 9vh, 90px);
    --pad: 18px;
  }
  .container { padding: 0 18px; }
  .section-head { margin-bottom: 36px; }
  .display { font-size: clamp(46px, 13vw, 88px); }
  .display-2 { font-size: clamp(28px, 7vw, 48px); }
  h2, h3 { letter-spacing: -.02em; }

  /* Header / nav */
  #site-header { padding: 12px 0; }
  #site-header.scrolled { padding: 8px 0; }
  .brand { gap: 10px; }
  .brand-mark { width: 44px; height: 28px; }
  .brand-text { font-size: 12px; }
  .brand-sub { font-size: 8px; }

  /* Hero */
  .scene-hero { padding: 100px 0 60px; min-height: auto; }
  .hero-inner { padding-top: 20px; }
  .tagline { font-size: 15px; margin: 18px auto 28px; max-width: 320px; }
  .hero-ctas { gap: 10px; margin-bottom: 40px; }
  .hero-ctas .btn { padding: 12px 18px; font-size: 13px; flex: 1 1 auto; min-width: 0; justify-content: center; }
  .hero-stats { max-width: 100%; }
  .hero-stats > div { padding: 16px 10px; }
  .hero-stats strong { font-size: 22px; }
  .hero-stats span { font-size: 9px; }

  /* Buttons */
  .btn { padding: 13px 20px; font-size: 13px; }

  /* Panels & cards */
  .panel, .panel-deep { padding: 22px; }
  .platform-grid { gap: 14px; }
  .platform-grid .panel { padding: 22px; }
  .service-card { padding: 24px 20px; }

  /* Two-col feature */
  .two-col-feature { gap: 32px; }
  .feature-copy h2 { margin-bottom: 14px; }
  .feature-copy p { font-size: 15px; }

  /* AI call panel */
  .call-ui { gap: 14px; }
  .waveform { height: 70px; }
  .call-transcript { font-size: 12px; max-height: 140px; }

  /* Layout engine panel */
  .layout-canvas-wrap { border-radius: 10px; }
  .layout-stats { grid-template-columns: repeat(2, 1fr); }
  .layout-stats > div { padding: 10px 8px; }
  .layout-stats b { font-size: 16px; }

  /* 3D viewer */
  .viewer-frame { border-radius: 16px; }
  .viewer-head { padding: 12px 16px; flex-wrap: wrap; gap: 6px; font-size: 9px; }
  #viewer-canvas { height: 360px; }
  .stage-info { top: 56px; left: 16px; right: 16px; gap: 12px; }
  .stage-num { font-size: 30px; min-width: 44px; }
  .stage-text h4 { font-size: 16px; }
  .stage-text p { font-size: 11px; line-height: 1.5; }
  .stage-progress { left: 16px; right: 16px; bottom: 16px; gap: 12px; }
  .stage-track { height: 2px; }
  .stage-dots span { width: 6px; height: 6px; }

  /* Cost cards */
  .cost-card { padding: 24px; }
  .cost-total { font-size: clamp(34px, 9vw, 48px); margin-bottom: 18px; }
  .cost-rows li { padding: 10px 0; font-size: 13px; }

  /* Workflow pipeline — stack as a vertical list on mobile */
  .pipeline { flex-direction: column; gap: 12px; }
  .pstep {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 18px 18px;
  }
  .pstep:hover { transform: none; }
  .pline { display: none; }

  /* Demo teaser */
  .demo-tease-canvas { padding: 18px; }
  .demo-tease-overlay { padding: 30px 20px; }
  .tease-title { font-size: 22px; }
  .tease-sub { font-size: 13px; }

  /* Services */
  .service-card .card-3d { height: 110px; margin-bottom: 14px; }
  .svc-obj { width: 90px; height: 90px; }

  /* Why grid */
  .why-grid { grid-template-columns: 1fr; gap: 18px; }

  /* Testimonials */
  .testimonial-grid { gap: 14px; }
  .testimonial { padding: 24px 22px; }
  .testimonial p { font-size: 14px; }

  /* Contact */
  .contact-wrap { padding: 0; }
  .contact-direct { gap: 10px; margin: 22px 0; }
  .contact-link { padding: 14px 18px; }
  .contact-value { font-size: 15px; }
  .map-placeholder { height: 160px; }

  /* Footer */
  .footer-row { gap: 14px; text-align: center; }
  .legal { font-size: 9px; }
  .foot-links { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  :root {
    --section-y: clamp(48px, 8vh, 72px);
    --pad: 16px;
  }
  .container { padding: 0 16px; }
  .display { font-size: clamp(40px, 14vw, 64px); }
  .display-2 { font-size: clamp(24px, 7.5vw, 36px); }
  .lede { font-size: 14px; }
  .eyebrow { font-size: 10px; letter-spacing: .18em; }
  .brand-text { font-size: 11px; }
  .brand-sub { font-size: 7px; }
  .brand-mark { width: 38px; height: 24px; }

  /* Hero */
  .scene-hero { padding: 92px 0 48px; }
  .tagline { font-size: 14px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats > div { padding: 14px 8px; }
  .hero-stats strong { font-size: 19px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }

  /* Sections */
  .section-head { margin-bottom: 28px; }
  .panel, .panel-deep { padding: 18px; border-radius: 16px; }
  .platform-grid .panel { padding: 18px; }

  /* Viewer */
  #viewer-canvas { height: 280px; }
  .viewer-head span:nth-child(2) { display: none; }
  .stage-info { flex-direction: column; gap: 4px; top: 50px; }
  .stage-num { font-size: 22px; }
  .stage-text h4 { font-size: 14px; }
  .stage-text p { font-size: 10px; }

  /* Layout panel */
  .layout-stats { grid-template-columns: repeat(2, 1fr); }

  /* Cost */
  .cost-card { padding: 20px; }
  .cost-total { font-size: 32px; }
  .cost-save { font-size: 11px; padding: 4px 10px; }

  /* Pipeline */
  .pstep { padding: 16px; }
  .pstep h4 { font-size: 15px; }
  .pstep p { font-size: 12px; }

  /* Footer */
  .footer-row { flex-direction: column; }
  .brand-footer { justify-content: center; }
}

/* Prevent large responsive canvases/SVGs from causing horizontal overflow.
   Scoped — don't touch explicit-sized icons (buttons, eyebrow dots, brand mark). */
canvas { max-width: 100%; }
.layout-svg, #demoSvg, .demo-tease-canvas > svg { max-width: 100%; height: auto; }
@media (max-width: 860px) { #viewer-canvas { height: 360px !important; } }
@media (max-width: 480px) { #viewer-canvas { height: 280px !important; } }

/* iOS safe area */
@supports (padding: max(0px)) {
  .container { padding-left: max(var(--pad), env(safe-area-inset-left)); padding-right: max(var(--pad), env(safe-area-inset-right)); }
}

/* Make sure body never horizontally scrolls */
html, body { max-width: 100%; overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; }

/* Prevent iOS auto-zoom on input focus (requires ≥16px font-size) */
input, select, textarea { font-size: 16px; }

/* Give interactive elements proper touch-target sizing */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  #primary-nav a { min-height: 44px; display: flex; align-items: center; }
  .contact-link { min-height: 60px; }
  .foot-links a { padding: 6px 2px; }
  /* Disable hover-lift transforms on touch — they stick after tap */
  .panel.tilt:hover, .service-card:hover, .pstep:hover,
  a.contact-link:hover, .btn-primary:hover, .btn-ghost:hover,
  .panel-deep.tilt:hover { transform: none; }
}

/* Ensure canvas fills hero on mobile without breaking aspect */
@media (max-width: 860px) {
  #hero-canvas { width: 100% !important; height: 100% !important; }
  /* Hide brand-sub on tight screens so hamburger always has room */
  .brand-sub { display: none; }
  /* Keep hero CTAs from getting cramped side-by-side on narrow widths */
  .hero-ctas { flex-wrap: wrap; }
  /* Scroll cue can overlap stats on short screens — hide on mobile */
  .scroll-cue { display: none; }
  /* Section padding breathing room */
  .section-head { margin-bottom: 40px; }
  /* Demo controls stack cleanly */
  .demo-controls { grid-template-columns: 1fr 1fr; }
  .demo-controls > button, .demo-controls .btn { grid-column: 1 / -1; }
  /* Keep fixed-header nav menu from running off-edge on very narrow devices */
  #primary-nav { inset: 68px 12px auto 12px; }
}

/* Very narrow phones (iPhone SE, 360dp Android) */
@media (max-width: 380px) {
  .brand-text { font-size: 11px; }
  .btn { padding: 12px 16px; font-size: 12px; gap: 8px; }
  .hero-ctas .btn { width: 100%; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats > div { padding: 14px 8px; }
  /* Testimonials stars / source lines don't wrap weird */
  .testimonial { padding: 22px 18px; }
  /* Cost callout tighter */
  .cost-callout { padding: 20px; gap: 12px; }
}
