/*
 * base.css — Rogério Paulo | Psicoterapia & Psicanálise
 * Reset, body e tipografia global.
 * Depende de variables.css — carregue variables.css antes.
 */

/* ==========================================================
   GOOGLE FONTS
========================================================== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');


/* ==========================================================
   RESET
========================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

ul,
ol {
  list-style: none;
}

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

button,
input,
textarea,
select {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* ==========================================================
   BODY
========================================================== */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--fw-regular);
  color: var(--color-text-body);
  background-color: var(--color-bg);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================
   CONTAINER
========================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

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

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

/* ==========================================================
   TIPOGRAFIA — HEADINGS
========================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading) !important;
  font-weight: var(--fw-medium) !important;
  color: var(--color-text-heading);
  letter-spacing: var(--ls-tight);
}

h1 {
  font-size: var(--text-h1) !important;
  line-height: var(--lh-heading) !important;
}

h2 {
  font-size: var(--text-h2) !important;
  line-height: var(--lh-heading) !important;
}

h3 {
  font-size: var(--text-h3) !important;
  line-height: 1.3 !important;
}

h4 {
  font-size: var(--text-h4) !important;
  line-height: 1.4 !important;
  letter-spacing: var(--ls-normal);
}

h5 {
  font-size: var(--text-lead) !important;
  line-height: 1.4 !important;
  letter-spacing: var(--ls-normal);
}

h6 {
  font-size: var(--text-body) !important;
  line-height: 1.5 !important;
  letter-spacing: var(--ls-normal);
}

/* Heading em fundo escuro */
.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4 {
  color: var(--color-text-white);
}

/* ==========================================================
   TIPOGRAFIA — PARÁGRAFOS
========================================================== */
p {
  font-size: var(--text-body);
  color: var(--color-text-body);
  line-height: var(--lh-body);
}

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

.bg-dark p {
  color: var(--color-text-footer);
}

/* ==========================================================
   TIPOGRAFIA — LEAD (subtítulo / intro de seção)
========================================================== */
.lead,
p.lead {
  font-size: var(--text-lead);
  line-height: var(--lh-lead);
  color: var(--color-text-body);
  font-weight: var(--fw-light);
}

.bg-dark .lead,
.bg-dark p.lead {
  color: var(--color-text-footer);
}

/* ==========================================================
   TIPOGRAFIA — LINKS DE TEXTO
========================================================== */
a:not([class]) {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:not([class]):hover {
  color: var(--color-primary-dark);
}

a:not([class]):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ==========================================================
   TIPOGRAFIA — BLOCKQUOTE
========================================================== */
blockquote {
  position: relative;
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 32px 36px;
  margin-block: var(--space-8);
  font-family: var(--font-heading);
  font-size: 20px;
  font-style: italic;
  font-weight: var(--fw-medium);
  color: var(--color-text-heading);
  line-height: 1.55;
  letter-spacing: var(--ls-normal);
}

blockquote::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 80px;
  color: var(--color-primary);
  opacity: 0.2;
  position: absolute;
  top: -8px;
  left: 20px;
  line-height: 1;
}

blockquote cite {
  display: block;
  margin-top: var(--space-4);
  font-family: var(--font-body);
  font-size: 13px;
  font-style: normal;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  letter-spacing: var(--ls-normal);
  text-transform: none;
}

.bg-dark blockquote {
  background: rgba(255, 255, 255, 0.07);
  border-left-color: var(--color-primary-mid);
}

.bg-dark blockquote::before {
  color: var(--color-primary-mid);
}

.bg-dark blockquote cite {
  color: var(--color-primary-mid);
}

/* ==========================================================
   TIPOGRAFIA — LISTAS
========================================================== */
ul.list,
ol.list {
  padding-left: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

ul.list {
  list-style: disc;
}

ol.list {
  list-style: decimal;
}

ul.list li,
ol.list li {
  font-size: var(--text-body);
  color: var(--color-text-body);
  line-height: var(--lh-body);
}

.bg-dark ul.list li,
.bg-dark ol.list li {
  color: var(--color-text-footer);
}

/* ==========================================================
   TIPOGRAFIA — SMALL / CAPTIONS
========================================================== */
small,
.text-small {
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

.text-xs {
  font-size: var(--text-xs);
  letter-spacing: var(--ls-wide);
}

/* ==========================================================
   UTILITÁRIOS DE TEXTO
========================================================== */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-muted   { color: var(--color-text-muted); }
.text-white   { color: var(--color-text-white); }
.text-primary { color: var(--color-primary); }

.uppercase {
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

/* ==========================================================
   RESPONSIVIDADE — TIPOGRAFIA
========================================================== */
@media (max-width: 768px) {
  h1 {
    font-size: var(--text-h1-mobile) !important;
  }

  h2 {
    font-size: var(--text-h2-mobile) !important;
  }

  h3 {
    font-size: var(--text-h3-mobile) !important;
  }

  blockquote {
    font-size: var(--text-h4);
    padding-left: var(--space-6);
  }

  .lead,
  p.lead {
    font-size: var(--text-body);
  }
}
