/*
Theme Name: Local AI Run
Theme URI: https://local-ai.run
Author: local-ai.run
Author URI: https://local-ai.run
Description: Landing page theme for local-ai.run — an open-source, self-hosted AI platform.
Version: 1.1.0
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: local-ai-run
*/

/* ══════════════════════════════
   CORE STYLES
   ══════════════════════════════ */

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

:root {
  --bg: #0a0a0f;
  --bg-elevated: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #23233a;
  --border-accent: #2d4a3e;
  --text: #e8e8ef;
  --text-muted: #7a7a8f;
  --text-dim: #50506a;
  --accent: #34d399;
  --accent-glow: rgba(52, 211, 153, 0.15);
  --accent-glow-strong: rgba(52, 211, 153, 0.3);
  --accent-secondary: #22d3ee;
  --accent-warm: #f59e0b;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ══════════════════════════════
   NAVIGATION
   ══════════════════════════════ */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
}

.nav-logo svg { width: 28px; height: 28px; }

.logo-dash {
  font-weight: 400;
  color: var(--text-dim);
  animation: cursorBlink 1.2s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { color: var(--text-dim); }
  50% { color: #e8e8ef; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a.nav-active { color: var(--accent); }

.nav-cta {
  background: var(--accent) !important;
  color: var(--bg) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  transition: opacity 0.2s !important;
}

.nav-cta:hover { opacity: 0.85; color: var(--bg) !important; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background 0.2s;
}

.nav-hamburger:hover span { background: var(--accent); }

/* ══════════════════════════════
   BADGES & TAGS
   ══════════════════════════════ */

.coming-soon-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-warm);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.recommended-inline {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--bg);
  background: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
  font-weight: 700;
}

.feature-card.coming-soon {
  opacity: 0.55;
  pointer-events: none;
}

.feature-card.coming-soon:hover {
  transform: none;
  border-color: var(--border);
  background: var(--bg-card);
}

.feature-card.coming-soon::before { display: none; }

.install-method.coming-soon-method {
  opacity: 0.55;
  pointer-events: none;
}

/* ══════════════════════════════
   HERO (Front Page)
   ══════════════════════════════ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent);
  background: var(--accent-glow);
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease both;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s 0.1s ease both;
}

h1 .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.7;
  animation: fadeInUp 0.6s 0.2s ease both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 0.6s 0.3s ease both;
}

/* ══════════════════════════════
   PAGE HERO (Inner Pages)
   ══════════════════════════════ */

.page-hero {
  padding: 10rem 2rem 4rem;
  position: relative;
  text-align: center;
}

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

.page-hero-inner { max-width: 800px; margin: 0 auto; }

.page-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
  animation: fadeInUp 0.6s 0.1s ease both;
}

.page-hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.7;
  animation: fadeInUp 0.6s 0.2s ease both;
}

/* ══════════════════════════════
   BUTTONS
   ══════════════════════════════ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  box-shadow: 0 0 30px var(--accent-glow-strong);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px var(--accent-glow-strong); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-secondary:hover { border-color: var(--text-muted); background: var(--bg-elevated); }

/* ══════════════════════════════
   TERMINAL
   ══════════════════════════════ */

.terminal-preview {
  margin-top: 4rem;
  width: 100%;
  max-width: 680px;
  animation: fadeInUp 0.6s 0.4s ease both;
}

.terminal-window {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

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

.terminal-line { display: flex; gap: 0.5rem; }
.terminal-prompt { color: var(--accent); user-select: none; }
.terminal-cmd { color: var(--text); }
.terminal-comment { color: var(--text-dim); }
.terminal-output { color: var(--text-muted); margin-left: 0; }
.terminal-success { color: var(--accent); }

.terminal-cursor {
  display: inline-block;
  width: 8px; height: 16px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink { 50% { opacity: 0; } }

/* ══════════════════════════════
   SECTIONS
   ══════════════════════════════ */

.landing-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 3.5rem;
  font-weight: 300;
}

/* ══════════════════════════════
   FEATURE CARDS (Front Page Grid)
   ══════════════════════════════ */

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

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

.feature-card:hover::before { opacity: 1; }

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

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  font-weight: 300;
}

.feature-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-top: 1rem;
  margin-right: 0.3rem;
}

/* ══════════════════════════════
   FEATURE DETAIL (Features Page)
   ══════════════════════════════ */

.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.feature-detail:last-child { border-bottom: none; }

.feature-detail-reverse { direction: rtl; }
.feature-detail-reverse > * { direction: ltr; }

.feature-detail-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-detail-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.feature-detail-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.feature-detail-specs {
  margin-bottom: 1.5rem;
}

.spec-item {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.spec-item:last-child { border-bottom: none; }

.spec-label {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.75rem;
  min-width: 130px;
  letter-spacing: 0.03em;
}

.spec-value {
  color: var(--text-muted);
  font-weight: 300;
}

.feature-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.feature-detail-visual .terminal-window {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Audio preview card */
.audio-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
}

.audio-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 60px;
  margin-bottom: 1rem;
}

.audio-bar {
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
  animation: audioWave 1.5s ease-in-out infinite alternate;
}

@keyframes audioWave {
  0% { height: 8px; opacity: 0.3; }
  50% { height: 40px; opacity: 0.8; }
  100% { height: 15px; opacity: 0.5; }
}

.audio-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.audio-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.audio-duration {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.audio-model {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ══════════════════════════════
   ROADMAP (Features Page)
   ══════════════════════════════ */

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

.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  opacity: 0.7;
}

.roadmap-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.roadmap-wip { background: var(--accent-warm); }
.roadmap-planned { background: var(--text-dim); }

.roadmap-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.roadmap-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 1rem;
}

/* ══════════════════════════════
   COMPATIBILITY (Features Page)
   ══════════════════════════════ */

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

.compat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.compat-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.compat-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: 300;
  margin-bottom: 0.8rem;
}

.compat-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.compat-full {
  color: var(--accent);
  background: var(--accent-glow);
}

.compat-soon {
  color: var(--accent-warm);
  background: rgba(245, 158, 11, 0.12);
}

/* ══════════════════════════════
   FLOW STEPS (How It Works)
   ══════════════════════════════ */

.flow-steps {
  max-width: 700px;
}

.flow-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.flow-step-num {
  width: 40px; height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.flow-step-content h4 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.flow-step-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
}

.flow-connector {
  width: 2px;
  height: 30px;
  background: var(--border);
  margin-left: 19px;
}

/* ══════════════════════════════
   STACK CARDS (How It Works)
   ══════════════════════════════ */

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

.stack-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
}

.stack-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.stack-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.stack-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stack-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.stack-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 1rem;
}

.stack-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.stack-tech span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.stack-port {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.compose-preview {
  max-width: 700px;
}

/* ══════════════════════════════
   SECURITY GRID (How It Works)
   ══════════════════════════════ */

.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}

.security-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.security-icon {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.security-item h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.security-item p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  font-weight: 300;
}

/* ══════════════════════════════
   INSTALL PAGE
   ══════════════════════════════ */

.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}

.req-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.req-icon {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.req-card h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.req-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: 300;
  margin-bottom: 1rem;
}

/* Install steps */
.install-guide { max-width: 700px; }

.install-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.install-step-num {
  width: 36px; height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.install-step-content { flex: 1; }

.install-step-content h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.install-step-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Env preview */
.env-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
}

.env-key { color: var(--accent); }
.env-val { color: var(--text-muted); }

/* Commands grid */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}

.command-item { margin-bottom: 0.5rem; }

.command-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

/* FAQ / Troubleshooting */
.faq-list { max-width: 700px; }

.faq-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: none; }

.faq-item h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
}

.faq-item code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

/* ══════════════════════════════
   ARCHITECTURE (Front Page)
   ══════════════════════════════ */

.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.arch-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}

.arch-card .arch-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
  letter-spacing: 0.1em;
}

.arch-card h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.arch-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 300;
}

.arch-arrow { display: none; }

@media (min-width: 900px) {
  .arch-grid {
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
  }
  .arch-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 1.4rem;
  }
}

/* ══════════════════════════════
   INSTALL SECTION (Front Page)
   ══════════════════════════════ */

.install-section { text-align: center; }

.install-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  text-align: left;
}

.install-method {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  position: relative;
}

.install-method.recommended {
  border-color: var(--border-accent);
  box-shadow: 0 0 40px var(--accent-glow);
}

.recommended-badge {
  position: absolute;
  top: -10px; right: 20px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.install-method h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.install-method > p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
  font-weight: 300;
}

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  position: relative;
  overflow-x: auto;
  line-height: 1.7;
}

.code-block .copy-btn {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
}

.code-block .copy-btn:hover { border-color: var(--accent); color: var(--accent); }

.code-os-group { display: flex; flex-direction: column; gap: 0; }

.os-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}
.os-tab {
  padding: 0.28rem 0.8rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.os-tab:hover {
  color: var(--text-muted);
  border-color: var(--text-dim);
}
.os-tab.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}
.os-note {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.install-meta {
  display: flex;
  gap: 1.2rem;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ══════════════════════════════
   COMPARISON TABLE
   ══════════════════════════════ */

.comparison { margin-top: 4rem; }

.comparison table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison th {
  text-align: left;
  padding: 0.8rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.comparison td {
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.comparison tr:hover td { background: var(--bg-card); }
.comparison .check { color: var(--accent); font-size: 1.1rem; }
.comparison .dash { color: var(--text-dim); }

/* ══════════════════════════════
   CTA & FOOTER
   ══════════════════════════════ */

.cta-section {
  text-align: center;
  padding: 6rem 2rem;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

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

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

/* ══════════════════════════════
   ANIMATIONS
   ══════════════════════════════ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

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

/* ══════════════════════════════
   RESPONSIVE
   ══════════════════════════════ */

/* ══════════════════════════════
   TABLET (max-width: 1024px)
   ══════════════════════════════ */

@media (max-width: 1024px) {
  .hero h1 { font-size: 2.8rem; }
  .page-hero-title { font-size: 2.6rem; }
  .section-title { font-size: 1.6rem; }
  .cta-title { font-size: 2rem; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .compat-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
  .req-grid { grid-template-columns: repeat(2, 1fr); }
  .commands-grid { grid-template-columns: repeat(2, 1fr); }
  .security-grid { grid-template-columns: repeat(2, 1fr); }

  .install-methods { grid-template-columns: 1fr; }

  .comparison { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comparison table { font-size: 0.8rem; }

  .feature-detail { gap: 2rem; }
  .spec-label { min-width: 110px; }

  .audio-wave { height: 50px; }
}

/* ══════════════════════════════
   MOBILE (max-width: 768px)
   ══════════════════════════════ */

@media (max-width: 768px) {
  /* ── Navigation ── */
  .site-nav { padding: 0.8rem 1rem; }
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    gap: 1rem;
  }
  .nav-links.nav-open { display: flex; }
  .nav-cta { text-align: center; }

  /* ── Hero ── */
  .hero { padding: 7rem 1.2rem 3rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero-sub { font-size: 1rem; }
  .hero-actions { flex-direction: column; gap: 0.8rem; }
  .hero-actions a { width: 100%; text-align: center; justify-content: center; }

  .page-hero { padding: 7rem 1.2rem 3rem; }
  .page-hero-title { font-size: 2rem; }
  .page-hero-desc { font-size: 1rem; }

  /* ── Sections ── */
  .landing-section { padding: 4rem 1.2rem; }
  .section-title { font-size: 1.4rem; }
  .section-desc { font-size: 0.95rem; }

  /* ── Grids → single column ── */
  .features-grid,
  .install-methods,
  .compat-grid,
  .stack-grid,
  .roadmap-grid,
  .req-grid,
  .commands-grid,
  .security-grid { grid-template-columns: 1fr; }

  /* ── Feature Detail ── */
  .feature-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .feature-detail-reverse { direction: ltr; }

  /* ── Terminal ── */
  .terminal-preview { margin-top: 2.5rem; }
  .terminal-body { font-size: 0.72rem; padding: 1rem; }
  .terminal-window { border-radius: 10px; }

  /* ── Compose preview ── */
  .compose-preview { max-width: 100%; }

  /* ── Flow / Install steps ── */
  .flow-steps { max-width: 100%; }
  .flow-step-content h4 { font-size: 1rem; }
  .install-guide { max-width: 100%; }

  /* ── Code blocks ── */
  .code-block { font-size: 0.78rem; padding: 0.9rem 1rem; }

  /* ── Comparison table ── */
  .comparison { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comparison table { min-width: 600px; font-size: 0.78rem; }

  /* ── CTA ── */
  .cta-section { padding: 4rem 1.2rem; }
  .cta-title { font-size: 1.6rem; }

  /* ── FAQ ── */
  .faq-list { max-width: 100%; }
  .faq-item h4 { font-size: 1rem; }

  /* ── Footer ── */
  .site-footer { flex-direction: column; text-align: center; gap: 1rem; }
  .footer-links { justify-content: center; flex-wrap: wrap; }

  /* ── Audio preview ── */
  .audio-preview-card { padding: 1.5rem; }
  .audio-wave { height: 40px; gap: 1px; }
  .audio-bar { width: 3px; }

  /* ── Badges ── */
  .coming-soon-badge { font-size: 0.6rem; padding: 0.12rem 0.4rem; }
  .recommended-inline { font-size: 0.55rem; padding: 0.15rem 0.5rem; }
  .recommended-badge { font-size: 0.65rem; }

  /* ── Spec items ── */
  .spec-label { min-width: auto; font-size: 0.72rem; }
  .spec-value { font-size: 0.82rem; }
  .spec-item { flex-direction: column; gap: 0.3rem; }

  /* ── Small text elements ── */
  .stack-tech span { font-size: 0.68rem; }
  .stack-port { font-size: 0.75rem; }
  .env-preview { font-size: 0.75rem; }
  .command-label { font-size: 0.75rem; }
  .compat-status { font-size: 0.68rem; }
  .roadmap-status { font-size: 0.68rem; }
  .install-meta { font-size: 0.72rem; flex-wrap: wrap; gap: 0.8rem; }

  /* ── Feature detail on mobile ── */
  .feature-detail-content h3 { font-size: 1.2rem; }
  .feature-detail-content p { font-size: 0.9rem; }
  .feature-detail-icon { width: 48px; height: 48px; font-size: 1.3rem; }
  .feature-tag { font-size: 0.68rem; }
}

/* ══════════════════════════════
   SMALL MOBILE (max-width: 480px)
   ══════════════════════════════ */

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .hero-sub { font-size: 0.9rem; }
  .hero-badge { font-size: 0.72rem; }

  .page-hero-title { font-size: 1.6rem; }
  .page-hero-desc { font-size: 0.9rem; }

  .section-title { font-size: 1.2rem; }
  .section-desc { font-size: 0.88rem; }

  .nav-logo { font-size: 1rem; }
  .nav-logo svg { width: 22px; height: 22px; }

  .feature-card { padding: 1.5rem; }
  .feature-icon { font-size: 1.5rem; }
  .feature-card h3 { font-size: 1rem; }
  .feature-card p { font-size: 0.85rem; }

  .arch-grid { gap: 0.8rem; }
  .arch-card { padding: 1.2rem; }
  .arch-arrow { font-size: 1rem; }

  .stack-card { padding: 1.5rem; }
  .stack-tech span { font-size: 0.68rem; padding: 0.2rem 0.5rem; }

  .install-method { padding: 1.5rem; }
  .install-meta span { font-size: 0.72rem; }

  .code-block { font-size: 0.72rem; padding: 0.8rem; }
  .copy-btn { font-size: 0.65rem; padding: 0.2rem 0.5rem; }

  .terminal-body { font-size: 0.65rem; padding: 0.8rem; }

  .cta-title { font-size: 1.3rem; }
  .cta-desc { font-size: 0.9rem; }

  .btn-primary, .btn-secondary { font-size: 0.88rem; padding: 0.7rem 1.4rem; }

  .req-card { padding: 1.2rem; }
  .req-icon { font-size: 1.5rem; }

  .roadmap-card { padding: 1.5rem; }
  .compat-card { padding: 1.2rem; }

  .security-item { padding: 1.5rem; }
  .security-icon { font-size: 1.5rem; }

  .command-item { padding: 1rem; }
  .faq-item { padding: 1.5rem; }

  .env-preview { font-size: 0.72rem; }

  .spec-item { flex-direction: column; gap: 0.3rem; }
  .spec-label { min-width: auto; }

  .comparison table { min-width: 480px; font-size: 0.68rem; }
  .comparison th, .comparison td { padding: 0.5rem 0.6rem; }

  .install-meta { flex-direction: column; gap: 0.4rem; }

  .flow-step { gap: 1rem; }
  .flow-step-num { width: 32px; height: 32px; min-width: 32px; font-size: 0.75rem; }
  .flow-connector { margin-left: 15px; height: 20px; }

  .install-step { gap: 1rem; }
  .install-step-num { width: 30px; height: 30px; min-width: 30px; font-size: 0.75rem; }

  .hero-badge { padding: 0.3rem 0.7rem; font-size: 0.68rem; }
  .hero::before { width: 400px; height: 400px; }
  .page-hero::before { width: 300px; height: 300px; }
  .cta-section::before { width: 300px; height: 200px; }
}
