/* ============================================================
   VoltGuard — design tokens
   ============================================================ */
:root{
  --navy: #1C2226;
  --navy-dark: #101315;
  --amber: #D9151F;
  --amber-dark: #A80E17;
  --ink: #16212C;
  --slate: #5A6470;
  --slate-light: #8792A0;
  --steel: #EAF1F8;
  --steel-line: #D9E3EE;
  --white: #FFFFFF;
  --success: #2E7D32;
  --success-bg: #E8F3E9;
  --danger: #B3261E;

  --font-head: "Sora", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --radius-s: 4px;
  --radius-m: 8px;
  --container: 1160px;
  --shadow-card: 0 1px 0 rgba(14,42,71,0.06), 0 8px 20px -14px rgba(14,42,71,0.25);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--white);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{
  font-family:var(--font-head);
  color:var(--navy);
  line-height:1.15;
  margin:0 0 .5em;
  font-weight:700;
}
p{ margin:0 0 1em; color:var(--slate); max-width:62ch; }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; }

.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 24px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

:focus-visible{
  outline:2.5px solid var(--amber-dark);
  outline-offset:2px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,0.98);
  border-bottom:1px solid var(--steel-line);
}
.site-header .bar{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 24px;
  max-width:var(--container); margin:0 auto;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand img{ height:40px; width:auto; }
.brand-name{ font-family:var(--font-head); font-weight:700; font-size:1.15rem; color:var(--navy); display:none; }

.main-nav{ display:flex; align-items:center; gap:28px; }
.main-nav a{
  font-size:.95rem; font-weight:600; color:var(--navy);
  padding:6px 2px; border-bottom:2px solid transparent;
}
.main-nav a:hover{ border-bottom-color:var(--amber); }
.main-nav a.active{ border-bottom-color:var(--amber); color:var(--amber-dark); }

.nav-actions{ display:flex; align-items:center; gap:14px; }
.nav-actions .tel{ font-size:.85rem; font-weight:600; color:var(--slate); }
.nav-toggle{
  display:none; background:none; border:1.5px solid var(--steel-line);
  border-radius:var(--radius-s); width:40px; height:40px; cursor:pointer;
  align-items:center; justify-content:center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:""; display:block; width:18px; height:2px; background:var(--navy); position:relative;
}
.nav-toggle span::before{ position:absolute; top:-6px; }
.nav-toggle span::after{ position:absolute; top:6px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 22px; border-radius:var(--radius-s);
  font-weight:700; font-size:.95rem; cursor:pointer;
  border:1.5px solid transparent; transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  white-space:nowrap;
}
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--amber); color:var(--white); }
.btn-primary:hover{ background:var(--amber-dark); }
.btn-outline{ background:transparent; border-color:var(--navy); color:var(--navy); }
.btn-outline:hover{ background:var(--navy); color:var(--white); }
.btn-ghost{ background:transparent; color:var(--navy); border-color:var(--steel-line); }
.btn-ghost:hover{ border-color:var(--navy); }
.btn-block{ width:100%; }
.btn-sm{ padding:8px 16px; font-size:.85rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero{
  background:linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color:var(--white);
  position:relative;
  overflow:hidden;
}
.hero .container{
  display:grid; grid-template-columns:1.05fr .95fr; gap:48px;
  align-items:center;
  padding-top:76px; padding-bottom:64px;
}
.eyebrow-plain{ color:var(--amber); font-weight:700; font-size:.85rem; letter-spacing:.02em; margin-bottom:14px; }
.hero h1{ color:var(--white); font-size:clamp(2.1rem, 4vw, 3.1rem); max-width:14ch; }
.hero p.lead{ color:#C7D3E0; font-size:1.08rem; max-width:46ch; }
.hero-ctas{ display:flex; gap:14px; margin-top:28px; flex-wrap:wrap; }
.hero-ctas .btn-outline{ border-color:#3E5A78; color:var(--white); }
.hero-ctas .btn-outline:hover{ background:var(--white); color:var(--navy); }

.hero-stats{
  display:flex; gap:32px; margin-top:44px; padding-top:24px;
  border-top:1px solid rgba(255,255,255,0.14); flex-wrap:wrap;
}
.hero-stats .stat b{ display:block; font-family:var(--font-head); font-size:1.5rem; color:var(--white); }
.hero-stats .stat span{ font-size:.82rem; color:#9FB0C4; }

/* Waveform visual: rough oscillation settling into a flat stable line */
.wave-card{
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.14);
  border-radius:var(--radius-m);
  padding:22px 18px 10px;
}
.wave-card .wave-label{ display:flex; justify-content:space-between; font-size:.78rem; color:#9FB0C4; margin-bottom:6px; }
.wave-card svg{ width:100%; height:auto; display:block; }
.wave-rough{
  stroke:#7C8A98; fill:none; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round;
}
.wave-stable{
  stroke:var(--amber); fill:none; stroke-width:3; stroke-linecap:round;
  stroke-dasharray:640; stroke-dashoffset:640;
  animation:draw-stable 2.4s 0.5s ease-out forwards;
}
@keyframes draw-stable{ to{ stroke-dashoffset:0; } }
.wave-tag{
  display:inline-flex; align-items:center; gap:6px; font-size:.75rem; color:var(--success);
  background:rgba(46,125,50,0.16); padding:4px 10px; border-radius:20px; margin-top:8px;
}
.wave-tag::before{ content:""; width:6px; height:6px; border-radius:50%; background:var(--success); }

/* ============================================================
   Section utilities
   ============================================================ */
.section{ padding:76px 0; }
.section-tight{ padding:52px 0; }
.section-alt{ background:var(--steel); }
.section-navy{ background:var(--navy); color:var(--white); }
.section-navy p{ color:#C7D3E0; }
.section-navy h2, .section-navy h3{ color:var(--white); }

.section-head{ max-width:640px; margin-bottom:40px; }
.section-head h2{ font-size:clamp(1.6rem, 3vw, 2.1rem); }
.section-kicker{ color:var(--amber-dark); font-weight:700; font-size:.85rem; margin-bottom:10px; }
.section-navy .section-kicker{ color:var(--amber); }

.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.grid-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:24px; }
.grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
/* Grid items default to min-width:auto, which lets a wide child (e.g. a table)
   force the whole column — and the page — wider than the viewport. This lets
   them shrink so overflow-x:auto on .table-wrap can actually do its job. */
.grid-2 > *, .grid-3 > *, .grid-4 > *{ min-width:0; }

/* ============================================================
   Spec / product cards — technical spec-sheet feel, not generic SaaS cards
   ============================================================ */
.spec-card{
  border:1px solid var(--steel-line);
  border-radius:var(--radius-m);
  background:var(--white);
  padding:26px 24px;
  position:relative;
  box-shadow:var(--shadow-card);
}
/* Product photography: keeps a tall/portrait source photo from dominating the
   page on mobile — crops to a sensible frame instead of stretching full height. */
.product-shot{
  width:100%; height:340px; object-fit:cover; border-radius:8px; box-shadow:var(--shadow-card);
}
.kva-tag{ background:var(--navy); color:var(--white); font-family:var(--font-head); font-weight:700; font-size:.78rem; padding:4px 10px; border-radius:4px; }
.spec-card .kva-tag{
  position:absolute; top:-12px; right:20px;
  background:var(--navy); color:var(--amber);
  font-family:var(--font-head); font-weight:700; font-size:.78rem;
  padding:4px 10px; border-radius:4px;
}
.spec-card h3{ font-size:1.15rem; margin-bottom:8px; }
.spec-card p{ font-size:.92rem; margin-bottom:14px; }
.spec-card .spec-list{ border-top:1px dashed var(--steel-line); padding-top:14px; }
.spec-card .spec-list li{
  display:flex; justify-content:space-between; font-size:.85rem;
  padding:5px 0; color:var(--slate);
}
.spec-card .spec-list li b{ color:var(--ink); font-weight:600; }

.feature-row{ display:flex; gap:16px; align-items:flex-start; }
.feature-row .icon{
  flex:0 0 auto; width:44px; height:44px; border-radius:var(--radius-s);
  background:var(--steel); display:flex; align-items:center; justify-content:center;
  color:var(--navy);
}
.feature-row h4{ font-size:1.02rem; margin-bottom:4px; }
.feature-row p{ font-size:.92rem; margin-bottom:0; }

/* ============================================================
   Process timeline (a real sequence — Design → QC → Dispatch)
   ============================================================ */
.timeline{ display:flex; gap:0; }
.timeline .step{ flex:1; position:relative; padding:0 18px 0 0; }
.timeline .step .num{
  font-family:var(--font-head); font-weight:700; color:var(--amber-dark);
  font-size:.85rem; margin-bottom:10px; display:block;
}
.timeline .step::after{
  content:""; position:absolute; top:8px; left:calc(100% - 12px); width:24px; height:1px;
  background:var(--steel-line);
}
.timeline .step:last-child::after{ display:none; }
.timeline .step h4{ font-size:1rem; margin-bottom:6px; }
.timeline .step p{ font-size:.88rem; }

/* ============================================================
   Table (comparison / specs)
   ============================================================ */
.table-wrap{ overflow-x:auto; border:1px solid var(--steel-line); border-radius:var(--radius-m); }
table{ width:100%; border-collapse:collapse; font-size:.9rem; min-width:560px; }
th,td{ text-align:left; padding:13px 16px; border-bottom:1px solid var(--steel-line); }
thead th{ background:var(--steel); color:var(--navy); font-family:var(--font-head); font-size:.82rem; }
tbody tr:last-child td{ border-bottom:none; }
td.yes{ color:var(--success); font-weight:700; }
td.no{ color:var(--slate-light); }

/* ============================================================
   District / coverage list
   ============================================================ */
.chip-row{ display:flex; flex-wrap:wrap; gap:10px; }
.chip{
  border:1px solid var(--steel-line); border-radius:20px; padding:7px 14px;
  font-size:.85rem; color:var(--navy); background:var(--white);
}

/* ============================================================
   CTA band
   ============================================================ */
.cta-band{
  background:var(--navy); color:var(--white);
  border-radius:var(--radius-m);
  padding:44px 40px;
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  flex-wrap:wrap;
}
.cta-band h3{ color:var(--white); margin-bottom:6px; }
.cta-band p{ color:#C7D3E0; margin-bottom:0; }

/* ============================================================
   Forms
   ============================================================ */
.form-card{
  background:var(--white); border:1px solid var(--steel-line); border-radius:var(--radius-m);
  padding:32px; box-shadow:var(--shadow-card);
}
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.field{ margin-bottom:18px; }
.field label{ display:block; font-size:.85rem; font-weight:600; color:var(--navy); margin-bottom:6px; }
.field .hint{ font-size:.76rem; color:var(--slate-light); margin-top:4px; }
.field input, .field select, .field textarea{
  width:100%; padding:11px 13px; border:1.5px solid var(--steel-line); border-radius:var(--radius-s);
  font-family:inherit; font-size:.92rem; color:var(--ink); background:var(--white);
}
.field input:focus, .field select:focus, .field textarea:focus{
  border-color:var(--navy); outline:none;
}
.field textarea{ resize:vertical; min-height:100px; }
.field.invalid input, .field.invalid select, .field.invalid textarea{ border-color:var(--danger); }
.field .error-msg{ font-size:.78rem; color:var(--danger); margin-top:4px; display:none; }
.field.invalid .error-msg{ display:block; }

.form-status{
  margin-top:16px; padding:14px 16px; border-radius:var(--radius-s); font-size:.9rem;
  display:none;
}
.form-status.ok{ display:block; background:var(--success-bg); color:var(--success); }
.form-status.err{ display:block; background:#FBEAE9; color:var(--danger); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer{ background:var(--navy-dark); color:#AEBBCB; padding:56px 0 28px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:36px; margin-bottom:40px; }
.footer-grid > *{ min-width:0; }
.footer-grid h5{ color:var(--white); font-family:var(--font-head); font-size:.92rem; margin-bottom:16px; }
.footer-grid a{ display:block; color:#AEBBCB; font-size:.88rem; padding:5px 0; }
.footer-grid a:hover{ color:var(--amber); }
.footer-brand img{ height:34px; margin-bottom:14px; }
.footer-brand p{ color:#8092A8; font-size:.85rem; }
.social-links{ display:flex; gap:10px; margin-top:16px; }
.social-links a{
  display:flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.14);
  color:#AEBBCB; transition:background-color .15s ease, color .15s ease, border-color .15s ease;
}
.social-links a:hover{ background:var(--amber); border-color:var(--amber); color:var(--white); }
.social-links svg{ width:17px; height:17px; fill:currentColor; }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,0.08); padding-top:22px;
  display:flex; justify-content:space-between; font-size:.8rem; color:#7A8AA0; flex-wrap:wrap; gap:8px;
}

/* ============================================================
   Admin
   ============================================================ */
.admin-shell{ min-height:70vh; }
.login-box{
  max-width:380px; margin:64px auto; background:var(--white);
  border:1px solid var(--steel-line); border-radius:var(--radius-m);
  padding:34px; box-shadow:var(--shadow-card);
}
.demo-note{
  background:#FFF6E5; border:1px solid #F0D9A6; color:#7A5A10;
  border-radius:var(--radius-s); padding:12px 14px; font-size:.82rem; margin-bottom:22px;
}
.admin-topbar{
  display:flex; justify-content:space-between; align-items:center;
  padding:18px 0; border-bottom:1px solid var(--steel-line); margin-bottom:24px; flex-wrap:wrap; gap:12px;
}
.admin-stats{ display:flex; gap:16px; margin-bottom:26px; flex-wrap:wrap; }
.admin-stat{
  border:1px solid var(--steel-line); border-radius:var(--radius-m); padding:16px 20px; min-width:150px;
}
.admin-stat b{ display:block; font-family:var(--font-head); font-size:1.5rem; color:var(--navy); }
.admin-stat span{ font-size:.8rem; color:var(--slate); }
.empty-state{
  text-align:center; padding:56px 20px; color:var(--slate);
  border:1.5px dashed var(--steel-line); border-radius:var(--radius-m);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px){
  .main-nav{
    position:fixed; inset:64px 0 0 0; background:var(--white);
    flex-direction:column; align-items:flex-start; padding:24px; gap:6px;
    transform:translateX(100%); transition:transform .2s ease; overflow-y:auto;
  }
  .main-nav.open{ transform:translateX(0); }
  .main-nav a{ width:100%; padding:14px 4px; border-bottom:1px solid var(--steel-line); }
  .nav-toggle{ display:flex; }
  .nav-actions .tel{ display:none; }

  .hero .container{ grid-template-columns:1fr; padding-top:40px; }
  .hero-stats{ gap:22px; }
  .grid-3, .grid-2, .grid-4{ grid-template-columns:1fr; }
  .timeline{ flex-direction:column; gap:22px; }
  .timeline .step::after{ display:none; }
  .form-row{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
  .cta-band{ flex-direction:column; align-items:flex-start; }
  .product-shot{ height:220px; }

  /* Data tables become stacked "label: value" cards on mobile instead of a
     silently-scrollable wide table — a cut-off row reads as broken content. */
  .table-stack thead{ display:none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td{ display:block; width:100%; }
  .table-stack{ min-width:0; }
  .table-stack tr{ padding:10px 14px; border-bottom:1px solid var(--steel-line); }
  .table-stack tr:last-child{ border-bottom:none; }
  .table-stack td{ border:none; padding:3px 0; text-align:left; }
  .table-stack td::before{ content:attr(data-label) ": "; font-weight:600; color:var(--navy); }
  .table-stack td:not([data-label])::before{ content:none; }
}
