/* ======================================
   AITerm Product Site — style.css
   ====================================== */

:root {
  --bg: #0a0e14;
  --bg-card: #111720;
  --bg-elevated: #161e2e;
  --border: #1e2d40;
  --accent: #4ade80;
  --accent-dim: rgba(74, 222, 128, 0.12);
  --accent2: #38bdf8;
  --text: #e2e8f0;
  --muted: #64748b;
  --code-bg: #0d1117;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  color: var(--accent);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.logo-bracket { color: var(--accent); }
.logo-term { color: var(--accent2); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover { color: var(--text); background: var(--bg-elevated); opacity: 1; }

.nav-github {
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 100px 1.5rem 60px;
  max-width: 1120px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-dim);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-sub strong { color: var(--text); }

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.hero-platforms {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); opacity: 1; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #0a0e14;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.25);
}

.btn-primary:hover { box-shadow: 0 0 30px rgba(74, 222, 128, 0.4); }

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

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-large { padding: 0.85rem 2rem; font-size: 1rem; }

.release-version {
  font-size: 0.78em;
  opacity: 0.75;
  font-weight: 500;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── TERMINAL MOCKUP ── */
.hero-terminal-wrap {
  display: flex;
  justify-content: center;
}

.terminal-window {
  width: 100%;
  max-width: 520px;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 60px rgba(74, 222, 128, 0.06);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #161b22;
  border-bottom: 1px solid var(--border);
}

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

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-title {
  font-family: 'SF Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
}

.terminal-line { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: baseline; }
.terminal-line + .terminal-line { margin-top: 0.1rem; }

.prompt { color: var(--accent); }
.cmd { color: #e2e8f0; }
.cursor { color: var(--accent); animation: blink 1s step-end infinite; }
.output { color: #94a3b8; padding-left: 1rem; }
.ai-thinking { color: var(--accent2); font-style: italic; }
.ai-cmd { color: var(--accent); font-weight: 600; }
.ai-explain { color: #f59e0b; font-size: 0.75rem; }
.muted { color: #475569; }

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

/* ── SECTIONS ── */
.section {
  padding: 96px 0;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--muted);
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 3.5rem;
}

/* ── FEATURES ── */
.features { background: var(--bg); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: rgba(74, 222, 128, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  font-family: 'SF Mono', monospace;
  color: var(--accent);
  line-height: 1;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
}

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

.feature-card p strong { color: var(--text); }

/* ── ARCHITECTURE ── */
.architecture { background: var(--bg-card); }

.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.arch-layer {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  min-width: 200px;
  text-align: center;
}

.arch-layer.frontend  { border-top: 2px solid var(--accent2); }
.arch-layer.backend   { border-top: 2px solid var(--accent); }
.arch-layer.sidecar   { border-top: 2px solid #f59e0b; }

.arch-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.arch-items { display: flex; flex-direction: column; gap: 0.35rem; }

.arch-item {
  font-size: 0.82rem;
  color: var(--text);
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
}

.arch-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.tech-stack {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}

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

.tech-dot.rust   { background: #f97316; }
.tech-dot.react  { background: #38bdf8; }
.tech-dot.tauri  { background: #a78bfa; }
.tech-dot.java   { background: #f59e0b; }
.tech-dot.ts     { background: #3b82f6; }
.tech-dot.xterm  { background: #4ade80; }

/* ── INSTALL ── */
.install { background: var(--bg); }

.install-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.install-steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 680px;
}

.install-steps li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.65;
}

.install-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--accent-dim);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.05rem;
}

.code-block {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  overflow: hidden;
}

.code-block pre {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  color: var(--accent);
  padding: 1rem 3.5rem 1rem 1.25rem;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.65;
}

.copy-btn {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

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

.download-cta {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

/* ── FOOTER ── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: 'SF Mono', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.footer-brand p {
  font-family: -apple-system, sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.35rem;
  font-weight: 400;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-links a:hover { color: var(--text); opacity: 1; }

.footer-copy {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
}

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

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 80px;
    text-align: center;
  }

  .hero-sub { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-platforms { justify-content: center; }
  .hero-terminal-wrap { order: -1; }

  .arch-diagram { flex-direction: column; }
  .arch-arrow svg { transform: rotate(90deg); }
  .arch-arrow { flex-direction: row; gap: 0.5rem; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 0.25rem;
  }
  .nav-toggle { display: block; }

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

  .section { padding: 64px 0; }
}
