/* ============================================================================
   DESIGN SYSTEM — MANUAL SÓBRIO (ESTÉTICA SUÍÇA RESPONSIVA: MOBILE + DESKTOP)
   ============================================================================ */
:root {
  --bg-main: #141413;
  --bg-card: #1C1C1A;
  --bg-elevated: #242421;
  --text-main: #F4F1EA;
  --text-muted: #A39B8B;
  --border-subtle: rgba(163, 155, 139, 0.18);
  --border-strong: rgba(244, 241, 234, 0.25);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --radius: 4px;
  --container-max: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 20, 19, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.monogram {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  padding: 5px 9px;
  border: 1px solid var(--text-main);
  color: var(--text-main);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 28px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.desktop-nav a:hover {
  color: var(--text-main);
}

.desktop-nav .nav-cta {
  color: var(--bg-main);
  background: var(--text-main);
  padding: 7px 14px;
  font-weight: 600;
  border-radius: var(--radius);
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 8px;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-main);
}

.mobile-drawer {
  display: none;
  flex-direction: column;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 20px 20px;
}

.mobile-drawer.open {
  display: flex;
}

.mobile-drawer a {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  color: var(--text-main);
}

.mobile-drawer a:last-child {
  border-bottom: none;
}

/* HERO */
.hero {
  padding: 44px 0 52px;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.eyebrow, .section-kicker, .box-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 540px;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-main);
  font-weight: 600;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--text-main);
  background: transparent;
}

.btn-outline:hover {
  background: var(--bg-card);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 0.95rem;
}

/* HERO LINKS BOX */
.hero-links-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 20px;
  border-radius: var(--radius);
}

.featured-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.featured-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.featured-link-item:hover {
  border-color: var(--text-main);
}

.featured-link-title {
  font-size: 0.88rem;
  font-weight: 500;
  display: block;
}

.featured-link-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.social-chip {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 6px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.social-chip:hover {
  color: var(--text-main);
  border-color: var(--text-main);
}

/* SEÇÕES */
.section-block {
  padding: 56px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-alt {
  background: #171716;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.counter-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-display);
}

/* FILTROS & BUSCA */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.search-field {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.search-field input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 12px 14px 12px 40px;
  font-size: 0.9rem;
  border-radius: var(--radius);
  outline: none;
}

.search-field input:focus {
  border-color: var(--text-muted);
}

.pills-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.pills-scroll::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 14px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.pill-btn:hover, .pill-btn.active {
  background: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
  font-weight: 600;
}

/* GRID DE CURADORIA */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.item-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #10100f;
  overflow: hidden;
}

.card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.03);
}

.featured-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(20, 20, 19, 0.88);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  font-size: 0.68rem;
  padding: 3px 8px;
  letter-spacing: 0.08em;
}

.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  flex: 1;
}

.card-footer-actions {
  display: flex;
  gap: 8px;
}

.card-footer-actions .btn-primary {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.84rem;
}

.card-footer-actions .btn-outline {
  padding: 10px 14px;
  font-size: 0.84rem;
}

/* GRID DE ARTIGOS (CAFÉ & LIVROS) */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color 0.2s;
}

.article-card:hover {
  border-color: var(--text-main);
}

.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body {
  padding: 20px;
}

.article-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.article-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 8px;
  line-height: 1.28;
}

.article-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* E-BOOK BANNER */
.ebook-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 32px 24px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ebook-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-bottom: 10px;
}

.ebook-text {
  color: var(--text-muted);
  max-width: 600px;
  font-size: 0.95rem;
}

/* RODAPÉ */
.footer {
  padding: 36px 0 48px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.affiliate-notice {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.5;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.admin-subtle-link {
  opacity: 0.5;
}

.admin-subtle-link:hover {
  opacity: 1;
}

/* MODAL DE LEITURA */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 9, 0.86);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-tag {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
}

.modal-body {
  padding: 24px 20px;
  overflow-y: auto;
}

.modal-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 12px;
  line-height: 1.25;
}

.modal-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 20px 0 8px;
  color: var(--text-main);
}

.modal-body p {
  color: #d6d2c8;
  margin-bottom: 14px;
  font-size: 0.96rem;
}

/* SKELETONS */
.skeleton-line {
  height: 44px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

.skeleton-card {
  height: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

/* ============================================================================
   MEDIA QUERIES — ADAPTAÇÃO PARA TABLET E DESKTOP WIDE
   ============================================================================ */
@media (min-width: 768px) {
  .mobile-menu-btn, .mobile-drawer {
    display: none !important;
  }

  .desktop-nav {
    display: flex;
  }

  .hero {
    padding: 68px 0 76px;
  }

  .hero-grid {
    grid-template-columns: 1.25fr 0.95fr;
    align-items: center;
    gap: 48px;
  }

  .filter-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .search-field {
    max-width: 340px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ebook-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 44px;
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}