/* === Catppuccin Mocha Palette === */
:root {
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
  --surface0: #313244;
  --surface1: #45475a;
  --text: #cdd6f4;
  --subtext: #a6adc8;
  --blue: #89b4fa;
  --peach: #fab387;
  --red: #f38ba8;
  --green: #a6e3a1;
  --lavender: #b4befe;
  --yellow: #f9e2af;
  --mono: 'SF Mono', 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  --body: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--base);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* === Layout === */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Nav === */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--crust);
  border-bottom: 1px solid var(--surface0);
  padding: 0 24px;
}

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

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

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

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

nav .nav-links a {
  color: var(--subtext);
  font-size: 0.9rem;
  transition: color 0.15s;
}
nav .nav-links a:hover { color: var(--text); opacity: 1; }
nav .nav-links a.active { color: var(--text); }

/* === Hero === */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
}

.hero .hero-logo { width: 80px; height: 80px; margin: 0 auto 32px; }

.hero h1 {
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero .subtitle {
  color: var(--subtext);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.accent-terminal { color: var(--peach); }
.accent-connections { color: var(--red); }
.accent-mind { color: var(--green); }
.accent-blue { color: var(--blue); }

/* === Feature Cards (homepage) === */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 24px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.card {
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 12px;
  padding: 28px 24px;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--surface1); }

.card h3 {
  font-family: var(--mono);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--subtext);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.card .card-link {
  font-size: 0.85rem;
  font-family: var(--mono);
}

/* === Download Section === */
.download {
  text-align: center;
  padding: 60px 24px;
  background: var(--mantle);
  border-top: 1px solid var(--surface0);
  border-bottom: 1px solid var(--surface0);
}

.download h2 {
  font-family: var(--mono);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.download .download-sub {
  color: var(--subtext);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.15s;
}

.btn-primary {
  background: var(--blue);
  color: var(--crust);
}

.btn-secondary {
  background: var(--surface0);
  color: var(--text);
}

.btn:hover { opacity: 0.85; }

/* === Footer === */
footer {
  padding: 32px 24px;
  text-align: center;
  color: var(--subtext);
  font-size: 0.85rem;
}

footer a { color: var(--subtext); }
footer a:hover { color: var(--text); }

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

/* === Feature Page Header === */
.page-header {
  padding: 60px 24px 40px;
  text-align: center;
}

.page-header h1 {
  font-family: var(--mono);
  font-size: 2rem;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--subtext);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* === Feature Sections === */
.feature-section {
  padding: 48px 24px;
  border-top: 1px solid var(--surface0);
}

.feature-section:nth-child(even) { background: var(--mantle); }

.feature-section .container { max-width: 900px; margin: 0 auto; }

.feature-section h2 {
  font-family: var(--mono);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.feature-section p {
  color: var(--subtext);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 720px;
}

.feature-section p + p { margin-top: 12px; }

.feature-section ul {
  color: var(--subtext);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-top: 12px;
  padding-left: 20px;
}

.feature-section li::marker { color: var(--surface1); }

/* === Keyboard Shortcuts Table === */
.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.9rem;
}

.shortcuts-table th,
.shortcuts-table td {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--surface0);
}

.shortcuts-table th {
  color: var(--subtext);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shortcuts-table td:first-child {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--blue);
  white-space: nowrap;
}

/* === Connection Type Grid === */
.connection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.connection-item {
  background: var(--base);
  border: 1px solid var(--surface0);
  border-radius: 8px;
  padding: 20px;
}

.connection-item h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.connection-item p {
  font-size: 0.85rem;
  color: var(--subtext);
}

/* === Provider Grid (AI page) === */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.provider-item {
  background: var(--base);
  border: 1px solid var(--surface0);
  border-radius: 8px;
  padding: 20px;
}

.provider-item h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.provider-item p {
  font-size: 0.85rem;
  color: var(--subtext);
}

/* === Back Link === */
.back-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--subtext);
  margin-bottom: 16px;
}
.back-link:hover { color: var(--text); opacity: 1; }

/* === Responsive === */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .hero { padding: 60px 24px 40px; }

  .cards { grid-template-columns: 1fr; }
  .connection-grid { grid-template-columns: 1fr; }
  .provider-grid { grid-template-columns: 1fr; }

  nav .nav-links { gap: 16px; }
  nav .nav-links a { font-size: 0.8rem; }

  .page-header h1 { font-size: 1.5rem; }

  .shortcuts-table { font-size: 0.8rem; }
  .shortcuts-table th,
  .shortcuts-table td { padding: 8px 10px; }
}

@media (max-width: 480px) {
  nav .nav-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 8px; }
  nav .nav-links { gap: 12px; }
  .download-buttons { flex-direction: column; align-items: center; }
}
