/* ═══════════════════════════════════════════════════════════════════════════
   Solaire Power Systems — Shared Stylesheet
   solairesa.co.za · same design language as solaire-intelligence.co.za
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg:          #0b1220;
  --panel:       #111a2e;
  --panel-2:     #162241;
  --line:        #1f2d51;
  --text:        #e6edf7;
  --muted:       #8ea1c2;
  --accent:      #ffb547;      /* Solaire Power sun-gold */
  --accent-2:    #ffd66b;
  --si:          #2fb5ff;      /* Solaire Intelligence cyan */
  --si-2:        #3ce0c3;
  --commercial:  #2fb5ff;
  --commercial-2:#3ce0c3;
  --home:        #4ade80;
  --home-2:      #86efac;
  --heat:        #4aa8ff;
  --heat-2:      #2dd4bf;
  --gateway:     #ffb547;
  --gateway-2:   #ffd66b;
  --pool:        #2fb5ff;
  --pool-2:      #3ce0c3;
  --water:       #4aa8ff;
  --water-2:     #2dd4bf;
  --switch:      #4ade80;
  --switch-2:    #86efac;
  --ok:          #3ce08f;
  --warn:        #ffb547;
  --danger:      #ff5a7a;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 6px 30px rgba(0,0,0,0.4);
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.25);
  --nav-h:       64px;
  --mono:        ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans:        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-w:       1120px;
  --content-w:   760px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:      #f0f4fa;
    --panel:   #ffffff;
    --panel-2: #eef3fb;
    --line:    #d4dff0;
    --text:    #0c1a33;
    --muted:   #5a6b86;
    --shadow:  0 4px 20px rgba(20,40,80,0.10);
    --shadow-sm: 0 2px 8px rgba(20,40,80,0.08);
  }
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: var(--sans); cursor: pointer; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--content-w); margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }
section + section { padding-top: 0; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(11,18,32,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
@media (prefers-color-scheme: light) {
  nav { background: rgba(240,244,250,0.92); }
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 8px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gateway), var(--gateway-2));
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #041425; letter-spacing: 0.3px;
}
.nav-name { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: 0.2px; }
.nav-name span { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 2px;
  margin-left: 28px; list-style: none;
}
.nav-links > li { position: relative; }
.nav-links a, .nav-links button.nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--muted);
  background: none; border: none; font-family: var(--sans);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links button.nav-link:hover {
  color: var(--text); background: var(--panel); text-decoration: none;
}
.nav-links a.active { color: var(--text); }

/* Dropdown */
.nav-dropdown {
  position: absolute; top: 100%; left: 0;
  min-width: 200px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px;
  padding-top: 12px; /* extra top padding so hover zone bridges gap to button */
  margin-top: -4px;  /* pull up slightly so it visually looks close */
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity .18s, transform .18s;
}
.nav-links li:hover .nav-dropdown,
.nav-links li:focus-within .nav-dropdown {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.nav-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--muted);
}
.nav-dropdown a:hover { color: var(--text); text-decoration: none; }
.nav-dropdown .dd-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

.nav-spacer { flex: 1; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--accent);
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}
.nav-cta:hover { border-color: var(--accent); background: var(--panel-2); text-decoration: none; }

/* Cart nav icon */
.nav-cart-btn {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--text);
  text-decoration: none; white-space: nowrap;
  transition: border-color .15s;
}
.nav-cart-btn:hover { border-color: var(--accent); text-decoration: none; }
.nav-cart-btn .cart-label { display: inline; }
.nav-cart-badge {
  display: none; align-items: center; justify-content: center;
  background: var(--accent); color: #041425;
  font-size: 10px; font-weight: 800; min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 4px;
}

/* Mobile nav toggle */
.nav-burger {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 6px 10px; color: var(--muted);
  font-size: 18px; line-height: 1;
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-cta { padding: 6px 10px; font-size: 12px; }
  .nav-cart-btn .cart-label { display: none; }
  .nav-cart-btn { padding: 6px 10px; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--panel); border-bottom: 1px solid var(--line);
    padding: 12px; gap: 4px;
  }
  .nav-dropdown {
    position: static; opacity: 1; pointer-events: auto;
    transform: none; box-shadow: none; border: none;
    background: var(--panel-2); margin-top: 4px;
  }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; letter-spacing: 0.2px;
  border: none; transition: filter .15s, transform .1s;
  text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041425;
}
.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ── Chip / badge ────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; border: 1px solid;
}
.chip-gateway { color: var(--gateway); border-color: rgba(255,181,71,0.35); background: rgba(255,181,71,0.08); }
.chip-pool    { color: var(--pool);    border-color: rgba(47,181,255,0.35); background: rgba(47,181,255,0.08); }
.chip-water   { color: var(--water);   border-color: rgba(74,168,255,0.35); background: rgba(74,168,255,0.08); }
.chip-switch  { color: var(--switch);  border-color: rgba(74,222,128,0.35); background: rgba(74,222,128,0.08); }
.chip-neutral { color: var(--muted);   border-color: var(--line);           background: var(--panel-2); }

/* ── Section labels ──────────────────────────────────────────────────────── */
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 10px;
}

/* ── Spec table ──────────────────────────────────────────────────────────── */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 10px 8px; font-size: 14px; }
.spec-table td:first-child {
  color: var(--muted); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  width: 36%; padding-right: 16px;
}
.spec-table td:last-child { font-family: var(--mono); font-size: 13px; }

/* ── Feature grid ────────────────────────────────────────────────────────── */
.feature-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.feature-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.feature-icon { font-size: 22px; margin-bottom: 10px; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.feature-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(255,181,71,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.hero-eyebrow::before {
  content: ""; display: inline-block; width: 24px; height: 1px; background: var(--accent);
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px); font-weight: 800;
  line-height: 1.12; letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 20px; max-width: 700px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: clamp(16px, 2vw, 18px); color: var(--muted);
  max-width: 560px; line-height: 1.65; margin-bottom: 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Product hero colour overrides */
.hero-switch::before  { background: radial-gradient(ellipse 60% 50% at 70% 40%, rgba(74,222,128,0.12) 0%, transparent 70%); }
.hero-gateway::before {
  background: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(255,181,71,0.08) 0%, transparent 70%);
}
.hero-pool::before {
  background: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(47,181,255,0.08) 0%, transparent 70%);
}
.hero-water::before {
  background: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(74,168,255,0.08) 0%, transparent 70%);
}

/* ── Trust bar ───────────────────────────────────────────────────────────── */
.trust-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0; background: var(--panel);
}
.trust-bar-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: center; justify-content: space-around;
}
.trust-item {
  display: flex; align-items: center; gap: 10px;
}
.trust-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 8px var(--ok); flex-shrink: 0;
}
.trust-item strong { font-size: 13px; font-weight: 700; color: var(--text); }
.trust-item span { font-size: 12px; color: var(--muted); display: block; }

/* ── Product cards (homepage) ─────────────────────────────────────────────── */
.product-cards {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.product-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s, transform .2s;
  text-decoration: none; color: inherit;
}
.product-card:hover { transform: translateY(-2px); text-decoration: none; color: inherit; }
.product-card.gateway:hover { border-color: rgba(255,181,71,0.5); }
.product-card.pool:hover    { border-color: rgba(47,181,255,0.5); }
.product-card.water:hover   { border-color: rgba(74,168,255,0.5); }
.product-card.switch:hover  { border-color: rgba(74,222,128,0.5); }
.product-card-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: grid; place-items: center; font-size: 20px;
  background: var(--panel-2); border: 1px solid var(--line);
}
.product-card h3 { font-size: 18px; font-weight: 700; }
.product-card .product-tag { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.product-card p { font-size: 14px; color: var(--muted); line-height: 1.6; flex: 1; }
.product-card .card-link { font-size: 13px; font-weight: 600; color: var(--accent); }
.product-card.gateway .card-link { color: var(--gateway); }
.product-card.water   .card-link { color: var(--water); }
.product-card.switch  .card-link { color: var(--switch); }

/* ── Architecture diagram ─────────────────────────────────────────────────── */
.arch-diagram {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 12px; text-align: center;
}
.arch-node {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 18px;
  font-size: 13px; font-weight: 600; color: var(--text); min-width: 110px;
}
.arch-node small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.arch-node.accent { border-color: var(--accent); color: var(--accent); }
.arch-arrow { color: var(--muted); font-size: 18px; }
/* arch-label: protocol badge (RS485, Wi-Fi, MQTT) on desktop shows as "label →" */
.arch-label { font-size: 11px; color: var(--muted); }
.arch-label::after { content: ' →'; }

@media (max-width: 600px) {
  /* Switch each branch to a vertical column */
  .arch-branch {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
  }
  /* Each node fills full width */
  .arch-branch .arch-node {
    width: 100% !important;
    min-width: unset !important;
    box-sizing: border-box;
    text-align: left;
  }
  /* Regular → arrows: hide character, show ↓ via ::before */
  .arch-branch .arch-arrow:not(.arch-label) {
    transform: none;
    font-size: 0;
    padding: 2px 16px;
    display: block;
  }
  .arch-branch .arch-arrow:not(.arch-label)::before {
    content: '↓';
    font-size: 16px;
    color: var(--muted);
  }
  /* Protocol labels (RS485, Wi-Fi, MQTT): show as ↓ badge */
  .arch-branch .arch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--muted);
  }
  .arch-branch .arch-label::before {
    content: '↓';
    font-size: 14px;
    color: var(--muted);
  }
  .arch-branch .arch-label::after { content: ''; } /* remove desktop → suffix */
}

/* ── Callout / highlight block ───────────────────────────────────────────── */
.callout {
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 20px 24px;
}
.callout.gateway { border-left-color: var(--gateway); }
.callout.pool    { border-left-color: var(--pool); }
.callout.water   { border-left-color: var(--water); }
.callout.switch  { border-left-color: var(--switch); }
.callout p { font-size: 15px; color: var(--muted); line-height: 1.7; }
.callout strong { color: var(--text); }

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  background: var(--panel); border-top: 1px solid var(--line);
  padding: 48px 0 28px;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: grid; gap: 40px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand .nav-brand { margin-bottom: 12px; }
.footer-brand p { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 13px; color: var(--muted); }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  max-width: var(--max-w); margin: 32px auto 0; padding: 20px 24px 0;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--text); }

/* ── Portal login ────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh; display: grid; place-items: center;
  padding: 24px; background: var(--bg);
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px 32px;
  box-shadow: var(--shadow);
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.login-card .login-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.field input {
  width: 100%; padding: 11px 14px; font-size: 15px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--mono); letter-spacing: 0.05em;
  transition: border-color .15s; outline: none;
}
.field input:focus { border-color: var(--accent); }
.field input.sans { font-family: var(--sans); letter-spacing: 0; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.login-note {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.6; text-align: center;
}
.login-note a { color: var(--accent); }

/* ── Docs library ────────────────────────────────────────────────────────── */
.doc-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.doc-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 14px;
  text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s;
}
.doc-card:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.doc-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: grid; place-items: center; font-size: 18px; flex-shrink: 0;
  background: var(--panel-2); border: 1px solid var(--line);
}
.doc-info { flex: 1; min-width: 0; }
.doc-info strong { font-size: 13px; font-weight: 600; color: var(--text); display: block; margin-bottom: 2px; }
.doc-info span { font-size: 11px; color: var(--muted); }
.doc-dl {
  font-size: 11px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-top: 8px; display: block;
}

/* ── Mono value display ──────────────────────────────────────────────────── */
.mono { font-family: var(--mono); }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-gateway { color: var(--gateway); }
.text-water   { color: var(--water); }

/* ── Phone mockup frame ─────────────────────────────────────────────────── */
.phone-frame {
  position: relative;
  border-radius: 38px;
  border: 2px solid rgba(255,255,255,0.10);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 24px 64px rgba(0,0,0,0.55),
    0 4px 16px rgba(0,0,0,0.3);
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}
.phone-frame img {
  width: 100%;
  display: block;
  border-radius: 36px;
}

/* ── App screenshot gallery ─────────────────────────────────────────────── */
.app-gallery {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 12px 4px 28px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.app-gallery::-webkit-scrollbar { height: 3px; }
.app-gallery::-webkit-scrollbar-track { background: var(--line); border-radius: 2px; }
.app-gallery::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 2px; }
.app-gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  scroll-snap-align: start;
  flex-shrink: 0;
}
.app-gallery-item .cap {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  max-width: 155px;
  line-height: 1.4;
}

/* ── ECM score scale ────────────────────────────────────────────────────── */
.ecm-scale {
  margin: 20px 0;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 16px 18px;
}
.ecm-bar {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(to right, #ff3b30, #ff6b00, #ffd60a, #34c759, #1a7a3c);
  margin-bottom: 10px;
}
.ecm-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* ── Responsive utilities ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  section { padding: 56px 0; }
  .hero { padding: 72px 0 56px; }
  .phone-frame { border-radius: 28px; }
  .phone-frame img { border-radius: 26px; }
  .hero-phone { display: none; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile layout fixes — ONLY affects ≤ 768px, desktop unchanged
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Stop horizontal scroll caused by overflowing content */
  html, body { overflow-x: hidden; }
  .wrap { overflow-x: hidden; }
  /* Exception: table scroll wrappers must be able to scroll horizontally */
  .wrap .table-scroll { overflow-x: auto; }

  /* ── Collapse ALL two-column inline grids to single column ── */
  /* These selectors target inline style attributes so !important is required */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr auto"],
  [style*="grid-template-columns: 1fr auto"],
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* Three-column stats (SI Water hero) → two columns */
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* Hero: collapse grid, hide phone, centre text */
  .hero .wrap > div { display: block !important; }
  .hero-phone { display: none !important; }

  /* ECM section: put phone below text on mobile */
  .ecm-scale { margin: 16px 0; }
  .ecm-labels { font-size: 10px; }

  /* App screenshot gallery: scroll left/right is intentional — just ensure padding */
  .app-gallery { padding-left: 0; padding-right: 0; }
  .app-gallery-item .phone-frame { width: 160px !important; }

  /* Arch diagram nodes: shrink slightly so they wrap cleanly */
  .arch-node { min-width: 88px !important; font-size: 13px; }

  /* Phone frames in ECM section: full width, centred */
  [style*="display:flex;align-items:flex-start;justify-content:center"] {
    flex-direction: column !important;
    align-items: center !important;
  }
  /* Stacked ECM phones: both same size */
  [style*="display:flex;align-items:flex-start;justify-content:center"] .phone-frame {
    width: 220px !important;
    margin-top: 0 !important;
  }

  /* Trust bar: wrap to two columns */
  .trust-bar-inner { flex-wrap: wrap; gap: 12px; }
  .trust-item { flex: 1 1 calc(50% - 8px); min-width: 140px; }

  /* Section headings: a bit smaller on small screens */
  h2 { font-size: clamp(20px, 5vw, 28px) !important; }

  /* Contact form grid: stack */
  [style*="grid-template-columns:1fr 1fr"][style*="align-items:start"] {
    grid-template-columns: 1fr !important;
  }

  /* Demo strip: stack on mobile */
  .demo-strip-inner { grid-template-columns: 1fr !important; }
  .demo-strip-cta   { align-items: flex-start !important; }
}

/* ── Demo strip ──────────────────────────────────────────────────────────── */
.demo-strip {
  background: #0d1f0d;
  border-top:    1px solid rgba(74,222,128,0.18);
  border-bottom: 1px solid rgba(74,222,128,0.18);
}
.demo-strip-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.demo-strip-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(74,222,128,0.7);
  margin-bottom: 8px;
}
.demo-strip-headline {
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f4f4f5;
  margin-bottom: 10px;
  line-height: 1.2;
}
.demo-strip-body {
  color: rgba(244,244,245,0.55);
  font-size: 14px;
  line-height: 1.65;
  max-width: 540px;
  margin: 0;
}
.demo-strip-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 175px;
}
.demo-strip-hint {
  font-size: 11px;
  color: rgba(244,244,245,0.3);
  text-align: center;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Solaire Power additions
   ═══════════════════════════════════════════════════════════════════════════ */

/* Section accent chips */
.chip-power      { color: var(--accent);     border-color: rgba(255,181,71,0.35); background: rgba(255,181,71,0.08); }
.chip-commercial { color: var(--commercial); border-color: rgba(47,181,255,0.35); background: rgba(47,181,255,0.08); }
.chip-home       { color: var(--home);       border-color: rgba(74,222,128,0.35); background: rgba(74,222,128,0.08); }
.chip-heat       { color: var(--heat);       border-color: rgba(74,168,255,0.35); background: rgba(74,168,255,0.08); }
.chip-si         { color: var(--si);         border-color: rgba(47,181,255,0.35); background: rgba(47,181,255,0.08); }

/* Hero tints per page */
.hero-commercial::before { background: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(47,181,255,0.08) 0%, transparent 70%); }
.hero-home::before       { background: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(74,222,128,0.09) 0%, transparent 70%); }
.hero-si::before         { background: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(47,181,255,0.08) 0%, transparent 70%); }

/* Callout + card hover variants */
.callout.power      { border-left-color: var(--accent); }
.callout.commercial { border-left-color: var(--commercial); }
.callout.home       { border-left-color: var(--home); }
.callout.danger     { border-left-color: var(--danger); }
.callout.si         { border-left-color: var(--si); }
.product-card.commercial:hover { border-color: rgba(47,181,255,0.5); }
.product-card.home:hover       { border-color: rgba(74,222,128,0.5); }
.product-card.si:hover         { border-color: rgba(47,181,255,0.5); }
.product-card.commercial .card-link { color: var(--commercial); }
.product-card.home .card-link       { color: var(--home); }
.product-card.si .card-link         { color: var(--si); }
.text-commercial { color: var(--commercial); }
.text-home       { color: var(--home); }
.text-si         { color: var(--si); }
.text-power      { color: var(--accent); }

/* Stat tiles — big-number panels used instead of photography */
.stat-row {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.stat-tile {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
}
.stat-tile .stat-value {
  font-family: var(--mono); font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700; color: var(--text); line-height: 1.1;
}
.stat-tile .stat-value em { font-style: normal; color: var(--accent); }
.stat-tile .stat-label {
  font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5;
}
.stat-tile.tint-commercial .stat-value { color: var(--commercial); }
.stat-tile.tint-home .stat-value       { color: var(--home); }
.stat-tile.tint-power .stat-value      { color: var(--accent); }
.stat-tile.tint-danger .stat-value     { color: var(--danger); }

/* Escalation bars — tariff growth visual, CSS only */
.esc-chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.esc-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 8px; text-align: center; }
.esc-bar {
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(to top, rgba(255,181,71,0.25), rgba(255,181,71,0.85));
  border: 1px solid rgba(255,181,71,0.4); border-bottom: none;
  min-height: 8px;
}
.esc-col .esc-val { font-family: var(--mono); font-size: 12px; color: var(--text); }
.esc-col .esc-year { font-size: 11px; color: var(--muted); }

/* Process steps */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; position: relative;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--accent); display: block; margin-bottom: 10px; letter-spacing: 0.08em;
}
.step h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* Comparison table rows */
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 12px 10px; font-size: 14px; text-align: left; border-bottom: 1px solid var(--line); }
.compare th { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.compare tr:last-child td { border-bottom: none; }
.compare td:first-child { color: var(--muted); }

/* ── Solaire brand lockup (recreated from original logo) ─────────────────── */
.logo-lockup { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo-lockup:hover { text-decoration: none; }
.logo-bulb { flex-shrink: 0; display: block; }
.logo-stack { display: flex; flex-direction: column; line-height: 1; }
.logo-word {
  font-size: 19px; font-weight: 600; letter-spacing: 0.30em;
  color: var(--text); text-transform: uppercase;
  padding-bottom: 4px; margin-bottom: 3px; white-space: nowrap;
  border-bottom: 2px solid var(--accent);
}
.logo-word .lw-sub { color: var(--accent); }
.logo-tag {
  font-size: 8.5px; font-weight: 600; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
footer .logo-word { font-size: 22px; }
footer .logo-tag { font-size: 9.5px; }
@media (max-width: 480px) {
  .logo-word { font-size: 16px; letter-spacing: 0.22em; }
  .logo-tag { letter-spacing: 0.18em; font-size: 7.5px; }
}

/* ── SI brand mark ───────────────────────────────────────────────────────── */
.si-mark { height: 1.05em; width: auto; vertical-align: -0.18em; display: inline-block; }
.si-mark-lg { height: 30px; width: auto; display: block; }

/* ── Inline icon system (replaces emoji) ─────────────────────────────────── */
.icon {
  width: 1.15em; height: 1.15em;
  vertical-align: -0.22em; display: inline-block; flex-shrink: 0;
}
.feature-icon .icon, .product-card-icon .icon { width: 26px; height: 26px; vertical-align: middle; }
.feature-icon { margin-bottom: 10px; }
.pill-group label .icon { width: 16px; height: 16px; }
.flow-btn .icon { width: 15px; height: 15px; vertical-align: -0.18em; }

/* ── Phone device mockup ─────────────────────────────────────────────────── */
.device {
  position: relative; display: block;
  border-radius: 40px; padding: 10px;
  background: linear-gradient(145deg, #485062, #14181f 42%, #2c3342 85%, #4a5266);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.10),
    inset 0 0 0 5px #04060a,
    0 34px 70px rgba(0,0,0,0.55),
    0 8px 22px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.device::before { /* power button */
  content: ""; position: absolute; right: -2.5px; top: 24%;
  width: 3px; height: 10%; border-radius: 2px; background: #3d4658;
}
.device::after { /* volume keys */
  content: ""; position: absolute; left: -2.5px; top: 18%;
  width: 3px; height: 7%; border-radius: 2px; background: #3d4658;
  box-shadow: 0 calc(100% + 10px) 0 #3d4658;
}
.device-screen { display: block; width: 100%; border-radius: 30px; }
.device-island {
  position: absolute; top: 17px; left: 50%; transform: translateX(-50%);
  width: 27%; height: 13px; background: #04060a; border-radius: 9px; z-index: 2;
}
.device-sm { border-radius: 30px; padding: 7px; }
.device-sm .device-screen { border-radius: 23px; }
.device-sm .device-island { top: 12px; height: 9px; }

/* tilted hero presentation */
.device-stage { position: relative; display: grid; place-items: center; padding: 20px 0; }
.device-stage::before {
  content: ""; position: absolute; inset: 8% 4%;
  background: radial-gradient(ellipse 60% 55% at 50% 45%, rgba(255,181,71,0.22), rgba(47,181,255,0.10) 55%, transparent 75%);
  filter: blur(10px); pointer-events: none;
}
.device-tilt {
  transform: perspective(1400px) rotateY(-13deg) rotateX(3.5deg) rotate(1.5deg);
  transition: transform .5s ease;
}
.device-stage:hover .device-tilt { transform: perspective(1400px) rotateY(-4deg) rotateX(1deg); }

.store-badge { display: inline-block; height: 42px; }
.store-badge img { height: 100%; width: auto; display: block; }
