/* algabyte.com — the public site. No external fonts or scripts (see the CSP in the Caddyfile). */
:root {
  --ink: #18181b;
  --ink-soft: #52525b;
  --muted: #71717a;
  --line: #e4e4e7;
  --bg: #ffffff;
  --bg-soft: #fafaf9;
  --accent: #b45309;
  --accent-ink: #ffffff;
  --accent-soft: #fef3c7;
  --radius: 14px;
  --max: 1080px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #fafaf9;
    --ink-soft: #d4d4d8;
    --muted: #a1a1aa;
    --line: #2e2e33;
    --bg: #121214;
    --bg-soft: #1a1a1d;
    --accent: #f59e0b;
    --accent-ink: #1c1917;
    --accent-soft: #3a2a0b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 16px; }
a { color: var(--accent); }
img { max-width: 100%; }

/* One language at a time: every text comes as a pt and an en sibling. */
html[data-lang="pt"] [lang="en"]:not(html),
html[data-lang="en"] [lang="pt"]:not(html) { display: none !important; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 0.95rem; font-weight: 900; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.93rem; }
.nav a:hover { color: var(--ink); }
.lang { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Sections */
.hero { padding-top: 72px; padding-bottom: 56px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 18px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; margin: 0 0 12px; line-height: 1.2; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
section { padding: 56px 0; }
section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lede { color: var(--ink-soft); max-width: 680px; margin: 0 0 28px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg); }
.card p { margin: 0; color: var(--ink-soft); }
.card .icon { font-size: 1.5rem; margin-bottom: 8px; }

/* Pricing */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-name { font-weight: 800; font-size: 1.05rem; }
.price { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; }
.price small { font-size: 0.9rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.limit { color: var(--ink-soft); }
.note { color: var(--muted); font-size: 0.88rem; margin-top: 14px; }
.loading { color: var(--muted); }
.pass { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 22px 24px; border-radius: var(--radius); background: var(--accent-soft); }
.pass strong { font-size: 1.05rem; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 650; }
details p { color: var(--ink-soft); margin: 10px 0 0; }

/* Legal pages */
.legal { padding: 48px 0 64px; max-width: 780px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 36px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal .updated { color: var(--muted); font-size: 0.9rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 12px 0; }
.legal th, .legal td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 6px; vertical-align: top; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 0.88rem; }
footer .wrap { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
footer a { color: var(--ink-soft); }
footer p { margin: 0 0 4px; }
