:root {
  --bg: #f5f6f8;
  --superficie: #ffffff;
  --texto: #1c1f26;
  --texto-suave: #5b6270;
  --borda: #e2e5ea;
  --destaque: #2f6feb;
}

body.escuro {
  --bg: #14161a;
  --superficie: #1d2027;
  --texto: #eef0f4;
  --texto-suave: #a2a9b6;
  --borda: #2c3038;
  --destaque: #6ea0ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--texto);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
}

header {
  background: var(--superficie);
  border-bottom: 1px solid var(--borda);
  padding: 1.5rem 1rem;
  text-align: center;
}

header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

nav a {
  color: var(--texto-suave);
  text-decoration: none;
  margin: 0 0.6rem;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--destaque);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

section {
  margin-bottom: 3rem;
}

h2 {
  font-size: 1.3rem;
  border-left: 3px solid var(--destaque);
  padding-left: 0.6rem;
}

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

.card {
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 1.2rem;
}

.card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.card p {
  color: var(--texto-suave);
  margin-bottom: 0;
  font-size: 0.92rem;
}

form {
  display: grid;
  gap: 1rem;
  max-width: 420px;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--texto-suave);
}

input,
textarea {
  font: inherit;
  padding: 0.6rem;
  border: 1px solid var(--borda);
  border-radius: 8px;
  background: var(--superficie);
  color: var(--texto);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--destaque);
  outline-offset: 1px;
}

button {
  font: inherit;
  cursor: pointer;
  background: var(--destaque);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
}

button:hover {
  filter: brightness(1.08);
}

#retorno {
  color: var(--destaque);
  font-size: 0.9rem;
  min-height: 1.4rem;
}

footer {
  border-top: 1px solid var(--borda);
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--texto-suave);
  font-size: 0.85rem;
}

#btn-tema {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  background: var(--superficie);
  border: 1px solid var(--borda);
  font-size: 1.1rem;
}
