/* ═══════════════════════════════════════════════════════════════
   InfraKavach — Main landing page
   Design: premium, dark, engineered. 4px grid.
   Tokens per brand spec.
   ═══════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;

  --bg: #0B0F12;
  --surface: #141B20;
  --surface-2: #111920;
  --border: #26333C;
  --border-soft: #1c272f;
  --ink: #E8EDF2;
  --ink-2: #A6B3BD;
  --ink-3: #71818D;
  --cyan: #42C7F5;
  --blue: #168BFF;
  --cyan-soft: rgba(66, 199, 245, 0.1);

  /* Themeable component tokens — the only place colors are hardcoded. */
  --accent-ink: #04141d;
  --accent-hover: #6bd3fa;
  --header-top: rgba(11, 15, 18, 0.9);
  --header-bottom: rgba(11, 15, 18, 0.55);
  --grid-line: rgba(255, 255, 255, 0.025);
  --ghost-hover: rgba(255, 255, 255, 0.02);
  --glow-blue: rgba(22, 139, 255, 0.06);
  --glow-cyan: rgba(66, 199, 245, 0.04);
  --badge-border: rgba(66, 199, 245, 0.35);
  --frame-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);

  --sans: "Inter", "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;

  --maxw: 1160px;
  --radius: 12px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #F3F6F8;
  --surface: #FFFFFF;
  --surface-2: #E9EEF3;
  --border: #B9C5CF;
  --border-soft: #D2DBE1;
  --ink: #101E28;
  --ink-2: #465866;
  --ink-3: #5D6B76;
  --cyan: #0B6E8A;
  --blue: #0B63D6;
  --cyan-soft: rgba(11, 110, 138, 0.10);

  --accent-ink: #FFFFFF;
  --accent-hover: #095a72;
  --header-top: rgba(243, 246, 248, 0.92);
  --header-bottom: rgba(243, 246, 248, 0.62);
  --grid-line: rgba(16, 30, 40, 0.045);
  --ghost-hover: rgba(16, 30, 40, 0.04);
  --glow-blue: rgba(11, 99, 214, 0.05);
  --glow-cyan: rgba(11, 110, 138, 0.05);
  --badge-border: rgba(11, 110, 138, 0.32);
  --frame-shadow: 0 24px 60px rgba(16, 30, 40, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

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

.mono { font-family: var(--mono); }

/* ═══════════ BUTTONS ═══════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.12s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--cyan);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--ink-3); background: var(--ghost-hover); }

.btn-lg { padding: 14px 26px; font-size: 1.02rem; }

/* ═══════════ NAVIGATION ═══════════ */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(to bottom, var(--header-top), var(--header-bottom));
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-mark { flex: 0 0 auto; }

.brand-hindi {
  font-size: 0.82rem;
  color: var(--ink-3);
  font-weight: 500;
  padding-left: 2px;
  border-left: 1px solid var(--border);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  transition: background 0.2s ease;
}

.nav-links a {
  font-size: 0.94rem;
  color: var(--ink-2);
  transition: color 0.16s ease;
  padding: 4px 0;
}

.nav-links a:hover { color: var(--ink); }

.nav-cta-mobile { display: none; }
.nav-right { display: flex; align-items: center; gap: 14px; }

/* Shared theme toggle (see js/theme.js) */
.theme-toggle {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.theme-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color 0.16s ease;
}

.nav-toggle:hover { border-color: var(--ink-3); }

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ═══════════ EYEBROW + HEADINGS ═══════════ */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}

/* ═══════════ HERO ═══════════ */

.hero { position: relative; padding: 76px 0 68px; }

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 420px at 80% -10%, var(--glow-blue), transparent 62%),
    radial-gradient(520px 340px at 0% 0%, var(--glow-cyan), transparent 58%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 62% at 60% 0%, #000 18%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 60% 0%, #000 18%, transparent 74%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 720;
  line-height: 1.03;
  letter-spacing: -0.035em;
  margin-bottom: 10px;
  max-width: 15ch;
}

.hero-sub {
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  margin-bottom: 22px;
}

.lede {
  font-size: 1.08rem;
  color: var(--ink-2);
  max-width: 46ch;
  margin-bottom: 30px;
  line-height: 1.6;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  color: var(--ink-2);
  font-size: 0.82rem;
}

/* — hero visual wrapper (the animated domain map styling lives in styles/domain-map.css) — */

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 300px;
}

/* The diagram never exceeds its column — no clipping, no horizontal scroll. */
.hero-visual .dmap-widget { max-width: 100%; }

/* ═══════════ CAPABILITY ROW ═══════════ */

.capacities { border-block: 1px solid var(--border-soft); background: var(--surface-2); }

.cap-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.cap {
  padding: 26px 24px;
  border-right: 1px solid var(--border-soft);
}

.cap:last-child { border-right: 0; }

.cap dt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
}

.cap-icon { color: var(--cyan); }

.cap dd {
  margin-top: 7px;
  color: var(--ink-2);
  font-size: 0.86rem;
}

/* ═══════════ SECTIONS ═══════════ */

.section { padding: 104px 0; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--border-soft); }

.section-head { margin-bottom: 56px; }

.section-head-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: end;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.9rem);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.section-head-center { text-align: center; max-width: 680px; margin-inline: auto; }
.section-head-center .eyebrow { margin-bottom: 14px; }

.section-lede { color: var(--ink-2); font-size: 1.04rem; line-height: 1.62; max-width: 46ch; }

/* ═══════════ FEATURES ═══════════ */

.feature-list {
  border-top: 1px solid var(--border);
}

.feature-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 28px;
  padding: 32px 0 34px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.2s ease;
}

.feature-index {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--cyan);
  padding-top: 6px;
}

.feature-item h3 {
  font-size: 1.22rem;
  font-weight: 620;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.feature-item p { color: var(--ink-2); max-width: 54ch; }

/* ═══════════ PRODUCT PREVIEW ═══════════ */

.section-preview { background: var(--surface-2); border-block: 1px solid var(--border-soft); }

.preview-frame {
  max-width: 880px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--frame-shadow);
  overflow: hidden;
}

.preview-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
}

.preview-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-transform: uppercase;
}

.preview-note { color: var(--ink-3); font-size: 0.78rem; }

.preview-body { padding: 26px 26px 30px; }

.preview-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.9rem;
  margin-bottom: 22px;
}

.preview-scheme { color: var(--ink-3); }
.preview-domain { color: var(--ink); font-weight: 600; }

.preview-enter {
  margin-left: auto;
  color: var(--cyan);
  font-size: 0.9rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 36px;
  margin-bottom: 6px;
}

.preview-col-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  margin: 14px 0 8px;
  text-transform: uppercase;
}

.prow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.prow span { color: var(--ink-3); font-size: 0.88rem; }
.prow strong { color: var(--ink); font-size: 0.9rem; font-weight: 540; text-align: right; }

.preview-block { margin-top: 18px; }

.preview-ns { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }

.ns-badge {
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.78rem;
}

.preview-status { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }

.st-badge {
  padding: 7px 13px;
  border: 1px solid var(--badge-border);
  border-radius: var(--radius-sm);
  background: var(--cyan-soft);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.preview-cta { text-align: center; margin-top: 40px; }

/* ═══════════ HOW IT WORKS ═══════════ */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  padding: 30px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s ease;
}

.step:hover { border-color: var(--ink-3); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--cyan);
  margin-bottom: 20px;
}

.step h3 { font-size: 1.08rem; font-weight: 620; margin-bottom: 8px; letter-spacing: -0.01em; }
.step p { color: var(--ink-2); font-size: 0.95rem; }

/* ═══════════ FINAL CTA ═══════════ */

.section-closing { text-align: center; }

.closing {
  max-width: 560px;
  margin: 0 auto;
}

.closing h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 16px;
}

.closing p:not(.eyebrow) { color: var(--ink-2); font-size: 1.06rem; margin-bottom: 32px; }

/* ═══════════ FOOTER ═══════════ */

.site-footer { border-top: 1px solid var(--border-soft); background: var(--surface-2); padding: 40px 0; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-tagline { color: var(--ink-3); font-size: 0.9rem; margin-top: 8px; }

.footer-links { display: flex; gap: 26px; }

.footer-links a {
  color: var(--ink-2);
  font-size: 0.92rem;
  transition: color 0.16s ease;
}

.footer-links a:hover { color: var(--ink); }

.nav-links a:focus-visible,
.footer-links a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.footer-copy { color: var(--ink-3); font-size: 0.84rem; }

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .section-head-split { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .cap-row { grid-template-columns: repeat(2, 1fr); }
  .cap:nth-child(2) { border-right: 0; }
  .cap:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { height: 64px; }
  .brand-hindi { display: none; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px 18px;
    z-index: 40;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border-soft); }
  .nav-links a { display: block; padding: 14px 0; font-size: 1rem; color: var(--ink); }
  .nav-cta-mobile { display: block; border-bottom: 0 !important; padding-top: 8px; }
  .nav-cta-mobile .btn { width: 100%; justify-content: center; }
  .nav-right .btn-primary { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 52px 0 52px; }
  .hero h1 { font-size: clamp(2.1rem, 10vw, 2.9rem); }
  .hero-sub { font-size: clamp(1.3rem, 6vw, 1.7rem); }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .cap-row { grid-template-columns: 1fr; }
  .cap { border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .cap:last-child { border-bottom: 0; }

  .section { padding: 72px 0; }
  .feature-item { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .feature-index { padding-top: 0; }

  .preview-grid { grid-template-columns: 1fr; }
  .preview-body { padding: 18px 16px 22px; }
  .prow strong { text-align: right; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
}

/* ═══════════ REDUCED MOTION ═══════════ */

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