/* ============================================================
   Battery Twin — Redesign
   ============================================================ */

:root {
  --bg: #0a0b0d;
  --bg-1: #101216;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --line: #22262e;
  --line-2: #2d323b;
  --text: #f3f5f8;
  --text-2: #b7bdc9;
  --text-3: #7e8593;
  --text-4: #555a66;

  --accent: #3fe8ab;
  --accent-hot: #00ffae;
  --accent-dim: #1d8a5f;
  --accent-glow: rgba(63, 232, 171, 0.18);

  --danger: #ff6b6b;
  --warn: #ffb547;

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

  --maxw: 1280px;
  --pad: clamp(20px, 4vw, 64px);

  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* Typography ---------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 3.6vw, 56px); letter-spacing: -0.035em; font-weight: 600; line-height: 1.05; }
h2 { font-size: clamp(32px, 3.4vw, 52px); letter-spacing: -0.025em; }
h3 { font-size: clamp(22px, 1.8vw, 28px); letter-spacing: -0.015em; }
h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.dim { color: var(--text-3); }
.lead {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 60ch;
  text-wrap: pretty;
}

/* Layout helpers ----------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
section { position: relative; }
.section-pad { padding: clamp(80px, 9vw, 140px) 0; }
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}

/* Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #07120d;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hot); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arrow {
  display: inline-block;
  transition: transform .2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* Nav ---------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 13, 0.7);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 32px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--accent);
  height: 32px;
}
.brand-mark {
  width: 32px; height: 32px;
  flex-shrink: 0;
  color: var(--accent);
  filter: drop-shadow(0 0 12px var(--accent-glow));
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-word {
  height: 18px;
  width: auto;
  color: var(--accent);
}
.brand-word svg { height: 100%; width: auto; display: block; }
.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
  font-size: 14px;
}
.nav-links a {
  color: var(--text-2);
  transition: color .15s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  display: flex; align-items: center; gap: 10px;
}
.nav-cta .btn { height: 38px; padding: 0 16px; font-size: 14px; }

/* Hamburger button (mobile only) ---------------------------- */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  background: transparent;
}
.nav-burger span {
  position: absolute;
  left: 10px;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.nav-burger span:nth-child(1) { top: 14px; }
.nav-burger span:nth-child(2) { top: 19px; }
.nav-burger span:nth-child(3) { top: 24px; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* Mobile menu drawer ---------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 600;
  pointer-events: none;
  visibility: hidden;
}
.mobile-menu.open {
  pointer-events: auto;
  visibility: visible;
}
.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .25s ease;
}
.mobile-menu.open .mobile-menu-backdrop { opacity: 1; }
.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 90vw);
  height: 100vh;
  background: var(--bg-1);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 22px 28px;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
  overflow-y: auto;
}
.mobile-menu.open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.mobile-menu-close {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--text-2);
  transition: color .15s, border-color .15s;
  background: transparent;
  cursor: pointer;
}
.mobile-menu-close:hover { color: var(--accent); border-color: var(--accent); }
.mobile-menu-links {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
}
.mobile-menu-links li { border-bottom: 1px solid var(--line); }
.mobile-menu-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color .15s, padding-left .2s;
}
.mobile-menu-links a:hover { color: var(--accent); padding-left: 8px; }
.mobile-menu-links a::after {
  content: "→";
  color: var(--text-3);
  font-size: 16px;
  font-weight: 400;
  transition: transform .2s, color .2s;
}
.mobile-menu-links a:hover::after { color: var(--accent); transform: translateX(3px); }
.mobile-menu-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: auto;
}
.mobile-menu-cta .btn {
  height: 52px;
  width: 100%;
  justify-content: center;
  font-size: 15px;
}
.mobile-menu-foot {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
}
.mobile-menu-foot .status-pill { margin: 0; }

/* Hero --------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(60px, 9vw, 120px) 0 clamp(60px, 8vw, 100px);
  overflow: hidden;
  isolation: isolate;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 0.9fr);
  gap: clamp(24px, 3vw, 56px);
  align-items: center;
}
.hero-copy { position: relative; }
.hero h1 .accent { color: var(--accent); }
.hero h1 .twin {
  color: var(--accent);
  font-weight: 600;
  position: relative;
  white-space: nowrap;
}
.hero h1 .twin::after {
  /* Base mint underline + bright shine that sweeps left → right periodically */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-image:
    /* Layer 1: base underline */
    linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent) 80%, transparent),
    /* Layer 2: bright shine */
    linear-gradient(90deg, transparent 30%, rgba(255, 255, 255, 0.95) 50%, transparent 70%);
  background-size: 100% 100%, 50% 100%;
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, -60% 0;
  opacity: .85;
  animation: twin-shine 3.6s ease-in-out infinite;
}
.hero h1 .twin::before {
  /* Soft glow that follows the shine */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 10px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(63, 232, 171, 0.5) 0%, transparent 70%) no-repeat;
  background-size: 40% 100%;
  background-position: -40% 50%;
  filter: blur(2px);
  animation: twin-shine-glow 3.6s ease-in-out infinite;
  opacity: .6;
}
@keyframes twin-shine {
  0%   { background-position: 0 0, -60% 0; }
  55%  { background-position: 0 0, 160% 0; }
  100% { background-position: 0 0, 160% 0; }
}
@keyframes twin-shine-glow {
  0%   { background-position: -40% 50%; }
  55%  { background-position: 140% 50%; }
  100% { background-position: 140% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 .twin::after,
  .hero h1 .twin::before { animation: none; }
}
.hero-sub {
  margin-top: 28px;
  font-size: clamp(17px, 1.3vw, 20px);
  color: var(--text-2);
  line-height: 1.5;
  max-width: 55ch;
  text-wrap: pretty;
}
.hero-cta {
  margin-top: 40px;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.hero-tags {
  margin-top: 56px;
  display: flex; flex-wrap: wrap;
  gap: 24px 36px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.hero-tags strong { color: var(--text); font-weight: 500; }
.hero-tags .sep {
  width: 1px; height: 16px;
  background: var(--line);
}

/* Hero visual: middle column — just the BEV stage */
.hero-physical {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(360px, 38vw, 520px);
  overflow: visible;
}
.hero-glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at 50% 55%, var(--accent-glow), transparent 55%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}
.hero-physical .bev {
  width: 130%;
  margin: 0 -15%;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.6));
  transform: rotate(-1deg);
  position: relative;
  z-index: 1;
}
.hp-anchor {
  position: absolute;
  /* Centered on the visible battery pack of the BEV image */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 22px var(--accent);
  pointer-events: none;
  z-index: 4;
}
.hp-anchor::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: anchor-ping 2s infinite ease-out;
}
@keyframes anchor-ping {
  0% { opacity: .9; transform: scale(.6); }
  100% { opacity: 0; transform: scale(2.4); }
}

/* Side labels — sit above each column's content */
.side-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 5px 10px;
  background: rgba(10, 12, 14, .8);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  z-index: 3;
  white-space: nowrap;
}
.side-label-top {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}
.hero-twin .side-label-top { left: 0; transform: none; }
.sl-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.hero-physical .sl-dot {
  background: var(--text-2);
  box-shadow: none;
}

/* Sync line — sits between BEV column and twin column at desktop.
   Anchored to the right edge of the middle column, pointing into the
   gutter toward the twin panel. */
.sync-wrap {
  position: absolute;
  top: 50%;
  right: -16%;             /* extend out into the gap between columns */
  width: 30%;
  height: 4px;
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: none;
}
.sync-line {
  width: 100%;
  height: 4px;
  overflow: visible;
}
.sl-pulse {
  animation: sl-pulse 2.4s infinite linear;
  stroke-linecap: round;
}
@keyframes sl-pulse {
  0%   { transform: translateX(-30%); }
  100% { transform: translateX(100%); }
}
.sync-label {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--accent);
  background: rgba(10, 12, 14, .8);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(63,232,171,.2);
  white-space: nowrap;
}

/* Twin panel — right column */
.hero-twin {
  position: relative;
  width: 100%;
  padding-top: 36px;       /* clearance for the side-label badge */
}
.ht-panel {
  width: 100%;
  background: rgba(10, 12, 14, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(63,232,171,.08);
  transition: border-color .3s, box-shadow .3s;
}
.ht-panel.alert {
  border-color: rgba(255,107,107,.55);
  box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 50px rgba(255,107,107,.18);
}
.ht-panel.warn {
  border-color: rgba(255,181,71,.45);
  box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 50px rgba(255,181,71,.16);
}
.ht-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.ht-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
  letter-spacing: -0.005em;
  flex: 1;
}
.ht-title .ht-sub {
  color: var(--text-3);
  font-weight: 400;
}
.pi-dot.live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pi-pulse 1.8s infinite ease-in-out;
  flex-shrink: 0;
}
.ht-panel.alert .pi-dot.live { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.ht-panel.warn .pi-dot.live { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
@keyframes pi-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.pi-mode {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding: 3px 7px;
  border: 1px solid rgba(63,232,171,.25);
  background: rgba(63,232,171,.06);
  border-radius: 4px;
  transition: color .3s, background .3s, border-color .3s;
  flex-shrink: 0;
}
.ht-panel.alert .pi-mode {
  color: var(--danger);
  border-color: rgba(255,107,107,.35);
  background: rgba(255,107,107,.08);
}
.ht-panel.warn .pi-mode {
  color: var(--warn);
  border-color: rgba(255,181,71,.35);
  background: rgba(255,181,71,.08);
}
.pi-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
}
.pi-cell {
  aspect-ratio: 1 / 1.6;
  border-radius: 3px;
  background: rgba(63, 232, 171, 0.22);
  border: 1px solid rgba(63, 232, 171, 0.45);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: background .35s ease, border-color .35s ease, transform .15s ease, box-shadow .15s ease;
}
.pi-cell::after {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 2px;
  background: rgba(255,255,255,.25);
  border-radius: 2px;
}
.pi-cell:hover, .pi-cell.is-active {
  transform: scale(1.18);
  z-index: 2;
  box-shadow: 0 0 0 1px var(--text), 0 4px 14px rgba(0,0,0,.5);
  border-color: var(--text);
}
.pi-cell[data-state="warn"] {
  background: rgba(255, 181, 71, 0.32);
  border-color: rgba(255, 181, 71, 0.6);
}
.pi-cell[data-state="hot"] {
  background: rgba(255, 107, 107, 0.42);
  border-color: rgba(255, 107, 107, 0.8);
  animation: cell-hot 1.2s infinite ease-in-out;
}
@keyframes cell-hot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0); }
  50% { box-shadow: 0 0 0 3px rgba(255,107,107,.25); }
}
.ht-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pi-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
  text-align: center;
}
.pi-scen {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  background: rgba(255,255,255,.03);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.pi-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  padding: 7px 6px;
  border-radius: 5px;
  transition: background .15s, color .15s;
}
.pi-btn:hover { color: var(--text); }
.pi-btn.active {
  background: var(--accent);
  color: #07120d;
  font-weight: 600;
}

/* Chip color states */
.hero-chip { transition: border-color .3s, background .3s; }
.hero-chip .val { transition: color .3s; }
.hero-chip .dot { transition: background .3s, box-shadow .3s; }
.hero-chip[data-state="warn"] { border-color: rgba(255, 181, 71, .45); }
.hero-chip[data-state="warn"] .dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.hero-chip[data-state="warn"] .val { color: var(--warn); }
.hero-chip[data-state="alert"] { border-color: rgba(255, 107, 107, .55); background: rgba(40, 18, 22, .92); }
.hero-chip[data-state="alert"] .dot { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.hero-chip[data-state="alert"] .val { color: var(--danger); }

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .hero-copy { grid-column: 1 / -1; }
  .sync-wrap { display: none; }
  .hero-physical .bev { width: 110%; margin: 0 -5%; }
}
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-physical { grid-column: 1; }
  .hero-twin { grid-column: 1; }
  .chip-1, .chip-2, .chip-3 { display: none; }
  .hp-anchor { display: none; }
  .hero-physical .bev { width: 100%; margin: 0; }
}
.hero-chip {
  position: absolute;
  background: rgba(10, 12, 14, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-2);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.hero-chip .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  flex-shrink: 0;
}
.hero-chip .val {
  font-family: var(--font-mono);
  color: var(--text);
  font-weight: 500;
}
.hero-chip .label {
  display: block;
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
/* Chip positions — float over the BEV in the middle column.
   z-index above the BEV image so labels stay readable. */
.hero-chip { z-index: 4; }
.chip-1 { top: 4%; left: -4%; }                  /* voltage — top-left of BEV */
.chip-2 { top: -2%; right: -2%; }                /* SoH — top-right, clear of charger */
.chip-3 { bottom: 6%; left: -2%; }               /* temp — lower-left of BEV */

/* Status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  background: rgba(63, 232, 171, .07);
  border: 1px solid rgba(63, 232, 171, .25);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 28px;
}
.status-pill .live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* Trust strip -------------------------------------------------- */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 0;
  background: var(--bg-1);
}
.trust-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 48px;
}
.trust-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  max-width: 18ch;
  line-height: 1.5;
}
.trust-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  color: var(--text-3);
}
.trust-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: .7;
  transition: opacity .2s ease;
}
.trust-logo:hover { opacity: 1; color: var(--text); }

/* Section header --------------------------------------------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
  align-items: end;
}
.section-head .lead { margin-top: 0; }
.section-head.center {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 800px;
  margin-left: auto; margin-right: auto;
}
.section-head.center .lead { margin: 24px auto 0; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 0; }

/* Concept / explainer ----------------------------------------- */
.concept {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.concept-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.concept-copy h2 { margin-bottom: 24px; }
.concept-copy p { margin-bottom: 18px; color: var(--text-2); font-size: 17px; line-height: 1.6; }
.concept-copy p:last-child { margin-bottom: 0; }
.concept-copy strong { color: var(--text); font-weight: 500; }

/* Twin diagram (physical <-> virtual) */
.twin-diagram {
  position: relative;
  aspect-ratio: 1.1 / 1;
  background:
    radial-gradient(circle at 25% 50%, rgba(63, 232, 171, .08), transparent 50%),
    radial-gradient(circle at 75% 50%, rgba(63, 232, 171, .04), transparent 50%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow: hidden;
}
.twin-diagram::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: .3;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
  pointer-events: none;
}
.twin-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 100%;
  position: relative;
}
.twin-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.twin-card {
  width: 100%;
  background: rgba(20, 23, 28, .8);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 18px;
  backdrop-filter: blur(6px);
  position: relative;
}
.twin-card .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.twin-card .title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 12px;
}
.twin-illust {
  width: 100%;
  aspect-ratio: 1.5/1;
  border-radius: 8px;
  display: grid; place-items: center;
}
.twin-illust img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.twin-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 12px;
  color: var(--text-3);
}
.twin-meta .v { color: var(--accent); }
.twin-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.1em;
}
.twin-bridge .line {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  position: relative;
}
.twin-bridge .line::before, .twin-bridge .line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}
.twin-bridge .line::before { left: 0; }
.twin-bridge .line::after { right: 0; }
.twin-bridge .arrow-row {
  display: flex; gap: 4px; align-items: center;
}

.twin-chart {
  position: relative;
  background: #0d1014;
  border-radius: 6px;
  height: 90px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.twin-chart svg {
  width: 100%;
  height: 100%;
}

/* Stats below concept */
.concept-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.concept-stat {
  background: var(--bg-1);
  padding: 28px 24px;
}
.concept-stat .num {
  font-family: var(--font-display);
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.concept-stat .num .unit {
  font-size: 16px;
  color: var(--accent);
  font-weight: 500;
  margin-left: 2px;
}
.concept-stat .lbl {
  font-size: 13px;
  color: var(--text-3);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* Applications cards ----------------------------------------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.app-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px 26px;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}
.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--surface-2);
}
.app-card .app-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: rgba(63, 232, 171, .08);
  border: 1px solid rgba(63, 232, 171, .2);
  display: grid; place-items: center;
  color: var(--accent);
  margin-bottom: 24px;
}
.app-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}
.app-card p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 18px;
}
.app-card .app-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: auto;
}
.app-card .app-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-3);
}
.app-card .app-arrow {
  position: absolute;
  top: 28px; right: 24px;
  color: var(--text-3);
  transition: transform .2s ease, color .2s ease;
}
.app-card:hover .app-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* Lifecycle workflow ----------------------------------------- */
.lifecycle {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.lifecycle-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.lifecycle-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 40px;
}
.lc-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background .2s ease, padding-left .2s ease;
}
.lc-step:hover { padding-left: 8px; }
.lc-step:last-child { border-bottom: 1px solid var(--line); }
.lc-step .lc-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.lc-step h4 {
  font-size: 17px;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 500;
}
.lc-step p {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.55;
}
.lc-step.active h4 { color: var(--accent); }

/* Lifecycle visual */
.lc-visual {
  position: relative;
  aspect-ratio: 1.2 / 1;
  background: radial-gradient(circle at 50% 50%, rgba(63, 232, 171, .08), transparent 65%);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.lc-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: .25;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
}
.lc-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.5));
}

/* Capabilities matrix --------------------------------------- */
.cap-matrix {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.cap-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  border-top: 1px solid var(--line);
}
.cap-row:first-child { border-top: 0; }
.cap-row .cap-name {
  padding: 22px 24px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--text);
  border-right: 1px solid var(--line);
  background: var(--bg-1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.cap-row .cap-name .ic {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: rgba(63, 232, 171, .08);
  border: 1px solid rgba(63, 232, 171, .2);
  color: var(--accent);
  display: grid; place-items: center;
}
.cap-row .cap-items {
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cap-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
}
.cap-tag .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Integration row ------------------------------------------- */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.int-cell {
  background: var(--surface);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s ease;
  min-height: 110px;
}
.int-cell:hover { background: var(--surface-2); }
.int-cell .int-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
}
.int-cell .int-type {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Q-Scout product callout ----------------------------------- */
.product-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding: clamp(40px, 5vw, 64px);
  background:
    radial-gradient(ellipse at top right, rgba(63, 232, 171, .07), transparent 50%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.product-copy .product-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.product-copy h2 {
  margin-bottom: 20px;
  font-size: clamp(28px, 2.6vw, 40px);
}
.product-copy p {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.product-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 32px;
}
.product-feature {
  display: flex; gap: 10px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
}
.product-feature .check {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

/* Phone mock */
.phone-mock {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.phone-shell {
  position: relative;
  width: 280px;
  aspect-ratio: 280 / 580;
  border-radius: 38px;
  background: #08090b;
  border: 1.5px solid #1a1d22;
  padding: 14px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 30px 80px rgba(0,0,0,.6),
    0 0 60px var(--accent-glow);
}
.phone-screen {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #233e58, #009968);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone-status {
  height: 28px;
  padding: 4px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: -apple-system, "SF Pro Text", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: white;
}
.phone-content {
  flex: 1;
  padding: 14px 18px;
  color: white;
}
.phone-content .scan-area {
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  aspect-ratio: 1.4 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 1px dashed rgba(255,255,255,.25);
  margin-bottom: 14px;
}
.phone-content .scan-icon {
  width: 36px; height: 36px;
  color: var(--accent);
}
.phone-content .scan-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.phone-content .battery-pill {
  background: rgba(255,255,255,.95);
  color: #0a3a2a;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.phone-content .battery-pill .row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.phone-content .bp-title {
  font-size: 14px; font-weight: 700;
}
.phone-content .bp-stat {
  font-size: 11px; color: #4a6259;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.phone-content .bp-val {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  font-family: var(--font-display);
}
.phone-content .bp-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  overflow: hidden;
  margin-top: 6px;
}
.phone-content .bp-bar > div {
  height: 100%;
  background: #00ffae;
  border-radius: 999px;
}

/* Floating data card next to phone */
.phone-side-card {
  position: absolute;
  width: 220px;
  background: rgba(20, 23, 28, .92);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
  font-size: 12px;
}
.phone-side-card.top { top: 12%; right: -10px; }
.phone-side-card.bot { bottom: 12%; left: -10px; }
.psc-title {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.psc-title .ic {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(63, 232, 171, .12);
  color: var(--accent);
  display: grid; place-items: center;
}
.psc-title span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
}
.psc-row {
  display: flex; justify-content: space-between;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.psc-row .v { color: var(--text); }
.psc-row .ok { color: var(--accent); }

/* Expertise --------------------------------------------------- */
.expertise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
}
.expertise-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.expertise-card .ex-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}
.expertise-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
  font-weight: 500;
}
.expertise-card p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}
.expertise-card .ex-tags {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; gap: 6px;
}

/* CTA --------------------------------------------------------- */
.cta {
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  top: -10%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}
.cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(80px, 9vw, 140px) 0;
}
.cta h2 {
  font-size: clamp(36px, 4.5vw, 64px);
  margin-bottom: 20px;
}
.cta h2 .accent { color: var(--accent); }
.cta p {
  max-width: 50ch;
  margin: 0 auto;
  font-size: 18px;
  color: var(--text-2);
  margin-bottom: 36px;
}
.cta-buttons {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* Footer ------------------------------------------------------ */
.footer {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand .brand { margin-bottom: 22px; }
.footer-brand .brand-mark { width: 36px; height: 36px; }
.footer-brand .brand-word { height: 20px; }
.footer-brand p {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.6;
  max-width: 32ch;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
}
.footer-col ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col a {
  font-size: 14px;
  color: var(--text-2);
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-3);
}
.footer-bottom .socials {
  display: flex; gap: 12px;
}
.footer-bottom .socials a {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-3);
  transition: color .15s ease, border-color .15s ease;
}
.footer-bottom .socials a:hover { color: var(--accent); border-color: var(--accent); }

/* ============= Request Demo Modal ========================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
  padding: 20px;
}
.modal.open {
  pointer-events: auto;
  opacity: 1;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(63,232,171,.05);
  transform: translateY(20px) scale(.98);
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.modal.open .modal-card { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--text-2);
  transition: color .15s ease, border-color .15s ease;
}
.modal-close:hover { color: var(--accent); border-color: var(--accent); }

.modal-head { margin-bottom: 24px; }
.modal-head h3 { font-size: 24px; letter-spacing: -0.02em; font-weight: 600; }
.form-intro { color: var(--text-3); font-size: 14px; line-height: 1.55; }

.demo-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.demo-form label, .form-block { display: flex; flex-direction: column; gap: 6px; }
.demo-form label > span, .form-block > span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.demo-form input,
.demo-form select,
.demo-form textarea {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color .15s ease, background .15s ease;
  width: 100%;
}
.demo-form input:focus,
.demo-form select:focus,
.demo-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.demo-form textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.demo-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237e8593' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.form-note { color: var(--text-3); font-size: 12px; }

.modal-success { text-align: center; padding: 24px 0; }
.modal-success .success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(63, 232, 171, .12);
  color: var(--accent);
  display: grid; place-items: center;
  margin: 0 auto 22px;
  border: 1.5px solid rgba(63, 232, 171, .4);
  box-shadow: 0 0 0 6px rgba(63, 232, 171, .04), 0 0 30px rgba(63, 232, 171, .15);
}
.modal-success h3 { font-size: 22px; letter-spacing: -0.015em; margin-bottom: 10px; font-weight: 600; }
.modal-success p { color: var(--text-2); margin-bottom: 24px; font-size: 14px; }

@media (max-width: 480px) {
  .modal-card { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .form-foot .btn { justify-content: center; }
  .form-note { text-align: center; }
}

/* ============= AI Chat Widget =============================== */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 14px 18px;
  background: var(--accent);
  color: #07120d;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  box-shadow:
    0 12px 30px rgba(0,0,0,.4),
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 0 40px rgba(63,232,171,.25);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 40px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 0 50px rgba(63,232,171,.35);
}
.chat-fab.hidden { opacity: 0; pointer-events: none; transform: scale(.85); }
.chat-fab-icon { display: block; }
.chat-fab-dot {
  position: absolute;
  top: 8px; right: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--bg);
  animation: chat-fab-pulse 2s infinite;
}
@keyframes chat-fab-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,.5); }
  50% { box-shadow: 0 0 0 6px rgba(255,107,107,0); }
}

.chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: min(400px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 48px));
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  overflow: hidden;
  z-index: 401;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(.96);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), opacity .25s ease;
  box-shadow:
    0 30px 80px rgba(0,0,0,.5),
    0 0 0 1px rgba(63,232,171,.05);
}
.chat-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.chat-head-left {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.chat-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(63,232,171,.1);
  border: 1px solid rgba(63,232,171,.25);
  display: grid; place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.chat-head-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.chat-head-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 6px;
  margin-top: 2px;
}
.chat-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}
.chat-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text-2);
  display: grid; place-items: center;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
}
.chat-close:hover { color: var(--accent); border-color: var(--accent); }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.chat-msg { display: flex; }
.chat-msg-bot { justify-content: flex-start; }
.chat-msg-user { justify-content: flex-end; }
.chat-bubble {
  max-width: 86%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}
.chat-bubble p { margin: 0; }
.chat-bubble p + p { margin-top: 8px; }
.chat-bubble ul { margin: 6px 0 0; padding-left: 18px; }
.chat-bubble ul li { margin-bottom: 4px; }
.chat-msg-bot .chat-bubble {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.chat-msg-user .chat-bubble {
  background: var(--accent);
  color: #07120d;
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.chat-msg-typing .typing {
  display: inline-flex; gap: 4px; align-items: center;
}
.chat-msg-typing .typing i {
  width: 6px; height: 6px;
  background: var(--text-3);
  border-radius: 50%;
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.chat-msg-typing .typing i:nth-child(2) { animation-delay: .15s; }
.chat-msg-typing .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Suggestion chips */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -4px;
  padding-left: 4px;
}
.chat-suggestion {
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(63,232,171,.06);
  border: 1px solid rgba(63,232,171,.2);
  color: var(--accent);
  font-family: var(--font-body);
  transition: background .15s, transform .1s;
  text-align: left;
}
.chat-suggestion:hover {
  background: rgba(63,232,171,.14);
  transform: translateY(-1px);
}

/* Input row */
.chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}
.chat-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font-body);
  transition: border-color .15s, background .15s;
  min-width: 0;
}
.chat-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.chat-input:disabled { opacity: .6; }
.chat-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #07120d;
  display: grid; place-items: center;
  transition: transform .15s, background .15s;
  flex-shrink: 0;
}
.chat-send:hover { background: var(--accent-hot); transform: scale(1.05); }
.chat-foot {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-4);
  text-align: center;
  padding: 8px 14px 12px;
  background: var(--bg-1);
}
.chat-foot a { color: var(--text-3); border-bottom: 1px dashed var(--line-2); }
.chat-foot a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 480px) {
  .chat-fab-label { display: none; }
  .chat-fab { padding: 14px; }
  .chat-panel {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    height: calc(100vh - 24px);
    max-height: 90vh;
  }
}

/* ============= Responsive ===================================
   Breakpoints:
   - 1180px: hero condenses, twin column shrinks
   - 1080px: tablet — 2-col grids collapse, copy spans full width
   -  900px: nav links → hamburger
   -  720px: hero stacks to single column
   -  640px: dense single-column treatment
   -  480px: small phones
============================================================ */

@media (max-width: 1080px) {
  .concept-grid { grid-template-columns: 1fr; }
  .apps-grid { grid-template-columns: 1fr 1fr; }
  .integration-grid { grid-template-columns: repeat(4, 1fr); }
  .lifecycle-grid { grid-template-columns: 1fr; }
  .product-row { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .concept-stats { grid-template-columns: 1fr 1fr; }
  .expertise-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .trust-inner { grid-template-columns: 1fr; gap: 20px; }
  .cap-row { grid-template-columns: 1fr; }
  .cap-row .cap-name { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* === Nav: hamburger kicks in at 900px === */
@media (max-width: 900px) {
  .nav-main { display: none; }
  .nav-signin { display: none; }
  .nav-demo { display: none; }
  .nav-burger { display: block; }
  .nav-cta { gap: 8px; }
}

/* === Hero: BEV + twin still side by side at 720px+ === */
/* (the .hero-grid block at line ~545 already collapses copy to full-width
   above the visual at 1180px) */

/* === Single-column phone layout === */
@media (max-width: 640px) {
  :root { --pad: 18px; }

  /* Hero copy compresses */
  .hero { padding: 32px 0 48px; }
  h1 { font-size: clamp(30px, 8vw, 40px); line-height: 1.1; }
  .hero-sub { font-size: 15px; margin-top: 18px; }
  .hero-cta { margin-top: 26px; flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; height: 50px; }
  .hero-tags { margin-top: 32px; gap: 14px; font-size: 11px; }
  .hero-tags .sep { display: none; }
  .status-pill { margin-bottom: 18px; }

  /* Section spacing */
  .section-pad { padding: 56px 0 64px; }
  h2 { font-size: clamp(26px, 6.5vw, 34px); }
  h3 { font-size: 19px; }
  .section-head { margin-bottom: 36px; }

  /* Trust strip */
  .trust { padding: 22px 0; }
  .trust-logos { gap: 20px 28px; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .trust-logo { flex-shrink: 0; font-size: 15px; }
  .trust-label { font-size: 10px; max-width: none; }

  /* Concept */
  .concept-copy h2 { margin-bottom: 16px; }
  .twin-diagram { padding: 18px; }
  .twin-stage { gap: 12px; }
  .concept-stats { grid-template-columns: 1fr 1fr; }
  .concept-stat { padding: 22px 16px; }
  .concept-stat .num { font-size: 26px; }

  /* Apps */
  .apps-grid { grid-template-columns: 1fr; }
  .app-card { min-height: auto; padding: 22px 20px; }

  /* Lifecycle */
  .lc-step { padding: 16px 0; }
  .lc-step h4 { font-size: 16px; }
  .lc-visual { padding: 24px; aspect-ratio: 1.4 / 1; }

  /* Capabilities */
  .cap-row .cap-name { padding: 16px 18px; font-size: 15px; }
  .cap-row .cap-items { padding: 14px 18px 16px; }
  .cap-tag { font-size: 12px; padding: 6px 10px; }

  /* Integrations */
  .integration-grid { grid-template-columns: repeat(2, 1fr); }
  .int-cell { min-height: 88px; padding: 18px 12px; }

  /* Footer */
  .footer { padding: 56px 0 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

  /* Chat fab: shrink to icon */
  .chat-fab-label { display: none; }
  .chat-fab { padding: 14px; }

  /* Chat panel: bottom-sheet style */
  .chat-panel {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    height: calc(100vh - 24px);
    max-height: 88vh;
    border-radius: 18px;
  }
}

/* === Very small phones === */
@media (max-width: 380px) {
  h1 { font-size: 26px; }
  .concept-stats { grid-template-columns: 1fr; }
}
