/* ===================== TOKENS ===================== */
:root {
  --bg: #07080c;
  --bg2: #10131a;
  --ink: #F5F6F8;
  --ink-dim: rgba(245,246,248,0.62);
  --line: rgba(255,255,255,0.10);
  --c1: #35E7E0; /* cyan */
  --c2: #FF4FD1; /* pink */
  --c3: #9B5CFF; /* purple */

  --font-display: 'Orbitron', sans-serif;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: default;
}

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

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

/* ===================== SHARED ===================== */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.eyebrow-cyan { color: var(--c1); }

.gradient-text {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.gradient-pink-purple { background-image: linear-gradient(90deg, var(--c2), var(--c3)); }
.gradient-cyan-purple { background-image: linear-gradient(90deg, var(--c1), var(--c3)); }

.accent { color: var(--c1); }
.accent-pink { color: var(--c2); }

.font-orbitron { font-family: var(--font-display); }

.section-h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  max-width: 720px;
}

.section-title-block { padding: 0 24px; margin-bottom: 64px; }
.section-title-block.center { text-align: center; margin-inline: auto; }
.section-title-block.center .section-h2 { margin-inline: auto; }
.section-title-block .eyebrow { margin-bottom: 14px; }

/* Buttons */
.btn {
  border-radius: 999px;
  padding: 15px 30px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0px) scale(0.98); }

.btn-gradient {
  background: linear-gradient(90deg, var(--c2), var(--c3));
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(255, 79, 209, 0.5);
}
.btn-gradient:hover { box-shadow: 0 12px 34px -6px rgba(255, 79, 209, 0.65); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.03); }

.btn-sm { padding: 10px 20px; font-size: 12px; letter-spacing: 0.02em; }
.btn-lg { padding: 20px 42px; font-size: 17px; }
.btn-full { width: 100%; text-align: center; }

/* Brand mark */
.brand-mark { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.mark-img { position: relative; z-index: 2; filter: drop-shadow(0 0 18px rgba(155, 92, 255, 0.55)); }
.mark-glow {
  position: absolute; inset: -30%; z-index: 1;
  background: radial-gradient(circle, rgba(155,92,255,0.35), transparent 70%);
  border-radius: 50%;
  animation: markPulse 2.4s ease-in-out infinite;
}
@keyframes markPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.18); }
}

.brand-mark--intro .mark-img { width: 80px; }
.brand-mark--nav .mark-img { width: 30px; }
.brand-mark--node .mark-img { width: 46px; }
.brand-mark--footer .mark-img { width: 24px; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.wordmark .accent { color: var(--c1); }
.wordmark-sm { font-size: 16px; }

/* ===================== PARTICLES ===================== */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
}

/* ===================== INTRO GATE ===================== */
.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
.intro-gate .btn-outline { border-color: rgba(255,255,255,0.22); }
.intro-welcome {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 38px);
  color: var(--ink);
  text-align: center;
}

/* ===================== NAV ===================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: linear-gradient(to bottom, rgba(7,8,12,0.9), transparent);
  backdrop-filter: blur(6px);
}
.nav-left { display: flex; align-items: center; gap: 12px; }
.nav-center { display: flex; gap: 36px; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--ink); }

@media (max-width: 860px) {
  .nav { padding: 16px 20px; }
  .nav-center { display: none; }
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 150px 24px 90px;
  overflow: hidden;
  z-index: 2;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; opacity: 0; }
.bloom { position: absolute; width: 60vw; height: 60vw; border-radius: 50%; filter: blur(80px); }
.bloom-pink { top: -10%; left: -10%; background: radial-gradient(circle, rgba(255,79,209,0.28), transparent 70%); }
.bloom-cyan { top: -15%; right: -10%; background: radial-gradient(circle, rgba(53,231,224,0.22), transparent 70%); }
.bloom-purple { bottom: -20%; left: 20%; background: radial-gradient(circle, rgba(155,92,255,0.28), transparent 70%); }
.dot-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.35) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.08;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  max-width: 800px;
}

/* Ancla de vuelo: ocupa el espacio real en el layout (flex flow);
   core-wrap y la estela de luz cuelgan de aquí, todos centrados en el
   mismo punto de origen, para que la misma ruta de vuelo (motionPath)
   los mueva en perfecta sincronía sin desfases de posición. */
.flight-anchor {
  position: relative;
  width: min(300px, 42vw);
  aspect-ratio: 1 / 1;
  margin-bottom: 8px;
}

.core-wrap {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 4;
}
.core-img { width: 100%; filter: drop-shadow(0 20px 60px rgba(155,92,255,0.45)); }

/* Boca de Core: se superpone a la sonrisa fija del PNG y solo se ve
   mientras habla (opacity 0 en reposo). Posición en % para que quede
   alineada con la cara sin importar el tamaño de pantalla. */
.core-mouth {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 9%;
  height: 3.4%;
  transform: translate(-50%, -50%) scaleY(0.4);
  transform-origin: center;
  background: radial-gradient(ellipse at center, rgba(255,79,209,0.95), rgba(255,79,209,0.25) 65%, transparent 80%);
  border-radius: 50%;
  filter: blur(1.5px);
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}

.core-caption {
  position: absolute;
  bottom: -46px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(60vw, 420px);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--c1);
  opacity: 0;
  text-shadow: 0 0 12px rgba(53,231,224,0.6);
}

/* Estela de luz del vuelo de Core -- ancladas al mismo centro que core-wrap
   para que sigan exactamente su ruta (misma motionPath, con retraso) */
.trail-light {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}
.trail-light-1 { width: 130px; height: 130px; background: radial-gradient(circle, rgba(53,231,224,0.55), transparent 70%); filter: blur(14px); }
.trail-light-2 { width: 160px; height: 160px; background: radial-gradient(circle, rgba(255,79,209,0.45), transparent 70%); filter: blur(22px); }
.trail-light-3 { width: 190px; height: 190px; background: radial-gradient(circle, rgba(155,92,255,0.4), transparent 70%); filter: blur(32px); }
.trail-light-4 { width: 220px; height: 220px; background: radial-gradient(circle, rgba(53,231,224,0.3), transparent 70%); filter: blur(46px); }

.hero-h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.06;
  display: flex;
  flex-direction: column;
}

.hero-subhead {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 19px;
  color: var(--ink-dim);
  max-width: 620px;
  line-height: 1.55;
}

.hero-ctas { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }

.hero-anim { opacity: 0; }

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.scroll-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--ink-dim); }
.scroll-line {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, var(--c1), transparent);
  animation: bounceChevron 1.8s ease-in-out infinite;
}
@keyframes bounceChevron {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.4; }
}

/* ===================== POSITIONING ===================== */
.positioning {
  position: relative;
  height: 100vh;
  z-index: 2;
}
.positioning-pin {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 0 24px;
  text-align: center;
}
.pos-line { opacity: 0.12; }
.pos-line-1 { font-family: var(--font-head); font-weight: 500; font-size: clamp(22px, 3.4vw, 34px); color: var(--ink-dim); }
.pos-line-2 { font-family: var(--font-head); font-weight: 700; font-size: clamp(26px, 4.2vw, 42px); }
.pos-line-3 { font-size: clamp(24px, 3.6vw, 38px); }

/* ===================== AGENTS ===================== */
.agents-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.agents-title-block { padding: 0 48px; margin-bottom: 48px; }
.agents-title-block .eyebrow { margin-bottom: 12px; }
.agents-title-block .section-h2 { max-width: 640px; }

.agents-track-viewport { overflow: hidden; }
.agents-track {
  display: flex;
  gap: 24px;
  padding: 0 48px;
  width: max-content;
}

.agent-card {
  position: relative;
  width: 340px;
  height: 400px;
  flex-shrink: 0;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255,255,255,0.045), rgba(255,255,255,0.01));
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transform-style: preserve-3d;
}
.card-bloom {
  position: absolute; top: -30%; right: -30%;
  width: 60%; height: 60%;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.5;
}
.agent-card[data-glow="cyan"] .card-bloom { background: var(--c1); }
.agent-card[data-glow="pink"] .card-bloom { background: var(--c2); }
.agent-card[data-glow="purple"] .card-bloom { background: var(--c3); }

.card-top { position: relative; display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: 0.1em; color: var(--ink-dim); }
.card-status { display: flex; align-items: center; gap: 6px; color: var(--ink-dim); }
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c1);
  box-shadow: 0 0 8px var(--c1);
  animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.card-bottom { position: relative; }
.card-bottom h3 { font-family: var(--font-head); font-weight: 700; font-size: 26px; margin-bottom: 10px; }
.card-bottom p { color: var(--ink-dim); font-size: 15px; line-height: 1.5; }

/* ===================== INTEGRATIONS ===================== */
.integrations-section {
  position: relative;
  padding: 140px 24px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.integrations-canvas {
  position: relative;
  width: min(880px, 92vw);
  height: 500px;
}
.integrations-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.conn-line {
  fill: none;
  stroke-width: 0.4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  pathLength: 1;
  vector-effect: non-scaling-stroke;
}
.conn-line[data-color="cyan"] { stroke: var(--c1); }
.conn-line[data-color="pink"] { stroke: var(--c2); }
.conn-line[data-color="purple"] { stroke: var(--c3); }

.node { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 10px; transform: translate(-50%, -50%); }
.node-center { top: 50%; left: 50%; opacity: 0; }
.node-label { font-size: 11px; letter-spacing: 0.1em; color: var(--ink-dim); }
#DANACORE, .node-center .node-label { color: var(--ink); }

.node-badge {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
}
.node-dot { width: 10px; height: 10px; border-radius: 50%; animation: dotPulse 1.8s ease-in-out infinite; }
.node[data-color="cyan"] .node-dot { background: var(--c1); box-shadow: 0 0 12px var(--c1); }
.node[data-color="pink"] .node-dot { background: var(--c2); box-shadow: 0 0 12px var(--c2); }
.node[data-color="purple"] .node-dot { background: var(--c3); box-shadow: 0 0 12px var(--c3); }

.node-pos { opacity: 0; }
.node-top { top: 6%; left: 50%; }
.node-upper-right { top: 20%; left: 86%; }
.node-lower-right { top: 82%; left: 86%; }
.node-lower-left { top: 82%; left: 14%; }
.node-upper-left { top: 20%; left: 14%; }

/* ===================== DASHBOARD ===================== */
.dashboard-section { position: relative; padding: 140px 24px; z-index: 2; display: flex; flex-direction: column; align-items: center; }

.app-window {
  width: 100%;
  max-width: 1040px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg2);
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px) scale(0.92);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.6);
}
.app-window-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.traffic-lights { display: flex; gap: 7px; }
.traffic-lights span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.address-bar {
  flex: 1;
  font-size: 12px;
  color: var(--ink-dim);
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  padding: 5px 12px;
  max-width: 260px;
}
.app-window-body { position: relative; min-height: 480px; padding: 40px; }

/* Guest */
.dashboard-guest { position: relative; }
.stat-grid-blurred { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; filter: blur(6px); opacity: 0.5; }
.stat-block-ghost { height: 120px; border-radius: 16px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.login-card {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; max-width: 360px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.7);
}
.login-copy { color: var(--ink-dim); font-size: 14px; margin-bottom: 20px; line-height: 1.5; }
#login-form { display: flex; flex-direction: column; gap: 12px; }
#login-form input {
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--ink);
  font-size: 14px;
}
#login-form input::placeholder { color: rgba(245,246,248,0.35); }
#login-form input:focus { outline: none; border-color: var(--c1); }
#login-form .btn { margin-top: 6px; }
.login-error { color: #ff6b6b; font-size: 13px; margin-top: 4px; }

/* Logged in */
.dashboard-loggedin { display: none; }
.dashboard-loggedin.active { display: block; }
.dashboard-guest.hidden { display: none; }

.dash-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; flex-wrap: wrap; gap: 16px; }
.dash-greeting { font-family: var(--font-head); font-weight: 700; font-size: 22px; }
.dash-sub { color: var(--ink-dim); font-size: 14px; margin-top: 4px; }

.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.dash-stat-card { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: rgba(255,255,255,0.02); display: flex; flex-direction: column; gap: 6px; }
.dash-stat-num { font-family: var(--font-head); font-weight: 700; font-size: 30px; }
.dash-stat-label { font-size: 10px; letter-spacing: 0.08em; color: var(--ink-dim); }

.dash-agent-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.agent-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

.dash-feed { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.dash-feed li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.015);
  font-size: 14px;
  flex-wrap: wrap;
}
.feed-time { color: var(--ink-dim); font-size: 11px; white-space: nowrap; }

@media (max-width: 700px) {
  .stat-grid-blurred, .dash-stats { grid-template-columns: 1fr; }
  .app-window-body { padding: 24px; }
}

/* ===================== PLANS ===================== */
.plans-section { position: relative; padding: 140px 24px; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.plans-grid { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; max-width: 1100px; }

.plan-card {
  position: relative;
  width: 340px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0;
  transform: translateY(60px) scale(0.94);
}
.plan-tag { color: var(--ink-dim); font-size: 11px; letter-spacing: 0.1em; }
.plan-name { font-family: var(--font-head); font-weight: 700; font-size: 24px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; }
.price-num { font-family: var(--font-head); font-weight: 700; font-size: 32px; }
.price-period { color: var(--ink-dim); font-size: 13px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 6px 0 10px; }
.plan-features li {
  font-size: 14px;
  color: var(--ink-dim);
  padding-left: 20px;
  position: relative;
}
.plan-features li::before {
  content: '';
  position: absolute; left: 0; top: 7px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--c1);
}

.plan-card--featured {
  border-color: rgba(255,79,209,0.5);
  background: linear-gradient(160deg, rgba(255,79,209,0.08), rgba(155,92,255,0.05));
}
.plan-badge {
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--c2), var(--c3));
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 999px;
}
.plan-card--featured .plan-features li::before { background: var(--c2); }

/* ===================== CTA FINAL ===================== */
.cta-final {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  padding: 100px 24px;
  z-index: 2;
  overflow: hidden;
}
.cta-glow {
  position: absolute; top: 50%; left: 50%;
  width: 80vw; height: 80vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(155,92,255,0.25), transparent 70%);
  z-index: -1;
}
.cta-headline {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(28px, 5.6vw, 56px);
  max-width: 800px;
  line-height: 1.15;
}
.cta-anim { opacity: 0; }

/* ===================== FOOTER ===================== */
.footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 48px;
  border-top: 1px solid var(--line);
}
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-caption { font-size: 11px; color: var(--ink-dim); letter-spacing: 0.06em; }

@media (max-width: 700px) {
  .footer { flex-direction: column; gap: 14px; padding: 30px 24px; text-align: center; }
}

/* ===================== SplitType chars (cinematic text reveal) ===================== */
.split-char { display: inline-block; will-change: transform, opacity; }
