/* VyomGrid — vyomgrid.com */
:root {
  --bg: #05060b;
  --bg-soft: #0a0d16;
  --panel: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaf2;
  --muted: #9aa3b8;
  --faint: #6b7387;
  --accent: #7c6cff;
  --accent-2: #38e1ff;
  --grad: linear-gradient(100deg, #7c6cff, #38e1ff);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(124, 108, 255, 0.35); }

/* film-grain overlay */
.noise {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 5vw, 3.5rem);
  transition: background 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 6, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.brand-mark { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  position: relative; transition: color 0.25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 2px; width: 0;
  background: var(--grad); border-radius: 2px; transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.7rem; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad); color: #06070d;
  box-shadow: 0 8px 30px rgba(124, 108, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 42px rgba(56, 225, 255, 0.4); }
.btn-ghost {
  color: var(--text); border: 1px solid var(--border); background: var(--panel);
}
.btn-ghost:hover { border-color: rgba(124, 108, 255, 0.55); background: rgba(124, 108, 255, 0.08); }
.btn-small { padding: 0.55rem 1.15rem; font-size: 0.85rem; background: var(--grad); color: #06070d; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 7rem 1.5rem 4rem; overflow: hidden;
}
#graph-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; top: 22%; left: 50%; transform: translate(-50%, -50%);
  width: 62vw; height: 62vw; max-width: 900px; max-height: 900px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.16), rgba(56, 225, 255, 0.05) 45%, transparent 70%);
  filter: blur(20px); pointer-events: none;
  animation: breathe 7s ease-in-out infinite;
}
.hero-glow.small { top: 0; width: 46vw; height: 46vw; opacity: 0.8; }
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 0.75; }
}
.hero-content { position: relative; z-index: 2; max-width: 880px; }
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 1.2rem;
}
h1 {
  font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.05;
}
h2 {
  font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.12;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub {
  margin: 1.6rem auto 0; max-width: 640px;
  color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem);
}
.hero-sub strong { color: var(--text); }
.hero-cta { display: flex; gap: 1rem; justify-content: center; margin-top: 2.4rem; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: clamp(1.6rem, 5vw, 4rem); justify-content: center;
  margin-top: 3.6rem; flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num {
  font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { color: var(--faint); font-size: 0.82rem; font-family: var(--mono); letter-spacing: 0.06em; }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px; border: 1.5px solid var(--border); border-radius: 14px;
  display: flex; justify-content: center; z-index: 2;
}
.scroll-hint span {
  width: 3px; height: 8px; border-radius: 3px; background: var(--accent-2);
  margin-top: 7px; animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- sections ---------- */
.section { padding: clamp(4.5rem, 10vw, 8.5rem) clamp(1.2rem, 6vw, 4rem); max-width: 1200px; margin: 0 auto; }
.section-head { max-width: 720px; margin-bottom: 3.2rem; }
.section-sub { color: var(--muted); margin-top: 1.1rem; font-size: 1.05rem; }

/* ---------- cards ---------- */
.card-grid { display: grid; gap: 1.2rem; }
.card-grid.four { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card-grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 1.8rem; position: relative; overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 108, 255, 0.14), transparent 60%);
  transition: opacity 0.35s ease; pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: rgba(124, 108, 255, 0.4); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.12rem; margin-bottom: 0.55rem; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 0.94rem; }
.card p code { font-family: var(--mono); font-size: 0.88em; color: var(--accent-2); }
.card-icon {
  font-size: 1.4rem; margin-bottom: 0.9rem; color: var(--accent-2);
  font-family: var(--mono);
}
.card-tag {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(124, 108, 255, 0.35); border-radius: 999px;
  padding: 0.22rem 0.7rem; margin-bottom: 1rem;
}
.card.feature { padding: 2rem; }

/* ---------- product screenshots ---------- */
.shot-grid { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.shot { margin: 0; }
.shot img {
  width: 100%; display: block; border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.shot figcaption { margin-top: 0.9rem; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.shot figcaption strong { color: var(--text); }

/* ---------- thesis ---------- */
.thesis { text-align: center; }
.thesis-inner { max-width: 860px; margin: 0 auto; }
.thesis blockquote {
  font-size: clamp(1.5rem, 3.6vw, 2.5rem); font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.3; margin-bottom: 1.6rem;
}
.thesis-note { color: var(--muted); max-width: 640px; margin: 0 auto; }
.thesis-note em { color: var(--text); font-style: normal; border-bottom: 1px solid var(--accent); }

/* ---------- agent loop diagram ---------- */
.loop-wrap { display: flex; justify-content: center; }
.loop-diagram { position: relative; width: min(560px, 88vw); aspect-ratio: 1; }
.loop-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.loop-ring { animation: spinRing 60s linear infinite; transform-origin: center; }
@keyframes spinRing { to { transform: rotate(360deg); } }
.loop-pulse { filter: drop-shadow(0 0 8px #38e1ff); }
.loop-node {
  position: absolute; width: 118px; height: 118px; margin: -59px 0 0 -59px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 13, 22, 0.9); border: 1px solid var(--border);
  text-align: center; font-size: 0.78rem; font-weight: 600; line-height: 1.35;
  color: var(--muted); backdrop-filter: blur(6px);
  transition: border-color 0.4s, color 0.4s, box-shadow 0.4s, transform 0.4s;
}
.loop-node.lit {
  border-color: var(--accent-2); color: var(--text);
  box-shadow: 0 0 26px rgba(56, 225, 255, 0.35), inset 0 0 18px rgba(56, 225, 255, 0.08);
  transform: scale(1.07);
}
.loop-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 150px; height: 150px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  background: radial-gradient(circle at 35% 30%, rgba(124, 108, 255, 0.22), rgba(10, 13, 22, 0.95) 70%);
  border: 1px solid rgba(124, 108, 255, 0.45);
  text-align: center; font-size: 0.82rem; line-height: 1.3; color: var(--text);
  box-shadow: 0 0 44px rgba(124, 108, 255, 0.28);
  animation: centerPulse 3.2s ease-in-out infinite;
}
.loop-center svg { color: var(--accent-2); }
@keyframes centerPulse {
  0%, 100% { box-shadow: 0 0 44px rgba(124, 108, 255, 0.28); }
  50% { box-shadow: 0 0 66px rgba(56, 225, 255, 0.4); }
}

/* ---------- strip ---------- */
.strip { max-width: 1200px; }
.strip-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(124, 108, 255, 0.1), rgba(56, 225, 255, 0.05));
  border: 1px solid rgba(124, 108, 255, 0.28); border-radius: 24px;
  padding: clamp(2rem, 5vw, 3.5rem);
}
.strip-inner > div { max-width: 640px; }

/* ---------- final CTA ---------- */
.cta-final { text-align: center; }
.cta-box {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 28px;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  background: var(--bg-soft);
}
.cta-glow {
  position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 70%; height: 90%; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.22), transparent 65%);
  filter: blur(30px); pointer-events: none;
}
.cta-box p { color: var(--muted); margin: 1.1rem auto 2rem; max-width: 520px; position: relative; }
.cta-box h2, .cta-box .btn { position: relative; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 3.5rem clamp(1.2rem, 6vw, 4rem) 2rem; }
.footer-inner {
  max-width: 1200px; margin: 0 auto 2.2rem;
  display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.brand-text {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.footer-brand p { color: var(--faint); font-size: 0.88rem; max-width: 340px; margin-top: 0.5rem; }
.footer-links { display: flex; gap: 1.8rem; align-items: flex-start; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.25s; }
.footer-links a:hover { color: var(--text); }
.footer-line {
  max-width: 1200px; margin: 0 auto; color: var(--faint);
  font-size: 0.8rem; font-family: var(--mono); letter-spacing: 0.04em;
}

/* ---------- sub-page hero ---------- */
.page-hero {
  position: relative; text-align: center;
  padding: 10rem 1.5rem 3rem; max-width: 900px; margin: 0 auto; overflow: hidden;
}

/* ---------- platform: agent rows ---------- */
.agent-list { display: flex; flex-direction: column; gap: 0.9rem; }
.agent-row {
  display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2.4rem);
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 1.6rem clamp(1.2rem, 3vw, 2.2rem);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.agent-row:hover {
  transform: translateX(8px); border-color: rgba(56, 225, 255, 0.4);
  background: rgba(56, 225, 255, 0.04);
}
.agent-idx {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 500;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; flex-shrink: 0;
}
.agent-body { flex: 1; }
.agent-body h3 { font-size: 1.15rem; margin-bottom: 0.35rem; letter-spacing: -0.01em; }
.agent-body p { color: var(--muted); font-size: 0.94rem; }
.agent-tag {
  flex-shrink: 0; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2);
  border: 1px solid rgba(56, 225, 255, 0.3); border-radius: 999px; padding: 0.3rem 0.8rem;
}

/* ---------- vision: personas ---------- */
.persona-cloud { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.persona {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0.6rem 1.3rem; font-size: 0.92rem; color: var(--muted);
  background: var(--panel); cursor: default;
  transition: all 0.3s ease;
}
.persona:hover {
  color: var(--text); border-color: var(--accent);
  background: rgba(124, 108, 255, 0.1); transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(124, 108, 255, 0.2);
}

/* ---------- vision: bookends ---------- */
.bookend-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.6rem; align-items: center;
}
.bookend {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
}
.bookend:hover { border-color: rgba(124, 108, 255, 0.4); transform: translateY(-4px); }
.bookend-when {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 0.8rem;
}
.bookend h3 { font-size: 1.2rem; letter-spacing: -0.015em; margin-bottom: 0.6rem; }
.bookend p { color: var(--muted); font-size: 0.94rem; }
.bookend-arrow { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.bookend-arrow svg { width: 110px; animation: arrowSlide 2.4s ease-in-out infinite; }
.bookend-arrow span { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); letter-spacing: 0.08em; }
@keyframes arrowSlide {
  0%, 100% { transform: translateX(0); opacity: 1; }
  50% { transform: translateX(8px); opacity: 0.7; }
}

/* ---------- vision: is / is not ---------- */
.isnot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
.isnot-col { border-radius: 20px; padding: 2.4rem; border: 1px solid var(--border); }
.isnot-col.is { background: linear-gradient(140deg, rgba(124, 108, 255, 0.12), rgba(56, 225, 255, 0.05)); border-color: rgba(124, 108, 255, 0.35); }
.isnot-col.not { background: var(--panel); }
.isnot-col h3 { font-size: 1.3rem; margin-bottom: 0.8rem; letter-spacing: -0.02em; }
.isnot-col p { color: var(--muted); }

/* ---------- vision: risks ---------- */
.risk-list { display: flex; flex-direction: column; gap: 0.8rem; }
.risk {
  display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 1.4rem;
  border: 1px solid var(--border); border-radius: 14px; padding: 1.3rem 1.6rem;
  background: var(--panel); transition: border-color 0.3s;
}
.risk:hover { border-color: rgba(255, 122, 144, 0.35); }
.risk strong { font-size: 0.98rem; }
.risk span { color: var(--muted); font-size: 0.92rem; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem; visibility: hidden; opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.modal.open { visibility: visible; opacity: 1; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 4, 8, 0.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.modal-card {
  position: relative; width: min(480px, 100%);
  background: #0b0e18; border: 1px solid rgba(124, 108, 255, 0.35);
  border-radius: 22px; padding: 2.2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(124, 108, 255, 0.12);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh; overflow-y: auto;
}
.modal.open .modal-card { transform: translateY(0) scale(1); }
.modal-card h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.modal-card .eyebrow { margin-bottom: 0.6rem; }
.modal-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.4rem; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--muted); font-size: 1.15rem; line-height: 1; cursor: pointer;
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.modal-close:hover { color: var(--text); border-color: var(--accent); transform: rotate(90deg); }
.field { margin-bottom: 1rem; }
.field label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: var(--muted); margin-bottom: 0.35rem; letter-spacing: 0.02em;
}
.field input, .field textarea {
  width: 100%; padding: 0.7rem 0.9rem; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04);
  color: var(--text); font-family: var(--font); font-size: 0.94rem;
  transition: border-color 0.25s, box-shadow 0.25s; resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.18);
}
.modal-submit { width: 100%; border: none; cursor: pointer; font-family: var(--font); margin-top: 0.4rem; }
.modal-alt {
  margin-top: 1.2rem; text-align: center;
  color: var(--faint); font-size: 0.84rem;
}

.footer-contact {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--muted); font-family: var(--font); font-size: 0.9rem;
  transition: color 0.25s;
}
.footer-contact:hover { color: var(--text); }
button.btn { border: none; cursor: pointer; font-family: var(--font); }

/* ---------- 404 ---------- */
.page-404 { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.nf-wrap { text-align: center; padding: 2rem; }
.nf-code { font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.nf-wrap h1 { font-size: 1.6rem; margin: 1rem 0 0.6rem; }
.nf-wrap p { color: var(--muted); margin-bottom: 2rem; }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }
.delay-4 { transition-delay: 0.48s; }

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

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .bookend-grid { grid-template-columns: 1fr; }
  .bookend-arrow svg { transform: rotate(90deg); width: 60px; }
  .risk { grid-template-columns: 1fr; gap: 0.4rem; }
  .agent-tag { display: none; }
  .loop-node { width: 92px; height: 92px; margin: -46px 0 0 -46px; font-size: 0.66rem; }
  .loop-center { width: 118px; height: 118px; font-size: 0.72rem; }
}
