/* Clínica Mente & Transformação — landing page
   Mobile-first. Paleta e fontes vêm de identidade-visual/paleta-e-fontes.md */

:root {
  --blue: #5A6590;
  --blue-dark: #4F5A85;
  --blue-deep: #424B73;
  --blue-wash: #ECEDF4;
  --blue-soft: #DEE0EB;
  --cream: #F6F3EE;
  --ink: #252A40;
  --ink-soft: #5A6078;
  --line: #E8E3DA;
  --wood: #D8BB8E;
  --white: #fff;

  --font-title: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 68px;
  --shadow: 0 18px 40px -22px rgba(66, 75, 115, .45);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
}
h1 { font-size: clamp(2.3rem, 7.5vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h3 { font-size: 1.3rem; font-weight: 600; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--blue-deep); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.container-narrow { width: min(780px, 100% - 40px); }

.ico { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.4rem;
  font: 600 .98rem/1.2 var(--font-body);
  text-decoration: none; text-align: center;
  border: 1.5px solid transparent; border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn .ico { width: 1.15rem; height: 1.15rem; stroke-width: 2; }
.btn-primary { background: var(--blue-dark); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { border-color: var(--blue); color: var(--blue-dark); background: transparent; }
.btn-ghost:hover { background: var(--blue-wash); }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.02rem; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  background: rgba(246, 243, 238, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand img { height: 46px; width: auto; }

.menu-toggle {
  display: grid; place-items: center; width: 46px; height: 46px;
  background: transparent; border: 1.5px solid var(--blue-soft); border-radius: 50%;
  cursor: pointer; color: var(--blue-dark);
}
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Menu mobile: painel abaixo do cabeçalho. Só some se o JS estiver ativo. */
.nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: var(--cream); border-bottom: 1px solid var(--line);
  padding: 8px 20px 22px;
  box-shadow: 0 20px 30px -20px rgba(37, 42, 64, .3);
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
}
.js .nav { display: none; }
.js .nav.is-open { display: block; }
.nav ul { display: flex; flex-direction: column; }
.nav li a {
  display: block; padding: .85rem .2rem; text-decoration: none;
  font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line);
}
.nav li a:hover { color: var(--blue); }
.nav-cta { width: 100%; margin-top: 1.1rem; }

/* ---------- Estrutura de seções ---------- */
.section { padding: 4.5rem 0; }
.section-soft { background: var(--blue-wash); }
.section-head { max-width: 680px; margin-bottom: 2.6rem; }
.section-lead { margin-top: 1rem; color: var(--ink-soft); font-size: 1.05rem; }
.eyebrow {
  margin-bottom: .8rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue);
}
.center { text-align: center; margin-top: 2.6rem; }

/* ---------- Hero ---------- */
.hero {
  --hero-img-h: clamp(17rem, 42vw, 30rem);
  position: relative; isolation: isolate; overflow: hidden; background: var(--white);
  /* celular: texto no topo, ilustração embaixo */
  padding: calc(var(--header-h) + 3rem) 0 calc(var(--hero-img-h) - 1rem);
}
.hero-bg { position: absolute; z-index: -2; inset: auto 0 0 0; height: var(--hero-img-h); }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
/* Degradê branco: o texto fica sobre o branco e a ilustração surge por baixo */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    #fff 0%, #fff calc(100% - var(--hero-img-h)),
    rgba(255, 255, 255, .55) calc(100% - var(--hero-img-h) + 2.5rem),
    rgba(255, 255, 255, 0) calc(100% - var(--hero-img-h) + 6rem));
}
.hero-grid { display: grid; }
.lead { margin-top: 1.3rem; font-size: 1.1rem; color: var(--ink-soft); max-width: 34rem; }
.hero-actions { margin-top: 2rem; display: flex; flex-direction: column; gap: .8rem; }

/* ---------- Pilares ---------- */
.pillars { display: grid; gap: 1.2rem; }
.pillar { background: var(--white); border-radius: var(--radius); padding: 1.8rem; }
.pillar-ico {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1.1rem;
  border-radius: 50%; background: var(--blue-wash); color: var(--blue-dark);
}
.pillar h3, .card h3 { margin-bottom: .5rem; }
.pillar p, .card p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Especialidades ---------- */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--blue-soft); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-ico { width: 2rem; height: 2rem; margin-bottom: 1rem; color: var(--blue); }
.card h3 { font-size: 1.2rem; }

/* ---------- Como funciona ---------- */
.steps { display: grid; gap: 1.8rem; }
.step { position: relative; padding-left: 4.2rem; }
.step-n {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--blue-dark); color: var(--white);
  font: 500 1.4rem/1 var(--font-title);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 1.5rem; top: 3.4rem; bottom: -1.5rem;
  border-left: 1.5px dashed var(--blue-soft);
}
.step h3 { margin-bottom: .35rem; font-size: 1.2rem; }
.step p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Galeria ---------- */
.gallery {
  display: flex; gap: 1rem; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: .8rem; margin-inline: -20px; padding-inline: 20px;
  scroll-padding-inline: 20px;
}
.gallery figure { flex: 0 0 78%; scroll-snap-align: start; }
.gallery img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius);
}
.gallery figcaption { margin-top: .7rem; font-size: .92rem; color: var(--ink-soft); }

/* ---------- Equipe ---------- */
.team { display: grid; gap: 1.2rem; }
.person { background: var(--white); border-radius: var(--radius); padding: 1.8rem; }
.person-featured { display: grid; gap: 1.6rem; align-items: center; }
.person-photo { display: block; width: 100%; max-width: 320px; margin-inline: auto; }
.person-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%;
  border-radius: var(--radius);
  box-shadow: 0 0 0 6px var(--blue-wash), 0 0 0 7px var(--wood);
}
.person-body .eyebrow { margin-bottom: .5rem; }
.person-role { margin: .3rem 0 .9rem; font-weight: 600; color: var(--blue-dark); }
.person-body > p:not(.eyebrow):not(.person-role) { color: var(--ink-soft); margin-bottom: 1.3rem; }
.person-soon { background: transparent; border: 1.5px dashed var(--blue-soft); }
.person-soon h3 { margin-bottom: .5rem; }
.person-soon p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.2rem .2rem; cursor: pointer; list-style: none;
  font: 600 1.05rem/1.4 var(--font-body);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 .2rem 1.3rem; color: var(--ink-soft); max-width: 40rem; }

/* ---------- Contato ---------- */
.contact-card {
  display: grid; gap: 2.2rem; padding: 2rem 1.6rem;
  background: var(--white); border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}
.contact-main .btn { margin-top: 1.6rem; }
.contact-list { display: grid; gap: 1.4rem; align-content: center; }
.contact-list li { display: flex; gap: 1rem; }
.contact-list li[hidden] { display: none; }
.contact-list .ico { margin-top: .15rem; color: var(--blue); }
.contact-list strong { display: block; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.contact-list span, .contact-list a { display: block; }
.contact-list a { text-decoration: none; }
.unit + .unit { margin-top: 1rem; }
.unit-city { font-weight: 600; color: var(--ink); }
.text-link { margin-top: .3rem; color: var(--blue-dark); font-weight: 600; text-decoration: underline !important; text-underline-offset: 3px; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--blue-deep); color: #D9DCEA; padding-top: 3.2rem; }
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2.4rem; }
.footer-brand img { width: 200px; height: auto; }
.footer-brand p { margin-top: .6rem; font-size: .92rem; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; }
.footer-links a, .footer-contact a { text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover, .footer-legal a:hover { color: var(--white); text-decoration: underline; }
.footer-contact { display: grid; gap: .6rem; align-content: start; }
.footer-contact a:first-child { font-weight: 600; color: var(--white); }
.footer-bottom {
  display: flex; flex-direction: column; gap: .6rem;
  padding: 1.3rem 0 6rem; border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .86rem;
}
.footer-legal { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.site-footer :focus-visible { outline-color: var(--wood); }

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.15rem; border-radius: 999px;
  background: var(--blue-dark); color: var(--white); text-decoration: none;
  font-weight: 600; font-size: .95rem;
  box-shadow: 0 10px 26px -8px rgba(37, 42, 64, .55);
  transition: background-color .2s, transform .2s;
}
.wa-float:hover { background: var(--blue-deep); transform: translateY(-2px); }
.wa-float .ico { width: 1.35rem; height: 1.35rem; }
.wa-float:focus-visible { outline-color: var(--wood); }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.2rem; }
  .step:not(:last-child)::after { display: none; }
  .person-featured { grid-template-columns: auto 1fr; gap: 2.2rem; padding: 2.2rem; }
  .person-photo { width: 230px; margin: 0; }
  .gallery figure { flex-basis: 44%; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  :root { --header-h: 76px; }
  .brand img { height: 52px; }

  .menu-toggle { display: none; }
  .nav, .js .nav {
    position: static; display: flex; align-items: center; gap: 1.6rem;
    padding: 0; border: 0; box-shadow: none; background: transparent; max-height: none; overflow: visible;
  }
  .nav ul { flex-direction: row; gap: 1.1rem; }
  .nav li a { padding: .4rem 0; border: 0; font-size: .9rem; color: var(--ink-soft); white-space: nowrap; }
  .nav-cta { width: auto; margin: 0; padding: .7rem 1.15rem; font-size: .9rem; white-space: nowrap; }

  .section { padding: 6.5rem 0; }
  .hero { padding-top: calc(var(--header-h) + 4rem); }

  .cards { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
  .step { padding: 4.4rem 0 0; }
  .step:not(:last-child)::after {
    display: block; left: 3.6rem; right: -.6rem; top: 1.5rem; bottom: auto;
    border-left: 0; border-top: 1.5px dashed var(--blue-soft);
  }

  .gallery { overflow: visible; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin: 0; padding: 0; }
  .gallery img { aspect-ratio: 4 / 5; }

  .team { grid-template-columns: 1.6fr 1fr; align-items: stretch; }
  .person-soon { display: flex; flex-direction: column; justify-content: center; }

  .contact-card { grid-template-columns: 1.1fr .9fr; padding: 3.4rem; gap: 3rem; }

  .footer-grid { grid-template-columns: 1.2fr 1.4fr 1fr; align-items: start; }
  .footer-bottom { padding-bottom: 2rem; }
}

@media (min-width: 1100px) {
  .nav ul { gap: 1.5rem; }
  .cards { gap: 1.4rem; }
}

/* Hero em tela larga: texto à esquerda e a ilustração inteira à direita */
@media (min-width: 1200px) {
  .hero { padding: calc(var(--header-h) + 4.5rem) 0 5.5rem; min-height: 700px; display: flex; align-items: center; }
  .hero-text { max-width: 31rem; }
  .hero-bg { inset: 0 0 0 auto; width: 60%; height: auto; }
  .hero-bg img {
    object-fit: contain; object-position: 100% 50%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%), linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0%, #000 14%), linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
    mask-composite: intersect;
  }
  .hero::before { background: linear-gradient(90deg, #fff 0%, #fff 40%, rgba(255, 255, 255, 0) 46%); }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .wa-float:hover { transform: none; }
}
