@font-face {
  font-family: Inter;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-var-latin.woff2) format("woff2");
}

:root {
  --bg: #faf8f4;
  --card: #fff;
  --tile: #fbf4e9;
  --border: #ece7df;
  --ink: #26221d;
  --muted: #5c554c;
  --faint: #8a8176;
  --accent: #b4622f;
}

[data-theme="escuro"] {
  --bg: #26221d;
  --card: #2e2a24;
  --tile: #363029;
  --border: #3d372f;
  --ink: #fbf4e9;
  --muted: #c9bfb2;
  --faint: #9a9083;
  --accent: #d98a52;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }

header, main, .footer-in {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

header {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  justify-content: flex-end;
}

#tema {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
#tema:hover { border-color: var(--accent); }
#tema svg { width: 20px; height: 20px; }

/* lua no claro, sol no escuro */
#tema .sol, [data-theme="escuro"] #tema .lua { display: none; }
[data-theme="escuro"] #tema .sol { display: block; }

main {
  flex: 1;
  padding-top: 32px;
  padding-bottom: 72px;
}

.grade {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.cartao {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--ink);
}
.cartao:hover { border-color: var(--accent); color: var(--ink); }

.simbolo {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tile);
  border-radius: 10px;
}
.simbolo img { height: 72px; }
.simbolo .escuro, [data-theme="escuro"] .simbolo .claro { display: none; }
[data-theme="escuro"] .simbolo .escuro { display: block; }

.texto { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.nome {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nome span { color: var(--accent); }

.desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.rodape-cartao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.dominio { font-size: 13px; font-weight: 600; color: var(--faint); }
.acessar { font-size: 14px; font-weight: 700; color: var(--accent); }

footer { border-top: 1px solid var(--border); }
.footer-in {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  justify-content: center;
  font-size: 13px;
  color: var(--faint);
}

/* mobile: sempre escuro (ver script no head), sem botão de tema */
@media (max-width: 639px) {
  header { display: none; }
}
