/* ============================================
   Renato Picks — Design System
   ============================================ */

:root {
  /* Light theme (default) */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --text: #111827;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --max-width: 680px;
  --max-width-wide: 920px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-alt: #1a1a1a;
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --text-soft: #737373;
  --border: #262626;
  --border-strong: #404040;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: #172554;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Reset & Base
   ============================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img, svg { display: block; max-width: 100%; }

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.5rem); margin-top: 2.5em; margin-bottom: 0.6em; }
h3 { font-size: 1.125rem; margin-top: 1.75em; margin-bottom: 0.4em; }

p { margin: 0 0 1.1em; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

strong { color: var(--text); font-weight: 600; }
em { font-style: italic; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; color: var(--text-muted); }
li::marker { color: var(--text-soft); }

hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* ============================================
   Layout
   ============================================ */

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

.container--wide { max-width: var(--max-width-wide); }

.site-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.site-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.site-brand__name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}
.site-brand__name:hover { text-decoration: none; color: var(--accent); }

.site-brand__tag { font-size: 0.8rem; color: var(--text-soft); font-weight: 400; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-top: 16px;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--text); text-decoration: none; border-bottom-color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

main { padding-bottom: 64px; }

/* ============================================
   Article / Content
   ============================================ */

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.article-title { margin-bottom: 12px; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-body p { font-size: 1.05rem; line-height: 1.75; }
.article-body > :first-child { margin-top: 0; }

/* ============================================
   Components
   ============================================ */

.notice {
  padding: 16px 18px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin: 1.5em 0;
}
.notice p { margin: 0; font-size: 0.9rem; }
.notice--accent { background: var(--accent-soft); border-color: transparent; }

.card {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* CTA block */
.cta {
  margin: 2.5em 0;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow);
}
.cta h3 { margin: 0 0 8px; font-size: 1.15rem; }
.cta p { margin: 0 0 18px; font-size: 0.95rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.button:hover { background: var(--accent-hover); color: #ffffff; text-decoration: none; }
.button:active { transform: translateY(1px); }
.button--block { display: flex; width: 100%; }
.button-arrow { font-size: 1.1em; line-height: 1; }

.small { font-size: 0.82rem; color: var(--text-soft); }

/* Post list (versão antiga, mantida para compatibilidade) */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }
.post-item__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 4px;
}
.post-item__title:hover { color: var(--accent); text-decoration: none; }
.post-item__desc { margin: 0 0 6px; font-size: 0.95rem; color: var(--text-muted); }
.post-item__date { font-size: 0.78rem; color: var(--text-soft); font-weight: 500; }

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.site-footer p {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin: 0 0 8px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin: 16px 0;
  padding: 0;
  border: none;
}
.site-footer nav a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer nav a:hover { color: var(--accent); text-decoration: none; }
.site-footer .copyright { font-size: 0.78rem; color: var(--text-soft); margin-top: 16px; }

/* ============================================
   Theme toggle
   ============================================ */

#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
#theme-toggle:hover { color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
#theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 600px) {
  body { font-size: 15px; }
  .container { padding: 0 20px; }
  .site-header { padding: 24px 0 20px; margin-bottom: 36px; }
  .site-brand { flex-direction: column; gap: 2px; align-items: flex-start; }
  .site-nav { gap: 4px 18px; margin-top: 12px; }
  .article-meta { font-size: 0.8rem; }
  .cta { padding: 22px 18px; }
  .button { width: 100%; }
  #theme-toggle {
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    min-width: 56px;
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   Post cards
   ============================================ */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.post-card {
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.post-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.post-card--empty { padding: 24px; text-align: center; }

.post-card__link {
  display: block;
  padding: 22px 24px;
  color: inherit;
  text-decoration: none;
}
.post-card__link:hover { text-decoration: none; }

.post-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.post-card__category {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.post-card__date { font-size: 0.78rem; color: var(--text-soft); font-weight: 500; }

.post-card__title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-card__desc { margin: 0 0 14px; font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

.post-card__more {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.15s ease;
}
.post-card:hover .post-card__more { color: var(--accent-hover); }

@media (max-width: 600px) {
  .post-card__link { padding: 18px 20px; }
  .post-card__title { font-size: 1.1rem; }
}

/* ============================================
   Custom scrollbar
   ============================================ */

html {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--bg);
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background-color: var(--border-strong);
  border-radius: 999px;
  border: 3px solid var(--bg);
  background-clip: content-box;
  transition: background-color 0.15s ease;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--accent); background-clip: content-box; }
::-webkit-scrollbar-corner { background: var(--bg); }

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background-color: #525252;
  border-color: var(--bg);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }

/* ============================================
   Reading progress bar
   ============================================ */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  width: 0;
  background: var(--accent);
  z-index: 1000;
  transition: width 0.05s linear;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress { transition: none; }
}

/* ============================================
   Read state
   ============================================ */

.post-card__read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

[data-theme="dark"] .post-card__read {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.post-card--read .post-card__title { color: var(--text-muted); }
.post-card--read .post-card__link:hover .post-card__title { color: var(--text); }

/* ============================================
   Post navigation (prev / next / home)
   ============================================ */

.post-nav {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.post-nav__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.post-nav__item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Inverte a ordem visual: Older à esquerda, Newer à direita */
.post-nav__item--newer { order: 2; text-align: right; }
.post-nav__item--older { order: 1; text-align: left; }

.post-nav__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.post-nav__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.post-nav__arrow { color: var(--accent); }

.post-nav__home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}
.post-nav__home:hover { color: var(--accent); text-decoration: none; }

@media (max-width: 600px) {
  .post-nav__grid { grid-template-columns: 1fr; }
  .post-nav__item--newer { order: 1; text-align: left; }
  .post-nav__item--older { order: 2; text-align: left; }
}

/* ============================================
   Product research section
   ============================================ */

.section-link { margin: 12px 0 0; font-size: 0.88rem; }
.section-link a { font-weight: 600; }

.products-empty {
  padding: 20px;
  background: var(--surface-alt);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 1em 0;
}

.products-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.products-item {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.products-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.products-item__link {
  display: block;
  padding: 22px 24px;
  color: inherit;
  text-decoration: none;
}
.products-item__link:hover { text-decoration: none; }

.products-item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.products-item__verdict {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.products-item__date { font-size: 0.78rem; color: var(--text-soft); font-weight: 500; }

.products-item__title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.products-item__desc { margin: 0 0 14px; font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

.products-item__more {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.products-item:hover .products-item__more { color: var(--accent-hover); }

@media (max-width: 600px) {
  .products-item__link { padding: 18px 20px; }
  .products-item__title { font-size: 1.1rem; }
}

/* ============================================
   Product CTA
   ============================================ */

.product-cta {
  margin: 3em 0;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
}

.product-cta__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.product-cta__title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -0.01em;
}

.product-cta__text {
  margin: 0 auto 22px;
  max-width: 480px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.product-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.product-cta__button:hover {
  background: var(--accent-hover);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.product-cta__button:active { transform: translateY(1px); }

.product-cta__arrow {
  font-size: 1.1em;
  line-height: 1;
  transition: transform 0.15s ease;
}
.product-cta__button:hover .product-cta__arrow { transform: translateX(3px); }

.product-cta__note {
  margin: 16px 0 0;
  font-size: 0.78rem;
  color: var(--text-soft);
  line-height: 1.5;
}

[data-theme="dark"] .product-cta__button:hover {
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

@media (max-width: 600px) {
  .product-cta { padding: 24px 20px; }
  .product-cta__title { font-size: 1.1rem; }
  .product-cta__button { width: 100%; padding: 14px 20px; }
}

/* ============================================
   Link list (página /links/) — em cards
   ============================================ */

.link-list {
  list-style: none;
  padding: 0;
  margin: 2em 0;
  display: grid;
  gap: 14px;
}

.link-list li {
  margin: 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
}

.link-list li:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.link-list a {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 4px;
}

.link-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

.link-list p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Destaque opcional para links de afiliado (badge) */
.link-list li a::after {
  content: " ↗";
  font-size: 0.8em;
  color: var(--text-soft);
  opacity: 0.6;
}

.link-list li a:hover::after {
  color: var(--accent);
  opacity: 1;
}

@media (max-width: 600px) {
  .link-list li {
    padding: 16px 18px;
  }
  .link-list a {
    font-size: 0.95rem;
  }
}