/* ═══════════════════════════════════════════════════
   dowitharun — Dark AI Frontier Theme
   ═══════════════════════════════════════════════════ */

:root {
  /* Dark backgrounds — deep space, slightly violet-tinted */
  --bg:        #060812;
  --bg-2:      #0a0e1e;
  --bg-3:      #121933;
  --surface:   rgba(17, 24, 50, 0.82);
  --glass:     rgba(22, 30, 62, 0.62);

  /* Borders */
  --border:    rgba(129, 140, 248, 0.18);
  --border-h:  rgba(168, 85, 247, 0.55);

  /* Brand colors — logo gradient extended with a neon pink tail
     cyan #22D3EE → indigo #6366F1 → purple #A855F7 → pink #EC4899 */
  --indigo:    #818cf8;
  --indigo-d:  #6366f1;
  --indigo-l:  rgba(129, 140, 248, 0.12);
  --cyan:      #22d3ee;
  --cyan-l:    rgba(34, 211, 238, 0.08);
  --violet:    #a855f7;
  --pink:      #ec4899;
  --brand-grad:      linear-gradient(100deg, var(--cyan) 0%, var(--indigo) 38%, var(--violet) 70%, var(--pink) 100%);
  --brand-grad-soft: linear-gradient(135deg, rgba(34,211,238,0.16), rgba(99,102,241,0.16), rgba(168,85,247,0.16));

  /* Text — readable on dark */
  --text-1:    #f4f6fb;
  --text-2:    #9aa7c2;
  --text-3:    #56617d;

  /* Typography — cross-platform fallback stacks */
  --font-head: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'SF Mono', 'Consolas', monospace;

  --radius:    16px;
  --radius-sm: 10px;

  --shadow:    0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-h:  0 8px 40px rgba(99, 102, 241, 0.28);
  --glow:      0 0 60px rgba(99, 102, 241, 0.12);
  --ease:      0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  touch-action: manipulation;
}
input, textarea, select {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-1);
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }

/* Gradient accent text — animated shimmer across the logo gradient */
.accent {
  background: linear-gradient(100deg,
    var(--cyan), var(--indigo), var(--violet), var(--pink),
    var(--violet), var(--indigo), var(--cyan));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: accentShimmer 8s ease-in-out infinite;
}
@keyframes accentShimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ── Scroll progress bar ──────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--brand-grad);
  z-index: 2000;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

/* ── Back to top ──────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--ease), transform var(--ease);
  z-index: 900;
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ── Live topic ticker (infinite marquee) ──────────
   Lives inside the hero so it's visible on the first
   screen; pinned to the hero's bottom edge on desktop. */
.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 30, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  animation: tickerScroll 32s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}
.ticker__track span.t-dot {
  color: var(--violet);
  letter-spacing: 0;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.7);
}
@keyframes tickerScroll {
  to { transform: translateX(-50%); }
}

/* ── Typewriter caret on rotating hero word ───────── */
.accent--rotate { white-space: nowrap; }
.type-caret {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 4px;
  background: var(--violet);
  vertical-align: baseline;
  animation: caretBlink 1s step-end infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* ── Section chrome ───────────────────────────────── */
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo);
  background: var(--indigo-l);
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 100px;
  padding: 3px 12px;
  margin-bottom: 14px;
}
.section-header { margin-bottom: 52px; }
.section-header.centered { text-align: center; }
.section-header.centered .section-sub { margin: 0 auto; }
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-1);
  margin-bottom: 12px;
  letter-spacing: -0.025em;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 480px;
  line-height: 1.7;
}
.section-cta { text-align: center; margin-top: 36px; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 24px;
  border-radius: 100px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--ease);
  white-space: nowrap;
  touch-action: manipulation;
  cursor: pointer;
}
.btn--primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, #0ea5c4 0%, var(--indigo-d) 45%, #9333ea 80%, #db2777 100%);
  background-size: 150% 100%;
  background-position: 0% 0;
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}
.btn--primary::after {
  content: '';
  position: absolute;
  top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}
.btn--primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(217, 70, 239, 0.45);
}
.btn--primary:hover::after { left: 130%; }
.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-1);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  background: rgba(129, 140, 248, 0.1);
  border-color: var(--border-h);
}
.btn--nav {
  padding: 8px 18px;
  font-size: 0.83rem;
  background: linear-gradient(100deg, #0ea5c4 0%, var(--indigo-d) 50%, #9333ea 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
}
.btn--nav:hover {
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}
.btn--full { width: 100%; justify-content: center; }

/* ── Rotating gradient border on card hover ───────── */
@property --card-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.focus-card, .adv-card, .video-card {
  position: relative;
  overflow: hidden;
}
.focus-card::after, .adv-card::after, .video-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--card-angle),
    var(--cyan), var(--indigo), var(--violet), var(--pink),
    var(--violet), var(--indigo), var(--cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  animation: cardBorderSpin 4s linear infinite;
  pointer-events: none;
  z-index: 1;
}
.focus-card:hover::after, .adv-card:hover::after, .video-card:hover::after {
  opacity: 1;
}
@keyframes cardBorderSpin {
  to { --card-angle: 360deg; }
}

/* ── Reveal animation ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: all var(--ease);
}
.nav.scrolled {
  background: rgba(2, 8, 23, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.4);
}
.nav__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* ── Logo ─────────────────────────────────────────── */
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 0 7px rgba(99, 102, 241, 0.55));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}
.nav__logo:hover .logo-icon {
  transform: rotate(30deg) scale(1.08);
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.8));
}
.logo-wordmark {
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(100deg, #f4f6fb 0%, var(--indigo) 45%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.nav__links { display: flex; gap: 24px; margin-left: auto; }
.nav__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--ease);
}
.nav__links a:hover { color: var(--text-1); }
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 6px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: all var(--ease);
}

/* ════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  gap: 48px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 120px 24px 110px; /* bottom space reserved for the ticker */
  overflow: hidden;
}

/* Atmospheric aurora glow behind hero — slowly drifts */
.hero::before {
  content: '';
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 25% 18%, rgba(99, 102, 241, 0.20) 0%, transparent 62%),
    radial-gradient(ellipse 50% 38% at 82% 70%, rgba(34, 211, 238, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 65% 30%, rgba(168, 85, 247, 0.13) 0%, transparent 52%),
    radial-gradient(ellipse 35% 28% at 12% 80%, rgba(236, 72, 153, 0.09) 0%, transparent 50%),
    var(--bg);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2%, -2%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
  .accent { animation: none; }
  .ticker__track { animation: none; }
  .focus-card::after, .adv-card::after, .video-card::after { animation: none; }
}

/* Dot grid texture */
.hero__dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(129, 140, 248, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.hero__inner { position: relative; z-index: 1; }

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-2);
  margin-bottom: 22px;
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: pulseGlow 2.2s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.08); }
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 4.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  color: var(--text-1);
}
.hero__sub {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: 32px;
}
.hero__sub strong { color: var(--text-1); font-weight: 600; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.hero__chips span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(129, 140, 248, 0.08);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: all var(--ease);
}
.hero__chips span:hover {
  background: var(--indigo-l);
  border-color: var(--border-h);
  color: var(--indigo);
}

/* Three.js canvas container */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 480px;
  z-index: 1;
}
.ai-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius);
}

/* Floating labels over the canvas */
.canvas-overlay-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.col-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-3);
  background: rgba(10, 22, 50, 0.7);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.col-label::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--indigo);
  flex-shrink: 0;
  animation: pulseGlow 2s ease-in-out infinite;
}
.col-label--1 { top: 12%; left: 8%; animation-delay: 0s; }
.col-label--2 { top: 50%; right: 5%; animation-delay: 0.7s; }
.col-label--3 { bottom: 12%; left: 20%; animation-delay: 1.4s; }

/* ════════════════════════════════════════════════════
   AGENT NETWORK OVERLAY (on top of Three.js canvas)
   ════════════════════════════════════════════════════ */
.agent-overlay {
  position: absolute;
  inset: 10px 14px;   /* breathing room so nodes never clip the edge */
  z-index: 2;
  pointer-events: none;
}

/* SVG for animated connection lines — drawn by JS */
.agent-svg-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
@keyframes dashFlow {
  to { stroke-dashoffset: -20; }
}

/* ── Base node style ── */
.ag2-node {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 10px 22px;
  border-radius: 12px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ── Orchestrator — center, indigo ── */
.ag2-node--center {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(99,102,241,0.22));
  border: 2px solid rgba(165,180,252,0.9);
  color: #e0e7ff;
  font-size: 0.8rem;
  animation: orchGlow 3s ease-in-out infinite;
}
.ag2-icon { font-size: 1rem; margin-bottom: 1px; }
@keyframes orchGlow {
  0%,100% { box-shadow: 0 0 28px rgba(99,102,241,0.6), 0 0 56px rgba(99,102,241,0.25), inset 0 1px 0 rgba(255,255,255,0.15); }
  50%      { box-shadow: 0 0 42px rgba(99,102,241,0.85), 0 0 80px rgba(99,102,241,0.4), inset 0 1px 0 rgba(255,255,255,0.15); }
}

/* Expanding ring around orchestrator */
.ag2-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  border: 1.5px solid rgba(165,180,252,0.5);
  animation: ringExpand 2.8s ease-out infinite;
  pointer-events: none;
}
@keyframes ringExpand {
  0%   { transform: scale(1);   opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* ── Planner — top center, cyan ── */
.ag2-node--planner {
  top: 7%; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(34,211,238,0.38), rgba(34,211,238,0.12));
  border: 1.5px solid rgba(34,211,238,0.88);
  color: #cffafe;
  animation: plannerGlow 3.5s ease-in-out infinite 0.5s;
}
@keyframes plannerGlow {
  0%,100% { box-shadow: 0 0 18px rgba(34,211,238,0.4),  0 0 36px rgba(34,211,238,0.15); }
  50%      { box-shadow: 0 0 32px rgba(34,211,238,0.7),  0 0 60px rgba(34,211,238,0.28); }
}

/* ── Executor — right middle, emerald ── */
.ag2-node--executor {
  top: 37%; right: 7%;
  background: linear-gradient(135deg, rgba(16,185,129,0.38), rgba(16,185,129,0.12));
  border: 1.5px solid rgba(16,185,129,0.88);
  color: #d1fae5;
  animation: executorGlow 4s ease-in-out infinite 1s;
}
@keyframes executorGlow {
  0%,100% { box-shadow: 0 0 18px rgba(16,185,129,0.4),  0 0 36px rgba(16,185,129,0.15); }
  50%      { box-shadow: 0 0 32px rgba(16,185,129,0.7),  0 0 60px rgba(16,185,129,0.28); }
}

/* ── Critic — bottom center, amber ── */
.ag2-node--critic {
  bottom: 7%; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(245,158,11,0.38), rgba(245,158,11,0.12));
  border: 1.5px solid rgba(245,158,11,0.88);
  color: #fef3c7;
  animation: criticGlow 3.8s ease-in-out infinite 1.5s;
}
@keyframes criticGlow {
  0%,100% { box-shadow: 0 0 18px rgba(245,158,11,0.4),  0 0 36px rgba(245,158,11,0.15); }
  50%      { box-shadow: 0 0 32px rgba(245,158,11,0.7),  0 0 60px rgba(245,158,11,0.28); }
}

/* ── Memory — left middle, sky blue ── */
.ag2-node--memory {
  top: 37%; left: 4%;
  background: linear-gradient(135deg, rgba(56,189,248,0.38), rgba(56,189,248,0.12));
  border: 1.5px solid rgba(56,189,248,0.88);
  color: #e0f2fe;
  animation: memoryGlow 4.2s ease-in-out infinite 2s;
}
@keyframes memoryGlow {
  0%,100% { box-shadow: 0 0 18px rgba(56,189,248,0.4),  0 0 36px rgba(56,189,248,0.15); }
  50%      { box-shadow: 0 0 32px rgba(56,189,248,0.7),  0 0 60px rgba(56,189,248,0.28); }
}

/* Floating capability badges */
.ag2-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-2);
  background: rgba(10, 22, 50, 0.8);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 100px;
  padding: 4px 11px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ag2-bdot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulseGlow 2s ease-in-out infinite;
}
.ag2-bdot--indigo { background: #818cf8; }
.ag2-bdot--cyan   { background: #22d3ee; }
.ag2-bdot--violet { background: #a78bfa; }

/* ════════════════════════════════════════════════════
   TRENDING — 3D FLOATING CARDS
   ════════════════════════════════════════════════════ */
.trending { background: var(--bg-2); overflow: hidden; }
.trending .container { margin-bottom: 0; }

.trending__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: -28px;
  margin-bottom: 12px;
}
.tm-source {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-3);
}
.tm-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulseGlow 2s ease-in-out infinite;
}
.tm-refresh {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--indigo);
  cursor: pointer;
  padding: 3px 10px;
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 100px;
  background: var(--indigo-l);
  transition: all var(--ease);
  touch-action: manipulation;
}
.tm-refresh:hover { background: rgba(129, 140, 248, 0.18); }
.tm-refresh.spinning { animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton loading */
.trend-skeleton {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.sk-line {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-3) 25%, rgba(99, 102, 241, 0.1) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  margin-bottom: 10px;
}
.sk-line--sm  { width: 40%; height: 8px; }
.sk-line--md  { width: 70%; height: 12px; margin-bottom: 14px; }
.sk-line--p1  { width: 100%; }
.sk-line--p2  { width: 85%; }
.sk-line--p3  { width: 60%; margin-bottom: 16px; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Trending grid — same fluid layout on every device:
   columns adapt to width (3 → 2 → 1), nothing overlaps */
.trending__stage {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}
.trending__world {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Trend cards */
.trend-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.trend-card:hover {
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
  border-color: var(--border-h);
  transform: translateY(-4px);
}

/* Card internals */
.tc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.tc-rank { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; color: var(--text-3); }
.tc-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tc-badge.models     { background: rgba(109, 40, 217, 0.25);  color: #c084fc; border: 1px solid rgba(192,132,252,0.2); }
.tc-badge.protocol   { background: rgba(37, 99, 235, 0.25);   color: #93c5fd; border: 1px solid rgba(147,197,253,0.2); }
.tc-badge.dev        { background: rgba(22, 163, 74, 0.25);   color: #86efac; border: 1px solid rgba(134,239,172,0.2); }
.tc-badge.infra      { background: rgba(202, 138, 4, 0.25);   color: #fde047; border: 1px solid rgba(253,224,71,0.2);  }
.tc-badge.reasoning  { background: rgba(220, 38, 38, 0.25);   color: #fca5a5; border: 1px solid rgba(252,165,165,0.2); }
.tc-badge.multimodal { background: rgba(2, 132, 199, 0.25);   color: #7dd3fc; border: 1px solid rgba(125,211,252,0.2); }

.trend-card h4 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.trend-card p { font-size: 0.8rem; color: var(--text-2); line-height: 1.65; margin-bottom: 14px; }
.tc-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.tc-fire { font-size: 0.85rem; }
.tc-stat { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-3); }

/* ════════════════════════════════════════════════════
   FOCUS
   ════════════════════════════════════════════════════ */
.focus { background: var(--bg); }
.focus__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.focus-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: all var(--ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.focus-card:hover {
  border-color: var(--border-h);
  box-shadow: var(--shadow-h);
  transform: translateY(-3px);
  background: rgba(15, 30, 65, 0.8);
}
.focus-card__num { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-3); margin-bottom: 10px; }
.focus-card__icon { font-size: 1.6rem; margin-bottom: 12px; }
.focus-card h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 9px;
  letter-spacing: -0.01em;
}
.focus-card p { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; margin-bottom: 16px; }
.focus-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.focus-tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--indigo-l);
  border: 1px solid rgba(129, 140, 248, 0.2);
  color: var(--indigo);
}

/* ════════════════════════════════════════════════════
   EXPLORATIONS (VIDEOS)
   ════════════════════════════════════════════════════ */
.explorations { background: var(--bg-2); }
.videos__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.video-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all var(--ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.25);
  border-color: var(--border-h);
}
.video-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.video-thumb-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--c1), var(--c2));
}
.video-overlay {
  position: absolute; inset: 0;
  background: rgba(2, 8, 23, 0.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--ease);
}
.video-card:hover .video-overlay { opacity: 1; }
.play-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo-d), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.55);
  padding-left: 3px;
}
.video-dur {
  position: absolute; bottom: 8px; right: 8px;
  font-family: var(--font-mono); font-size: 0.68rem;
  background: rgba(2, 8, 23, 0.8); color: #fff;
  padding: 2px 7px; border-radius: 4px;
}
.video-meta { padding: 14px 16px 18px; }
.video-tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.66rem;
  color: var(--indigo); background: var(--indigo-l);
  padding: 2px 8px; border-radius: 4px; margin-bottom: 7px;
}
.video-meta h4 {
  font-family: var(--font-head); font-size: 0.875rem;
  font-weight: 600; color: var(--text-1); line-height: 1.45;
}

/* ════════════════════════════════════════════════════
   ADVANCEMENTS
   ════════════════════════════════════════════════════ */
.advancements { background: var(--bg); }
.adv__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.adv-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all var(--ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.adv-card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow: var(--shadow-h);
}
.adv-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.adv-tag {
  font-family: var(--font-mono); font-size: 0.66rem;
  color: var(--cyan); background: var(--cyan-l);
  border: 1px solid rgba(34, 211, 238, 0.2);
  padding: 2px 8px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.adv-year { font-size: 0.72rem; color: var(--text-3); font-family: var(--font-mono); }
.adv-card h3 {
  font-family: var(--font-head); font-size: 0.975rem;
  font-weight: 700; color: var(--text-1);
  margin-bottom: 9px; line-height: 1.35; letter-spacing: -0.01em;
}
.adv-card p { font-size: 0.85rem; color: var(--text-2); line-height: 1.72; }

/* ════════════════════════════════════════════════════
   CONNECT
   ════════════════════════════════════════════════════ */
.connect { background: var(--bg-2); }
.connect__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.connect__left p { font-size: 1rem; color: var(--text-2); line-height: 1.75; margin-bottom: 28px; }
.connect__socials { display: flex; flex-direction: column; gap: 10px; }
.social-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--glass);
  transition: all var(--ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  touch-action: manipulation;
}
.social-row:hover {
  border-color: var(--border-h);
  background: rgba(15, 30, 65, 0.8);
  box-shadow: var(--shadow-h);
}
.sr-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
  flex-shrink: 0; color: #fff;
}
.sr-icon.yt { background: #ff0000; }
.sr-icon.li { background: #0077b5; }
.sr-icon.x  { background: #000; font-size: 0.85rem; border: 1px solid rgba(255,255,255,0.1); }
.sr-text { flex: 1; }
.sr-text strong { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text-1); }
.sr-text span { font-size: 0.775rem; color: var(--text-3); }
.sr-arrow { color: var(--text-3); font-size: 0.9rem; transition: transform var(--ease); }
.social-row:hover .sr-arrow { transform: translateX(4px); color: var(--indigo); }

/* Contact form */
.connect__form {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block; font-size: 0.8rem;
  font-weight: 500; color: var(--text-2); margin-bottom: 6px;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%; padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem; color: var(--text-1);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-3); }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: rgba(129, 140, 248, 0.05);
}
.form-field textarea { resize: vertical; min-height: 96px; }
.form-field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.form-field select option { background: #0a1628; color: var(--text-1); }

/* ════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  background: var(--bg);
}
.footer__inner {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  gap: 32px; margin-bottom: 28px; flex-wrap: wrap;
}
.footer__brand p {
  font-size: 0.83rem; color: var(--text-3);
  max-width: 280px; line-height: 1.65; margin-top: 8px;
}
.footer__nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer__nav a {
  font-size: 0.85rem; color: var(--text-3);
  font-weight: 500; transition: color var(--ease);
}
.footer__nav a:hover { color: var(--indigo); }
.footer__social { display: flex; gap: 18px; align-items: center; }
.footer__social a {
  font-size: 0.83rem; color: var(--text-3);
  font-weight: 500; transition: color var(--ease);
}
.footer__social a:hover { color: var(--cyan); }
.footer__bottom {
  display: flex; justify-content: space-between;
  padding-top: 22px; border-top: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-3);
  flex-wrap: wrap; gap: 8px;
}

/* ════════════════════════════════════════════════════
   RESPONSIVE — Platform-independent breakpoints
   ════════════════════════════════════════════════════ */

/* Use hover media query so hover effects only apply when a real pointer exists */
@media (hover: none) {
  .btn--primary:hover,
  .btn--ghost:hover,
  .focus-card:hover,
  .video-card:hover,
  .adv-card:hover,
  .social-row:hover {
    transform: none;
  }
}

/* ── Tablet: ≤1024px ─────────────────────────────── */
@media (max-width: 1024px) {
  .videos__grid { grid-template-columns: repeat(2, 1fr); }
  .adv__grid    { grid-template-columns: repeat(2, 1fr); }
  .connect__inner { gap: 40px; }
}

/* ── Hero stacks at 900px ────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 100px 24px 48px;
    gap: 20px;
  }
  .hero__sub { max-width: 100%; }

  /* Ticker flows right after the hero text so it's still
     near the top of the home screen on phones/tablets */
  .ticker {
    position: static;
    order: 2;
    margin: 4px -24px 0;
  }
  .hero__visual { order: 3; }

  /* Compact agent-network + 3D sphere on mobile */
  .hero__visual {
    height: 340px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    border-radius: var(--radius);
  }
  .ag2-node {
    padding: 8px 14px;
    font-size: 0.62rem;
    border-radius: 10px;
  }
  .ag2-node--center {
    padding: 12px 18px;
    font-size: 0.7rem;
    border-radius: 12px;
  }
  .ag2-icon { font-size: 0.85rem; }
  .ag2-badge { font-size: 0.54rem; padding: 3px 9px; }
}

/* ── Mobile: ≤768px ──────────────────────────────── */
@media (max-width: 768px) {
  .section { padding: 68px 0; }

  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 23, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    justify-content: center;
    align-items: center;
    gap: 32px;
    z-index: 999;
  }
  .nav__links.open a {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-1);
  }
  .btn--nav { display: none; }
  .nav__hamburger { display: flex; }

  .focus__grid    { grid-template-columns: 1fr; }
  .videos__grid   { grid-template-columns: 1fr; }
  .adv__grid      { grid-template-columns: 1fr; }
  .connect__inner { grid-template-columns: 1fr; gap: 36px; }
  .form-row       { grid-template-columns: 1fr; }
  .footer__inner  { flex-direction: column; gap: 24px; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ── Small phones: ≤480px ────────────────────────── */
@media (max-width: 480px) {
  .section { padding: 56px 0; }
  .hero__title  { font-size: 2.2rem; }
  .hero__ctas   { flex-direction: column; }
  .connect__form { padding: 22px; }
  .container { padding: 0 16px; }
  .hero__visual { height: 280px; }
  .accent--rotate { white-space: normal; }
}

/* ── iOS safe area insets ────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer {
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }
}
