/* ============================================================
   EGBÉ YPÒ ÒRUN — Base Global v2
   Light-first · DM Sans dominant
   ============================================================ */

/* ----------------------------------------------------------
   Corpo
   ---------------------------------------------------------- */
body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-on-light);
  background-color: var(--bg-page);
}

/* ----------------------------------------------------------
   Títulos — DM Sans, pesos distintos
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-on-light);
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: -0.035em;
}
h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
}
h3 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
}
h4 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: 0;
}
h5 {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
}
h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
}

/* Titles sobre fundo escuro */
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6,
.hero h1,
.hero h2 {
  color: var(--text-on-dark);
}

/* ----------------------------------------------------------
   Serif — uso editorial estrito
   Citações, depoimentos, pullquotes, missão statement.
   ---------------------------------------------------------- */
.text-serif {
  font-family: var(--font-serif);
  font-weight: var(--weight-light);
  font-style: italic;
  line-height: var(--leading-snug);
  letter-spacing: 0;
}

/* ----------------------------------------------------------
   Rótulo de seção (eyebrow)
   ---------------------------------------------------------- */
.section-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--accent-text);
  display: inline-block;
}

.section--dark .section-label,
.hero .section-label {
  color: var(--accent-on-dark);
}

.section--subtle .section-label {
  color: var(--accent-text);
}

/* ----------------------------------------------------------
   Parágrafos
   ---------------------------------------------------------- */
p {
  max-width: var(--max-width-text);
  line-height: var(--leading-normal);
  color: var(--text-on-light);
}

p + p {
  margin-top: var(--space-4);
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  font-weight: var(--weight-regular);
  color: var(--text-secondary);
}

.section--dark p,
.section--dark .lead {
  color: rgba(246, 240, 216, 0.82);
}

.small {
  font-size: var(--text-sm);
}

/* ----------------------------------------------------------
   Links
   ---------------------------------------------------------- */
a {
  color: inherit;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

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

.section--dark a:hover {
  color: var(--color-green);
}

/* ----------------------------------------------------------
   Citação editorial — serif, usada com critério
   ---------------------------------------------------------- */
blockquote {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-style: italic;
  font-weight: var(--weight-light);
  line-height: var(--leading-snug);
  letter-spacing: 0;
  color: var(--text-on-light);
  padding-left: var(--space-8);
  border-left: 3px solid var(--color-green);
}

.section--dark blockquote {
  color: var(--text-on-dark);
  border-left-color: var(--color-green);
}

/* ----------------------------------------------------------
   Divisores
   ---------------------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: var(--space-10) 0;
}

.section--dark hr {
  border-top-color: var(--border-dark);
}

/* ----------------------------------------------------------
   Figuras
   ---------------------------------------------------------- */
figure {
  position: relative;
}

figcaption {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-3);
}

.section--dark figcaption {
  color: rgba(246, 240, 216, 0.55);
}

/* ----------------------------------------------------------
   Layout — Container
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

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

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

/* ----------------------------------------------------------
   Seções — sistema light-first
   ---------------------------------------------------------- */
.section {
  padding-block: var(--section-gap);
}

/* Branco puro — padrão da maioria das seções */
.section--white {
  background-color: var(--bg-page);
  color: var(--text-on-light);
}

/* Off-white quente — quebra de seção sem peso */
.section--subtle {
  background-color: var(--bg-subtle);
  color: var(--text-on-light);
}

/* Creme — editorial, CTAs leves, callouts */
.section--cream {
  background-color: var(--bg-cream);
  color: var(--text-on-light);
}

/* Escuro — hero, footer, 1 CTA máx. por página */
.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

/* ----------------------------------------------------------
   Cabeçalho de seção
   ---------------------------------------------------------- */
.section__header {
  margin-bottom: var(--content-gap);
}

.section__header--centered {
  text-align: center;
}

.section__header--centered p {
  margin-inline: auto;
}

.section__header .section-label {
  margin-bottom: var(--space-4);
}

.section__header h2 {
  margin-bottom: var(--space-5);
}

.section__header p {
  color: var(--text-secondary);
  font-size: var(--text-lg);
}

.section--dark .section__header p {
  color: rgba(246, 240, 216, 0.75);
}

/* ----------------------------------------------------------
   Animações de entrada (IntersectionObserver via data-animate)
   ---------------------------------------------------------- */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slower), transform var(--transition-slower);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ----------------------------------------------------------
   Grids utilitários
   ---------------------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: var(--space-6);
}

/* ----------------------------------------------------------
   Listas
   ---------------------------------------------------------- */
.prose ul,
.prose ol {
  padding-left: var(--space-6);
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: var(--space-2); }

/* ----------------------------------------------------------
   Seleção de texto
   ---------------------------------------------------------- */
::selection {
  background: var(--color-green);
  color: var(--color-brown-dark);
}
