@import "./app/styles.css";

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

section[id], [id] {
  scroll-margin-top: 88px;
}

.landing-body {
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
}

/* Subtle background glowing orbs */
.glow-sphere {
  position: absolute;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--primary), transparent 70%);
}

.glow-2 {
  top: 700px;
  right: -100px;
  background: radial-gradient(circle, var(--info), transparent 70%);
}

/* Landing Navigation */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(9, 9, 11, 0.8);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.landing-nav.scrolled {
  border-bottom-color: var(--border-hover);
  background-color: rgba(9, 9, 11, 0.95);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.nav-brand:hover {
  color: var(--text-main);
  opacity: 0.9;
}

.brand-icon {
  color: var(--primary-light);
  flex-shrink: 0;
}

.brand-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Mobile Navigation Toggle Button */
.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  transition: var(--transition-smooth);
  z-index: 101;
}

.nav-mobile-toggle:hover,
.nav-mobile-toggle:focus-visible {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hamburger active animation to X */
.nav-mobile-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-mobile-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.nav-mobile-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: var(--text-main);
}

.btn-launch {
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  gap: 0.4rem;
  background-color: var(--accent-primary);
  color: var(--bg-main);
  border-radius: var(--radius-md);
  box-shadow: 0 0 16px rgba(244, 244, 245, 0.12);
}

.btn-launch:hover {
  background-color: transparent;
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(244, 244, 245, 0.25);
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.btn-launch:hover .btn-arrow,
.btn-hero-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* Hero Section */
.hero-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  transition: var(--transition-smooth);
}

.hero-pill-badge:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
}

.pill-dot {
  width: 7px;
  height: 7px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.text-gradient {
  display: inline-block;
  background: linear-gradient(135deg, #f4f4f5 20%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 640px;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.btn-hero-primary {
  padding: 0.85rem 1.85rem;
  font-size: 0.95rem;
  gap: 0.5rem;
  background-color: var(--accent-primary);
  color: var(--bg-main);
  border: 1px solid var(--border-color);
}

.btn-hero-primary:hover {
  background-color: transparent;
  color: var(--accent-primary);
}

.btn-hero-secondary {
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-hero-secondary:hover {
  border-color: var(--border-hover);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Metrics bar */
.hero-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 3.5rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-divider {
  width: 1px;
  height: 28px;
  background-color: var(--border-color);
}

/* Browser Mockup Preview */
.hero-preview-container {
  width: 100%;
  margin: 0 auto;
}

.preview-browser-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 0, 0, 0.6);
  transition: var(--transition-smooth);
  text-align: left;
}

.preview-browser-card:hover {
  border-color: var(--border-hover);
}

.preview-browser-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
}

.browser-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.browser-address {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin: 0 auto;
}

.browser-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.preview-card-body {
  padding: 1.5rem;
  background: var(--bg-main);
}

.preview-mock-query {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mock-query-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mock-badge {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 500;
}

.mock-query-term {
  color: var(--text-muted);
  font-style: italic;
}

.mock-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 500;
}

.status-indicator {
  width: 6px;
  height: 6px;
  background-color: var(--success);
  border-radius: 50%;
}

.mock-article-card {
  margin-bottom: 0 !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-card) !important;
  border-radius: var(--radius-md) !important;
}

.demo-analysis {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
  padding: 1.25rem !important;
  border-radius: var(--radius-md);
}

.demo-checkbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.demo-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
}

.demo-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.demo-model-badge {
  font-family: monospace;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  color: var(--primary-light);
}

.demo-section-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 1.25rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.demo-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.demo-info-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.demo-info-table th {
  border: 1px solid var(--border-color);
  padding: 0.65rem 0.9rem;
  text-align: left;
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  width: 130px;
  white-space: nowrap;
}

.demo-info-table td {
  border: 1px solid var(--border-color);
  padding: 0.65rem 0.9rem;
  text-align: left;
  color: var(--text-main);
  font-size: 0.82rem;
}

.demo-preview-card {
  display: flex;
  gap: 1rem;
  background-color: var(--bg-main) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.9rem !important;
  margin-top: 0.25rem !important;
  align-items: stretch;
}

.demo-thumb-container {
  width: 110px;
  min-width: 110px;
  height: 82px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  align-self: center;
}

.demo-thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-summary-box {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.9rem 1.4rem !important;
  margin-bottom: 1.25rem !important;
  color: var(--text-main) !important;
}

.demo-summary-box li {
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.demo-summary-box li:last-child {
  margin-bottom: 0;
}

.demo-sentiment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.demo-sentiment-grid .sentiment-block {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.85rem 1rem !important;
}

.demo-sentiment-grid .sentiment-block.positive {
  border-left: 4px solid var(--success) !important;
}

.demo-sentiment-grid .sentiment-block.neutral {
  border-left: 4px solid var(--text-muted) !important;
}

.demo-sentiment-grid .sentiment-block.negative {
  border-left: 4px solid var(--danger) !important;
}

.demo-sentiment-grid h3 {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  margin-top: 0 !important;
  margin-bottom: 0.5rem !important;
  color: var(--text-main) !important;
}

.demo-sentiment-grid ul {
  padding-left: 1rem;
  margin: 0;
}

.demo-sentiment-grid li {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.demo-sentiment-grid li:last-child {
  margin-bottom: 0;
}

.mock-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mock-actions-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mock-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mock-action-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.mock-btn-active {
  color: var(--success) !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
  background: rgba(34, 197, 94, 0.08) !important;
}

.mock-action-link {
  font-size: 0.8rem;
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.mock-action-link:hover {
  text-decoration: underline;
  color: var(--accent-primary);
}

/* Common Section Container */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem auto;
}

.section-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Features Grid */
.features-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-wrapper {
  color: var(--primary-light);
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.015em;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* Architecture Section */
.architecture-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.arch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.arch-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.arch-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.arch-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  width: fit-content;
}

.arch-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.arch-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.arch-list {
  padding-left: 1.2rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.arch-list li {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.arch-list li strong {
  color: var(--text-main);
}

.arch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.arch-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

/* Sources Section */
.sources-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.sources-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.source-tag:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.source-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-light);
}

/* Workflow Section */
.workflow-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.workflow-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: var(--transition-smooth);
}

.workflow-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.step-badge {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-light);
  font-family: monospace;
  background: rgba(99, 102, 241, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.workflow-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.workflow-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* CTA Section */
.cta-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem 1.5rem;
  position: relative;
  z-index: 1;
}

.cta-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(24, 24, 27, 0.6) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.cta-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto 2rem auto;
}

.cta-actions {
  display: flex;
  justify-content: center;
}

/* Footer */
.landing-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 2.5rem 1.5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--text-main);
}

/* Responsive queries */
@media (max-width: 768px) {
  /* Ambient glow performance & bounds on mobile */
  .glow-sphere {
    width: 300px;
    height: 300px;
    filter: blur(80px);
    opacity: 0.12;
  }

  .glow-1 {
    top: -50px;
  }

  .glow-2 {
    top: 600px;
    right: -40px;
  }

  /* Navigation Drawer for Mobile */
  .nav-mobile-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(14, 15, 18, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem 1.5rem 1.5rem 1.5rem;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.25s;
    pointer-events: none;
    z-index: 99;
  }

  .nav-links.nav-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links .nav-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition-smooth);
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link:focus-visible {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
    padding-left: 0.75rem;
  }

  .nav-links .btn-launch {
    margin-top: 0.75rem;
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }

  /* Section Spacing & Headers */
  .section-header {
    margin-bottom: 2rem;
    padding: 0 0.5rem;
  }

  .section-title {
    font-size: clamp(1.45rem, 5vw, 1.85rem);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 0.5rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .section-subtitle {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  /* Hero Section */
  .hero-section {
    padding: 3rem 1.25rem 2.5rem 1.25rem;
  }

  .hero-title {
    font-size: clamp(1.85rem, 6.5vw, 2.75rem);
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.75rem;
  }

  .hero-actions {
    margin-bottom: 2.25rem;
    gap: 0.75rem;
    width: 100%;
  }

  .hero-metrics {
    gap: 1rem;
    padding: 0.85rem 1.25rem;
  }

  .metric-value {
    font-size: 1.05rem;
  }

  .metric-label {
    font-size: 0.65rem;
  }

  /* Preview Mock Card Elements */
  .preview-card-body {
    padding: 1rem;
  }

  .preview-browser-header {
    padding: 0.6rem 0.85rem;
  }

  .browser-address {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    max-width: calc(100% - 70px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .preview-mock-query {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
  }

  .mock-query-left {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .mock-query-term {
    width: 100%;
    word-break: break-word;
    font-size: 0.75rem;
  }

  /* Grid Layouts Stacked on Mobile */
  .features-section,
  .architecture-section,
  .workflow-section {
    padding: 3rem 1.25rem;
  }

  .features-grid,
  .arch-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-card,
  .arch-card,
  .workflow-card {
    padding: 1.5rem 1.25rem;
    gap: 0.85rem;
  }

  .feature-card h3,
  .arch-header h3,
  .workflow-card h3 {
    font-size: 1.08rem;
  }

  .feature-card p,
  .arch-desc,
  .workflow-card p {
    font-size: 0.85rem;
    line-height: 1.55;
  }

  .arch-list {
    padding-left: 1.1rem;
    gap: 0.4rem;
  }

  .arch-list li {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .arch-tags {
    gap: 0.35rem;
    padding-top: 0.65rem;
  }

  .arch-tag {
    font-size: 0.68rem;
    padding: 0.18rem 0.45rem;
  }

  /* Sources Grid */
  .sources-section {
    padding: 2.5rem 1.25rem 3rem 1.25rem;
  }

  .sources-grid {
    gap: 0.65rem;
    justify-content: center;
  }

  .source-tag {
    flex: 1 1 calc(50% - 0.65rem);
    min-width: 130px;
    max-width: calc(50% - 0.35rem);
    box-sizing: border-box;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    justify-content: center;
    text-align: center;
  }

  /* CTA Section */
  .cta-section {
    padding: 2rem 1.25rem 4rem 1.25rem;
  }

  .cta-card {
    padding: 2.25rem 1.25rem;
  }

  .cta-title {
    font-size: clamp(1.4rem, 4.5vw, 1.75rem);
    margin-bottom: 0.5rem;
  }

  .cta-desc {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
  }

  .cta-actions {
    width: 100%;
  }

  .cta-actions .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
  }

  /* Footer */
  .landing-footer {
    padding: 2rem 1.25rem;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .footer-right {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

/* Specific optimizations for standard and compact mobile viewports */
@media (max-width: 640px) {
  .preview-card-body {
    padding: 0.75rem 0.5rem;
  }

  .demo-analysis {
    padding: 0.85rem 0.65rem !important;
  }

  .demo-section-heading {
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }

  /* Transform table to stacked responsive card blocks */
  .demo-table-wrapper {
    margin-bottom: 1rem;
  }

  .demo-info-table,
  .demo-info-table tbody,
  .demo-info-table tr {
    display: block;
    width: 100%;
  }

  .demo-info-table tr {
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0.35rem;
  }

  .demo-info-table tr:last-child {
    border-bottom: none;
  }

  .demo-info-table th {
    display: block;
    width: 100%;
    border: none;
    padding: 0.15rem 0;
    background: transparent;
    font-size: 0.72rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .demo-info-table td {
    display: block;
    width: 100%;
    border: none;
    padding: 0.15rem 0 0.35rem 0;
    font-size: 0.82rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Link Preview inside demo table */
  .demo-preview-card {
    flex-direction: column-reverse;
    gap: 0.75rem;
    padding: 0.75rem !important;
    align-items: stretch;
  }

  .demo-thumb-container {
    width: 100%;
    min-width: 100%;
    height: 140px;
    max-height: 160px;
    align-self: stretch;
  }

  .demo-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .link-preview-title {
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .link-preview-desc {
    font-size: 0.8rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .link-preview-meta {
    font-size: 0.72rem;
    flex-wrap: wrap;
  }

  /* Summary list */
  .demo-summary-box {
    padding: 0.75rem 0.85rem 0.75rem 1.6rem !important;
    margin-bottom: 1rem !important;
  }

  .demo-summary-box li {
    font-size: 0.78rem;
    line-height: 1.5;
    margin-bottom: 0.4rem;
  }

  /* Sentiment grid */
  .demo-sentiment-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .demo-sentiment-grid .sentiment-block {
    padding: 0.75rem 0.85rem !important;
  }

  .demo-sentiment-grid h3 {
    font-size: 0.82rem !important;
    margin-bottom: 0.35rem !important;
  }

  .demo-sentiment-grid li {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0.3rem;
  }
}

/* Extra small / narrow mobile screens (<= 480px) */
@media (max-width: 480px) {
  .nav-container {
    padding: 0.75rem 1rem;
  }

  .hero-section {
    padding: 2.25rem 1rem 1.75rem 1rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 6.5vw, 2.25rem);
    margin-bottom: 0.85rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.65rem;
    margin-bottom: 2rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
  }

  .cta-actions .btn {
    max-width: 100%;
  }

  .features-section,
  .architecture-section,
  .workflow-section {
    padding: 2.25rem 1rem;
  }

  .sources-section {
    padding: 2rem 1rem 2.5rem 1rem;
  }

  .cta-section {
    padding: 1.5rem 1rem 3.5rem 1rem;
  }

  .landing-footer {
    padding: 1.75rem 1rem;
  }

  .back-to-top {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    width: 40px;
    height: 40px;
  }
}

/* Ultra narrow devices (<= 360px) */
@media (max-width: 360px) {
  .nav-brand {
    font-size: 0.95rem;
    gap: 0.45rem;
  }

  .source-tag {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    font-size: 0.88rem;
    padding: 0.75rem 1rem;
  }
}

/* Back to Top Floating Action Button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 20, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  color: var(--text-main);
  background: rgba(30, 34, 45, 0.98);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.25);
  transform: translateY(-2px);
}
