/* Mesmo padrão de tema do driit-site/hv2-site/hub-aesir: :root guarda os
   tokens claros (base), a classe .dark-mode no <html> sobrepõe pro escuro.
   Quem decide o default é o JS (ver <script> no <head> e js/theme.js) —
   aqui o default é escuro, igual ao hv2-site. */
:root {
  --bg: #faf7f2;
  --bg-raised: #ffffff;
  --border: #e3ddd3;
  --text: #201c16;
  --text-dim: #6b6459;
  --teal: #007a74;
  --teal-deep: #bfe9e6;
  --gold: #8a5c14;
  --red: #b32e22;
  --radius: 10px;
  --max-width: 960px;
}

html.dark-mode {
  --bg: #0a0a0a;
  --bg-raised: #141414;
  --border: #262626;
  --text: #f0e4d8;
  --text-dim: #a8a19a;
  --teal: #00a8a8;
  --teal-deep: #00544a;
  --gold: #e0a83e;
  --red: #d4362a;
}

* { box-sizing: border-box; }

html { color-scheme: light; }
html.dark-mode { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  transition: background-color 0.15s ease, color 0.15s ease;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }

code {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand-mark { display: block; }

.topbar-nav { display: flex; align-items: center; gap: 24px; font-size: 0.95rem; }
.topbar-nav a { color: var(--text-dim); }
.topbar-nav a:hover { color: var(--teal); }

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0.15rem dashed currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s;
}
.theme-toggle:hover { background: rgba(128, 128, 128, 0.15); }

/* Claro (default): mostra o ícone "sol -> lua" (clique escurece). */
.theme-toggle .icon-to-light { display: none; }
.theme-toggle .icon-to-dark { display: block; }
/* Escuro: mostra o ícone "nascer do sol" (clique clareia). */
html.dark-mode .theme-toggle .icon-to-light { display: block; }
html.dark-mode .theme-toggle .icon-to-dark { display: none; }

main { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

.hero {
  text-align: center;
  padding: 56px 0 72px;
}

.hero-mark {
  width: 300px;
  height: 300px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  max-width: 18ch;
  margin-inline: auto;
}

.hero-sub {
  color: var(--text-dim);
  max-width: 52ch;
  margin: 16px auto 0;
  font-size: 1.05rem;
}

.features { padding: 48px 0 64px; border-top: 1px solid var(--border); }
.features h2 { text-align: center; font-size: 1.6rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.feature {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature h3 {
  font-size: 1rem;
  color: var(--gold);
}
.feature p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }

@media (max-width: 480px) {
  .topbar-nav { gap: 14px; font-size: 0.85rem; }
  .hero { padding: 40px 0 56px; }
}
