/* ==========================================================================
   XeZap — Design System
   Signature: the "current line" — a wire trace with a travelling pulse of
   light, used as the connective tissue between sections. Everything else
   stays quiet: near-black surfaces, one disciplined accent, restrained radii.
   ========================================================================== */

:root{
  /* ---- color: named tokens ---- */
  --void:      #0a0a0a;   /* page background */
  --carbon:    #141414;   /* card / section surface */
  --graphite:  #202020;   /* elevated surface, hairline borders */
  --graphite-2:#2b2b2b;   /* stronger border, hover surface */
  --ash:       #8c8c86;   /* secondary / muted text */
  --bone:      #f3f1ea;   /* primary text — warm off-white, not clinical */
  --current:   #ff5e1a;   /* signature accent — electric orange */
  --current-2: #ffb443;   /* accent gradient stop, glow only */
  --current-dim: #7a3413; /* accent at low emphasis (borders, icons idle) */
  --danger:    #ff4d4d;

  /* ---- type ---- */
  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* ---- scale ---- */
  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1:  clamp(1.2rem, 1.13rem + 0.35vw, 1.375rem);
  --step-2:  clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  --step-3:  clamp(2rem, 1.7rem + 1.5vw, 2.75rem);
  --step-4:  clamp(2.75rem, 2.2rem + 2.75vw, 4.25rem);
  --step-5:  clamp(3.4rem, 2.5rem + 4.5vw, 6rem);

  /* ---- layout ---- */
  --content-w: 1240px;
  --radius-s: 6px;
  --radius-m: 8px;
  --radius-pill: 999px;
  --border: 1px solid var(--graphite-2);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body{
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }

::selection{ background: var(--current); color: var(--void); }

:focus-visible{
  outline: 2px solid var(--current);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--bone);
}
h1{ font-size: var(--step-5); letter-spacing: -0.02em; }
h2{ font-size: var(--step-3); }
h3{ font-size: var(--step-2); }
p{ margin: 0 0 1em; color: var(--ash); max-width: 62ch; }
p.lede{ font-size: var(--step-1); color: var(--bone); }

.container{
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section{ padding: clamp(64px, 9vw, 128px) 0; }
.section--tight{ padding: clamp(40px, 6vw, 72px) 0; }
.section--surface{ background: var(--carbon); border-top: var(--border); border-bottom: var(--border); }
.section--current{
  background: linear-gradient(180deg, rgba(255,94,26,0.08), rgba(255,94,26,0.02));
  border-top: 1px solid var(--current-dim);
  border-bottom: 1px solid var(--current-dim);
}

/* ---- eyebrow / mono labels ---- */
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--current);
  margin-bottom: 18px;
}
.eyebrow::before{
  content: "";
  width: 7px; height: 7px;
  background: var(--current);
  border-radius: 50%;
  box-shadow: 0 0 10px 2px rgba(255,94,26,0.6);
  flex: none;
}
.eyebrow--ash{ color: var(--ash); }
.eyebrow--ash::before{ background: var(--ash); box-shadow: none; }

/* ---- buttons ---- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--current); color: #180a02; }
.btn-primary:hover{ background: var(--current-2); }
.btn-ghost{ background: transparent; color: var(--bone); border-color: var(--graphite-2); }
.btn-ghost:hover{ border-color: var(--current); color: var(--current); }
.btn-row{ display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn svg{ width: 16px; height: 16px; }

/* ---- nav ---- */
.nav{
  position: sticky; top: 0; z-index: 50;
  background: var(--void);
  border-bottom: 1px solid var(--graphite);
}
.nav .container{ display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand{ display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.nav-links{ display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a{ font-size: var(--step--1); font-weight: 500; color: var(--ash); transition: color .15s ease; }
.nav-links a:hover, .nav-links a.is-active{ color: var(--bone); }
.nav-cta{ display: flex; align-items: center; gap: 18px; }
.nav-toggle{ display: none; background: none; border: 0; color: var(--bone); cursor: pointer; padding: 8px; }

@media (max-width: 900px){
  .nav-links{
    position: fixed; inset: 76px 0 0 0; height: calc(100dvh - 76px);
    background: var(--void); flex-direction: column; justify-content: flex-start;
    padding: 32px 24px; gap: 26px; transform: translateX(100%);
    transition: transform .25s ease; overflow-y: auto;
  }
  .nav-links.is-open{ transform: translateX(0); }
  .nav-links a{ font-size: var(--step-1); color: var(--bone); }
  .nav-toggle{ display: inline-flex; }
  .nav-cta .btn-ghost{ display: none; }
}

/* ---- current line: the signature divider ---- */
.current-line{
  position: relative;
  height: 2px;
  background: var(--graphite-2);
  overflow: hidden;
  margin: 0;
}
.current-line::after{
  content: "";
  position: absolute; top: 0; left: -20%;
  width: 20%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--current), var(--current-2), transparent);
  animation: travel 3.6s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255,94,26,0.7));
}
@keyframes travel{
  0%{ left: -20%; }
  100%{ left: 100%; }
}
@media (prefers-reduced-motion: reduce){
  .current-line::after{ animation: none; left: 40%; }
}

/* ---- grid helpers ---- */
.grid{ display: grid; gap: 24px; }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){
  .grid-3, .grid-4{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; }
}

/* ---- card ---- */
.card{
  background: var(--carbon);
  border: var(--border);
  border-radius: var(--radius-m);
  padding: 32px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover{ border-color: var(--graphite-2); }
.card .icon{
  width: 44px; height: 44px;
  border-radius: var(--radius-s);
  background: rgba(255,94,26,0.1);
  color: var(--current);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card h3{ font-size: var(--step-1); margin-bottom: 10px; }
.card p{ margin-bottom: 0; font-size: var(--step--1); }

/* ---- spec / datasheet tables (mono) ---- */
.spec{
  font-family: var(--font-mono);
  font-size: var(--step--1);
  border-top: var(--border);
}
.spec-row{
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 0;
  border-bottom: var(--border);
  color: var(--ash);
}
.spec-row span:last-child{ color: var(--bone); text-align: right; }

/* ---- stat block ---- */
.stat{ display: flex; flex-direction: column; gap: 4px; }
.stat .value{ font-family: var(--font-display); font-size: var(--step-3); color: var(--bone); }
.stat .value .unit{ color: var(--current); }
.stat .label{ font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); }

/* ---- pill tag ---- */
.tag{
  display: inline-block; font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--graphite-2); color: var(--ash);
}
.tag--current{ border-color: var(--current-dim); color: var(--current); background: rgba(255,94,26,0.08); }

/* ---- timeline (legit sequence content only) ---- */
.timeline{ display: flex; flex-direction: column; }
.timeline-item{
  display: grid; grid-template-columns: 64px 1fr; gap: 24px;
  padding: 28px 0; border-bottom: var(--border);
}
.timeline-item:last-child{ border-bottom: none; }
.timeline-item .num{ font-family: var(--font-mono); color: var(--current); font-size: var(--step-1); }

/* ---- forms ---- */
.form-row{ display: grid; gap: 20px; grid-template-columns: 1fr 1fr; margin-bottom: 20px; }
@media (max-width: 640px){ .form-row{ grid-template-columns: 1fr; } }
label{ display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); margin-bottom: 8px; }
input, select, textarea{
  width: 100%; background: var(--carbon); border: var(--border); border-radius: var(--radius-s);
  padding: 13px 16px; color: var(--bone); font-family: var(--font-body); font-size: var(--step-0);
}
input:focus, select:focus, textarea:focus{ outline: none; border-color: var(--current); }
textarea{ resize: vertical; min-height: 120px; }
.field{ margin-bottom: 20px; }
.radio-group{ display: flex; gap: 12px; flex-wrap: wrap; }
.radio-group input{ display: none; }
.radio-group label{
  display: inline-flex; align-items: center; padding: 10px 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--graphite-2); font-size: var(--step--1); text-transform: none; letter-spacing: 0;
  font-family: var(--font-body); color: var(--ash); cursor: pointer; margin: 0; transition: all .15s ease;
}
.radio-group input:checked + label{ border-color: var(--current); color: var(--current); background: rgba(255,94,26,0.08); }
.form-note{ font-size: 0.8rem; color: var(--ash); margin-top: 12px; }
.form-success{ background: rgba(255,94,26,0.1); border: 1px solid var(--current-dim); border-radius: var(--radius-m); padding: 20px 24px; }

/* ---- footer ---- */
.footer{ border-top: var(--border); padding: 64px 0 32px; }
.footer-grid{ display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 48px; }
@media (max-width: 900px){ .footer-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer h4{ font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash); margin-bottom: 18px; }
.footer ul{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer a{ color: var(--bone); font-size: var(--step--1); }
.footer a:hover{ color: var(--current); }
.footer-bottom{ display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 32px; border-top: var(--border); font-size: 0.8rem; color: var(--ash); }
.social-row{ display: flex; gap: 16px; }
.social-row a{ color: var(--ash); }
.social-row a:hover{ color: var(--current); }

/* ---- hero ---- */
.hero{ padding: clamp(72px, 12vw, 140px) 0 clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.hero-grid-bg{
  position: absolute; inset: 0; z-index: 0; opacity: 0.5;
  background-image: linear-gradient(var(--graphite) 1px, transparent 1px), linear-gradient(90deg, var(--graphite) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}
.hero .container{ position: relative; z-index: 1; }
.hero h1{ max-width: 15ch; }
.hero .lede{ max-width: 52ch; margin-bottom: 36px; }
.hero-badges{ display: flex; gap: 10px; flex-wrap: wrap; margin-top: 40px; }

/* ---- page header (non-home) ---- */
.page-hero{ padding: clamp(56px, 8vw, 96px) 0 48px; }
.page-hero h1{ max-width: 20ch; font-size: var(--step-4); }

/* ---- section head ---- */
.section-head{ max-width: 640px; margin-bottom: 48px; }
.section-head--split{ display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* ---- two-col feature ---- */
.split{ display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px){ .split{ grid-template-columns: 1fr; } }
.split.reverse .split-media{ order: -1; }
@media (max-width: 860px){ .split.reverse .split-media{ order: 0; } }
.split-media{
  aspect-ratio: 4/3; border-radius: var(--radius-m); border: var(--border);
  background: var(--carbon);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

/* ---- map (network page, illustrative, not literal GPS data) ---- */
.map-wrap{
  border: var(--border); border-radius: var(--radius-m); background: var(--carbon);
  padding: 24px; overflow: hidden;
}
.map-wrap--india{ max-width: 640px; margin-left: auto; margin-right: auto; }
.map-legend{ display: flex; gap: 24px; flex-wrap: wrap; margin-top: 20px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ash); }
.map-legend span{ display: inline-flex; align-items: center; gap: 8px; }
.dot{ width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--current{ background: var(--current); box-shadow: 0 0 8px rgba(255,94,26,0.7); }
.dot--ash{ background: var(--ash); }
.dot--outline{ border: 1px solid var(--ash); }

/* ---- pulse dot animation on map nodes ---- */
.pulse{
  animation: pulse-ring 2.4s ease-out infinite;
  transform-origin: center;
}
@keyframes pulse-ring{
  0%{ opacity: 0.9; transform: scale(1); }
  70%{ opacity: 0; transform: scale(3.2); }
  100%{ opacity: 0; transform: scale(3.2); }
}

/* ---- cookie consent banner ---- */
.cookie-banner{
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 200;
  max-width: 720px; margin: 0 auto;
  background: var(--carbon); border: var(--border); border-radius: var(--radius-m);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  padding: 22px 26px;
  transform: translateY(140%);
  transition: transform 0.35s ease;
}
.cookie-banner.is-visible{ transform: translateY(0); }
.cookie-banner-inner p{ margin: 0 0 16px; font-size: var(--step--1); color: var(--ash); max-width: none; }
.cookie-banner-actions{ display: flex; gap: 12px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce){ .cookie-banner{ transition: none; } }

/* ---- long-form legal / prose pages ---- */
.prose{ max-width: 760px; }
.prose h2{ font-size: var(--step-2); margin-top: 2.2em; margin-bottom: 0.6em; }
.prose h2:first-child{ margin-top: 0; }
.prose h3{ font-size: var(--step-1); margin-top: 1.6em; margin-bottom: 0.5em; color: var(--bone); }
.prose p{ max-width: none; }
.prose ul, .prose ol{ margin: 0 0 1em; padding-left: 1.25em; color: var(--ash); }
.prose li{ margin-bottom: 0.5em; }
.prose li::marker{ color: var(--current); }
.prose strong{ color: var(--bone); }
.prose a{ color: var(--current); }
.prose .updated{ font-family: var(--font-mono); font-size: 0.8rem; color: var(--ash); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---- guide articles ---- */
.guide-meta{ display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-family: var(--font-mono); font-size: 0.8rem; color: var(--ash); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.guide-toc{ background: var(--carbon); border: var(--border); border-radius: var(--radius-m); padding: 24px 28px; margin: 32px 0; }
.guide-toc p{ font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); margin-bottom: 12px; max-width: none; }
.guide-toc ol{ margin: 0; padding-left: 1.25em; color: var(--bone); }
.guide-toc li{ margin-bottom: 6px; }
.guide-toc a{ color: var(--bone); }
.guide-toc a:hover{ color: var(--current); }
.guide-related{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 16px; }

/* ---- comparison table ---- */
.compare-table-wrap{ overflow-x: auto; border: var(--border); border-radius: var(--radius-m); background: var(--carbon); }
.compare-table{ width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: var(--step--1); white-space: nowrap; }
.compare-table th, .compare-table td{ padding: 14px 18px; text-align: left; border-bottom: var(--border); border-right: 1px solid var(--graphite); }
.compare-table th:last-child, .compare-table td:last-child{ border-right: none; }
.compare-table thead th{ background: var(--graphite); color: var(--bone); font-weight: 600; }
.compare-table tbody th{ color: var(--ash); font-weight: 500; background: var(--carbon); }
.compare-table td{ color: var(--bone); }
.compare-table tr:last-child td, .compare-table tr:last-child th{ border-bottom: none; }

/* ---- utility ---- */
.text-center{ text-align: center; margin-left: auto; margin-right: auto; }
.mt-0{ margin-top: 0; }
.mb-0{ margin-bottom: 0; }
.muted{ color: var(--ash); }
.reveal{ opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){ .reveal{ opacity: 1; transform: none; } }
