/* ============================================================
   Edu Esperidião — eduesperidiao.com.br
   Direção: editorial seco. Papel quente, tinta quase preta,
   uma cor só, usada quase nunca.
   ============================================================ */

/* ── Fontes ─────────────────────────────────────────────── */
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-latin-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/plex-mono-400-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/plex-mono-500-latin.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --paper:    #FBF9F5;
  --paper-2:  #F2EEE6;
  --ink:      #17140F;
  --ink-2:    #46413A;
  --muted:    #787064; /* 4.64:1 sobre --paper — WCAG AA em texto pequeno */
  --rule:     #DFD8CB;
  --rule-2:   #EAE4D9;
  --accent:   #9C3B1E;

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono:  'Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --w-prose: 34rem;
  --w-wide:  60rem;
  --pad: clamp(1.25rem, 5vw, 2.5rem);

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: 'kern', 'liga';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: .75rem 1rem; z-index: 100; text-decoration: none;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ── Tipografia ─────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 8.5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}
h1 em { font-style: italic; color: var(--ink-2); }

h2 {
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin-bottom: 2rem;
}
h2 em { font-style: italic; }

h3 { font-size: 1.5rem; line-height: 1.2; }

.label {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.label .num {
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .2rem .5rem;
  letter-spacing: .06em;
}

.lede {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 38ch;
  margin: 0 0 2.75rem;
  text-wrap: pretty;
}

.prose { max-width: var(--w-prose); }
.prose p {
  margin: 0 0 1.35em;
  color: var(--ink-2);
  text-wrap: pretty;
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

/* Bloco em itálico: o "atalho" que funciona mas não se sustenta.
   Itálico separa a voz da tentação da voz do argumento. */
.em-block {
  font-style: italic;
  font-size: 1.09em;
  line-height: 1.6;
}
.em-block strong { font-style: normal; }

.pull {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  line-height: 1.25;
  color: var(--ink) !important;
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  margin-top: 2.5rem !important;
}

.note {
  font-size: .875rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 44ch;
}
.note-center { max-width: none; text-align: center; margin: 1.75rem 0 0; }

/* ── Header ─────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-head.is-stuck { border-bottom-color: var(--rule); }

.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 4rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-head nav { display: flex; align-items: center; gap: 1.75rem; }
.site-head nav a {
  font-size: .875rem;
  text-decoration: none;
  color: var(--ink-2);
  transition: color .15s ease;
}
.site-head nav a:hover { color: var(--ink); }
.head-cta {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: .4rem 1rem;
  color: var(--ink) !important;
  transition: background .15s ease, color .15s ease !important;
}
.head-cta:hover { background: var(--ink); color: var(--paper) !important; }

@media (max-width: 44rem) {
  .site-head nav a:not(.head-cta) { display: none; }
}

/* ── Botões ─────────────────────────────────────────────── */
.actions {
  display: flex; flex-wrap: wrap; gap: .75rem 1rem;
  align-items: center; margin-top: 2.5rem;
}
.actions-center { justify-content: center; }

.btn {
  display: inline-flex; align-items: center;
  font-family: var(--sans);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); }

.btn-ghost {
  color: var(--muted);
  border-color: var(--rule);
  background: transparent;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

.btn-lg { font-size: 1.0625rem; padding: 1rem 2rem; }

.section-invert .btn-primary { background: var(--paper); color: var(--ink); }
.section-invert .btn-primary:hover { background: var(--accent); color: var(--paper); }

/* ── Seções ─────────────────────────────────────────────── */
.section { padding-block: clamp(4.5rem, 11vw, 8.5rem); }
.section-rule { border-top: 1px solid var(--rule); }

.section-invert {
  background: var(--ink);
  color: var(--paper);
}
.section-invert h2, .section-invert .prose strong { color: var(--paper); }
.section-invert .prose p { color: color-mix(in srgb, var(--paper) 72%, var(--ink)); }
.section-invert .label { color: color-mix(in srgb, var(--paper) 55%, var(--ink)); }
.section-invert .label .num {
  color: var(--paper);
  border-color: color-mix(in srgb, var(--paper) 28%, var(--ink));
}
.section-invert .pull {
  color: var(--paper) !important;
  border-left-color: var(--accent);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  padding-block: clamp(3rem, 9vw, 6rem) clamp(4rem, 10vw, 7rem);
  border-bottom: 1px solid var(--rule);
}

/* Só tipografia. A primeira coisa que o médico vê é o argumento,
   não um rosto — coerente com o que a página defende. */
.hero .lede { margin-bottom: 0; }

/* ── Ledger (alcance ≠ agenda) ──────────────────────────── */
.ledger {
  list-style: none;
  margin: 3.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  max-width: var(--w-prose);
}
.ledger li {
  display: flex; align-items: baseline; gap: .85rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}
.ledger span { color: var(--ink); }
.ledger span:last-child { color: var(--muted); }
.ledger em {
  font-family: var(--mono);
  font-style: normal;
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

/* ── OUMP ───────────────────────────────────────────────── */
.oump { margin-bottom: 1.5rem; }
.oump sup {
  font-size: .32em;
  vertical-align: super;
  color: var(--muted);
  letter-spacing: 0;
}
.oump-note {
  font-family: var(--mono);
  font-size: .8125rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  border-left: 1px solid var(--rule);
}
.oump-note-2 { color: var(--ink); margin-bottom: 3.5rem; }

/* ── Passos ─────────────────────────────────────────────── */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}
@media (min-width: 48rem) {
  .steps { grid-template-columns: 1fr 1fr; }
}
.steps li {
  background: var(--paper);
  padding: 2.25rem clamp(1.25rem, 3vw, 2.25rem);
}
.step-n {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .85rem;
}
.steps h3 { margin: 0 0 .75rem; }
.steps p:last-child {
  margin: 0;
  color: var(--ink-2);
  font-size: .9375rem;
  text-wrap: pretty;
}

/* ── Filtro (duas colunas) ──────────────────────────────── */
.cols { display: grid; gap: 3.5rem; }
@media (min-width: 52rem) {
  .cols { grid-template-columns: 1fr 1fr; gap: 4.5rem; }
}
.col-h {
  font-size: 1.35rem;
  margin: 0 0 1.5rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--rule);
}

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  position: relative;
  padding: .7rem 0 .7rem 1.85rem;
  border-bottom: 1px solid var(--rule-2);
  color: var(--ink-2);
  font-size: .9375rem;
  text-wrap: pretty;
}
.list li::before {
  position: absolute; left: 0; top: .72rem;
  font-family: var(--mono);
  font-size: .8125rem;
  line-height: 1.5;
}
.list-no li::before { content: '×'; color: var(--accent); font-size: 1rem; top: .6rem; }
.list-yes li::before { content: '→'; color: var(--ink); }

#filtro .note { margin-top: 1.75rem; }

/* ── Bio ────────────────────────────────────────────────── */
.bio { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 52rem) {
  .bio { grid-template-columns: 20rem 1fr; gap: 4rem; }
}
.bio-photo { margin: 0; }
.bio-photo img {
  width: 100%;
  max-width: 20rem;
  border-radius: 2px;
  filter: saturate(.94) contrast(1.02);
}
.bio-text h2 { margin-bottom: 1.5rem; }

/* ── CTA ────────────────────────────────────────────────── */
.section-cta { background: var(--paper-2); border-top: 1px solid var(--rule); }
.section-cta .prose { margin-inline: auto; text-align: center; }
.section-cta h2 { margin-inline: auto; text-align: center; }
.section-cta .label { justify-content: center; }
.section-cta .actions { justify-content: center; margin-top: 2.75rem; }

/* ── FAQ ────────────────────────────────────────────────── */
.faq { border-top: 1px solid var(--rule); max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.35rem 2.5rem 1.35rem 0;
  position: relative;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--ink);
  transition: color .15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after {
  content: '+';
  position: absolute; right: .25rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 1.25rem;
  color: var(--muted);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: '−'; }
.faq-a { padding: 0 3rem 1.6rem 0; }
.faq-a p {
  margin: 0;
  color: var(--ink-2);
  font-size: .9375rem;
  text-wrap: pretty;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-foot {
  background: var(--ink);
  color: color-mix(in srgb, var(--paper) 70%, var(--ink));
  padding-block: 4rem 2rem;
}
.foot-inner {
  display: grid; gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 14%, var(--ink));
}
@media (min-width: 44rem) {
  .foot-inner { grid-template-columns: 1fr auto; align-items: start; }
}
.foot-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--paper);
  margin: 0 0 .5rem;
}
.foot-tag { margin: 0; font-size: .875rem; line-height: 1.6; }
.foot-nav { display: flex; flex-direction: column; gap: .6rem; }
.foot-nav a {
  font-size: .875rem;
  text-decoration: none;
  color: color-mix(in srgb, var(--paper) 72%, var(--ink));
  transition: color .15s ease;
}
.foot-nav a:hover { color: var(--paper); }
@media (min-width: 44rem) { .foot-nav { text-align: right; } }

.foot-legal { padding-top: 1.75rem; }
.foot-legal p {
  margin: 0;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .04em;
  color: color-mix(in srgb, var(--paper) 48%, var(--ink)); /* 4.79:1 sobre --ink */
}

/* ── Movimento ──────────────────────────────────────────── */
/* Entrada discreta. O conteúdo NUNCA depende de JS para existir:
   sem JS, .reveal simplesmente não recebe transform e fica visível. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease, transform .5s ease;
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
