/* main.css — the VanillaFirst site. Carried over from the original landing page's look:
   warm paper, vanilla gold, system fonts (no font requests), cards, and a dark theme.
   Same structure as the Frontend Kit: tokens as custom properties, no inline styles. */

:root {
  /* Palette Requirements */
  --bg-base: #faf8f5;
  --text-primary: #1a1918;
  --text-muted: #5c5855;
  --accent-gold: #e5a93c;
  --accent-gold-hover: #d19427;
  --code-bg: #2b303a;
  --code-text: #f8f8f2;
  --border-subtle: #eadbcc;
  --card-bg: #ffffff;

  /* System Typography Stack (Zero network requests) */
  --font-sans:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  --font-mono:
    ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
    monospace;

  /* Utility tokens */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-subtle: 0 4px 20px rgba(26, 25, 24, 0.04);
  --shadow-card: 0 10px 30px rgba(26, 25, 24, 0.06);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

  --link: #1d4ed8;
  --link-hover: #1e40af;
}

/* Dark Theme Override */
[data-theme="dark"] {
  --bg-base: #141312;
  --text-primary: #faf8f5;
  --text-muted: #a39e98;
  --border-subtle: #2e2b28;
  --card-bg: #1d1b1a;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--link-hover);
}

/* Container constraints */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

[data-theme="dark"] .header {
  background-color: rgba(20, 19, 18, 0.85);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-icon {
  font-size: 1.4rem;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  width: 38px;
  height: 38px;
}

.theme-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--accent-gold);
  color: #1a1918;
}

.btn-primary:hover {
  background-color: var(--accent-gold-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: rgba(0, 0, 0, 0.03);
  border-color: var(--text-primary);
}

[data-theme="dark"] .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-subtle);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-gold);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

/* Terminal Component */
.terminal {
  background-color: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-md);
  text-align: left;
  max-width: 780px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-header {
  background-color: rgba(0, 0, 0, 0.25);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
}

.dot-red {
  background-color: #ff5f56;
}
.dot-yellow {
  background-color: #ffbd2e;
}
.dot-green {
  background-color: #27c93f;
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-x: auto;
}

.prompt {
  color: #89ddff;
}
.cmd {
  color: #f1fa8c;
}
.out {
  color: rgba(248, 248, 242, 0.7);
}
.success {
  color: #50fa7b;
}
.highlight {
  color: var(--accent-gold);
}

.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
}

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

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(229, 169, 60, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

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

.comparison-wrapper {
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th,
.table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.table th {
  background-color: rgba(0, 0, 0, 0.02);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

[data-theme="dark"] .table th {
  background-color: rgba(255, 255, 255, 0.02);
}

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

.col-feature {
  font-weight: 600;
  width: 25%;
}
.col-framework {
  color: var(--text-muted);
  width: 37.5%;
}
.col-vanilla {
  font-weight: 600;
  width: 37.5%;
  color: var(--text-primary);
}

.tag-bad {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background-color: rgba(255, 95, 86, 0.1);
  color: #d93830;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-right: 0.4rem;
}

.tag-good {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background-color: rgba(39, 201, 63, 0.15);
  color: #1e8e2d;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-right: 0.4rem;
}

[data-theme="dark"] .tag-good {
  color: #50fa7b;
}

.manifesto-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  list-style: none;
}

.manifesto-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: relative;
}

.manifesto-num {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.manifesto-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

.faq-accordion {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

details {
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

details[open] {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-subtle);
}

summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

details[open] summary::after {
  content: "−";
  color: var(--accent-gold);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background-color: rgba(229, 169, 60, 0.14);
}
.terminal code {
  background: none;
  padding: 0;
}
.faq-content p + p {
  margin-top: 0.75rem;
}
.faq-content strong {
  color: var(--text-primary);
}
.faq-content {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.quickstart-box {
  background-color: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.quickstart-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #ffffff;
}

.quickstart-subtitle {
  color: rgba(255, 255, 255, 0.7);
  max-width: 550px;
  margin: 0 auto 2rem;
}

.copy-btn {
  background-color: var(--accent-gold);
  color: #1a1918;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  text-align: left;
  margin-bottom: 2rem;
}

.kit-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.kit-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}
.kit-what {
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 0.95rem;
}
.kit-meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.5;
}
.kit-meta strong {
  color: #ffffff;
}
.kit-meta code,
.kit-footnote code {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.kit-cmd {
  margin-top: auto;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: #f1fa8c;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.kit-cmd code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.kit-card .copy-btn {
  align-self: flex-start;
}

.kit-footnote {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  max-width: 640px;
  margin: 0 auto;
}
.kit-footnote a {
  color: var(--accent-gold);
}

.copy-btn:hover {
  background-color: var(--accent-gold-hover);
}

.copy-btn.copied,
.copy-btn.copied:hover {
  background-color: #27c93f;
  color: #ffffff;
}

.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin-bottom: 1.5rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
}

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero {
    padding: 3rem 0 2rem;
  }
  .section {
    padding: 3.5rem 0;
  }
  .table th,
  .table td {
    padding: 0.75rem 0.85rem;
    font-size: 0.85rem;
  }
  .col-feature {
    width: 30%;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --link: #93c5fd;
    --link-hover: #bfdbfe;
  }
}
