/*
 * Base do tema: variáveis, tipografia do site, reset dos componentes e botões.
 * Sem o CSS do Astra, este arquivo é a única base do site.
 */

:root {
  --blue-950: #050f1c;
  --blue-900: #0a1628;
  --blue-800: #0d2244;
  --blue-700: #0f3060;
  --blue-600: #1a4a8a;
  --blue-500: #2563b8;
  --blue-400: #3b82d4;
  --blue-300: #60a5e8;
  --blue-200: #93c5fd;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;
  --white:    #ffffff;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --gold:     #c9a94c;
  --radius-sm: 6px;
  --radius-md: 12px;
  --csd-serif: 'Playfair Display', Georgia, serif;
  --csd-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --csd-altura-cabecalho: 84px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 92px; }

body {
  margin: 0;
  font-family: var(--csd-sans);
  background: var(--white);
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Reset só dentro dos componentes da Catedral ── */
.csd, .csd *, .csd *::before, .csd *::after { box-sizing: border-box; }
.csd :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd, address, details, summary) { margin: 0; padding: 0; }
.csd :where(img, svg) { display: block; max-width: 100%; border: 0; }
.csd :where(button) { padding: 0; border-radius: 0; color: inherit; font: inherit; letter-spacing: normal; text-transform: none; box-shadow: none; min-height: 0; }
.csd :where(a) { text-decoration: none; }
/* Raiz de cada componente sem margem/recuo herdados de regras genéricas (ex.: "footer { padding… }") */
.csd { margin: 0; padding: 0; }
/* Bordas, fundos e sombras genéricos de temas (ex.: "header, nav { border… }") não chegam aos componentes */
.csd, .csd :where(header, nav, footer, section, aside, div, details, summary, ul, ol, li, a, img, button, span, p, h1, h2, h3, h4, address) {
  border: 0; background: none; box-shadow: none; text-shadow: none;
}
.csd :where(h1, h2, h3, h4) { font-family: var(--csd-serif); }
.csd { font-family: var(--csd-sans); line-height: 1.6; }

/* ── Acessibilidade ── */
.screen-reader-text, .visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; word-wrap: normal !important;
}
/* O link "pular para o conteúdo" impresso pelo Astra recebe o visual da Catedral */
.skip-link.screen-reader-text:focus, .skip-link.screen-reader-text:focus-visible {
  position: fixed !important; top: 0; left: 1rem; z-index: 100000;
  width: auto; height: auto; clip: auto; margin: 0; overflow: visible; white-space: normal;
  background: var(--blue-600); color: #fff; padding: 8px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font: 500 14px/1.4 var(--csd-sans); text-decoration: none;
  outline: 2px solid var(--blue-200); outline-offset: 2px;
}

/* ── Estrutura comum ── */
.csd .csd-wrap { max-width: 1160px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 768px) { .csd .csd-wrap { padding: 0 1.25rem; } }

.csd .csd-sobretitulo {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-500); margin-bottom: .6rem;
}
.csd .csd-h2 {
  font-family: var(--csd-serif); font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.2; color: var(--blue-900);
}
.csd .csd-h2 em { font-style: italic; color: var(--blue-600); }

/* ── Botões ── */
.csd .btn-primary, .csd .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font: 500 14.5px/1.6 var(--csd-sans); cursor: pointer; text-decoration: none;
}
.csd .btn-primary svg, .csd .btn-ghost svg { width: 18px; height: 18px; flex-shrink: 0; }
.csd .btn-primary .ico-calendario, .csd .btn-ghost .ico-calendario { width: 17px; height: 17px; }
.csd .btn-primary .ico-seta, .csd .btn-ghost .ico-seta { width: 15px; height: 15px; }
.csd .btn-primary { background: var(--blue-600); color: #fff; border: none; transition: background .15s, transform .1s; }
.csd .btn-primary:hover { background: var(--blue-500); color: #fff; }
.csd .btn-primary:active { transform: scale(.98); }
.csd .btn-primary:focus-visible { outline: 2px solid var(--blue-200); outline-offset: 3px; }
.csd .btn-ghost {
  background: transparent; color: #fff; font-weight: 400;
  border: 1.5px solid rgba(255,255,255,.4); transition: border-color .15s, background .15s;
}
.csd .btn-ghost:hover { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.08); color: #fff; }
.csd .btn-ghost:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ── Páginas comuns (posts, arquivos, páginas sem componentes) ── */
.csd-sem-hero .site-content { padding-top: var(--csd-altura-cabecalho); }
.csd-sem-hero:not(.csd-layout-livre) .site-content > .ast-container {
  max-width: 1200px; margin: 0 auto; padding: 3rem 2rem 4.5rem;
}
.csd-sem-hero:not(.csd-layout-livre) .entry-title {
  font-family: var(--csd-serif); font-weight: 500; color: var(--blue-900);
  font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.2; margin: 0 0 1.5rem;
}
.csd-sem-hero:not(.csd-layout-livre) .entry-content { max-width: 760px; color: var(--gray-700); font-size: 1.0625rem; line-height: 1.75; }
.csd-sem-hero:not(.csd-layout-livre) .entry-content :where(p, ul, ol) { margin: 0 0 1.2em; }
.csd-sem-hero:not(.csd-layout-livre) .entry-content :where(h2, h3) { font-family: var(--csd-serif); font-weight: 500; color: var(--blue-900); margin: 2rem 0 .75rem; line-height: 1.25; }
.csd-sem-hero:not(.csd-layout-livre) .entry-content a { color: var(--blue-700); text-decoration: underline; text-underline-offset: 2px; }
.csd-sem-hero:not(.csd-layout-livre) .entry-content img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
@media (max-width: 768px) {
  :root { --csd-altura-cabecalho: 68px; }
  .csd-sem-hero:not(.csd-layout-livre) .site-content > .ast-container { padding: 2rem 1.25rem 3.5rem; }
}
