/**
 * Parallel Landing Page Styles
 * Uses tokens from tokens.css
 */

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: var(--leading-normal);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* Background Noise Texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1; /* Lowered so it doesn't wash out interactive elements */
  opacity: 0.2; /* Softened */
}

/* Utility Classes for Orchestrator Visuals */
.w-3 {
  width: 12px;
}
.h-3 {
  height: 12px;
}
.w-3.5 {
  width: 14px;
}
.h-3.5 {
  height: 14px;
}
.w-4 {
  width: 16px;
}
.h-4 {
  height: 16px;
}

/* ==========================================================================
   Accessibility & Typography
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-2) var(--space-4);
  background: var(--primary);
  color: var(--primary-foreground);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
}

.skip-link:focus {
  top: var(--space-4);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--foreground);
  letter-spacing: -0.02em;
}

p {
  color: var(--foreground-secondary);
  font-size: var(--text-base);
}

ul {
  list-style-position: inside;
}

/* ==========================================================================
   Layout & Sections
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--space-32) 0;
  position: relative;
}

.section-offset {
  background: radial-gradient(50% 50% at 50% 50%, oklch(0.08 0 0 / 0.5) 0%, rgba(0, 0, 0, 0) 100%);
}

.section-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  text-align: center;
  margin-bottom: var(--space-4);
  background: linear-gradient(to bottom, #fff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s cubic-bezier(0.21, 0.45, 0.32, 0.9),
    transform 0.8s cubic-bezier(0.21, 0.45, 0.32, 0.9);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.section-subtitle {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-16);
  font-size: var(--text-lg);
  color: var(--foreground-muted);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.btn-primary {
  background: var(--brand-500);
  color: var(--primary-foreground);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 8px 24px oklch(0.55 0.25 265 / 0.4);
}

.btn-primary:hover {
  background: var(--brand-400);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.3),
    0 12px 32px oklch(0.55 0.25 265 / 0.5);
}

/* Button Shine Effect */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  20% {
    left: 200%;
  }
  100% {
    left: 200%;
  }
}

/* ==========================================================================
   Header & Footer
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-modal);
  padding: var(--space-4) 0;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition:
    background 0.3s ease,
    padding 0.3s ease;
}

.site-header.scrolled {
  padding: var(--space-3) 0;
  background: rgba(10, 10, 10, 0.9);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--foreground);
  transition: opacity 0.2s ease;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.copyright {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-sm);
  letter-spacing: -0.02em;
}

.site-footer {
  padding: var(--space-20) 0;
  border-top: 1px solid var(--border-glass);
  text-align: center;
  color: var(--foreground-muted);
  background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}

.footer-links a {
  color: var(--foreground-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
  font-weight: 500;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  padding: var(--space-32) 0 var(--space-24);
  text-align: center;
  overflow: hidden;
  /* Radiant background glow */
  background: radial-gradient(circle at 50% 0%, oklch(0.15 0.1 265 / 0.4) 0%, transparent 70%);
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.3;
  mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.1;
  margin-bottom: var(--space-8);
  padding-bottom: 0.1em;
  letter-spacing: -0.04em;
  background: linear-gradient(to bottom, #fff 30%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(100, 100, 255, 0.15));
}

.hero-subtitle {
  font-size: clamp(var(--text-lg), 2.2vw, var(--text-xl));
  max-width: 650px;
  margin: 0 auto var(--space-12);
  color: var(--foreground-secondary);
  line-height: 1.6;
  font-weight: 450;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.cta-subtext {
  font-size: 11px;
  color: var(--foreground-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  opacity: 0.8;
  text-transform: uppercase;
}

.cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* ==========================================================================
   Problem Section (Terminal Logs)
   ========================================================================== */

#problem {
  background: linear-gradient(180deg, transparent, rgba(20, 0, 0, 0.3));
}

.problem-terminal {
  background: #050505;
  border: 1px solid rgba(255, 50, 50, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  max-width: 800px;
  margin: var(--space-8) auto;
  box-shadow:
    0 0 50px rgba(255, 50, 50, 0.05),
    inset 0 0 20px rgba(255, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.problem-terminal::before {
  content: 'SYSTEM OVERLOAD';
  position: absolute;
  top: var(--space-4);
  right: var(--space-6);
  color: #ff3333;
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.7;
  border: 1px solid rgba(255, 50, 50, 0.4);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 700;
}

.log-entry {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
  opacity: 0.7;
  border-left: 2px solid transparent;
  padding: var(--space-2) var(--space-4);
  transition: all 0.3s ease;
  border-radius: 0 4px 4px 0;
}

.log-entry:hover {
  opacity: 1;
  border-left-color: #ff3333;
  background: rgba(255, 50, 50, 0.08);
  transform: translateX(4px);
}

.log-timestamp {
  color: #666;
  font-size: var(--text-sm);
  min-width: 80px;
}

.log-level {
  color: #ff3333;
  font-weight: bold;
  font-size: var(--text-sm);
  min-width: 60px;
}

.log-message {
  color: #ffaaaa;
  font-size: var(--text-base);
}

.problem-statement {
  text-align: center;
  margin-top: var(--space-12);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--foreground);
}

/* ==========================================================================
   Solution & Features (Bento Grid)
   ========================================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-8);
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
  }

  .bento-item:nth-child(1) {
    grid-column: span 2;
  }
  .bento-item:nth-child(4) {
    grid-column: span 2;
  }
}

.bento-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.2, 0, 0.2, 1),
    background 0.4s ease;
}

.bento-item:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.bento-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  color: white;
  box-shadow: 0 4px 12px rgba(100, 100, 255, 0.3);
}

.bento-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.bento-desc {
  font-size: var(--text-base);
  color: var(--foreground-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   How It Works (Timeline & Terminal)
   ========================================================================== */

.how-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  margin-top: var(--space-8);
}

@media (min-width: 900px) {
  .how-container {
    flex-direction: row;
    align-items: flex-start;
  }
}

.timeline {
  flex: 1;
  position: relative;
  padding-left: var(--space-10);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: var(--space-2);
  bottom: var(--space-2);
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--brand-500) 0%,
    rgba(100, 100, 255, 0.2) 50%,
    transparent 100%
  );
}

.timeline-step {
  position: relative;
  margin-bottom: var(--space-16);
  padding-left: var(--space-6);
  transition: transform 0.3s ease;
}

.timeline-step:hover {
  transform: translateX(8px);
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: calc(var(--space-10) * -1 - 5px);
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--background);
  border: 2px solid var(--brand-500);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 15px var(--brand-500);
}

.step-number {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--brand-400);
  margin-bottom: var(--space-2);
  font-weight: 800;
}

.step-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.step-desc {
  color: var(--foreground-secondary);
  line-height: 1.6;
  max-width: 400px;
}

/* Orchestrator Dashboard Visual */
.orchestrator-visual {
  flex: 1.5;
  background: #0a0a0c;
  border: 1px solid #1a1a1a;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  position: relative;
}

@media (min-width: 900px) {
  .orchestrator-visual {
    position: sticky;
    top: var(--space-24);
  }
}

/* App Status Bar (Filter Buttons row) */
.app-status-bar {
  background: rgba(10, 10, 12, 0.8);
  display: flex;
  border-bottom: 1px solid #1a1a1a;
  padding: 12px 16px;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.app-status-bar::-webkit-scrollbar {
  display: none;
}

.filter-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 500;
  color: #888;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-button.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.font-bold {
  font-weight: 700;
  margin-right: 2px;
}

.text-cyan-400 {
  color: #22d3ee;
}
.text-green-400 {
  color: #4ade80;
}
.text-amber-400 {
  color: #fbbf24;
}
.text-purple-400 {
  color: #c084fc;
}
.text-emerald-400 {
  color: #34d399;
}
.text-blue-400 {
  color: #60a5fa;
}

/* App Tab Bar (Matches TerminalStatusTab) */
.app-tab-bar {
  background: rgba(20, 20, 23, 0.5);
  display: flex;
  padding: 0 var(--space-4);
  border-bottom: 1px solid #1a1a1a;
  overflow-x: auto;
  scrollbar-width: none;
}

.app-tab-bar::-webkit-scrollbar {
  display: none;
}

.app-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  position: relative;
}

.app-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: oklch(0.55 0.25 265 / 0.05);
}

.tab-status-icon {
  width: 14px;
  height: 14px;
}

/* Attention Pulse Animation (Matches app) */
.app-tab.attention {
  border-bottom-color: #f59e0b;
  color: #f59e0b;
  animation: pulse-subtle 2s infinite;
}

@keyframes pulse-subtle {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(245, 158, 11, 0);
  }
  50% {
    box-shadow: inset 0 0 12px 0 rgba(245, 158, 11, 0.2);
  }
}

.attention-dot {
  width: 6px;
  height: 6px;
  background: #f59e0b;
  border-radius: 50%;
  margin-left: 4px;
  animation: pulse 1.5s infinite;
}

/* Agent Grid & Panes */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1px;
  background: #1a1a1a;
  flex: 1;
}

@media (max-width: 600px) {
  .agent-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
  }
  .orchestrator-visual {
    height: 1000px;
  }
}

.agent-pane {
  background: #0a0a0c;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

/* Sub Tab Bar (Matches AgentContentTabs) */
.sub-tab-bar {
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid #111;
}

.sub-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  border-radius: 4px;
}

.sub-tab.active {
  background: #1a1a1a;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.agent-pane-content {
  padding: 12px;
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.5;
  overflow: hidden;
}

/* LLM Speech Bubble */
.llm-speech {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  color: #d1d1d1;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.llm-avatar {
  width: 18px;
  height: 18px;
  background: var(--brand-500);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}

.keyword {
  color: var(--primary);
  font-weight: 600;
  margin-right: 4px;
}

.string {
  color: #4ade80;
}

.comment {
  color: #666;
}

.mini-btn {
  margin-top: 8px;
  display: inline-block;
  padding: 4px 12px;
  background: oklch(0.55 0.25 265 / 0.1);
  border: 1px solid oklch(0.55 0.25 265 / 0.3);
  color: var(--primary);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.mini-btn:hover {
  background: oklch(0.55 0.25 265 / 0.2);
}

.animate-spin-slow {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Summary View Mock */
.summary-mock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #a1a1aa;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  line-height: 1.6;
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(var(--brand-500-rgb), 0.1) 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 100%, oklch(0.55 0.25 265 / 0.15), transparent 70%);
  z-index: -1;
}

.cta-title {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl));
  margin-bottom: var(--space-8);
  background: linear-gradient(to bottom, #fff, #ccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
