/* =====================================================================
   Clínica Renata Martins — Saúde Mental e Integral
   styles.css — mobile-first, vanilla CSS
   Identidade própria (não reutiliza nada do projeto da Dra. Olívia).
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Paleta */
  --c-bg:        #efede8;  /* off-white quente (fundo principal) */
  --c-surface:   #e4dfd5;  /* greige (fundo secundário) */
  --c-cream:     #e9e6e0;
  --c-ink:       #29313a;  /* texto principal (derivado do carvão, alto contraste) */
  --c-ink-soft:  #55606b;  /* texto secundário (ardósia) */
  --c-olive:     #848367;  /* marca / elementos */
  --c-olive-deep:#6c6b51;  /* oliva p/ texto sobre claro (contraste) */
  --c-cognac:    #8a5b3a;  /* detalhe / CTA (cognac levemente aprofundado p/ contraste) */
  --c-cognac-2:  #916141;  /* cognac de referência da marca */
  --c-carvao:    #3b4650;  /* seções escuras */
  --c-carvao-2:  #313b44;
  --c-ardosia:   #4f5d6b;
  --c-on-dark:   #ece8e1;  /* texto sobre fundos escuros */
  --c-on-dark-soft:#c7c8bd;
  --c-line:      #d7d1c6;  /* linhas/bordas suaves */

  /* Tipografia */
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans:  "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --fs-eyebrow: 0.78rem;
  --fs-body:    1.0625rem;
  --fs-lead:    clamp(1.125rem, 1.02rem + 0.5vw, 1.3125rem);
  --fs-h3:      clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --fs-h2:      clamp(1.9rem, 1.5rem + 2.1vw, 3rem);
  --fs-h1:      clamp(2.15rem, 1.5rem + 3.2vw, 4rem);

  /* Espaçamento / layout */
  --space-section: clamp(3.75rem, 2.5rem + 6vw, 7.5rem);
  --container:   72rem;
  --gutter:      clamp(1rem, 0.6rem + 2vw, 2rem);
  --radius:      14px;
  --radius-lg:   22px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur:  0.6s;

  --z-header: 100;
  --z-drawer: 200;
}

/* ---------- Reset enxuto ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-weight: 500; line-height: 1.12; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2.5px solid var(--c-cognac); outline-offset: 3px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Utilitários ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-section); }
.section__title { font-family: var(--font-serif); font-size: var(--fs-h2); letter-spacing: 0.005em; color: var(--c-ink); }

.eyebrow {
  font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--c-olive-deep); margin-bottom: 0.9rem;
}
.eyebrow--center { text-align: center; }
.eyebrow--on-dark { color: var(--c-on-dark-soft); }

.note { font-size: 0.9rem; color: var(--c-ink-soft); font-style: italic; }

.skip-link {
  position: absolute; left: 0; top: 0; transform: translateY(-120%);
  background: var(--c-carvao); color: var(--c-on-dark); padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--radius) 0; z-index: 300; transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.5rem;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn--primary { background: var(--c-cognac); color: #f6f1ea; }
.btn--primary:hover { background: #774d30; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-olive); color: var(--c-olive-deep); transform: translateY(-2px); }
.btn--on-dark { color: var(--c-on-dark); border-color: rgba(236,232,225,0.4); }
.btn--on-dark:hover { border-color: var(--c-on-dark); color: var(--c-on-dark); }
.btn--lg { min-height: 54px; padding: 0.9rem 2rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.4rem;
  font-weight: 600; text-decoration: none; color: var(--c-cognac);
  border-bottom: 1.5px solid transparent; transition: border-color 0.25s var(--ease);
  width: fit-content; padding-block: 4px;
}
.link-arrow:hover { border-color: var(--c-cognac); }

/* =====================================================================
   HEADER / NAV
   ===================================================================== */
/* Obs.: NÃO usar backdrop-filter/filter/transform aqui — criaria um bloco de
   contenção que prenderia o drawer (position:fixed) dentro do header. */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--c-bg) 92%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--c-line); background: var(--c-bg); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.header__brand { display: inline-flex; align-items: center; }
.header__logo { width: auto; height: 34px; }

.nav { display: flex; align-items: center; }
.nav__toggle {
  position: relative; z-index: calc(var(--z-drawer) + 1);
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; padding: 0.4rem 0.5rem;
  background: transparent; border: 0; cursor: pointer; color: var(--c-ink); font: inherit; font-weight: 600;
}
.nav__toggle-box { display: inline-block; width: 26px; height: 14px; position: relative; }
.nav__toggle-bar, .nav__toggle-bar::before, .nav__toggle-bar::after {
  content: ""; position: absolute; left: 0; width: 26px; height: 2px; background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle-bar { top: 6px; }
.nav__toggle-bar::before { top: -6px; }
.nav__toggle-bar::after { top: 6px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }
body[data-nav-open="true"] .nav__toggle { color: var(--c-on-dark); }

/* Mobile drawer */
.nav__panel {
  position: fixed; inset: 0 0 0 auto; width: min(84vw, 340px);
  background: var(--c-carvao); color: var(--c-on-dark);
  padding: 6rem 2rem 2rem; z-index: var(--z-drawer);
  transform: translateX(100%); transition: transform 0.42s var(--ease);
  display: flex; flex-direction: column; gap: 1.75rem;
  box-shadow: -30px 0 80px rgba(20,24,28,0.25);
}
.nav__list { display: flex; flex-direction: column; gap: 0.25rem; }
.nav__link {
  display: block; padding: 0.85rem 0; font-family: var(--font-serif); font-size: 1.6rem;
  color: var(--c-on-dark); text-decoration: none; border-bottom: 1px solid rgba(236,232,225,0.12);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.nav__link:hover { color: #fff; padding-left: 6px; }
.nav__cta { align-self: flex-start; margin-top: 0.5rem; }

body[data-nav-open="true"] .nav__panel { transform: translateX(0); }
body[data-nav-open="true"] { overflow: hidden; }
.nav__backdrop {
  position: fixed; inset: 0; background: rgba(24,27,31,0.42); z-index: calc(var(--z-header) - 1);
  opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease);
}
body[data-nav-open="true"] .nav__backdrop { opacity: 1; pointer-events: auto; }

/* =====================================================================
   01 — HERO
   ===================================================================== */
.hero { padding-top: clamp(2rem, 1rem + 4vw, 3.5rem); padding-bottom: var(--space-section); }
.hero__inner { display: flex; flex-direction: column; gap: clamp(2rem, 1rem + 5vw, 3rem); }
.hero__title {
  font-family: var(--font-serif); font-size: var(--fs-h1); font-weight: 600;
  letter-spacing: -0.005em; margin-block: 0.5rem 1.1rem; max-width: 15ch;
}
.hero__lead { font-size: var(--fs-lead); color: var(--c-ink-soft); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.9rem; }
.hero__media { position: relative; }
.hero__img {
  width: 100%; height: auto; border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%;
  box-shadow: 0 30px 60px -30px rgba(41,49,58,0.35);
}
.hero__media::after {
  content: ""; position: absolute; right: -10px; bottom: -10px; width: 46%; height: 46%;
  border: 1.5px solid var(--c-olive); border-radius: var(--radius-lg); z-index: -1; opacity: 0.5;
}

/* =====================================================================
   02 — A ABORDAGEM
   ===================================================================== */
.abordagem { position: relative; overflow: hidden; }
.abordagem__inner { max-width: 46rem; margin-inline: auto; text-align: center; }
.abordagem__title { max-width: 18ch; margin-inline: auto; }
.abordagem__text { margin-top: 1.25rem; font-size: var(--fs-lead); color: var(--c-ink-soft); }
.abordagem::before {
  content: ""; position: absolute; inset: auto -8% -30% auto; width: min(52%, 460px); aspect-ratio: 1;
  background: url("../img/ui/symbol-oliva.png") center / contain no-repeat;
  opacity: 0.06; pointer-events: none; z-index: 0;
}
.pillars {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1rem; margin-top: 2rem;
}
.pillars__item {
  font-family: var(--font-serif); font-size: 1.35rem; color: var(--c-olive-deep);
  padding: 0.35rem 1.25rem; border: 1px solid var(--c-line); border-radius: 999px;
  background: color-mix(in srgb, var(--c-cream) 60%, transparent);
}

/* =====================================================================
   03 — DRA. RENATA  |  06 / 07 — mídia + texto (padrão split)
   ===================================================================== */
.dra { background: var(--c-surface); }
.dra__inner, .como__inner, .recursos__inner {
  display: flex; flex-direction: column; gap: clamp(1.75rem, 1rem + 4vw, 3rem);
}
.dra__img, .como__img, .recursos__img {
  width: 100%; height: auto; border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%;
}
.dra__text p + p { margin-top: 1rem; }
.dra__text .link-arrow { margin-top: 1.4rem; }

/* =====================================================================
   04 — QUANDO BUSCAR CUIDADO
   ===================================================================== */
.sinais { background: var(--c-bg); }
.sinais__inner { max-width: 44rem; margin-inline: auto; text-align: center; }
.sinais__text { margin-top: 1.1rem; font-size: var(--fs-lead); color: var(--c-ink-soft); }
.sinais .note { margin-top: 1.4rem; }

/* =====================================================================
   05 — ÁREAS DE CUIDADO
   ===================================================================== */
.cuidado { background: var(--c-surface); }
.cuidado__head { max-width: 40rem; margin-bottom: clamp(2rem, 1rem + 3vw, 3rem); }
.cuidado__intro { margin-top: 0.75rem; color: var(--c-ink-soft); }
/* Composição editorial: colunas separadas por fio fino (sem cards/sombra) */
.areas { display: grid; gap: 0; }
.area {
  padding: 1.6rem 0;
  border-top: 1px solid var(--c-line);
}
.area:first-child { border-top: 0; padding-top: 0.25rem; }
.area__num {
  font-family: var(--font-serif); font-size: 1.05rem; color: var(--c-cognac);
  letter-spacing: 0.14em; display: block;
}
.area__title { font-family: var(--font-serif); font-size: var(--fs-h3); margin-top: 0.5rem; }
.area__text { margin-top: 0.55rem; color: var(--c-ink-soft); max-width: 34ch; }

/* =====================================================================
   06 — COMO ACONTECE (passos)
   ===================================================================== */
.steps { margin-top: 1.75rem; display: grid; gap: 0; }
.section-copy { max-width: 48rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding-block: 1.25rem; position: relative; }
.step + .step { border-top: 1px solid var(--c-line); }
.step__num {
  font-family: var(--font-serif); font-size: 1.5rem; color: var(--c-olive-deep);
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  border: 1.5px solid var(--c-olive); border-radius: 50%; flex: none;
}
.step__title { font-size: var(--fs-h3); font-family: var(--font-serif); }
.step__text { margin-top: 0.3rem; color: var(--c-ink-soft); }

/* =====================================================================
   07 — RECURSOS
   ===================================================================== */
.recursos__text .note { margin-top: 1.1rem; }

/* =====================================================================
   08 — REPORTAGEM SOBRE EMT
   ===================================================================== */
.emt-report { background: var(--c-surface); }
.emt-report__inner { display: grid; gap: clamp(1.75rem, 1rem + 4vw, 3rem); align-items: center; }
.emt-report__media {
  overflow: hidden; border: 1px solid var(--c-line); background: #fff;
  box-shadow: 0 24px 48px -36px rgba(41,49,58,0.6);
}
.emt-report__media img { width: 100%; height: auto; }
.emt-report__text > p:not(.eyebrow) { margin-top: 1rem; color: var(--c-ink-soft); max-width: 48ch; }
.emt-report__text .btn { margin-top: 1.5rem; }

/* =====================================================================
   09 — ATENDIMENTO + CTA
   ===================================================================== */
.atendimento { background: var(--c-carvao); color: var(--c-on-dark); position: relative; overflow: hidden; }
.atendimento__inner { max-width: 44rem; margin-inline: auto; text-align: center; position: relative; z-index: 1; }
.atendimento__title { color: var(--c-on-dark); max-width: 18ch; margin-inline: auto; }
.atendimento__text { margin-top: 1.1rem; font-size: var(--fs-lead); color: var(--c-on-dark-soft); }
.atendimento__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.85rem; margin-top: 2rem; }
.atendimento::before {
  content: ""; position: absolute; inset: -20% -15% auto auto; width: min(60%, 520px); aspect-ratio: 1;
  background: url("../img/ui/symbol-offwhite.png") center / contain no-repeat;
  opacity: 0.05; pointer-events: none;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: var(--c-carvao-2); color: var(--c-on-dark); padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.footer__inner { display: flex; flex-direction: column; gap: 1.75rem; }
.footer__brand img { height: 40px; width: auto; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.footer__nav a { color: var(--c-on-dark-soft); text-decoration: none; padding-block: 4px; transition: color 0.2s var(--ease); }
.footer__nav a:hover { color: var(--c-on-dark); }
.footer__note { color: var(--c-on-dark-soft); font-size: 0.9rem; }

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-float {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90; display: inline-flex; align-items: center; justify-content: center;
  width: 3.5rem; height: 3.5rem; border-radius: 999px;
  background: #246b4e; color: #fff; text-decoration: none;
  box-shadow: 0 14px 30px rgba(24, 45, 36, 0.28);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.whatsapp-float:hover { transform: translateY(-3px); background: #1c5940; }
.whatsapp-float__icon { width: 1.7rem; height: 1.7rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.whatsapp-float__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =====================================================================
   Reveal (progressive enhancement — visível sem JS)
   ===================================================================== */
[data-reveal] { opacity: 1; }
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* =====================================================================
   DESKTOP / TABLET (min-width)
   ===================================================================== */
@media (min-width: 768px) {
  .areas { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .area {
    border-top: 0; border-left: 1px solid var(--c-line);
    padding: 0.25rem clamp(1.5rem, 1rem + 2vw, 2.5rem);
  }
  .area:first-child { border-left: 0; padding-left: 0; }
  .area:last-child { padding-right: 0; }
  .whatsapp-float { width: auto; min-width: 3.5rem; padding-inline: 1rem 1.15rem; gap: 0.55rem; }
  .whatsapp-float__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-weight: 600; }
}

@media (min-width: 900px) {
  /* Nav vira horizontal, sem drawer */
  .nav__toggle { display: none; }
  .nav__panel {
    position: static; width: auto; transform: none; background: transparent; color: inherit;
    padding: 0; flex-direction: row; align-items: center; gap: 2rem; box-shadow: none;
  }
  .nav__list { flex-direction: row; gap: 1.75rem; }
  .nav__link { font-family: var(--font-sans); font-size: 1rem; padding: 0.5rem 0; border-bottom: 2px solid transparent; color: var(--c-ink); }
  .nav__link:hover { padding-left: 0; color: var(--c-olive-deep); border-bottom-color: var(--c-olive); }
  .nav__cta { margin-top: 0; }
  .nav__backdrop { display: none; }
  .header__logo { height: 38px; }

  /* Hero em duas colunas */
  .hero__inner { flex-direction: row; align-items: center; }
  .hero__text { flex: 1 1 54%; }
  .hero__media { flex: 1 1 46%; max-width: 30rem; margin-inline: auto; }
  .hero__img { aspect-ratio: 3 / 4; }

  /* Splits: mídia + texto lado a lado */
  .dra__inner, .como__inner, .recursos__inner {
    flex-direction: row; align-items: center; gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  }
  .dra__media, .como__media, .recursos__media { flex: 1 1 44%; max-width: 27rem; }
  .dra__text, .como__text, .recursos__text { flex: 1 1 56%; }
  .section-copy { display: block; }
  .section-copy .como__text,
  .section-copy .recursos__text { max-width: 46rem; margin-inline: auto; }
  /* Alterna o lado da imagem para ritmo editorial */
  .recursos__inner { flex-direction: row-reverse; }
  /* Altura fixa e contida das imagens split (evita seções altas demais) */
  .dra__img, .recursos__img { aspect-ratio: auto; height: clamp(23rem, 40vw, 29rem); }
  .como__img { aspect-ratio: auto; height: clamp(26rem, 46vw, 34rem); }

  .emt-report__inner { grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr); gap: clamp(2.5rem, 5vw, 5rem); }

  .footer__inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer__nav { justify-content: center; }
}

@media (min-width: 1200px) {
  .hero__title { font-size: var(--fs-h1); }
}
