/* ============================================================
   Veritail Landing Page — Dark AI-Native Theme
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary: #09090b;
  --bg-surface: #18181b;
  --bg-code: #0c0c0e;
  --bg-nav: rgba(9, 9, 11, 0.8);
  --accent: #818cf8;
  --accent-dim: rgba(129, 140, 248, 0.15);
  --accent-glow: rgba(129, 140, 248, 0.25);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border: rgba(129, 140, 248, 0.15);
  --border-hover: rgba(129, 140, 248, 0.4);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "JetBrains Mono", "Fira Code", "Consolas", monospace;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 7rem;
  --space-2xl: 10rem;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #a5b4fc;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Focus States --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm) 0;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: var(--space-2xl) 0 var(--space-md);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/hero.png") center center / cover no-repeat;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

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

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto var(--space-md);
  line-height: 1.6;
}

.hero-positioning {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.hero-install {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.hero-install .prompt {
  color: var(--accent);
  user-select: none;
}

.hero-install .cmd {
  color: var(--text-primary);
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: #a5b4fc;
  color: #09090b;
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.3);
}

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

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ============================================================
   Demo
   ============================================================ */
.demo {
  padding: var(--space-lg) 0 var(--space-xl);
}

.demo-frame {
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(129, 140, 248, 0.08), 0 0 120px rgba(129, 140, 248, 0.04);
}

.demo-frame img {
  width: 100%;
  display: block;
}

/* ============================================================
   Section Shared
   ============================================================ */
.section {
  padding: var(--space-lg) 0;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-xs);
  text-align: center;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* ============================================================
   Features — Lightweight Accent Layout
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

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

.feature-card {
  padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg);
  border-left: 3px solid var(--accent);
  transition: border-color 0.3s;
}

.feature-card:hover {
  border-left-color: #a5b4fc;
}

.feature-card:hover h3 {
  color: #a5b4fc;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.feature-card p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   Sample Output — Section Background
   ============================================================ */
.section-output {
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.4) 0%, var(--bg-primary) 100%);
}

/* ============================================================
   Terminal Window Chrome
   ============================================================ */
.terminal-window {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 0 60px rgba(129, 140, 248, 0.06),
    0 0 120px rgba(129, 140, 248, 0.03);
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.6);
}

.terminal-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

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

.dot-red {
  background: #f87171;
}

.dot-yellow {
  background: #fbbf24;
}

.dot-green {
  background: #34d399;
}

.terminal-command {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Sample Output — Bento Grid
   ============================================================ */
.output-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  padding: var(--space-md);
}

@media (min-width: 640px) {
  .output-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.output-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
}

.output-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

/* Metrics Table */
.metrics-table {
  width: 100%;
  border-collapse: collapse;
}

.metrics-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.metrics-table td {
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.metrics-table tr:last-child td {
  border-bottom: none;
}

.th-range {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.metric-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
}

.metric-denom {
  font-weight: 400;
  color: var(--text-muted);
}

.metric-val-zero {
  color: #34d399;
}

/* Bar Chart */
.chart-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bar-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.bar-green {
  background: #34d399;
}

.bar-yellow {
  background: #fbbf24;
}

.bar-orange {
  background: #fb923c;
}

.bar-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 36px;
  flex-shrink: 0;
}

.mono-cell {
  font-family: var(--font-mono);
  font-size: 0.825rem;
}

.verdict-appropriate {
  color: #34d399;
  font-weight: 600;
  font-size: 0.825rem;
}

.verdict-inappropriate {
  color: #fb923c;
  font-weight: 600;
  font-size: 0.825rem;
}

.output-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-style: italic;
}

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

.checks-failed {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #fb923c;
}

.check-passed {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #34d399;
}

.check-failed-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #fb923c;
}

/* Judgment Detail */
.output-card-wide {
  grid-column: 1 / -1;
}

.judgment-query {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 0.5rem;
}

.judgment-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.judgment-result {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
}

.judgment-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.judgment-position {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.judgment-product {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.judgment-score {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

.score-green {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

.score-orange {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.1);
}

.judgment-attr {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.attr-match {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

.attr-mismatch {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.attr-partial {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.judgment-reason {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Autocomplete Judgment */
.suggestion-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.pill {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.pill-flagged {
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
}

.autocomplete-scores {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.autocomplete-scores .judgment-score {
  margin-left: 0;
}

.score-yellow {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

/* ============================================================
   How It Works — Steps
   ============================================================ */
.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 640px) {
  .steps {
    flex-direction: row;
    align-items: flex-start;
  }
}

.step {
  flex: 1;
  text-align: center;
  max-width: 300px;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-connector {
  display: none;
}

@media (min-width: 640px) {
  .step-connector {
    display: flex;
    align-items: center;
    padding-top: 18px;
    color: var(--text-muted);
    font-size: 1.25rem;
    flex-shrink: 0;
  }
}

/* ============================================================
   Quick Start — Code Blocks
   ============================================================ */
.quickstart-blocks {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 720px;
  margin: 0 auto;
}

.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-block-header {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.5);
}

.code-block pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Syntax highlighting classes */
.syn-keyword {
  color: #c084fc;
}

.syn-function {
  color: #818cf8;
}

.syn-string {
  color: #34d399;
}

.syn-comment {
  color: #52525b;
  font-style: italic;
}

.syn-prompt {
  color: #818cf8;
  user-select: none;
}

.syn-flag {
  color: #f9a8d4;
}

.syn-class {
  color: #fbbf24;
}

.syn-decorator {
  color: #f472b6;
}

.syn-param {
  color: #fb923c;
}

.syn-number {
  color: #fb923c;
}

.syn-builtin {
  color: #67e8f9;
}

.syn-op {
  color: #a1a1aa;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   Responsive — 1024px+
   ============================================================ */
@media (min-width: 1024px) {
  .hero {
    padding: var(--space-2xl) 0 var(--space-xl);
  }
}
