/* ==========================================================================
   ENERGY MANAGER - Product Landing Page
   Design: Neumorphic / Figma-based (energy-manager-cd)
   Font: Switzer via Fontshare (loaded in index.html <head>)
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --bg-dark:        #181C24;
  --bg-dark-card:   #1E2330;
  --bg-light:       #F2F5F7;
  --card-bg:        #E6E8ED;
  --text-primary:   #242934;
  --text-secondary: #58647F;
  --text-on-dark:   #F2F5F7;
  --text-muted:     #8892A8;
  --white:          #FFFFFF;

  /* UI accent - Lime */
  --lime-warm:     #FBE600;
  --lime:          #DBF200;
  --lime-cool:     #BAFE00;
  --lime-strong:   #AAB800;
  --gradient-lime: linear-gradient(135deg, var(--lime-warm), var(--lime-cool));

  /* Errors only */
  --accent-red:    #AB091E;

  --shadow-raised:
    3.27px 3.27px 6.54px rgba(163,157,147,0.4),
    -2.18px -2.18px 6.54px rgba(255,255,255,1);
  --shadow-raised-dark:
    4px 4px 8px rgba(0,0,0,0.5),
    -2px -2px 6px rgba(50,55,70,0.4);
  --shadow-inset:
    inset 2px 2px 5px rgba(163,157,147,0.35),
    inset -2px -2px 5px rgba(255,255,255,0.8);

  --font: 'Switzer', system-ui, -apple-system, sans-serif;
  --mono: 'SF Mono', 'Fira Code', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.35s;
  --max-w: 1200px;
  --nav-h: 64px;

  --sp-xs: 0.5rem;  --sp-sm: 1rem;
  --sp-md: 2rem;    --sp-lg: 4rem;
  --sp-xl: 6rem;    --sp-2xl: 8rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
code { font-family: var(--mono); font-size: 0.85em; }

/* ---------- Utility ---------- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-md); }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-sm);
}
.section-label--dark { color: rgba(242,245,247,0.5); }

.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Status pills (roadmap honesty) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 100px;
  white-space: nowrap;
}
.pill--live    { background: var(--gradient-lime); color: var(--bg-dark); }
.pill--next    { background: transparent; color: var(--text-secondary); box-shadow: inset 0 0 0 1.5px var(--text-secondary); }
.pill--concept { background: var(--text-secondary); color: var(--white); }
.section--dark .pill--next    { color: var(--text-on-dark); box-shadow: inset 0 0 0 1.5px rgba(242,245,247,0.45); }
.section--dark .pill--concept { background: rgba(242,245,247,0.14); color: var(--text-on-dark); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--gradient-lime); color: var(--bg-dark); }
.btn--primary:hover { box-shadow: 0 8px 24px rgba(219,242,0,0.25); }
.btn--ghost { color: var(--text-on-dark); box-shadow: inset 0 0 0 1.5px rgba(242,245,247,0.3); }
.btn--ghost:hover { background: rgba(242,245,247,0.06); }
.btn--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(24,28,36,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.nav.scrolled { background: rgba(24,28,36,0.95); box-shadow: 0 1px 0 rgba(255,255,255,0.06); }

.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md);
  width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-md);
}
.nav__logo { display: flex; align-items: center; gap: 0.5rem; color: var(--text-on-dark); flex-shrink: 0; }
.nav__logo svg { width: 30px; height: 30px; }
.nav__logo-text { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.05em; }

.nav__links { display: flex; align-items: center; gap: 1.5rem; }
.nav__links a {
  font-size: 0.875rem; font-weight: 500;
  color: rgba(242,245,247,0.7);
  transition: color var(--duration) var(--ease);
  white-space: nowrap;
}
.nav__links a:hover, .nav__links a.active { color: var(--text-on-dark); }

.nav__cta {
  padding: 0.5rem 1.25rem; font-size: 0.875rem; font-weight: 600;
  border-radius: 8px; background: var(--gradient-lime); color: var(--bg-dark);
  white-space: nowrap;
  transition: transform var(--duration) var(--ease);
}
.nav__cta:hover { transform: translateY(-2px); }

.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav__burger span {
  display: block; width: 22px; height: 2px; background: var(--text-on-dark); border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none; position: fixed; inset: var(--nav-h) 0 0 0;
  background: rgba(24,28,36,0.97);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  z-index: 999;
}
.nav__mobile.open { display: flex; }
.nav__mobile a { font-size: 1.2rem; font-weight: 500; color: var(--text-on-dark); opacity: 0.8; }
.nav__mobile a:hover { opacity: 1; }
.nav__mobile .nav__cta { opacity: 1; color: var(--bg-dark); margin-top: 1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  background: var(--bg-dark);
  overflow: hidden;
  padding: calc(var(--nav-h) + var(--sp-lg)) 0 var(--sp-xl);
}
.hero::before {
  content: '';
  position: absolute; right: -10%; top: 10%;
  width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(219,242,0,0.10), transparent 65%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-lg); align-items: center; }
.hero__content { max-width: 600px; }

.hero__badge {
  display: inline-block; padding: 0.35rem 1rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bg-dark); background: var(--gradient-lime);
  border-radius: 100px; margin-bottom: var(--sp-md);
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.1;
  color: var(--text-on-dark); margin-bottom: var(--sp-sm);
}
.hero h1 span, .grad-text {
  background: var(--gradient-lime);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__subtitle { font-size: 1.125rem; line-height: 1.6; color: var(--text-muted); margin-bottom: var(--sp-md); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-bottom: var(--sp-md); }

.hero__facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.hero__facts li {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: rgba(242,245,247,0.75);
}
.hero__facts svg { width: 18px; height: 18px; color: var(--lime); flex-shrink: 0; }

.hero__visual { position: relative; display: flex; justify-content: center; }
.hero__phone-frame {
  position: relative; width: 280px; max-height: 580px;
  border-radius: 32px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  background: var(--bg-dark-card);
}
.hero__phone-frame img { width: 100%; object-fit: cover; object-position: top center; max-height: 580px; }

.hero__float {
  position: absolute;
  background: rgba(30,35,48,0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  color: var(--text-on-dark);
  font-size: 0.8rem;
  line-height: 1.4;
}
.hero__float strong { display: block; font-size: 0.95rem; }
.hero__float span { color: var(--text-muted); }
.hero__float--a { left: 0; top: 18%; }
.hero__float--b { right: 0; bottom: 16%; }

/* ---------- Sections ---------- */
.section { padding: var(--sp-2xl) 0; }
.section--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section--tight { padding-top: var(--sp-xl); padding-bottom: var(--sp-xl); }
.section--dark .section-label { color: rgba(242,245,247,0.5); }
.section--dark .section__subtitle { color: var(--text-muted); }

.section__header { max-width: 680px; margin-bottom: var(--sp-lg); }
.section__header--center { text-align: center; margin-left: auto; margin-right: auto; }

.section h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; line-height: 1.2; margin-bottom: var(--sp-sm); }
.section h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem; }
.section__subtitle { font-size: 1.125rem; color: var(--text-secondary); line-height: 1.6; }
.section__note { margin-top: var(--sp-md); font-size: 0.85rem; color: var(--text-muted); }
.section--dark .section__note { color: rgba(136,146,168,0.85); }

/* ---------- Claim band ---------- */
.claim {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 500;
  line-height: 1.35;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-primary);
}
.claim strong { font-weight: 700; }

/* ---------- Construct cards (ZEV / vZEV / LEG) ---------- */
.constructs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); margin-top: var(--sp-lg); }
.construct {
  position: relative;
  background: var(--card-bg);
  border-radius: 16px;
  padding: var(--sp-md);
  box-shadow: var(--shadow-raised);
  transition: transform var(--duration) var(--ease);
  display: flex; flex-direction: column; gap: 0.75rem;
}
.construct:hover { transform: translateY(-2px); }
.construct--hl::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  border-radius: 16px 16px 0 0; background: var(--gradient-lime);
}
.construct__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.construct__abbr { font-size: 2rem; font-weight: 700; line-height: 1; color: var(--text-primary); }
.construct__since { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.construct p { font-size: 0.95rem; color: var(--text-secondary); }
.construct p strong { color: var(--text-primary); }

/* ---------- Feature Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg); align-items: center; }
.split--wide-visual { grid-template-columns: 0.85fr 1.15fr; }
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }
.split__text p { color: var(--text-secondary); margin-bottom: var(--sp-sm); }
.section--dark .split__text p { color: var(--text-muted); }

.split__visual { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-raised); background: var(--card-bg); }
.split__visual--dark { box-shadow: var(--shadow-raised-dark); background: var(--bg-dark-card); }
.split__visual img { width: 100%; }
.split__visual--plain { background: none; box-shadow: none; border-radius: 0; overflow: visible; }

/* Check list: Blue-Grey on light, lime on dark */
.check-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: var(--sp-sm); }
.check-list li {
  position: relative;
  padding-left: 2rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.check-list li::before {
  content: '';
  position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--text-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.2l2.8 2.8L14 7.6' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}
.check-list li strong { color: var(--text-primary); }
.section--dark .check-list li { color: var(--text-muted); }
.section--dark .check-list li strong { color: var(--text-on-dark); }
.section--dark .check-list li::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.2l2.8 2.8L14 7.6' stroke='%23181C24' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat, var(--gradient-lime);
}

/* Stat highlight */
.stat-highlight { display: inline-flex; align-items: baseline; gap: 0.25rem; margin-top: var(--sp-sm); }
.stat-highlight__number { font-size: 3rem; font-weight: 700; line-height: 1; color: var(--lime-strong); }
.section--dark .stat-highlight__number {
  background: var(--gradient-lime);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-highlight__unit { font-size: 1.25rem; font-weight: 600; color: var(--text-muted); }

/* ---------- Stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-md); margin-top: var(--sp-lg); }
.stat {
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--bg-dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-raised-dark);
}
.stat__value { display: flex; align-items: baseline; gap: 0.3rem; margin-bottom: 0.35rem; }
.stat__num {
  font-size: 2.5rem; font-weight: 700; line-height: 1;
  background: var(--gradient-lime);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat__unit { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.stat p { font-size: 0.875rem; color: var(--text-muted); }

/* ---------- Diagram card ---------- */
.diagram {
  background: var(--bg-dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  box-shadow: var(--shadow-raised-dark);
  padding: var(--sp-md);
}
.diagram svg { width: 100%; height: auto; display: block; }
.diagram__caption { margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); }
.diagram--light { background: var(--card-bg); border: none; box-shadow: var(--shadow-raised); }

/* ---------- Screen gallery (tabs) ---------- */
.gallery__tabs {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: var(--sp-md);
}
.gallery__tab {
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem; font-weight: 600;
  border-radius: 10px;
  color: var(--text-secondary);
  background: var(--card-bg);
  box-shadow: var(--shadow-raised);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), color var(--duration) var(--ease);
}
.gallery__tab:hover { transform: translateY(-2px); color: var(--text-primary); }
.gallery__tab[aria-selected="true"] { color: var(--text-primary); box-shadow: var(--shadow-inset); transform: none; }
.gallery__tab:focus-visible { outline: 2px solid var(--text-secondary); outline-offset: 2px; }

.gallery__panel { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--sp-lg); align-items: center; }
.gallery__panel[hidden] { display: none; }
.gallery__shot {
  border-radius: 14px; overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-raised), 0 20px 50px rgba(36,41,52,0.10);
}
.gallery__chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 0.6rem 0.9rem;
  background: var(--card-bg);
}
.gallery__chrome i { width: 9px; height: 9px; border-radius: 50%; background: rgba(88,100,127,0.35); }
.gallery__chrome span { margin-left: 0.75rem; font-size: 0.72rem; color: var(--text-muted); font-family: var(--mono); }
.gallery__text h3 { margin-bottom: 0.75rem; }
.gallery__text p { color: var(--text-secondary); font-size: 0.975rem; margin-bottom: var(--sp-sm); }

/* ---------- Phones ---------- */
.phones { display: flex; justify-content: center; align-items: flex-start; gap: var(--sp-md); }
.phone {
  width: 260px; border-radius: 30px; overflow: hidden;
  background: var(--bg-dark-card);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  border: 6px solid #0f1218;
}
.phone img { width: 100%; }
.phone--offset { margin-top: var(--sp-lg); }
.phone__caption { margin-top: 0.85rem; text-align: center; font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Billing table mock ---------- */
.ledger {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-raised);
  padding: 1.5rem;
  overflow-x: auto;
}
.ledger__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ledger__title { font-weight: 700; }
.ledger__meta { font-size: 0.75rem; color: var(--text-muted); font-family: var(--mono); }
.ledger table { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 440px; }
.ledger th, .ledger td { padding: 0.6rem 0.5rem; text-align: right; }
.ledger th:first-child, .ledger td:first-child { text-align: left; }
.ledger th { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; border-bottom: 1px solid rgba(88,100,127,0.2); }
.ledger td { color: var(--text-secondary); border-bottom: 1px solid rgba(88,100,127,0.1); font-variant-numeric: tabular-nums; }
.ledger td:first-child { color: var(--text-primary); font-weight: 500; }
.ledger tfoot td { font-weight: 700; color: var(--text-primary); border-bottom: none; }
.ledger__foot { margin-top: 0.85rem; font-size: 0.75rem; color: var(--text-muted); }

/* ---------- Brand variants (OEM) ---------- */
.brands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.brand {
  border-radius: 16px; overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-raised);
  transition: transform var(--duration) var(--ease);
}
.brand:hover { transform: translateY(-2px); }
.brand__bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 0.9rem; color: var(--white); }
.brand__mark { width: 22px; height: 22px; border-radius: 6px; background: rgba(255,255,255,0.9); flex-shrink: 0; }
.brand__name { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; }
.brand__body { padding: 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; }
.brand__line { height: 8px; border-radius: 4px; background: var(--card-bg); }
.brand__line--s { width: 55%; }
.brand__btn { margin-top: 0.4rem; height: 26px; border-radius: 7px; }
.brand__url { padding: 0 0.9rem 0.9rem; font-family: var(--mono); font-size: 0.68rem; color: var(--text-muted); }
.brand--a .brand__bar, .brand--a .brand__btn { background: #2F4858; }
.brand--b .brand__bar, .brand--b .brand__btn { background: #3E6E5C; }
.brand--c .brand__bar, .brand--c .brand__btn { background: #6B4E71; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-md); margin-top: var(--sp-lg); }
.feature {
  background: var(--card-bg); border-radius: 16px; padding: 1.5rem;
  box-shadow: var(--shadow-raised);
  display: grid; grid-template-columns: 44px 1fr; gap: 1rem; align-items: start;
}
.feature__icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); box-shadow: var(--shadow-inset);
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.feature p { font-size: 0.9rem; color: var(--text-secondary); }

/* ---------- API / MCP ---------- */
.api-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
.panel {
  background: var(--bg-dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  box-shadow: var(--shadow-raised-dark);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8rem; color: var(--text-muted);
}
.panel__head strong { color: var(--text-on-dark); font-size: 0.875rem; }
.panel__body { padding: 1.1rem; flex: 1; }

.code {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: #C9D1E0;
  white-space: pre;
  overflow-x: auto;
}
.code .k { color: var(--lime); }
.code .s { color: #9FD8C2; }
.code .c { color: #6C7792; }
.code .n { color: #E9C46A; }

.chat { display: flex; flex-direction: column; gap: 0.8rem; }
.chat__msg { max-width: 92%; padding: 0.7rem 0.9rem; border-radius: 12px; font-size: 0.875rem; line-height: 1.5; }
.chat__msg--user { align-self: flex-end; background: rgba(242,245,247,0.08); color: var(--text-on-dark); border-bottom-right-radius: 4px; }
.chat__msg--agent { align-self: flex-start; background: rgba(219,242,0,0.07); color: var(--text-on-dark); border: 1px solid rgba(219,242,0,0.18); border-bottom-left-radius: 4px; }
.chat__tool {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.25);
}
.chat__tool b { color: var(--lime); font-weight: 600; }
.chat__tool svg { width: 14px; height: 14px; color: var(--text-muted); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.tag {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  padding: 0.18rem 0.5rem; border-radius: 4px;
  background: rgba(219,242,0,0.1); color: var(--lime);
}
.tag--light { background: var(--card-bg); color: var(--text-secondary); box-shadow: var(--shadow-raised); }

.api-points { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-md); margin-top: var(--sp-lg); }
.api-point h4 { font-size: 1rem; font-weight: 700; color: var(--text-on-dark); margin-bottom: 0.35rem; }
.api-point p { font-size: 0.875rem; color: var(--text-muted); }
.api-point__icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 0.85rem;
  background: var(--gradient-lime); color: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
}
.api-point__icon svg { width: 22px; height: 22px; }

/* ---------- Modes list (e-mobility) ---------- */
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: var(--sp-md); }
.mode {
  background: var(--card-bg); border-radius: 12px; padding: 0.9rem 1rem;
  box-shadow: var(--shadow-raised);
}
.mode strong { display: block; font-size: 0.95rem; }
.mode span { font-size: 0.82rem; color: var(--text-secondary); }

.usecase {
  margin-top: var(--sp-lg);
  display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--sp-lg); align-items: center;
  background: var(--card-bg);
  border-radius: 24px;
  padding: var(--sp-md);
  box-shadow: var(--shadow-raised);
}
.usecase__steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 0.9rem; margin-top: var(--sp-sm); }
.usecase__steps li { position: relative; padding-left: 2.4rem; font-size: 0.95rem; color: var(--text-secondary); }
.usecase__steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-dark); color: var(--text-on-dark);
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.usecase__steps strong { color: var(--text-primary); }

/* ---------- Gateway compare ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
.compare__card {
  position: relative;
  background: var(--bg-dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  box-shadow: var(--shadow-raised-dark);
  padding: var(--sp-md);
}
.compare__card--hl::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  border-radius: 16px 16px 0 0; background: var(--gradient-lime);
}
.compare__kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(242,245,247,0.5); }
.compare__card h3 { color: var(--text-on-dark); margin: 0.35rem 0 0.5rem; }
.compare__card > p { color: var(--text-muted); font-size: 0.95rem; }
.compare__for { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.06); font-size: 0.85rem; color: var(--text-muted); }
.compare__for strong { color: var(--text-on-dark); }

.vendors { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: var(--sp-lg); }
.vendor {
  padding: 0.45rem 1rem; border-radius: 100px;
  font-size: 0.85rem; font-weight: 600; color: var(--text-on-dark);
  background: var(--bg-dark-card); border: 1px solid rgba(255,255,255,0.08);
}
.vendor--auto { background: rgba(219,242,0,0.1); color: var(--lime); border-color: rgba(219,242,0,0.25); }

.flow { display: flex; align-items: stretch; gap: 0.5rem; margin-top: var(--sp-lg); }
.flow__step {
  flex: 1;
  background: var(--bg-dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; padding: 1.1rem;
}
.flow__step span { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; color: var(--lime); margin-bottom: 0.35rem; }
.flow__step strong { display: block; color: var(--text-on-dark); font-size: 0.95rem; margin-bottom: 0.25rem; }
.flow__step p { font-size: 0.82rem; color: var(--text-muted); }
.flow__sep { display: flex; align-items: center; color: rgba(242,245,247,0.3); }
.flow__sep svg { width: 18px; height: 18px; }

/* ---------- Showcase & duo ---------- */
.showcase { position: relative; border-radius: 16px; overflow: hidden; background: var(--card-bg); box-shadow: var(--shadow-raised); }
.showcase img { width: 100%; }

.duo { display: flex; align-items: flex-end; justify-content: center; gap: var(--sp-md); }
.duo__desktop { width: 65%; max-height: 500px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-raised-dark); }
.duo__phone { width: 22%; max-height: 500px; border-radius: 24px; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,0.4); }
.duo__desktop img, .duo__phone img { width: 100%; object-fit: cover; object-position: top center; }

.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); margin-top: var(--sp-lg); }
.mini { background: var(--card-bg); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-raised); }
.mini img { width: 100%; height: 220px; object-fit: cover; object-position: top center; }
.mini__body { padding: 1.1rem 1.25rem 1.3rem; }
.mini__body h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.mini__body p { font-size: 0.875rem; color: var(--text-secondary); }

/* ---------- CTA ---------- */
.cta-box {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--sp-lg); align-items: center;
  background: var(--card-bg); border-radius: 24px; padding: var(--sp-lg);
  box-shadow: var(--shadow-raised);
}
.cta-box h2 { margin-bottom: 0.75rem; }
.cta-box p { color: var(--text-secondary); }
.cta-box__list { display: flex; flex-direction: column; gap: 0.6rem; }
.cta-box__actions { margin-top: var(--sp-md); display: flex; flex-wrap: wrap; gap: var(--sp-sm); }

/* ---------- Award ---------- */
.award { text-align: center; padding: var(--sp-xl) 0; background: linear-gradient(135deg, var(--bg-dark), #1a2030); }
.award__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--gradient-lime); margin-bottom: var(--sp-md); color: var(--bg-dark);
}
.award__badge svg { width: 40px; height: 40px; }
.award h2 { color: var(--text-on-dark); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--sp-sm); }
.award__quote { max-width: 640px; margin: 0 auto; font-size: 1.1rem; font-style: italic; color: var(--text-muted); line-height: 1.7; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-dark); padding: var(--sp-lg) 0 var(--sp-md); color: var(--text-muted); border-top: 1px solid rgba(255,255,255,0.06); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-lg); margin-bottom: var(--sp-lg); }
.footer__brand p { margin-top: var(--sp-xs); font-size: 0.875rem; max-width: 300px; }
.footer h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-on-dark); margin-bottom: var(--sp-sm); }
.footer a { font-size: 0.875rem; color: var(--text-muted); transition: color var(--duration) var(--ease); }
.footer a:hover { color: var(--text-on-dark); }
.footer__links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.06); padding-top: var(--sp-md); font-size: 0.8rem; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav__links { gap: 1rem; }
  .nav__links a { font-size: 0.8rem; }
}

@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__content { max-width: 100%; margin: 0 auto; }
  .hero__actions, .hero__facts { justify-content: center; }
  .hero__visual { margin-top: var(--sp-md); }
  .hero__phone-frame { width: 240px; }
  .hero__float--a { left: 4%; }
  .hero__float--b { right: 4%; }

  .split, .split--wide-visual { grid-template-columns: 1fr; }
  .split--reverse { direction: ltr; }
  .split__visual, .split .diagram, .split .ledger { order: -1; }

  .constructs { grid-template-columns: 1fr; }
  .gallery__panel { grid-template-columns: 1fr; gap: var(--sp-md); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .api-grid, .compare, .usecase, .cta-box { grid-template-columns: 1fr; }
  .api-points { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
  .flow { flex-direction: column; }
  .flow__sep { justify-content: center; transform: rotate(90deg); }
}

@media (max-width: 768px) {
  :root { --sp-lg: 3rem; --sp-xl: 4rem; --sp-2xl: 5rem; }
  .container { padding: 0 1rem; }
  .nav__inner { padding: 0 1rem; }
  .nav > .nav__inner > .nav__cta { display: none; }

  .hero { min-height: auto; padding: calc(var(--nav-h) + var(--sp-md)) 0 var(--sp-lg); }
  .hero__phone-frame { width: 220px; }
  .hero__float { display: none; }

  .duo { flex-direction: column; align-items: center; }
  .duo__desktop { width: 100%; }
  .duo__phone { width: 50%; }

  .phones { gap: 1rem; }
  .phone { width: 46%; border-width: 4px; border-radius: 22px; }
  .phone--offset { margin-top: var(--sp-md); }

  .brands { grid-template-columns: 1fr 1fr; }
  .brand:nth-child(3) { display: none; }
  .modes { grid-template-columns: 1fr; }
  .cta-box { padding: var(--sp-md); }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .section h2 { font-size: 1.5rem; }
  .stat-highlight__number, .stat__num { font-size: 2.25rem; }
  .stats, .api-points { grid-template-columns: 1fr; }
}

/* ---------- MCP chat: the preview an agent shows before a write (ADR-047) ---------- */
.chat__msg--preview { display: flex; flex-direction: column; gap: 0.35rem; border-style: dashed; }
.chat__label {
  align-self: flex-start;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--lime);
}
