/* =========================================================
   Elisa Sant'Anna Martins · Psicóloga
   Direção: "Anéis de crescimento"
   Para trocar cores, fontes ou espaçamentos, edite os tokens abaixo.
   ========================================================= */

@font-face {
  font-family: "Marcellus";
  src: url("../fonts/marcellus-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albert-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Cores: papel cinza-quente (paredes do consultório), ameixa, ocre (quadro da árvore) */
  --paper: #E5E1E2;
  --paper-deep: #D9D3D6;
  --plum: #3A2040;
  --plum-deep: #2A1630;
  --ink: #2A1A2E;
  --ink-soft: #594659;
  --ochre: #C49546;
  --white: #FBF8F5;
  --line-on-paper: rgba(58, 32, 64, 0.22);
  --line-on-plum: rgba(229, 225, 226, 0.20);

  /* Tipografia */
  --font-display: "Marcellus", "Times New Roman", serif;
  --font-text: "Albert Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --step-hero: clamp(2.35rem, 1.2rem + 3.9vw, 4.6rem);
  --step-h2: clamp(1.9rem, 1.25rem + 2.2vw, 3.1rem);
  --step-h3: clamp(1.4rem, 1.15rem + 0.9vw, 1.85rem);
  --step-body: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem);

  /* Espaço */
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --header-h: 4.25rem;
  --max: 74rem;

  /* Movimento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance; color: var(--plum); }
h1 { font-size: var(--step-hero); line-height: 1.04; letter-spacing: -0.015em; }
h2 { font-size: var(--step-h2); line-height: 1.08; letter-spacing: -0.01em; }
h3 { font-size: var(--step-h3); line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--ochre); }
::selection { background: var(--plum); color: var(--paper); }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
.hero__field :focus-visible, .passos :focus-visible, .final :focus-visible, .footer :focus-visible { outline-color: var(--ochre); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: 62ch; display: grid; gap: 1em; color: var(--ink-soft); }
.section { padding-block: var(--section); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--plum); color: var(--paper); padding: 0.75rem 1rem;
}
.skip:focus { top: 1rem; }

/* ---------- Botão ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.35rem; padding: 0.85rem 1.5rem;
  background: var(--plum); color: var(--paper);
  font-family: var(--font-text); font-weight: 600; font-size: 1.02rem; letter-spacing: 0.005em;
  text-decoration: none; border-radius: 2px;
  transition: background-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn:hover { background: var(--plum-deep); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn__icon { width: 1.25rem; height: 1.25rem; flex: none; color: var(--ochre); }
.btn--small { min-height: 2.75rem; padding: 0.55rem 1rem; font-size: 0.95rem; }
.btn--light { background: var(--paper); color: var(--plum); }
.btn--light:hover { background: var(--white); }
.btn--light .btn__icon { color: var(--plum); }

/* ---------- Cabeçalho ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line-on-paper);
}
.topbar__inner {
  max-width: calc(var(--max) + 10rem); margin-inline: auto; padding-inline: var(--gutter);
  height: var(--header-h); display: flex; align-items: center; gap: 2rem;
}
.wordmark { display: grid; text-decoration: none; line-height: 1.15; margin-right: auto; }
.wordmark__name { font-family: var(--font-display); font-size: 1.2rem; color: var(--plum); }
.wordmark__role { font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.02em; }
.topnav { display: flex; gap: 1.75rem; font-size: 0.95rem; }
.topnav a { text-decoration: none; color: var(--ink-soft); padding-block: 0.5rem; }
.topnav a:hover { color: var(--plum); text-decoration: underline; text-decoration-color: var(--ochre); }

/* ---------- 1. Abertura ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: calc(100svh - var(--header-h));
  max-height: 60rem;
}
.hero__text {
  display: flex; flex-direction: column; justify-content: center; gap: 1.75rem;
  padding-block: clamp(2.5rem, 6vh, 5rem);
  padding-right: clamp(2rem, 4vw, 4.5rem);
  padding-left: max(var(--gutter), calc((100vw - var(--max) - 10rem) / 2 + var(--gutter)));
}
.hero__text h1 { max-width: 13.5ch; }
.hero__lead { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.28rem); color: var(--ink-soft); max-width: 36rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.hero__contact { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.45; font-variant-numeric: tabular-nums; }
.hero__crp {
  padding-top: 1.25rem; border-top: 1px solid var(--line-on-paper);
  font-size: 0.9rem; letter-spacing: 0.02em; color: var(--ink-soft); max-width: 36rem;
}

.hero__field { position: relative; background: var(--plum); overflow: hidden; isolation: isolate; }
.hero__portrait {
  position: absolute; z-index: 2; margin: 0;
  top: clamp(2rem, 8%, 4.5rem); right: clamp(1.25rem, 9%, 5rem);
  width: min(60%, 23rem);
  box-shadow: 0 1.5rem 3rem -1.5rem rgba(20, 8, 24, 0.6);
}
.hero__portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; filter: url(#duotone); }

/* ---------- Anéis (gerados por tools/aneis.mjs) ---------- */
.rings { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.ring { fill: none; stroke: var(--line-on-plum); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ring--late { stroke: rgba(229, 225, 226, 0.08); }
.ring--mark { stroke: rgba(229, 225, 226, 0.42); }
.ring--hoje { stroke: var(--ochre); }
.hero__legend {
  position: absolute; z-index: 2; left: var(--gutter); bottom: clamp(1.25rem, 4%, 2.25rem); right: var(--gutter);
  margin: 0; display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.86rem; letter-spacing: 0.02em; color: rgba(229, 225, 226, 0.8);
}
.hero__legend::before { content: ""; width: 2.25rem; border-top: 1px solid var(--ochre); flex: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero .ring {
    transform-box: view-box; transform-origin: 150px 1000px;
    animation: ring-grow 1.6s var(--ease-out) both;
    animation-delay: calc(var(--i) * 55ms);
  }
  .hero .ring--hoje { animation-name: ring-grow, ring-light; animation-duration: 1.6s, 1.2s; animation-delay: calc(var(--i) * 55ms), 1.5s; }
  .hero__legend { animation: fade-in 1s var(--ease-out) 1.4s both; }
  .hero__portrait { animation: settle 1.2s var(--ease-out) 0.15s both; }
}
@keyframes ring-grow { from { opacity: 0.15; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes ring-light { from { stroke: var(--line-on-plum); } to { stroke: var(--ochre); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { opacity: 0.4; transform: translateY(0.75rem); } to { opacity: 1; transform: none; } }

/* ---------- 2. Trajetória ---------- */
.trajetoria__intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2rem 4rem; align-items: start; }
.trajetoria__intro h2 { max-width: 14ch; }

.core-wrap { position: relative; margin-top: clamp(3rem, 6vw, 5rem); padding-top: 2.1rem; }
.core { display: block; width: 100%; height: clamp(2.75rem, 5vw, 4rem); }
.core-body { fill: var(--paper-deep); }
.core-band { fill: rgba(58, 32, 64, 0.06); }
.core-line { fill: none; stroke: var(--line-on-paper); stroke-width: 1; vector-effect: non-scaling-stroke; }
.core-line--mark { stroke: var(--plum); }
.core-mark {
  position: absolute; top: 0; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 1.05rem; color: var(--plum); line-height: 1;
}
.core-mark::after { content: ""; position: absolute; left: 50%; top: 1.35rem; height: 0.6rem; border-left: 1px solid var(--plum); }
.core-mark--2005 { left: var(--pos-2005); transform: none; }
.core-mark--2005::after { left: 0; }
.core-mark--2021 { left: var(--pos-2021); }
.core-mark--hoje { left: var(--pos-hoje); transform: translateX(-100%); color: #74521F; }
.core-mark--hoje::after { left: auto; right: 0; border-color: var(--ochre); }

.timeline { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 3rem; }
.timeline li { display: grid; gap: 0.6rem; align-content: start; }
.timeline__year { font-family: var(--font-display); font-size: 1.6rem; color: var(--plum); line-height: 1; }
.timeline p { color: var(--ink-soft); max-width: 34ch; }

/* ---------- 3. Para quem ---------- */
.para-quem { background: var(--paper-deep); }
.audiences { margin-top: clamp(2rem, 4vw, 3.5rem); border-top: 1px solid var(--line-on-paper); }
.audience {
  display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(0, 2.2fr); gap: 0.75rem 3rem;
  padding-block: clamp(1.5rem, 3vw, 2.4rem); border-bottom: 1px solid var(--line-on-paper);
  align-items: baseline;
}
.audience h3 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem); }
.audience p { color: var(--ink-soft); max-width: 60ch; }
.para-quem__note { margin-top: 2rem; max-width: 60ch; color: var(--ink); font-weight: 500; }

/* ---------- 4. Abordagem ---------- */
.abordagem__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem 5rem; align-items: center; }
.abordagem h2 { margin-bottom: 1.5rem; max-width: 16ch; }
.pull { margin: 0; padding: 2.5rem 0 2.5rem 2rem; position: relative; }
.pull::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--plum); }
.pull p { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.3; color: var(--plum); }

/* ---------- 5. Como funciona ---------- */
.passos { background: var(--plum); color: var(--paper); }
.passos h2, .passos h3 { color: var(--paper); }
.steps { list-style: none; margin: clamp(2.5rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 3.5rem); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 3rem; }
.step { display: grid; gap: 0.9rem; align-content: start; padding-top: 1.5rem; border-top: 1px solid var(--line-on-plum); }
.step__n { font-family: var(--font-display); font-size: clamp(4rem, 3rem + 4vw, 6rem); line-height: 0.85; color: var(--ochre); }
.step p { color: rgba(229, 225, 226, 0.82); max-width: 32ch; }
.passos .btn { background: var(--paper); color: var(--plum); }
.passos .btn:hover { background: var(--white); }
.passos .btn .btn__icon { color: var(--plum); }

/* ---------- 6. Consultório ---------- */
.consultorio__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem 4rem; align-items: end; }
.gallery {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid; grid-template-columns: 1.15fr 0.85fr 1.5fr; gap: clamp(0.75rem, 1.5vw, 1.25rem);
  align-items: end;
}
.gallery figure { margin: 0; display: grid; gap: 0.6rem; }
.gallery img { width: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.03); background: var(--paper-deep); }
.gallery__a img, .gallery__b img { aspect-ratio: 3 / 4; }
.gallery__c img { aspect-ratio: 4 / 3; }
.gallery figcaption { font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.02em; }

.facts { margin: clamp(2.5rem, 5vw, 4rem) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 3rem; border-top: 1px solid var(--line-on-paper); padding-top: 2rem; }
.facts dt { font-family: var(--font-display); font-size: 1.3rem; color: var(--plum); margin-bottom: 0.5rem; }
.facts dd { margin: 0; color: var(--ink-soft); }
.facts a { color: var(--plum); font-weight: 500; display: inline-block; margin-top: 0.4rem; }

/* ---------- 7. Contato ---------- */
.final { position: relative; background: var(--plum); color: var(--paper); overflow: hidden; isolation: isolate; padding-block: var(--section); }
.final .rings { z-index: 0; opacity: 0.9; transform: scaleX(-1); }
.final__inner { position: relative; z-index: 1; display: grid; gap: 1.5rem; justify-items: start; }
.final h2 { color: var(--paper); max-width: 16ch; font-size: clamp(2.2rem, 1.4rem + 3vw, 4rem); }
.final__lead { color: rgba(229, 225, 226, 0.85); max-width: 40ch; font-size: 1.15rem; }
.contacts { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, auto); gap: 1.25rem 3rem; }
.contacts li { display: grid; gap: 0.2rem; }
.contacts span { font-size: 0.8rem; letter-spacing: 0.04em; color: rgba(229, 225, 226, 0.7); }
.contacts a { color: var(--paper); text-decoration-color: rgba(196, 149, 70, 0.7); overflow-wrap: anywhere; }

/* ---------- Rodapé ---------- */
.footer { background: var(--plum-deep); color: rgba(229, 225, 226, 0.78); font-size: 0.9rem; padding-block: 2rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 3rem; }
.footer strong { color: var(--paper); font-weight: 600; }
.footer__care { max-width: 44ch; }

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 1080px) {
  .topnav { display: none; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; max-height: none; }
  .hero__text { justify-self: stretch; max-width: none; padding: 2.25rem var(--gutter) 2.5rem; gap: 1.4rem; }
  .hero__text h1 { max-width: 15ch; }
  .hero__field { height: clamp(24rem, 105vw, 36rem); }
  .hero__portrait { width: min(62%, 20rem); top: 2rem; right: var(--gutter); }

  .trajetoria__intro, .abordagem__grid, .consultorio__head { grid-template-columns: 1fr; }
  .timeline, .steps, .facts { gap: 2rem 1.75rem; }

  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery__a { grid-column: 1 / -1; }
  .contacts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .timeline, .steps, .facts { grid-template-columns: 1fr; }
  .audience { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  :root { --header-h: 3.75rem; }
  .wordmark__name { font-size: 0.95rem; }
  .wordmark__role { font-size: 0.7rem; }
  .topbar .btn--small { font-size: 0.84rem; padding-inline: 0.7rem; }
  .topbar .btn__icon { display: none; }
  .topbar__inner { gap: 0.6rem; }
  .hero__actions .btn, .passos .btn, .final .btn { width: 100%; }
  .contacts { grid-template-columns: 1fr; }
  .core-mark { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.nowrap { white-space: nowrap; }

/* Celulares estreitos (até 380px): nome e botão do topo em uma linha só */
.wordmark__name, .topbar .btn { white-space: nowrap; }
@media (max-width: 380px) {
  .wordmark__name { font-size: 0.86rem; }
  .wordmark__role { font-size: 0.66rem; }
  .topbar .btn--small { font-size: 0.76rem; padding-inline: 0.55rem; }
}
