/* =============================================
   OrioSearch Landing Page
   Colors: Dark base + warm orange accent
   Fonts: Space Grotesk (headings), Inter (body), JetBrains Mono (code)
   ============================================= */

:root {
  --bg: #09090b;
  --bg-surface: #131316;
  --bg-elevated: #1a1a1f;
  --border: #27272a;
  --border-light: #3f3f46;

  --text: #fafafa;
  --text-dim: #a1a1aa;
  --text-muted: #71717a;

  --accent: #f97316;
  --accent-soft: #fb923c;
  --accent-glow: rgba(249, 115, 22, 0.15);
  --accent-border: rgba(249, 115, 22, 0.3);

  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --blue: #60a5fa;

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --max-width: 1120px;
  --section-gap: 120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* Background grid pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(9, 9, 11, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--text-dim);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-github {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}

.nav-github:hover {
  border-color: var(--border-light);
  background: var(--bg-surface);
}

.btn-nav {
  padding: 8px 18px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-nav:hover {
  opacity: 0.9;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 160px 24px 80px;
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--accent-soft);
  margin-bottom: 32px;
  background: rgba(249, 115, 22, 0.05);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #ea6c10;
  transform: translateY(-1px);
}

.btn-primary .btn-icon {
  font-family: var(--font-mono);
  opacity: 0.7;
  font-weight: 400;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.btn-outline:hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--bg-surface);
}

.btn-outline svg {
  opacity: 0.6;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

/* Terminal */
.terminal {
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  background: var(--bg-surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.terminal-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

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

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.terminal-title {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 20px 20px 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.terminal-line {
  display: flex;
  gap: 8px;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-prompt {
  color: var(--green);
  font-weight: 500;
  flex-shrink: 0;
}

.terminal-cmd {
  color: var(--text);
}

.terminal-cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.terminal-output {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.7;
  opacity: 0;
  transition: opacity 0.5s;
}

.terminal-output.visible {
  opacity: 1;
}

.terminal-success {
  color: var(--green);
}

.terminal-json {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ===== TRUST BAR ===== */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  background: var(--bg-surface);
}

.trust-items {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-item svg {
  color: var(--accent);
  opacity: 0.8;
}

/* ===== SECTIONS (shared) ===== */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  position: relative;
  z-index: 1;
  padding: var(--section-gap) 0;
}

section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 560px;
  line-height: 1.7;
  margin: 0 auto 48px;
}

.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

/* Scroll fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PROBLEM ===== */
.problem {
  text-align: center;
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.pain-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: left;
  transition: border-color 0.3s, transform 0.3s;
}

.pain-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
}

.pain-icon {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  font-family: var(--font-heading);
}

.pain-icon svg {
  color: var(--accent);
}

.pain-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.pain-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== SWAP ===== */
.swap {
  text-align: center;
}

.swap-code {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: center;
  margin-top: 48px;
  flex-wrap: wrap;
}

.swap-arrow {
  color: var(--accent);
  flex-shrink: 0;
}

.code-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  min-width: 320px;
  flex: 1;
  max-width: 420px;
}

.code-label {
  display: block;
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.code-label-before {
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.code-label-after {
  color: var(--green);
  background: rgba(74, 222, 128, 0.05);
}

.code-block pre {
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block code {
  background: none;
}

.code-block-after {
  border-color: rgba(74, 222, 128, 0.2);
}

.code-comment {
  color: var(--text-muted);
}

.code-key {
  color: var(--blue);
}

.code-string {
  color: var(--green);
}

.code-num {
  color: var(--accent-soft);
}

.swap-note {
  margin-top: 32px;
  color: var(--text-dim);
  font-size: 1rem;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 48px;
  text-align: left;
}

.step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  position: relative;
}

.step-num {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  top: 20px;
  right: 24px;
  line-height: 1;
}

.step h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.step-code {
  margin-bottom: 16px;
}

.step-code pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--green);
  white-space: pre-wrap !important;
  word-break: break-all !important;
}

.step p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ===== FEATURES ===== */
.features {
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 48px;
  text-align: left;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.3s;
}

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

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-border);
  margin-bottom: 16px;
}

.feature-icon svg {
  color: var(--accent);
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
}

.feature-card code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--accent-soft);
}

/* ===== ARCHITECTURE ===== */
.architecture {
  text-align: center;
}

.arch-native {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.arch-tier {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.arch-tier-triple { gap: 16px; }
.arch-tier-double { gap: 24px; }
.arch-node {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 32px;
  min-width: 170px;
  text-align: center;
}
.arch-node-main {
  border-color: var(--accent);
  background: rgba(249,115,22,0.05);
  box-shadow: 0 0 24px rgba(249,115,22,0.08);
}
.arch-node-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.arch-node-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.arch-arrow-down {
  color: var(--accent);
  font-size: 1.5rem;
  padding: 10px 0;
}
.arch-arrows-triple {
  display: flex;
  gap: 120px;
  color: var(--accent);
  font-size: 1.5rem;
  padding: 10px 0;
}

@media (max-width: 768px) {
  .arch-tier-triple,
  .arch-tier-double {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .arch-arrows-triple {
    gap: 40px;
  }
  .arch-node {
    padding: 16px 24px;
    min-width: 140px;
  }
}

.arch-ascii {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 40px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim);
  text-align: left;
  overflow-x: auto;
  display: inline-block;
}

/* ===== COMPARISON TABLE ===== */
.comparison {
  text-align: center;
}

.table-wrap {
  margin-top: 48px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead th {
  padding: 18px 20px;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}

thead th.highlight-col {
  color: var(--accent);
}

tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody td:first-child {
  font-weight: 500;
  color: var(--text);
}

td.highlight-col {
  background: rgba(249, 115, 22, 0.04);
}

.check {
  color: var(--green);
  font-weight: 700;
  font-size: 1.1rem;
}

.dim-check {
  opacity: 0.5;
}

.cross {
  color: var(--text-muted);
  opacity: 0.4;
  font-size: 1rem;
}

.row-price td {
  font-size: 0.88rem;
}

.row-price .highlight-col {
  color: var(--green);
}

/* ===== AI SECTION ===== */
.ai-section {
  text-align: center;
}

.ai-demo {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  margin-top: 48px;
  text-align: left;
}

.ai-config {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ai-config h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
}

.ai-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 16px;
  border-left: 3px solid var(--accent-border);
  background: rgba(249, 115, 22, 0.03);
  border-radius: 0 8px 8px 0;
}

.ai-note code {
  color: var(--accent-soft);
  background: var(--bg-elevated);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ===== QUICKSTART CTA ===== */
.quickstart-cta {
  text-align: center;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.qs-terminal {
  max-width: 640px;
  margin: 40px auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  background: var(--bg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.qs-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* ===== FOOTER ===== */
.footer {
  padding: 60px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 20px 0;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-license {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root {
    --section-gap: 80px;
  }

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
  }

  .hero {
    padding: 120px 20px 60px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .trust-items {
    gap: 20px;
  }

  .trust-item {
    font-size: 0.78rem;
  }

  .swap-code {
    flex-direction: column;
  }

  .swap-arrow {
    transform: rotate(90deg);
  }

  .code-block {
    min-width: auto;
    max-width: 100%;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ai-demo {
    grid-template-columns: 1fr;
  }

  .arch-ascii {
    font-size: 0.65rem;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .pain-grid {
    grid-template-columns: 1fr;
  }

  .trust-items {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}