/* ============================================================
   NetPulse — Modern landing page
   Dark tech · glassmorphism · animated grid/aurora · responsive
============================================================ */

:root {
  /* palette */
  --bg: #050b14;
  --bg-2: #070f1d;
  --bg-3: #0a1628;
  --surface: rgba(13, 27, 47, 0.62);
  --surface-strong: rgba(14, 30, 54, 0.92);
  --border: rgba(125, 180, 255, 0.12);
  --border-strong: rgba(125, 180, 255, 0.22);
  --text: #e7f0ff;
  --muted: #93a5c0;
  --muted-soft: #7688a4;
  --heading: #f7fbff;

  --primary: #35c6ff;
  --primary-strong: #1e9eff;
  --accent: #77ffd6;
  --accent-2: #a88bff;
  --warn: #ffc266;
  --danger: #ff6b8a;

  /* scale */
  --radius: 22px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 24px 80px -12px rgba(30, 158, 255, 0.35);
  --max: 1180px;
}

/* ───────────── reset / base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
code, pre { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
::selection { background: rgba(53, 198, 255, 0.35); color: white; }

/* ───────────── animated background ───────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(rgba(125, 180, 255, 0.05) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(125, 180, 255, 0.05) 1px, transparent 1px) 0 0 / 64px 64px,
    radial-gradient(ellipse at top, #0a1628 0%, #050b14 60%);
  mask-image: radial-gradient(ellipse at center top, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center top, #000 40%, transparent 85%);
}
.bg-aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55;
  animation: drift 22s ease-in-out infinite;
}
.aurora.a1 { width: 620px; height: 620px; top: -200px; left: -160px; background: radial-gradient(circle, rgba(53,198,255,0.55), transparent 60%); }
.aurora.a2 { width: 520px; height: 520px; top: 10%; right: -180px; background: radial-gradient(circle, rgba(168,139,255,0.45), transparent 60%); animation-delay: -7s; }
.aurora.a3 { width: 680px; height: 680px; top: 55%; left: 30%; background: radial-gradient(circle, rgba(119,255,214,0.28), transparent 60%); animation-delay: -14s; }
@keyframes drift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50%      { transform: translate3d(40px, -30px, 0) scale(1.08); }
}

/* ───────────── layout ───────────── */
.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.site-shell { position: relative; }

/* ───────────── header ───────────── */
.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(5,11,20,0.85), rgba(5,11,20,0.55));
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; min-width: 0; font-weight: 800; letter-spacing: -0.02em; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 12px; object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px rgba(30,158,255,0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.brand-logo.sm { width: 32px; height: 32px; border-radius: 10px; }
.brand:hover .brand-logo { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(30,158,255,0.4); }
.brand-text { color: var(--heading); font-size: 1.05rem; }
.brand-text .accent { color: var(--primary); }

.nav-menu { display: flex; align-items: center; gap: 0.25rem; }
.nav-menu a {
  color: var(--muted); padding: 0.55rem 0.85rem; border-radius: 999px; font-size: 0.92rem; font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-menu a:hover, .nav-menu a:focus-visible { color: var(--heading); background: rgba(255,255,255,0.05); }
.nav-menu .nav-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--heading); padding: 0.55rem 1rem;
  background: linear-gradient(135deg, rgba(53,198,255,0.22), rgba(30,158,255,0.16));
  border: 1px solid rgba(53,198,255,0.3);
  margin-left: 0.4rem;
}
.nav-menu .nav-cta:hover { background: linear-gradient(135deg, rgba(53,198,255,0.32), rgba(30,158,255,0.24)); }
.nav-toggle, .nav-burger { display: none; }

/* ───────────── hero ───────────── */
.hero { padding: clamp(4rem, 8vw, 7rem) 0 3rem; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.25rem);
  align-items: center;
}
.pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.45rem 0.85rem; border-radius: 999px;
  background: rgba(119,255,214,0.08); border: 1px solid rgba(119,255,214,0.22);
  color: var(--accent); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700;
  margin-bottom: 1.25rem;
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(119,255,214,0.2); animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(119,255,214,0.2); }
  50%      { box-shadow: 0 0 0 8px rgba(119,255,214,0.0); }
}

h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -0.03em; color: var(--heading); font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 900; line-height: 1.02; }
h1 .grad {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h1 .grad-2 {
  background: linear-gradient(120deg, var(--accent-2), var(--primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-text { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 58ch; margin: 1.4rem 0 0; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }

/* buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.8rem 1.3rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}
.button:hover, .button:focus-visible { transform: translateY(-1px); }
.button-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #02121f; box-shadow: 0 16px 38px -8px rgba(30,158,255,0.55);
}
.button-primary:hover { box-shadow: 0 24px 48px -10px rgba(30,158,255,0.6); }
.button-ghost {
  background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); color: var(--heading);
}
.button-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }

/* ───────────── chat panel ───────────── */
.chat-panel { position: relative; display: flex; justify-content: flex-end; }
.chat-window {
  width: min(100%, 520px);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(18,38,66,0.94), rgba(8,18,33,0.96));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}
.chat-window-top {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.9rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}
.window-dots { display: flex; gap: 6px; }
.window-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.22); }
.window-dots span:nth-child(1) { background: #ff6b6b; }
.window-dots span:nth-child(2) { background: #ffd166; }
.window-dots span:nth-child(3) { background: #6cf0a8; }
.chat-title { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.chat-pill {
  margin-left: auto; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700;
  color: var(--accent); padding: 0.3rem 0.6rem; border-radius: 999px;
  background: rgba(119,255,214,0.08); border: 1px solid rgba(119,255,214,0.2);
}

.chat-body {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1.1rem 1rem; max-height: 430px; overflow: hidden;
}
.chat-msg {
  display: flex; gap: 0.6rem; align-items: flex-start;
  opacity: 0; transform: translateY(8px); animation: msgIn 0.45s ease forwards;
}
@keyframes msgIn { to { opacity: 1; transform: translateY(0); } }
.chat-avatar {
  width: 30px; height: 30px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800;
  color: #041220; background: linear-gradient(135deg, var(--primary), var(--accent));
}
.chat-msg.bot .chat-avatar { background: linear-gradient(135deg, var(--accent-2), var(--primary)); color: #0b0320; }
.chat-bubble {
  padding: 0.7rem 0.9rem; border-radius: 14px 14px 14px 4px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.92rem; color: var(--heading); max-width: 100%;
}
.chat-msg.bot .chat-bubble {
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(180deg, rgba(53,198,255,0.12), rgba(30,158,255,0.06));
  border-color: rgba(53,198,255,0.25);
}
.chat-bubble code {
  background: rgba(0,0,0,0.25); padding: 0.1rem 0.35rem; border-radius: 6px; font-size: 0.85em; color: #d8ecff;
}
.chat-bubble .label {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); font-weight: 800; margin-bottom: 0.35rem;
}
.chat-bubble table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-top: 0.3rem; }
.chat-bubble td { padding: 0.15rem 0.5rem 0.15rem 0; color: var(--muted); }
.chat-bubble td:last-child { color: var(--heading); text-align: right; font-variant-numeric: tabular-nums; }

.chat-input {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1rem; border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}
.chat-typing { flex: 1; color: var(--muted); font-size: 0.9rem; min-height: 22px; }
.chat-typing .cursor-blink {
  display: inline-block; color: var(--primary); animation: blink 1s steps(2, end) infinite; margin-left: 1px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ───────────── sections ───────────── */
.section { padding: clamp(4rem, 8vw, 6rem) 0; position: relative; }
.section-alt::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(10,22,40,0.6), transparent);
}
.section-heading { max-width: 760px; margin: 0 auto 2.5rem; text-align: center; }
.section-heading.left { margin: 0 0 2rem; text-align: left; max-width: 520px; }
.section-heading h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); margin-bottom: 1rem; }
.section-heading p { margin: 0; color: var(--muted); font-size: 1.02rem; line-height: 1.75; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.74rem;
  color: var(--accent); font-weight: 800; margin-bottom: 1rem;
}

/* ───────────── grids ───────────── */
.two-up, .three-up { display: grid; gap: 1.1rem; }
.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ───────────── cards (shared) ───────────── */
.content-card, .problem-card, .feature-card, .stack-card, .cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.content-card:hover, .problem-card:hover, .feature-card:hover, .stack-card:hover {
  transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow);
}

.content-card, .problem-card, .feature-card, .stack-card { padding: 1.6rem 1.5rem 1.5rem; }
.content-card h3, .problem-card h3, .feature-card h3, .stack-card h3 { font-size: 1.15rem; margin-bottom: 0.7rem; }
.content-card p, .problem-card p, .feature-card p, .stack-card p { margin: 0; color: var(--muted); }

.card-kicker {
  display: inline-block; font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary); background: rgba(53,198,255,0.08);
  border: 1px solid rgba(53,198,255,0.2);
  padding: 0.25rem 0.55rem; border-radius: 8px; margin-bottom: 0.85rem; font-weight: 700;
}

.icon-badge {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; margin-bottom: 1rem;
  font-size: 0.9rem; font-weight: 800; color: #04101b;
  background: linear-gradient(135deg, var(--accent), var(--primary));
}
.icon-dot {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  margin-bottom: 1rem; color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}

/* content-card pre block (quickstart) */
.content-card pre {
  margin: 1rem 0 0; padding: 0.9rem 1rem; border-radius: 14px;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.05); overflow-x: auto;
}
.content-card code { color: #d8ecff; font-size: 0.85rem; line-height: 1.7; }

/* ───────────── safety ───────────── */
.safety-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2rem; align-items: start; }
.safety-stack { display: grid; gap: 0.9rem; }
.stack-card.simple { padding: 1.4rem 1.4rem 1.3rem; }

/* ───────────── CTA ───────────── */
.cta-section { padding-top: 1rem; }
.cta-card {
  border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.6rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: linear-gradient(135deg, rgba(53,198,255,0.14), rgba(119,255,214,0.08) 55%, rgba(168,139,255,0.1));
  border: 1px solid rgba(53,198,255,0.24);
  box-shadow: var(--shadow-glow);
  position: relative; overflow: hidden;
}
.cta-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(53,198,255,0.25), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(168,139,255,0.2), transparent 45%);
}
.cta-card h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 0.5rem; }
.cta-card p { margin: 0; color: var(--muted); }
.cta-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ───────────── footer ───────────── */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06); padding: 2rem 0;
  margin-top: 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(3,8,15,0.55));
}
.footer-row {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 1rem; color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { font-size: 0.93rem; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { margin: 0; font-size: 0.88rem; color: var(--muted-soft); }

/* ───────────── reveal animation ───────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ───────────── responsive ───────────── */
@media (max-width: 980px) {
  .hero-grid, .two-up, .three-up, .safety-layout { grid-template-columns: 1fr; }
  .chat-panel { justify-content: stretch; }
  .cta-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .nav { min-height: 68px; }
  .nav-burger {
    display: inline-flex; width: 44px; height: 44px; border-radius: 12px;
    align-items: center; justify-content: center; flex-direction: column; gap: 5px;
    border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
    cursor: pointer;
  }
  .nav-burger span { width: 18px; height: 2px; border-radius: 99px; background: var(--heading); transition: 0.2s ease; }
  .nav-menu {
    position: absolute; inset: calc(100% + 0.5rem) 1rem auto 1rem;
    display: grid; gap: 0.25rem; padding: 0.8rem; border-radius: 18px;
    background: rgba(6,15,28,0.98); border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-menu a { padding: 0.85rem 1rem; border-radius: 14px; width: 100%; }
  .nav-toggle:checked ~ .nav-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-toggle:checked + .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .footer-row { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .button { width: 100%; }
  .hero-actions { width: 100%; }
  .section { padding: 3.4rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
