/*
Theme Name: ms Theme
Theme URI: https://midiasim.com.br
Author: MIDIASIM Criação e Soluções Web
Author URI: https://midiasim.com.br
Description: Tema WordPress clássico do site da Dra. Joyce Menezes — Ginecologia Clínica. CSS puro, JS vanilla, sem build step.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: ms-theme
*/

/* ==========================================================================
   Dra. Joyce Menezes — Ginecologia Clínica
   Paleta oficial: paleta-site-dra-joyce (identidade visual do Instagram)
   Estilos globais: tokens, reset, utilitários, botões, cabeçalho, rodapé.
   O CSS específico da homepage vive em assets/css/home.css.
   ========================================================================== */

:root {
  --creme:      #F7F3EC; /* fundo geral do site */
  --creme-card: #FDFBF6; /* cards claros (derivado do creme) */
  --nude:       #E8DCCF; /* blocos e rodapé */
  --nude-esc:   #E0CFBF; /* realces dentro das faixas (derivado do nude) */
  --rose-claro: #D9BFB4; /* fios e bordas */
  --rose:       #B08A8A; /* subtítulos em itálico, eyebrows e legendas */
  --vinho:      #7A2E3B; /* títulos e botões */
  --vinho-esc:  #5F2330; /* hover dos botões */
  --marrom:     #3D2B2B; /* texto corrido */

  --serif:  "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:   "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Parisienne", "Cormorant Garamond", cursive;

  --wrap: 1200px;
  --gut: 24px;
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sombra: 0 30px 60px -44px rgba(61, 43, 43, .55);
}

/* --------------------------------------------------------------- reset -- */

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

html { scroll-behavior: smooth; scroll-padding-top: 104px; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--marrom);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17.5px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--vinho); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--rose); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--vinho); margin: 0; line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
input, textarea, button, select { font: inherit; color: inherit; }
::selection { background: var(--nude-esc); color: var(--vinho); }

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

.skip {
  position: absolute; left: 8px; top: 8px; z-index: 100;
  width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%);
  background: var(--vinho); color: var(--creme);
  font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
}
.skip:focus { width: auto; height: auto; padding: 12px 20px; clip-path: none; color: var(--creme); }

/* ------------------------------------------------------------ utilities -- */

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* honeypot: o input herda width:100%, por isso quem esconde é o wrapper */
.hp { position: absolute; left: -100vw; top: 0; width: 1px; height: 1px; overflow: hidden; }

.eyebrow {
  font-weight: 500; font-size: 15px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--rose); margin: 0;
}
.eyebrow--vinho { color: var(--vinho); }

.rule { width: 46px; height: 1px; background: var(--rose-claro); margin: 18px 0 20px; border: 0; }
.rule--sm { width: 32px; margin: 12px 0 14px; }

.h2 { font-weight: 600; font-size: clamp(32px, 3.4vw, 48.5px); }
.lead { font-weight: 400; font-size: 16.5px; line-height: 1.7; color: var(--rose); margin: 10px 0 0; max-width: 40em; }
.lead--serif { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 1.6vw, 23.5px); line-height: 1.55; }

.script { font-family: var(--script); font-weight: 400; color: var(--vinho); line-height: 1.3; }

.band { background: var(--nude); border-block: 1px solid var(--rose-claro); }
/* tom intermediário, para as faixas não se fundirem quando vêm em sequência */
.band--suave { background: #F1EAE0; }
.section { padding-block: clamp(62px, 8vw, 104px); }

/* cabeçalho de seção: título à esquerda, ação à direita */
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.sec-head .h2 { margin-top: 14px; }

/* ramos decorativos nas bordas da página */
.deco {
  position: absolute; pointer-events: none; z-index: 0;
  width: clamp(120px, 14vw, 210px); aspect-ratio: 200 / 460;
  background: url("assets/images/deco-ramo.svg") center/contain no-repeat;
  opacity: .34;
}
.deco--tl { top: -30px; left: -46px; }
.deco--tr { top: 40px; right: -54px; transform: scaleX(-1); }
.deco--bl { bottom: -40px; left: -52px; transform: scaleY(-1); }
.deco--br { bottom: -30px; right: -56px; transform: scale(-1); }
@media (max-width: 900px) { .deco { display: none; } }

/* --------------------------------------------------------------- botões -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 14px 22px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--ease);
}
.btn::after { content: "\2192"; font-family: var(--sans); font-size: 15px; letter-spacing: 0; }
.btn--sem-seta::after { content: none; }
.btn--solid { background: var(--vinho); color: var(--creme); }
.btn--solid:hover { background: var(--vinho-esc); color: var(--creme); transform: translateY(-2px); }
.btn--ghost { border-color: var(--vinho); color: var(--vinho); background: transparent; }
.btn--ghost:hover { background: var(--vinho); color: var(--creme); }
.btn--sm { min-height: 42px; padding: 11px 16px; font-size: 15px; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------- cabeçalho -- */

.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 243, 236, .93);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--rose-claro);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding-block: 12px;
}
.brand { display: block; line-height: 1.1; }
.brand__name {
  display: block; font-family: var(--serif); font-weight: 500;
  font-size: clamp(21px, 4.4vw, 24.5px); color: var(--vinho); letter-spacing: .01em; white-space: nowrap;
}
.brand__tag {
  display: block; margin-top: 3px; font-weight: 400;
  font-size: 15px; letter-spacing: .04em; text-transform: none; color: var(--rose); white-space: nowrap;
}
/* telas bem estreitas: com o piso de 15px a tagline precisa poder quebrar */
@media (max-width: 400px) {
  .brand__tag { white-space: normal; letter-spacing: .02em; }
}

.nav { display: flex; align-items: center; gap: clamp(12px, 1.3vw, 18px); }
/* wp_nav_menu envolve cada item em <li>: display:contents faz o <a> voltar
   a ser filho direto do flex, preservando o layout do design. */
.nav ul, .nav li { display: contents; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-size: 15px; white-space: nowrap; letter-spacing: .02em;
  color: var(--marrom); position: relative; padding-block: 4px;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--vinho); transition: width .3s var(--ease);
}
.nav a:hover { color: var(--vinho); }
.nav a:hover::after { width: 100%; }
.nav .btn { color: var(--creme); text-transform: none; letter-spacing: .03em; }
/* o botão mantém a seta: anula o sublinhado animado dos links */
.nav .btn::after {
  content: "\2192"; position: static; width: auto; height: auto;
  background: none; font-size: 15px; letter-spacing: 0;
}

.burger {
  display: none; width: 46px; height: 46px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--rose-claro);
  border-radius: var(--r-sm); cursor: pointer;
}
.burger span { display: block; position: relative; width: 20px; height: 1px; background: var(--vinho); transition: transform .3s var(--ease), background .2s; }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 1px; background: var(--vinho);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after  { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .burger { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gut) 26px;
    background: var(--creme); border-bottom: 1px solid var(--rose-claro);
    box-shadow: 0 22px 40px -22px rgba(61, 43, 43, .4);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .28s ease, transform .28s var(--ease), visibility .28s;
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav a:not(.btn) { padding: 15px 0; border-bottom: 1px solid var(--rose-claro); font-size: 15px; }
  /* :not(.btn) preserva a seta do botão "Agendar consulta" */
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 18px; }
}


/* ----------------------------------------------------------------- rodapé -- */

.footer { position: relative; overflow: hidden; background: var(--nude); border-top: 1px solid var(--rose-claro); }
.footer > .wrap { position: relative; z-index: 1; }
.footer__grid {
  display: grid; grid-template-columns: 1.35fr .8fr 1.1fr 1fr;
  gap: clamp(28px, 3.4vw, 44px);
  padding-block: clamp(46px, 6vw, 68px);
}
@media (max-width: 980px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__name { font-family: var(--serif); font-weight: 500; font-size: 25.5px; color: var(--vinho); }
.footer__tag { font-weight: 500; margin-top: 4px; font-size: 15px; letter-spacing: .13em; text-transform: uppercase; color: var(--rose); }
.footer__meta { font-weight: 400; font-size: 15px; line-height: 1.75; margin: 18px 0 0; color: var(--marrom); max-width: 26em; }
.footer__social { display: flex; gap: 10px; margin-top: 20px; }
.footer__social a {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--rose-claro); border-radius: var(--r-sm);
  color: var(--vinho); background: transparent;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.footer__social a:hover { background: var(--vinho); color: var(--creme); border-color: var(--vinho); }

.footer__col h2 {
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  letter-spacing: .13em; text-transform: uppercase; color: var(--vinho);
}
.footer__col ul { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-weight: 400; font-size: 15px; color: var(--marrom); }
.footer__col a:hover { color: var(--vinho); }
.footer__col li.info { font-weight: 400; gap: 11px; align-items: flex-start; font-size: 15px; line-height: 1.6; }
.footer__col li.info svg { flex: none; margin-top: 4px; color: var(--vinho); }
.footer__col p { font-weight: 400; font-size: 15px; line-height: 1.7; margin-top: 14px; }

.footer__frase { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 14px; }
.footer__frase .script { font-size: clamp(21px, 1.9vw, 25.5px); max-width: 9em; }
.footer__frase svg { color: var(--rose); }
@media (max-width: 980px) { .footer__frase { align-items: flex-start; text-align: left; } }

.footer__aviso {
  margin: 0; font-weight: 400; padding-bottom: 26px;
  font-size: 15px; line-height: 1.7; color: var(--rose); max-width: 76ch;
}

.footer__bar { border-top: 1px solid var(--rose-claro); position: relative; z-index: 1; }
.footer__bar .wrap {
  font-weight: 500; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 18px; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--rose);
}

/* ------------------------------------------------------ whatsapp flutuante -- */

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--vinho); display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(61, 43, 43, .26);
  transition: background .25s ease, transform .25s var(--ease);
}
.wa-float:hover { background: var(--vinho-esc); transform: translateY(-3px); }

/* ---------------------------------------------------------------- reveal -- */

[data-reveal] { opacity: 0; transform: translateY(20px); }
[data-reveal].is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.no-js [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
