/* =========================================================================
   Scrapbook — folha de estilo única.
   Pra trocar as cores do site inteiro, mexa só nos valores do :root abaixo.
   ========================================================================= */

:root {
  --primary: #9c48ae;         /* roxo — texto, bordas, sombras */
  --secondary: #c2cce7;       /* lavanda — fundo da página */
  --accent: #86c6be;          /* teal — destaques, links ativos */
  --highlight: #76a2c9;       /* azul — botões de perigo, avisos */
  --card: #fcfaf8;            /* quase branco — fundo dos cards */

  --font: 'Quicksand', 'Trebuchet MS', sans-serif;
  --radius: 0px;              /* cantos retos */
  --shadow: 6px 6px 0 var(--primary); /* sombra dura, sem blur */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--secondary);
  color: var(--primary);
  font-family: var(--font);
  line-height: 1.5;
}

a { color: var(--primary); }

.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- cabeçalho ---------- */

.site-header {
  background: var(--secondary);
  border-bottom: 2px solid var(--primary);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.site-header a { text-decoration: none; }

.logo {
  font-size: 1.25rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  padding-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.site-nav a:hover,
.site-nav a.active { opacity: 1; color: var(--accent); }

.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1); }

.site-footer {
  padding: 32px 0;
  text-align: center;
  opacity: 0.8;
}

/* ---------- home ---------- */

.hero {
  position: relative;
  padding: 64px 380px 32px 0;
}

.hero h1 { margin: 0 0 12px; font-size: 2.5rem; }
.hero p { max-width: 60ch; font-size: 1.1rem; }

.highlight {
  background: var(--accent);
  padding: 1px 8px;
  font-weight: 700;
}

.hero-portrait {
  position: absolute;
  top: 50%;
  right: 0;
  width: 340px;
  transform: translateY(-50%);
}

.hero-portrait img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* ---------- cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 24px 0 48px;
}

.card {
  display: block;
  padding: 20px;
  background: var(--card);
  border: 3px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--primary);
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.card:hover {
  transform: translate(-3px, -3px);
  border-color: var(--accent);
  box-shadow: 9px 9px 0 var(--primary);
}

.card h3 { margin: 0 0 8px; }
.card p { margin: 0; font-size: 0.95rem; opacity: 0.85; }

/* ---------- listas top 10 ---------- */

.ranked-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 48px;
  padding: 0;
  list-style: none;
}

.ranked-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card);
  border-left: 6px solid var(--accent);
}

.ranked-item .rank {
  min-width: 2ch;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.ranked-item-body { flex: 1; min-width: 0; }
.ranked-item .title { margin: 0 0 4px; font-weight: 600; }
.ranked-item .note { margin: 0; font-size: 0.95rem; opacity: 0.85; }

.ranked-item img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  object-fit: cover;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.tag-chip {
  padding: 2px 10px;
  background: var(--card);
  border: 2px solid var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- títulos de página ---------- */

.page-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--secondary);
  text-decoration: none;
  font-weight: 700;
  transition: background-color 150ms ease;
}

.back-link:hover { background: var(--accent); }

.section-heading {
  display: inline-block;
  margin: 0;
  padding-bottom: 4px;
  border-bottom: 3px solid var(--accent);
}

/* seções recolhíveis do índice do devlog */
.section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 24px 0 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  font-family: var(--font);
  font-size: 1.17rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.section-toggle .count {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.7;
}

/* ---------- texto do devlog ---------- */

.markdown-body { margin-top: 24px; line-height: 1.6; }
.markdown-body h2,
.markdown-body h3 { color: var(--primary); }

.markdown-body strong {
  background: var(--accent);
  padding: 1px 6px;
  font-weight: 700;
}

.markdown-body code {
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.06);
}

.markdown-body img { max-width: 100%; }

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
  padding: 8px 12px;
  border: 1px solid var(--primary);
}

/* tabelas largas rolam sozinhas em vez de estourar a página */
.table-scroll { overflow-x: auto; }

/* ---------- callouts (> [!info] do Obsidian) ---------- */

.callout {
  --callout-color: var(--primary);
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--card);
  border: 2px solid var(--callout-color);
  border-left-width: 6px;
}

.callout::before {
  content: attr(data-callout-title);
  display: block;
  margin-bottom: 8px;
  color: var(--callout-color);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

.callout-info { --callout-color: var(--accent); }
.callout-tip { --callout-color: var(--highlight); }
.callout-todo { border-style: dashed; }

.callout-quote {
  border-width: 0 0 0 4px;
  padding: 4px 18px;
  background: none;
  font-style: italic;
}

.callout-quote::before { content: none; }

/* ---------- animação de entrada ---------- */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, -50px, 0);
  transition: opacity 800ms ease-in-out, transform 800ms ease-in-out;
}

[data-reveal].visible {
  opacity: 1;
  transform: none;
}

/* se o JS não rodar, o conteúdo aparece mesmo assim */
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- mobile ---------- */

@media (max-width: 800px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: 0;
    text-align: center;
  }

  .hero-portrait {
    position: static;
    order: -1;
    width: 200px;
    margin-bottom: 16px;
    transform: none;
  }

  .site-header .shell { flex-direction: column; gap: 12px; }
}

@media (max-width: 1000px) {
  .hero h1 { font-size: 2rem; }
}
