/* Direção: atlas cirúrgico com a identidade do logo.
   Cinza neutro e petróleo tirados do próprio logo (#E6E6E6 / #011D25),
   Cinzel (letras romanas do logo) + Jost (subtítulo espaçado do logo).
   Um único destaque: o azul da caneta de demarcação cirúrgica. Sem raio, sem sombra. */

:root {
  --paper: #ECECEA;
  --ink: #04212A;
  --marker: #2B3A9E;

  --ink-75: color-mix(in srgb, var(--ink) 78%, var(--paper));
  --ink-60: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --rule: color-mix(in srgb, var(--ink) 18%, var(--paper));
  --rule-strong: var(--ink);

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --col-gap: clamp(16px, 2vw, 32px);
  --section: clamp(80px, 11vw, 168px);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(19px, 0.5vw + 16px, 22px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--marker); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; font-size: 15px; }
.skip:focus { left: 8px; }

/* ---------- Tipos ---------- */
/* Rótulo no espírito do "TRICOLOGIA E TRANSPLANTE CAPILAR" do logo */
.label {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.tnum { font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--ink-60); }

.h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 5vw, 76px);
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(24px, 1.9vw, 30px);
  line-height: 1.2;
}
.lead { font-size: clamp(21px, 1.4vw + 10px, 26px); line-height: 1.5; font-weight: 300; color: var(--ink-75); max-width: 36ch; }
.ink { color: var(--marker); }

/* Placeholder visível: dado real ainda não fornecido */
.ph {
  font-family: var(--sans); font-style: normal; font-size: 0.85em;
  color: var(--marker);
  outline: 1px dashed var(--marker); outline-offset: 2px;
  padding: 0 4px;
}

/* ---------- Grid ---------- */
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.grid > * { grid-column: 1 / -1; }

/* ---------- Botões e links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 16px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  padding: 20px 28px;
  border: 1px solid var(--ink);
  transition: background-color .15s, color .15s;
}
.btn span { transition: transform .2s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn:hover span { transform: translateX(4px); }
.btn--small { padding: 12px 18px; font-size: 13px; }
.btn--big { padding: 24px 32px; font-size: 15px; }
@media (min-width: 900px) { .btn--big { white-space: nowrap; } }

.link {
  font-size: 17px; font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 2px;
  color: var(--ink-75);
  transition: color .15s;
}
.link:hover { color: var(--marker); }
.link--strong { color: var(--ink); }

/* ---------- Cabeçalho ---------- */
.masthead {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 84px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand__mark { height: 52px; width: auto; }
.brand__text { display: grid; gap: 2px; }
.brand__name { font-family: var(--display); font-size: 25px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; }
.brand__sub { font-size: 10.5px; letter-spacing: 0.26em; color: var(--ink-60); }
.nav { display: none; gap: 32px; font-size: 13px; }
.nav a { color: var(--ink-75); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 519px) {
  .brand__sub { display: none; }
  .brand__mark { height: 42px; }
  .brand__name { font-size: 21px; }
}
@media (min-width: 1180px) { .nav { display: flex; } }

/* ---------- Abertura ---------- */
.hero { padding-top: clamp(32px, 5vw, 72px); }
.hero__grid { row-gap: 48px; align-items: end; }
.kicker { color: var(--ink-60); padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 5.9vw, 100px);
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin: clamp(24px, 3vw, 40px) 0 clamp(28px, 3vw, 44px);
}
.mark { position: relative; white-space: nowrap; }
.mark__line {
  position: absolute; left: -1%; bottom: -0.08em;
  width: 102%; height: 0.2em; overflow: visible;
  fill: none; stroke: var(--marker); stroke-width: 3; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.js .mark__line path { stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw 1.1s .35s cubic-bezier(.6,.1,.3,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .js .mark__line path { animation: none; stroke-dashoffset: 0; } }

.hero__text .lead { max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 40px; }

/* Retrato do médico */
.portrait { border: 1px solid var(--rule); background: #fff; }
.portrait > img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.portrait__ph {
  aspect-ratio: 4 / 5;
  display: grid; place-items: center; align-content: center; gap: 28px;
  padding: 24px; text-align: center;
  background: color-mix(in srgb, var(--paper) 55%, #fff);
}
.portrait__ph img { width: 72px; opacity: .25; }
.caption {
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline;
  padding: 16px 18px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
  font-size: 17px; line-height: 1.45; color: var(--ink-75);
}
.caption__n { font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }

@media (min-width: 900px) {
  .hero__text { grid-column: 1 / span 7; align-self: center; }
  .hero__portrait { grid-column: 8 / -1; margin-right: calc(-1 * var(--gutter)); }
}
@media (min-width: 1400px) {
  .hero__portrait { margin-right: calc((1400px - 100vw) / 2 - var(--gutter)); }
}

.spec {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-top: clamp(56px, 7vw, 104px);
  border-top: 1px solid var(--rule-strong);
}
.spec > div { padding: 18px 16px 22px 0; border-bottom: 1px solid var(--rule); }
.spec dt { color: var(--ink-60); margin-bottom: 8px; font-size: 12px; }
.spec dd { font-size: 19px; line-height: 1.4; }
@media (min-width: 900px) {
  .spec { grid-template-columns: repeat(4, 1fr); }
  .spec > div { border-bottom: 0; border-right: 1px solid var(--rule); padding-left: 20px; }
  .spec > div:first-child { padding-left: 0; }
  .spec > div:last-child { border-right: 0; }
}

/* ---------- Seções ---------- */
.section { padding: var(--section) 0; border-top: 1px solid var(--rule); }
.section__n { color: var(--ink-60); margin-bottom: 24px; }

/* 01 — o médico */
.medico { row-gap: 48px; }
.medico__text .lead { margin-top: 28px; }
.medico__bio { margin-top: 24px; }
.medico__list-title { margin-top: 56px; padding-bottom: 14px; color: var(--ink-60); border-bottom: 1px solid var(--rule-strong); }
.treat li { display: grid; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.treat__name { font-family: var(--display); font-size: clamp(22px, 1.8vw, 28px); line-height: 1.2; transition: color .15s; }
.treat__note { color: var(--ink-60); font-size: 18px; }
.treat li:hover .treat__name { color: var(--marker); }
@media (min-width: 900px) {
  /* A foto sangra até a borda esquerda da janela */
  .medico__photo { grid-column: 1 / span 5; margin-left: calc(-1 * var(--gutter)); align-self: start; position: sticky; top: 120px; }
  .medico__text { grid-column: 7 / -1; }
  .treat li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: baseline; }
}
@media (min-width: 1400px) {
  .medico__photo { margin-left: calc((1400px - 100vw) / 2 - var(--gutter)); }
}

/* 02 — teses com notas de margem */
.side { margin-bottom: 56px; }
.side__text { margin-top: 24px; color: var(--ink-75); max-width: 30ch; }
.theses { border-top: 1px solid var(--rule-strong); }
.thesis {
  display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; row-gap: 20px;
  padding: 36px 0 44px; border-bottom: 1px solid var(--rule);
}
.thesis__n { font-family: var(--display); font-size: 56px; line-height: .9; color: var(--ink-60); }
.thesis__body p { margin-top: 14px; color: var(--ink-75); max-width: 50ch; }
.note {
  grid-column: 2; font-size: 17px; line-height: 1.5; color: var(--ink-75);
  padding-left: 16px; border-left: 1px solid var(--marker);
}
.note .label { display: block; color: var(--marker); margin-bottom: 4px; font-size: 12px; }

.team { margin-top: 56px; }
.team > .label { color: var(--ink-60); margin-bottom: 12px; }
.team ul { border-top: 1px solid var(--rule); }
.team li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.team__name { font-size: 22px; }
.team li > .label { color: var(--ink-60); font-size: 12px; }

@media (min-width: 900px) {
  .side { grid-column: 1 / span 4; position: sticky; top: 120px; align-self: start; margin: 0; }
  .theses, .team { grid-column: 6 / -1; }
  .thesis { grid-template-columns: 80px minmax(0, 1fr) 220px; column-gap: 28px; }
  .thesis__n { font-size: 76px; }
  .note { grid-column: 3; align-self: start; margin-top: 6px; }
}

/* 03 — atlas de casos */
.atlas__head { row-gap: 20px; margin-bottom: clamp(40px, 5vw, 72px); align-items: end; }
.atlas__intro { color: var(--ink-75); max-width: 40ch; }
.atlas { row-gap: 24px; }
.atlas__index { display: flex; overflow-x: auto; border-top: 1px solid var(--rule-strong); scrollbar-width: none; }
.atlas__index::-webkit-scrollbar { display: none; }
.atlas__index button {
  appearance: none; background: none; border: 0; cursor: pointer; color: var(--ink-60);
  font: inherit; text-align: left;
  display: grid; grid-template-columns: 48px 1fr; align-items: baseline;
  padding: 18px 12px 18px 0; min-width: 240px;
  border-bottom: 1px solid var(--rule);
  transition: color .15s;
}
.atlas__index button > .tnum { font-family: var(--display); font-size: 17px; }
.atlas__index button > span:last-child { font-size: 21px; line-height: 1.25; }
.atlas__index small { display: block; font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; margin-top: 6px; color: var(--ink-60); }
.atlas__index button:hover { color: var(--ink); }
.atlas__index button[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.atlas__index button[aria-selected="true"] > .tnum { color: var(--marker); }

.plate { background: #fff; border: 1px solid var(--rule); }
.plate img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.atlas__plate + .atlas__plate { margin-top: 24px; }
.js .atlas__plate + .atlas__plate { margin-top: 0; }
.js .atlas__plate[hidden] { display: none; }
.atlas__plate .caption > span:nth-child(2) { flex: 1 1 28ch; }
.atlas__plate img { transition: opacity .25s; }
.atlas__plate.is-entering img { opacity: 0; }
.fineprint { margin-top: 28px; font-size: 16px; color: var(--ink-60); max-width: 70ch; }

@media (min-width: 900px) {
  .atlas__title { grid-column: 1 / span 7; }
  .atlas__intro { grid-column: 9 / -1; }
  .atlas__index { grid-column: 1 / span 4; flex-direction: column; overflow: visible; align-self: start; }
  .atlas__index button { min-width: 0; padding: 20px 0 20px 20px; }
  .atlas__index button[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--ink); }
  .atlas__stage { grid-column: 5 / -1; }
}

/* 04 — protocolo, em tinta */
.section--ink { background: var(--ink); color: var(--paper); border-top: 0; }
.section--ink ::selection { background: var(--paper); color: var(--ink); }
.section--ink .section__n, .section--ink .steps__n { color: color-mix(in srgb, var(--paper) 62%, var(--ink)); }
.proto__head { margin-bottom: clamp(48px, 6vw, 96px); }
.proto__head .h2 { max-width: 16ch; }
.steps { display: grid; border-top: 1px solid color-mix(in srgb, var(--paper) 35%, var(--ink)); }
.steps li { padding: 28px 0 40px; border-bottom: 1px solid color-mix(in srgb, var(--paper) 18%, var(--ink)); display: grid; gap: 14px; align-content: start; }
.steps p { color: color-mix(in srgb, var(--paper) 78%, var(--ink)); font-size: 19px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); column-gap: var(--col-gap); } }
@media (min-width: 1100px) {
  .proto__head .section__n { grid-column: 1 / span 3; }
  .proto__head .h2 { grid-column: 4 / -1; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { border-bottom: 0; padding-top: 32px; position: relative; }
  .steps li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--paper); }
}

/* 05 — polos */
.polos__head { row-gap: 20px; margin-bottom: clamp(40px, 5vw, 72px); align-items: end; }
.polos__intro { color: var(--ink-75); max-width: 38ch; }
.polos__state { display: flex; justify-content: space-between; color: var(--ink-60); padding: 14px 0; border-bottom: 1px solid var(--rule-strong); }
.polos__state:not(:first-child) { margin-top: 64px; }
.place { display: grid; gap: 16px; padding: 32px 0; border-bottom: 1px solid var(--rule); }
.place__city { font-family: var(--display); font-size: clamp(34px, 4vw, 60px); letter-spacing: 0.01em; line-height: 1.05; transition: color .15s; }
.place__clinic { font-size: 14px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 6px; }
.place__addr p { font-size: 19px; }
.place__act { display: flex; flex-wrap: wrap; gap: 12px 28px; }
@media (min-width: 900px) {
  .polos__head > div { grid-column: 1 / span 7; }
  .polos__intro { grid-column: 9 / -1; }
  .place { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: baseline; }
  .place__city { grid-column: 1 / span 5; }
  .place__addr { grid-column: 6 / span 4; }
  .place__act { grid-column: 10 / -1; flex-direction: column; align-items: flex-end; }
  .place:hover .place__city { color: var(--marker); }
}

/* 06 — dúvidas */
.faq { border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 44px 1fr 24px; gap: 12px; align-items: baseline;
  padding: 24px 0; font-size: clamp(21px, 1.6vw, 26px); font-weight: 500; line-height: 1.3;
  transition: color .15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary > .tnum { font-size: 15px; font-weight: 400; color: var(--ink-60); }
.faq summary::after { content: "+"; font-size: 26px; font-weight: 300; text-align: right; color: var(--ink-60); }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--marker); }
.faq details p { padding: 0 36px 30px 56px; color: var(--ink-75); max-width: 62ch; }
@media (min-width: 900px) { .faq { grid-column: 6 / -1; } }

/* Instagram */
.insta { padding: clamp(64px, 8vw, 120px) 0; border-top: 1px solid var(--rule-strong); }
.insta .grid { row-gap: 20px; align-items: end; }
.insta__k { color: var(--ink-60); }
.insta__title { font-family: var(--sans); font-weight: 300; font-size: clamp(34px, 7.4vw, 124px); line-height: 1; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.insta__title span { font-size: .5em; vertical-align: .6em; margin-left: .1em; }
.insta__title a { background-image: linear-gradient(var(--marker), var(--marker)); background-size: 0 3px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s, color .15s; }
.insta__title a:hover { color: var(--marker); background-size: 100% 3px; }
.insta__text { color: var(--ink-75); max-width: 38ch; }
@media (min-width: 900px) {
  .insta__title { grid-column: 1 / span 9; }
  .insta__text { grid-column: 10 / -1; }
}

/* Fechamento */
.closing { padding: var(--section) 0; border-top: 1px solid var(--rule); }
.closing__title { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4.2vw, 64px); line-height: 1.12; letter-spacing: 0.005em; max-width: 22ch; }
.closing__act { margin-top: 48px; display: grid; gap: 20px; justify-items: start; }
.closing__phone { font-size: clamp(26px, 2.6vw, 36px); font-weight: 300; letter-spacing: 0.04em; }
@media (min-width: 900px) {
  .closing__title { grid-column: 1 / span 7; }
  .closing__act { grid-column: 8 / -1; justify-self: end; align-self: end; margin: 0; }
}

/* Rodapé */
.footer { border-top: 1px solid var(--rule); padding: 64px 0 104px; }
.footer .grid { row-gap: 40px; }
.footer__id { display: grid; gap: 24px; justify-items: start; }
.footer__id img { width: 260px; }
.footer__id .label { color: var(--ink-60); line-height: 1.9; font-size: 12px; }
.footer__nav, .footer__contact { display: grid; gap: 12px; align-content: start; }
.footer__nav a, .footer__contact a { color: var(--ink-75); width: fit-content; border-bottom: 1px solid transparent; }
.footer__nav a:hover, .footer__contact a:hover { color: var(--ink); border-bottom-color: currentColor; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px 32px; border-top: 1px solid var(--rule); padding-top: 28px; }
.footer__legal { font-size: 16px; color: var(--ink-60); max-width: 64ch; }
.footer__copy { color: var(--ink-60); font-size: 12px; }
@media (min-width: 900px) {
  .footer__id { grid-column: 1 / span 5; }
  .footer__nav { grid-column: 6 / span 3; }
  .footer__contact { grid-column: 9 / -1; }
}

/* WhatsApp flutuante: só aparece depois da abertura */
.float { position: fixed; right: 16px; bottom: 16px; z-index: 40; padding: 14px 18px; font-size: 13px; transition: transform .25s, opacity .25s, background-color .15s, color .15s; }
.float:hover { background: var(--paper); }
.js .float { transform: translateY(12px); opacity: 0; pointer-events: none; }
.js .float.is-visible { transform: none; opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .float { transition: none; } }
