/* ─────────────────────────────────────────────────────────────────────────────
   Agoria Chat - Marketing Site Styles
   Palette mirrors the app (apps/web/src/styles/app.css)
───────────────────────────────────────────────────────────────────────────── */

:root {
  --accent:           #2d6a4f;
  --accent-hover:     #245542;
  --accent-muted:     rgba(45, 106, 79, 0.18);
  --accent-glow:      rgba(45, 106, 79, 0.30);

  --bg:               #0f1012;
  --bg-card:          #141518;
  --bg-raised:        #18191e;
  --bg-code:          #0c0d0f;

  --border:           #1a1c22;
  --border-strong:    #2c2e36;

  --text-primary:     #dbdee1;
  --text-muted:       rgba(219, 222, 225, 0.50);
  --text-subtle:      rgba(219, 222, 225, 0.30);

  --radius-sm:        6px;
  --radius-md:        10px;
  --radius-lg:        16px;

  --nav-height:       60px;
  --content-max:      1100px;
  --section-gap:      100px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover {
  background: var(--bg-raised);
  color: var(--text-primary);
  text-decoration: none;
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-raised);
  text-decoration: none;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(15, 16, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo img, .nav-logo svg { height: 32px; width: auto; max-width: 160px; object-fit: contain; }
.nav-logo-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-raised);
  text-decoration: none;
}

/* Desktop: both nav-links and nav-actions sit in a flex row */
#nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-primary);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  #nav-menu:not(.open) { display: none; }

  #nav-menu.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
  }
  #nav-menu.open .nav-links,
  #nav-menu.open .nav-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  #nav-menu.open .nav-links { margin-bottom: 8px; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding-block: 120px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 22px;
  max-width: 800px;
  margin-inline: auto;
  margin-top: 0;
}

.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 42px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Discord / TeamSpeak alternative (SEO landing copy) ─────────────────── */
.compare-section {
  padding-block: 56px 48px;
  border-top: 1px solid var(--border);
}
.compare-section .features-header {
  margin-bottom: 36px;
}
.compare-body,
.faq-block {
  max-width: none;
  width: 100%;
  text-align: left;
}
.compare-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 1.15em;
}
.compare-lead:last-of-type {
  margin-bottom: 0;
}
.compare-lead strong {
  color: var(--text-primary);
  font-weight: 600;
}
.faq-block {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.faq-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 22px 0 8px;
}
.faq-block h3:first-child {
  margin-top: 0;
}
.faq-block p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 4px;
}

/* ── Section headings ─────────────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.section-heading {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.7;
}

/* ── Feature grid ─────────────────────────────────────────────────────────── */
.features {
  padding-block: var(--section-gap);
}.features-header {
  text-align: center;
  margin-bottom: 60px;
}
.features-header .section-sub { margin-inline: auto; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: rgba(45, 106, 79, 0.35);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding-top: 4px;
}

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

@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

/* ── Why self-host section ────────────────────────────────────────────────── */
.why {
  padding-block: var(--section-gap);
  border-top: 1px solid var(--border);
}

.why-inner {
  max-width: 680px;
}

.why-list {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.why-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.why-list li:last-child {
  border-bottom: none;
}

.why-list .item-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.why-list .item-text span {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Quick deploy section ─────────────────────────────────────────────────── */
.deploy {
  padding-block: var(--section-gap);
  border-top: 1px solid var(--border);
}

.deploy-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.deploy-steps {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  counter-reset: step;
}

.deploy-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body strong {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.step-body span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Code blocks */
.code-block {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 0;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.copy-btn:hover { color: var(--text-primary); background: var(--bg-raised); }

.code-block pre {
  padding: 18px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text-primary);
  white-space: pre;
  display: block;
}

.code-block code .comment { color: rgba(219,222,225,0.35); }
.code-block code .cmd     { color: #5aab80; font-weight: 600; }
.code-block code .flag    { color: #88c0d0; }

@media (max-width: 800px) {
  .deploy-inner { grid-template-columns: 1fr; gap: 40px; }
  .code-block { font-size: 0.8rem; }
  .code-block code { font-size: 0.8rem; white-space: pre-wrap; word-break: break-all; }
}

/* ── Demo banner ──────────────────────────────────────────────────────────── */
.demo-banner {
  padding-block: 70px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.demo-banner h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.demo-banner p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: 32px;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  padding-block: 48px 36px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.footer-brand img, .footer-brand svg { height: 28px; width: auto; max-width: 120px; object-fit: contain; }
.footer-brand span {
  font-size: 0.9rem;
  color: var(--text-subtle);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text-primary); }
.footer-disclaimer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Docs page ────────────────────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: calc(100vh - var(--nav-height));
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 24px;
  padding-block: 40px;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  align-self: start;
  padding-right: 32px;
  border-right: 1px solid var(--border);
  padding-block: 8px;
}

.docs-sidebar nav ul { list-style: none; }
.docs-sidebar nav li + li { margin-top: 2px; }
.docs-sidebar nav a {
  display: block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}
.docs-sidebar nav a:hover {
  color: var(--text-primary);
  background: var(--bg-raised);
  text-decoration: none;
}
.docs-sidebar nav .section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 18px 12px 6px;
}

.docs-content {
  padding-left: 48px;
  max-width: 780px;
}

.docs-content h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.docs-content .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
}

.docs-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-top: 52px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.docs-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 10px;
}

.docs-content p { margin-bottom: 16px; color: var(--text-muted); line-height: 1.75; }
.docs-content p:last-child { margin-bottom: 0; }

.docs-content ul, .docs-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
  color: var(--text-muted);
  line-height: 1.75;
}
.docs-content li + li { margin-top: 6px; }

.docs-content code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.85em;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: #5aab80;
}

.docs-content .callout {
  background: var(--accent-muted);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin-block: 22px;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.65;
}
.docs-content .callout strong { color: #5aab80; }

/* Env vars table */
.env-table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 22px;
  font-size: 0.875rem;
}
.env-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.env-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1.55;
  vertical-align: top;
}
.env-table td:first-child {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.8rem;
  color: #5aab80;
  white-space: nowrap;
}
.env-table tr:hover td { background: var(--bg-raised); }

@media (max-width: 768px) {
  .docs-layout { grid-template-columns: 1fr; padding-block: 24px; padding-inline: 16px; }
  .docs-sidebar { display: none; }
  .docs-content { padding-left: 0; min-width: 0; max-width: 100%; }
  .env-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .docs-content .code-block code { white-space: pre-wrap; word-break: break-all; }
}
