/* ─── Theme tokens ─────────────────────────────────────────────
   Tema "atlas" (default). Outras paletas viram themes em
   [data-theme="..."], permitindo o switcher de temas no futuro.
─────────────────────────────────────────────────────────────── */
:root,
[data-theme="atlas"] {
  --paper:        #fbf7ef;
  --paper-soft:   #f3ede0;
  --ink:          #2a2520;
  --ink-soft:     #5a4f44;
  --ink-mute:     #8a7e72;
  --accent:       #3a4a8c;   /* cobalto */
  --accent-warm:  #b04a2e;   /* tijolo */
  --accent-ochre: #c8a03c;
  --border:       rgba(60, 50, 40, 0.18);

  /* Cores das regiões anatômicas — usadas como --region-color
     em cada página interna pra carregar a cor da home pra dentro. */
  --region-sobre:         #c8412a;
  --region-principios:    #e07820;
  --region-publicacoes:   #d4b020;
  --region-emdr:          #5fa758;
  --region-brainspotting: #3a78c4;
  --region-supervisao:    #4a52b8;
  --region-online:        #7a4ec4;
}

/* ─── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Fraunces', 'EB Garamond', Georgia, serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
img { display: block; max-width: 100%; }

/* Subtle paper grain — fixo sobre toda página */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(rgba(40, 30, 20, 0.04) 1px, transparent 1.2px),
    radial-gradient(rgba(40, 30, 20, 0.025) 1px, transparent 1.2px);
  background-size: 3px 3px, 5px 5px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: multiply;
  opacity: 0.7;
}

/* ─── Layout: home (canvas: ocupa exatamente a viewport, sem scroll) ── */
.home {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 26px 56px 22px;
  gap: 24px;
}

/* ─── Layout: páginas internas (scroll natural) ─────────────── */
.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 56px 22px;
  gap: 32px;
}

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand img {
  width: 28px;
  height: 28px;
  opacity: 0.92;
}
.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink);
  white-space: nowrap;
}
.nav {
  display: flex;
  gap: 22px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav a {
  transition: color 0.15s;
  white-space: nowrap;
  position: relative;
}
.nav a:hover,
.nav a:focus-visible { color: var(--accent); outline: none; }
.nav a.is-active {
  color: var(--region-color, var(--ink));
}
.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cta-agende {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 11px 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
}
.cta-agende:hover,
.cta-agende:focus-visible { background: var(--accent); outline: none; }
.cta-agende:active { transform: translateY(1px); }

/* ─── Page spread (metade imagem / metade texto) ────────────── */
.page-spread {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 56px;
  align-items: start;
  flex: 1;
}

.page-image {
  position: sticky;
  top: 26px;
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: calc(100vh - 180px);
}

.image-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--paper-soft) 0%, var(--paper) 100%);
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px;
  text-align: center;
  overflow: hidden;
}
.image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 30% 30%, color-mix(in srgb, var(--region-color, var(--accent)) 14%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 70% 70%, color-mix(in srgb, var(--region-color, var(--accent)) 10%, transparent) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.image-placeholder > * { position: relative; z-index: 1; }
.image-placeholder .numeral {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(80px, 14vw, 140px);
  font-weight: 400;
  line-height: 1;
  color: var(--region-color, var(--accent));
  opacity: 0.85;
}
.image-placeholder .caption {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  max-width: 24ch;
  line-height: 1.6;
}
.image-placeholder code {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  background: rgba(60, 50, 40, 0.06);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--ink-soft);
}

/* Quando a imagem real estiver pronta, basta substituir
   <div class="image-placeholder"> por <img class="page-img" src="..."> */
.page-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--paper-soft);
}

/* ─── Page content ───────────────────────────────────────────── */
.page-content {
  padding-top: 8px;
  max-width: 64ch;
}

.page-eyebrow {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--region-color, var(--accent));
  margin-bottom: 20px;
  font-weight: 600;
}

.page-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(40px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 28px;
  font-variation-settings: 'opsz' 144;
}
.page-title em {
  font-style: italic;
  color: var(--region-color, var(--accent));
}

.page-prose {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.page-prose > * + * { margin-top: 18px; }
.page-prose h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-style: italic;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 44px;
  margin-bottom: 4px;
}
.page-prose h2:first-child { margin-top: 0; }
.page-prose h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--region-color, var(--accent));
  margin-top: 28px;
  margin-bottom: 4px;
}
.page-prose ul, .page-prose ol {
  padding-left: 22px;
}
.page-prose li {
  margin-bottom: 8px;
}
.page-prose a {
  color: var(--region-color, var(--accent));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-thickness 0.15s;
}
.page-prose a:hover {
  text-decoration-thickness: 2px;
}
.page-prose strong {
  color: var(--ink);
  font-weight: 600;
}
.page-prose blockquote {
  border-left: 2px solid var(--region-color, var(--accent));
  padding-left: 22px;
  margin: 28px 0;
  font-style: italic;
  color: var(--ink);
}
.page-prose .lead {
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 28px;
}
.page-prose .meta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Lista de publicações (simples, numerada) */
.papers-list {
  list-style: none;
  padding-left: 0;
  counter-reset: paper;
}
.papers-list li {
  counter-increment: paper;
  position: relative;
  padding: 14px 0 14px 56px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  line-height: 1.5;
}
.papers-list li::before {
  content: counter(paper, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--region-color, var(--accent));
}
.papers-list li:last-child {
  border-bottom: none;
}

/* Seções com label/sublabel (formação, indicações, etc) */
.spec-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 22px 28px;
  margin-top: 28px;
}
.spec-grid dt {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--region-color, var(--accent));
  padding-top: 4px;
  font-weight: 600;
}
.spec-grid dd {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Vídeos embed */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--paper-soft);
  border: 1px solid var(--border);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Contato — bloco simples */
.contact-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  font-family: 'Fraunces', serif;
  font-size: 18px;
}
.contact-block a {
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color 0.15s, border-color 0.15s;
}
.contact-block a:hover {
  color: var(--region-color, var(--accent));
  border-color: currentColor;
}
.contact-block .label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .home, .page { padding: 18px 20px; gap: 22px; }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .nav {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 10px 18px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .page-spread {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .page-image {
    position: static;
    max-height: none;
    aspect-ratio: 4 / 5;
  }
  .page-content { padding-top: 0; max-width: none; }
  .page-title { font-size: 36px; }
  .page-prose { font-size: 16px; }
  .page-prose h2 { font-size: 22px; }
  .page-prose .lead { font-size: 18px; }

  .spec-grid {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .spec-grid dd { margin-bottom: 16px; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    font-size: 9px;
    gap: 14px;
  }
  .cta-agende { width: 100%; padding: 14px; text-align: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
