/* ──────────────────────────────────────────────────────────────────────
   Smriti · landing page styles
   Aesthetic: deep indigo/violet (Indian-night-sky inspired) over near-black,
   sharp typography (Inter + JetBrains Mono), restrained motion.
   ──────────────────────────────────────────────────────────────────── */

:root {
  /* Backgrounds */
  --bg: #030308;
  --bg-soft: #08081a;
  --bg-card: rgba(12, 12, 28, 0.65);
  --bg-card-hi: rgba(20, 18, 40, 0.75);
  --border: rgba(130, 120, 255, 0.08);
  --border-soft: rgba(130, 120, 255, 0.04);

  /* Text */
  --t1: #eeeef2;
  --t2: #9d9db8;
  --t3: #5a5a78;

  /* Brand — Deep indigo/violet (Indian night-sky) with subtle warmth */
  --accent: #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-glow: rgba(167, 139, 250, 0.12);
  --accent-2: #7c6cc4;
  --accent-2-glow: rgba(124, 108, 196, 0.12);

  --gradient: linear-gradient(135deg, #c4b5fd 0%, #818cf8 50%, #6366f1 100%);
  --gradient-soft: linear-gradient(135deg,
    rgba(167, 139, 250, 0.06),
    rgba(99, 102, 241, 0.03),
    rgba(129, 140, 248, 0.02));

  --green: #34d399;
  --yellow: #fbbf24;
  --red: #f87171;

  /* Type */
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Easing */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Subtle radial glow behind everything — indigo ambient */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 40% at 30% 0%, rgba(99, 102, 241, 0.06), transparent 60%),
    radial-gradient(ellipse 80% 50% at 70% 100%, rgba(167, 139, 250, 0.04), transparent 60%);
}

#particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
}

/* ── Typography ── */

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; color: var(--t2); text-transform: uppercase; letter-spacing: 0.08em; }

p { color: var(--t2); }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: var(--accent-bright);
}

pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--t1);
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--t1); }

/* ── Nav ── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  background: rgba(10, 10, 15, 0.7);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled {
  background: rgba(10, 10, 15, 0.85);
  box-shadow: 0 1px 0 var(--border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--t1);
}
.nav-brand:hover { color: var(--t1); }
.brand-mark {
  display: inline-block;
  font-family: serif;
  font-size: 1.3em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
}
.brand-name {
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--t2);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--t1); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { padding: 14px 18px; }
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease),
    border-color 0.2s var(--ease), background 0.2s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 24px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-bright);
  color: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 36px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--t1);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent-bright);
  background: rgba(255, 255, 255, 0.06);
  color: var(--t1);
}

.btn-nav-cta {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 0.88rem;
  border: 0;
  cursor: pointer;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-nav-cta:hover {
  background: var(--accent-bright);
  color: #000;
  box-shadow: 0 0 24px var(--accent-glow);
}

/* ── Sections ── */

section {
  padding: 96px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
section.hero { padding-top: 140px; padding-bottom: 60px; }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head .tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-bright);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--t2); max-width: 640px; margin: 0 auto; }

/* ── Hero ── */

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--t2);
  font-weight: 500;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
  animation: pulse-dot 2s var(--ease) infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.55; }
}

.hero-title {
  max-width: 820px;
  font-weight: 900;
  /* Reserve enough vertical space for the typewriter span to grow to its
     longest phrase without bumping the heading from N lines to N+1 lines.
     Without this, every keystroke of the typing animation could shift the
     entire page below the hero up or down by ~80px. We pick a min-height
     a touch larger than the *largest* phrase in initTyping() at the
     wrapping width browsers actually use here. Keeps the visual hierarchy
     stable while preserving the animation. */
  min-height: 4.4em;
  line-height: 1.05;
}
.gradient-text {
  background: var(--gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 6s var(--ease) infinite;
  /* Inline-block so the typed span occupies a layout box of stable height
     even when its text content is mid-deletion (and could otherwise be
     0 chars wide for one frame). Combined with the heading's min-height,
     this fully arrests the page jitter caused by the typewriter. */
  display: inline-block;
  min-height: 1.1em;
  vertical-align: baseline;
}
@media (min-width: 720px) {
  /* On wider viewports the heading wraps at 2 lines for nearly every
     phrase, so we can tighten the reserved height. */
  .hero-title { min-height: 2.4em; }
}
@keyframes gradient-shift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

.hero-subtitle {
  max-width: 680px;
  font-size: 1.1rem;
  color: var(--t2);
  line-height: 1.65;
}
.hero-subtitle strong { color: var(--t1); font-weight: 600; }

.hero-positioning {
  width: 100%;
  max-width: 760px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.position-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.hero-positioning p {
  color: var(--t1);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-positioning strong {
  color: var(--t1);
  font-weight: 700;
}

.position-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.position-pills span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  color: var(--t2);
  font-size: 0.84rem;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.hero-card {
  width: 100%;
  max-width: 720px;
  margin-top: 36px;
  background: rgba(21, 21, 31, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  text-align: left;
}
.card-head {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.card-dots {
  display: flex; gap: 6px;
}
.card-dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--border);
}
.card-dots span:nth-child(1) { background: #ef4444; }
.card-dots span:nth-child(2) { background: #f59e0b; }
.card-dots span:nth-child(3) { background: #22c55e; }

.card-title {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--t2);
}
.card-meta { margin-left: auto; font-family: var(--mono); font-size: 0.75rem; color: var(--t3); }
.card-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.card-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  opacity: 0;
  transform: translateX(-12px);
  animation: row-in 0.5s var(--ease) forwards;
}
.card-row[data-delay="200"] { animation-delay: 0.2s; }
.card-row[data-delay="500"] { animation-delay: 0.5s; }
.card-row[data-delay="800"] { animation-delay: 0.8s; }
@keyframes row-in {
  to { opacity: 1; transform: translateX(0); }
}
.row-icon { font-size: 1rem; }
.row-text { flex: 1; font-size: 0.9rem; color: var(--t1); }
.row-text code { color: var(--accent-bright); font-size: 0.86rem; background: none; padding: 0; }
.row-meta { font-family: var(--mono); font-size: 0.78rem; color: var(--t3); }

.card-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--t3);
}
.foot-stat strong { color: var(--accent-bright); font-weight: 700; }

/* ── Metrics bar ── */

.metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 36px;
  padding: 48px 32px;
  margin: 0 auto;
  max-width: 1100px;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.metric { text-align: center; }
.metric .num {
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--t1);
  line-height: 1;
  background: var(--gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 8s var(--ease) infinite;
}
.metric .label {
  margin-top: 6px;
  font-size: 0.84rem;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.metrics .sep {
  width: 1px; height: 32px;
  background: var(--border);
}

/* ── Sliders (Why, Capabilities, Bench) ── */

.slider-grid {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding-bottom: 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.slider-grid::-webkit-scrollbar {
  height: 6px;
}
.slider-grid::-webkit-scrollbar-track {
  background: transparent;
}
.slider-grid::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
}

.slider-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  position: relative;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease), background 0.25s var(--ease);
  opacity: 0;
  transform: translateY(28px);
}
.slider-card[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.slider-card:hover {
  border-color: rgba(167, 139, 250, 0.35);
  background: var(--bg-card-hi);
  box-shadow: 0 0 36px var(--accent-glow);
  transform: translateY(-4px);
}

.bench-card {
  flex: 0 0 80vw;
  max-width: 900px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  opacity: 1;
  transform: none;
}
.bench-card:hover {
  border-color: transparent;
  background: none;
  box-shadow: none;
  transform: none;
}

.why-num {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--accent-bright);
  font-weight: 700;
  margin-bottom: 12px;
}
.slider-card h3 { margin-bottom: 10px; }
.slider-card p { color: var(--t2); font-size: 0.95rem; line-height: 1.62; }
.slider-card strong { color: var(--t1); font-weight: 600; }

/* ── Bench ── */

.bench-table {
  max-width: 920px;
  margin: 0 auto;
}
.bench-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.bench-table th, .bench-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.95rem;
}
.bench-table th {
  background: var(--bg-soft);
  color: var(--t3);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.bench-table tr:last-child td { border-bottom: 0; }
.bench-table tr.us { background: linear-gradient(90deg,
  rgba(99, 102, 241, 0.12),
  rgba(167, 139, 250, 0.04));
}
.bench-table tr.us strong { color: var(--accent-bright); }
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  margin-left: 6px;
}
.bench-note {
  margin-top: 16px;
  font-size: 0.86rem;
  color: var(--t3);
  text-align: center;
}

/* ── Science (horizontal slider) ── */

.science-grid {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding-bottom: 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 250, 0.2) transparent;
}
.science-grid::-webkit-scrollbar { height: 6px; }
.science-grid::-webkit-scrollbar-track { background: transparent; }
.science-grid::-webkit-scrollbar-thumb {
  background-color: rgba(167, 139, 250, 0.2);
  border-radius: 6px;
}
.paper {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease),
    border-color 0.25s var(--ease);
}
.paper[data-reveal].revealed { opacity: 1; transform: translateY(0); }
.paper:hover { border-color: rgba(167, 139, 250, 0.3); }
.paper-year {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}
.paper-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.3;
  margin-bottom: 4px;
}
.paper-author {
  font-size: 0.85rem;
  color: var(--accent-bright);
  font-style: italic;
  margin-bottom: 12px;
}
.paper-body {
  font-size: 0.9rem;
  color: var(--t2);
  line-height: 1.55;
}

/* ── Demo ── */

.demo-shell {
  max-width: 880px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.demo-controls {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
#demo-input {
  flex: 1;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--t1);
  font-family: var(--mono);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s var(--ease);
}
#demo-input:focus { border-color: var(--accent-bright); }
#demo-input::placeholder { color: var(--t3); }

.demo-body {
  display: flex;
  flex-direction: row;
  min-height: 280px;
}
.demo-output {
  flex: 1;
  padding: 18px;
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--t2);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  overflow-y: auto;
  max-height: 400px;
}
.demo-graph {
  flex: 1;
  border-left: 1px solid var(--border);
  background: var(--bg-card-hi);
  position: relative;
  overflow: hidden;
}
#demo-graph-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.demo-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--t3);
}
.demo-empty code {
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-bright);
}
.demo-empty em {
  margin-top: 8px;
  font-style: italic;
  color: var(--t3);
}
.demo-line { padding: 4px 0; }
.demo-line.ok { color: var(--green); }
.demo-line.hit { color: var(--t1); }
.demo-line.note { color: var(--t3); }
.demo-line strong { color: var(--accent-bright); }

.demo-stats {
  display: flex;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--t2);
  background: var(--bg-soft);
}
.demo-stats .dim { color: var(--t3); }
.demo-stats strong { color: var(--accent-bright); font-weight: 700; }

/* ── Install ── */

.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.install-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
}
.install-step {
  position: absolute;
  top: -12px;
  left: 24px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0a0f;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px var(--accent-glow);
}
.install-card h3 { margin: 12px 0 12px; }
.install-card pre {
  font-size: 0.82rem;
  background: var(--bg);
  padding: 14px;
  margin: 0;
}
.install-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
}

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--border);
  padding: 64px 32px 36px;
  margin-top: 64px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto 32px;
}
.footer-col h4 { margin-bottom: 14px; color: var(--t3); }
.footer-col a {
  display: block;
  padding: 4px 0;
  color: var(--t2);
  font-size: 0.92rem;
}
.footer-col a:hover { color: var(--t1); }
.footer-tagline {
  font-size: 0.88rem;
  color: var(--t3);
  margin-top: 8px;
  line-height: 1.6;
}
.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: var(--t3);
  border-top: 1px solid var(--border-soft);
  padding-top: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .hero-positioning {
    padding: 16px;
  }

  .hero-positioning p {
    font-size: 0.96rem;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  section { padding: 64px 20px; }
}
