/* =========================================================
   VERA HARNESS LANDING PAGE - MODULAR DESIGN SYSTEM
   ========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: #FFFFFF;
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111827;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.font-quantico {
  font-family: 'Quantico', 'Space Grotesk', sans-serif;
}

.font-space {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.font-mono-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Background Unified Pure White */
.bg-tech-grid {
  background-color: #FFFFFF;
}

/* =========================================================
   Animations: Section 04 Memory Layer
   ========================================================= */
@keyframes flowRight {
  0% { stroke-dashoffset: 36; }
  100% { stroke-dashoffset: 0; }
}
@keyframes flowConflictDash {
  0% { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: 0; }
}
@keyframes pulseBadge {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.16)); }
  50% { transform: scale(1.03); filter: drop-shadow(0 6px 16px rgba(239, 68, 68, 0.24)); }
}
.main-flow-pulse {
  stroke-dasharray: 10 26;
  animation: flowRight 1.3s linear infinite;
}
.conflict-dash-flow {
  stroke-dasharray: 6 6;
  animation: flowConflictDash 0.85s linear infinite;
}
.conflict-badge-group {
  transform-origin: 560px 510px;
  animation: pulseBadge 2.6s ease-in-out infinite;
}

/* =========================================================
   Animations: Section 05 Evolution Loop
   ========================================================= */
.node-card {
  transition: stroke 0.35s ease, fill 0.35s ease, filter 0.35s ease;
}
.node-blue {
  stroke: #1677FF !important;
  stroke-width: 2.2px !important;
  filter: drop-shadow(0 6px 18px rgba(22, 119, 255, 0.22));
}
.node-green {
  stroke: #10B981 !important;
  stroke-width: 2.4px !important;
  filter: drop-shadow(0 6px 20px rgba(16, 185, 129, 0.25));
}
.node-orange {
  stroke: #F59E0B !important;
  stroke-width: 2.4px !important;
  filter: drop-shadow(0 6px 20px rgba(245, 158, 11, 0.25));
}
@keyframes dashFlowForward {
  from { stroke-dashoffset: 24; }
  to { stroke-dashoffset: 0; }
}
.line-flow-active {
  stroke-dasharray: 6 6;
  animation: dashFlowForward 0.7s linear infinite;
}
.dashed-flow-active {
  stroke-dasharray: 6 5;
  animation: dashFlowForward 0.7s linear infinite;
}
.path-transition {
  transition: opacity 0.3s ease, stroke 0.3s ease;
}

/* =========================================================
   Animations: Section 06 Interconnect
   ========================================================= */
@keyframes pulseOutbound {
  0% { stroke-dashoffset: 56; }
  100% { stroke-dashoffset: 0; }
}
@keyframes pulseInbound {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 56; }
}
.s-curve-pulse-out {
  stroke-dasharray: 14 42;
  animation: pulseOutbound 1.8s linear infinite;
}
.s-curve-pulse-in {
  stroke-dasharray: 12 44;
  animation: pulseInbound 2.2s linear infinite;
}

/* =========================================================
   UI Components (Buttons & Cards)
   ========================================================= */
.terminal-card {
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.09), 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.terminal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.13), 0 4px 12px rgba(15, 23, 42, 0.06);
}
.btn-glass-dark {
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-glass-dark:hover {
  background: rgba(17, 24, 39, 0.98);
  border-color: rgba(0, 210, 255, 0.45);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.24), 0 0 18px rgba(0, 210, 255, 0.22);
  transform: translateY(-1.5px);
}
.btn-glass-light {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(17, 24, 39, 0.12);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-glass-light:hover {
  background: #FFFFFF;
  border-color: rgba(22, 119, 255, 0.4);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 0 16px rgba(0, 210, 255, 0.14);
  transform: translateY(-1.5px);
}

.nav-dot {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-dot.active {
  background-color: #1677FF;
  transform: scale(1.35);
  box-shadow: 0 0 10px rgba(22, 119, 255, 0.5);
}

/* The original landing sections share one shell with docs and the demo. */
body[data-view] {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  --shell-header-height: 112px;
}

.view-viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.view-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.site-view {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.home-view,
.demo-view {
  overflow-y: auto;
}

.home-view {
  scroll-behavior: smooth;
}

.docs-view,
.demo-view {
  padding-top: var(--shell-header-height);
}

#docs-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.demo-content {
  width: min(100%, 1360px);
  margin: 0 auto;
  padding: 72px 40px 64px;
}

.demo-heading {
  margin-bottom: 32px;
  text-align: center;
}

.demo-heading h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.demo-tagline {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.025em;
}

.demo-tagline span:last-child {
  color: transparent;
  background: linear-gradient(to right, #00d2ff, #1677ff);
  background-clip: text;
  -webkit-background-clip: text;
}

.demo-player {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 48px -24px rgba(15, 23, 42, 0.25);
}

#demo-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: max(160px, calc(100dvh - var(--shell-header-height) - 260px));
  object-fit: contain;
  background: #f8fafc;
  cursor: pointer;
}

.demo-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
}

.demo-controls button {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #374151;
  cursor: pointer;
}

.demo-controls button:hover {
  background: #eff6ff;
  color: #1677ff;
}

.demo-controls [hidden] {
  display: none;
}

.demo-controls button:focus-visible,
#demo-video:focus-visible,
#demo-progress:focus-visible {
  outline: 2px solid #1677ff;
  outline-offset: 3px;
}

#demo-play[data-playing="false"] .demo-pause-icon,
#demo-play[data-playing="true"] .demo-play-icon {
  display: none;
}

#demo-time {
  flex-shrink: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #6b7280;
}

#demo-progress {
  flex: 1;
  min-width: 0;
  height: 24px;
  margin: 0;
  accent-color: #1677ff;
  cursor: pointer;
}

.demo-player:fullscreen {
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  background: #000;
}

.demo-player:fullscreen #demo-video {
  flex: 1;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  background: #000;
}

.demo-player:fullscreen .demo-controls {
  background: #fff;
}

.demo-error {
  margin-top: 16px;
  color: #b91c1c;
}

body:not([data-view="home"]) #home-dots {
  display: none;
}

#navbar-pill a[aria-current="page"] {
  color: #2563eb;
}

@media (max-width: 639px) {
  body[data-view] {
    --shell-header-height: 88px;
  }

  .demo-content {
    padding: 48px 16px 40px;
  }

  .demo-player {
    border-radius: 12px;
  }

  .demo-controls {
    gap: 8px;
    padding: 8px;
  }

  #navbar-pill {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #navbar-pill > div:nth-child(2) {
    gap: clamp(0.75rem, 4vw, 1.5rem);
    font-size: 0.8rem;
  }

  #navbar-pill > a span {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .view-track {
    transition: none;
  }

  .home-view {
    scroll-behavior: auto;
  }
}
