/* ==========================================================================
   Dr. André Barbosa · Otorrinolaringologista — Landing page
   ========================================================================== */

:root {
  /* Paleta */
  --petrol-900: #082A2B;
  --petrol-800: #0B3334;
  --petrol: #0E3B3C;
  --petrol-600: #1C5455;
  --sage-100: #EAF1EE;
  --sage-200: #DCE6E2;
  --sage-300: #C5D4CF;
  --ivory: #F8F5EF;
  --sand: #EFE8DC;
  --white: #FFFFFF;
  --gold: #B8945A;
  --gold-ink: #7E6033;
  --ink: #142120;
  --muted: #4C5A58;
  --line: rgba(14, 59, 60, .14);

  /* Tipografia */
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-body: clamp(1.0625rem, 1rem + .2vw, 1.1875rem);
  --fs-lead: clamp(1.125rem, 1.05rem + .4vw, 1.3125rem);
  --fs-h1: clamp(2.4rem, 1.6rem + 3vw, 4.1rem);
  --fs-h2: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  --fs-h3: clamp(1.25rem, 1.15rem + .4vw, 1.5rem);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --radius: 4px;
  --radius-lg: 20px;
  --shadow: 0 30px 60px -30px rgba(8, 42, 43, .35);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role="list"], ol { list-style: none; padding: 0; }
a { color: inherit; }
address { font-style: normal; }

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

.visually-hidden {
  position: absolute !important; 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: 1rem; top: -100px; z-index: 100;
  padding: .75rem 1.25rem; background: var(--petrol); color: var(--ivory);
  border-radius: var(--radius); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Conteúdo pendente: a classe .todo fica no HTML só como marcador para busca (sem destaque visual) */
.todo { font-style: normal; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.center { display: flex; justify-content: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 1.25rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--gold); }

.section-title {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--petrol);

  text-wrap: balance;
}
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

.prose p + p { margin-top: 1.1em; }
.prose { color: var(--muted); }
.prose--light { color: rgba(248, 245, 239, .78); }

/* ---------- Botões ---------- */
.btn {
  --btn-bg: var(--petrol); --btn-fg: var(--ivory);
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 52px; padding: .9rem 1.75rem;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 600; line-height: 1.25;
  text-decoration: none; text-align: center;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid transparent; border-radius: 999px;
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
  cursor: pointer;
}
.btn .icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { box-shadow: 0 14px 30px -14px rgba(14, 59, 60, .7); }
.btn--primary:hover { --btn-bg: var(--petrol-900); box-shadow: 0 18px 36px -14px rgba(14, 59, 60, .8); }

.btn--light { --btn-bg: var(--ivory); --btn-fg: var(--petrol); }
.btn--light:hover { --btn-bg: var(--white); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--petrol); border-color: var(--line); }
.btn--ghost:hover { --btn-bg: var(--petrol); --btn-fg: var(--ivory); }

.btn--lg { min-height: 60px; padding: 1.05rem 2.1rem; font-size: 1.0625rem; }
.btn--sm { min-height: 44px; padding: .6rem 1.15rem; font-size: .9375rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 245, 239, .86);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 10px 30px -24px rgba(8, 42, 43, .5); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }

.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
.brand__name { font-family: var(--font-serif); font-size: 1.375rem; color: var(--petrol); letter-spacing: -.01em; }
.brand__role { font-size: .6875rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-ink); margin-top: .3rem; }

/* ---------- Dobra 1 · Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 5vw, 5rem) clamp(4rem, 7vw, 7rem);
  overflow: hidden;
}
.hero::before { /* halo suave */
  content: ""; position: absolute; z-index: -1;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  right: -20vw; top: -20vw; border-radius: 50%;
  background: radial-gradient(circle, var(--sage-200) 0%, rgba(220, 230, 226, 0) 70%);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  grid-template-areas: "intro media" "action media";
  grid-template-rows: auto 1fr;
  column-gap: clamp(2.5rem, 6vw, 6rem);
  align-items: end;
}
.hero__intro { grid-area: intro; padding-top: clamp(1rem, 4vw, 3rem); }
.hero__media { grid-area: media; align-self: center; }
.hero__action { grid-area: action; align-self: start; margin-top: 2.5rem; }

.hero__title {
  font-family: var(--font-serif);
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.025em;
  color: var(--petrol);

  text-wrap: balance;
}
.hero__title em, .closing__title em { font-style: italic; color: var(--gold-ink); }
.hero__lead { margin-top: 1.75rem; font-size: var(--fs-lead); line-height: 1.65; color: var(--muted); max-width: 36rem; }

.hero__media {
  position: relative; margin: 0;
}
.hero__media img {
  width: 100%; height: 100%; min-height: 520px; max-height: 760px;
  object-fit: cover;
  border-radius: 240px 240px var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero__media::after { /* moldura deslocada */
  content: ""; position: absolute; inset: 1.5rem -1.5rem -1.5rem 1.5rem; z-index: -1;
  border: 1px solid var(--gold); opacity: .55;
  border-radius: 240px 240px var(--radius-lg) var(--radius-lg);
}

.hero__facts {
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
  margin-top: 2rem; padding: 1.25rem 0 0; list-style: none;
  border-top: 1px solid var(--line);
  font-size: .9375rem; color: var(--muted);
}
.hero__facts li { display: inline-flex; align-items: center; }
.hero__facts li::before {
  content: ""; width: 4px; height: 4px; margin-right: .6rem; flex-shrink: 0;
  border-radius: 50%; background: var(--gold);
}

/* ---------- Dobra 2 · Sobre ---------- */
.about { background: var(--white); }
.about__grid {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 7vw, 7rem); align-items: center;
}
.about__media { position: relative; margin: 0; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); }
.about__badge {
  position: absolute; right: -1.5rem; bottom: 2rem; max-width: 15rem;
  padding: 1.25rem 1.5rem; border-radius: 14px;
  background: var(--petrol); color: var(--ivory); box-shadow: var(--shadow);
  font-size: .875rem; line-height: 1.5;
}
.about__badge strong { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 1.375rem; color: var(--gold); margin-bottom: .25rem; }

.about__content .section-title { margin-bottom: 1.75rem; }

.credentials-title {
  margin-top: 2.5rem; margin-bottom: .5rem;
  font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink);
}
.credentials { margin-bottom: 2.5rem; border-top: 1px solid var(--line); }
.credentials__item {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: .25rem 1.5rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.credentials dt { color: var(--ink); font-weight: 600; }
.credentials dd { color: var(--muted); }

/* ---------- Dobra 3 · Áreas ---------- */
.cards {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem;
}
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 2rem 1.75rem 2.25rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon { width: 52px; height: 52px; color: var(--petrol); margin-bottom: 1.75rem; }
.card__title { font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h3); color: var(--petrol); margin-bottom: .6rem; }
.card p { font-size: 1rem; line-height: 1.6; color: var(--muted); }

.card--featured { background: var(--petrol); border-color: var(--petrol); }
.card--featured .card__icon { color: var(--gold); }
.card--featured .card__title { color: var(--ivory); }
.card--featured p { color: rgba(248, 245, 239, .78); }

.areas__footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem;
  margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line);
}
.support-line { color: var(--muted); max-width: 40rem; }

/* ---------- Dobra 4 · Perda auditiva ---------- */
.hearing {
  background: var(--petrol); color: var(--ivory);
  position: relative; overflow: hidden;
}
.hearing::before { /* ondas sonoras decorativas */
  content: ""; position: absolute; inset: auto -10% -40% auto; width: 900px; height: 900px; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(184, 148, 90, .09) 0 1px, transparent 1px 48px);
  pointer-events: none;
}
.hearing .section-title { color: var(--ivory); margin-bottom: 1.5rem; }
.hearing__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
}
.hearing__highlight {
  margin-top: 1.75rem; padding-left: 1.25rem; border-left: 2px solid var(--gold);
  font-family: var(--font-serif); font-style: italic; font-size: var(--fs-lead); line-height: 1.5; color: var(--ivory);
}
.hearing__media { margin: 2.75rem 0 0; }
.hearing__media img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: var(--radius-lg); }

.hearing__quote {
  position: relative;
  padding: clamp(2rem, 4vw, 3.25rem);
  background: var(--petrol-800);
  border: 1px solid rgba(184, 148, 90, .3);
  border-radius: var(--radius-lg);
  color: rgba(248, 245, 239, .8);
}
.hearing__mark { width: 44px; height: 44px; color: var(--gold); margin-bottom: 1.5rem; }
.hearing__quote-title {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  line-height: 1.15; color: var(--ivory); margin-bottom: 1.5rem; letter-spacing: -.01em;
}
.hearing__quote p + p { margin-top: 1.1em; }
.hearing__quote .btn { margin-top: 2.25rem; }
.hearing .todo { color: var(--ivory); }

/* ---------- Dobra 5 · Passos ---------- */
.steps__list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  counter-reset: none;
}
.step {
  position: relative; padding: 2.25rem 1.75rem;
  border-top: 1px solid var(--petrol);
  background: linear-gradient(to bottom, var(--sage-100), rgba(234, 241, 238, 0));
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.step__num {
  display: block; font-family: var(--font-serif); font-weight: 400;
  font-size: 3rem; line-height: 1; color: var(--gold); margin-bottom: 1.5rem;

}
.step__title { font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h3); color: var(--petrol); margin-bottom: .6rem; }
.step p { font-size: 1rem; line-height: 1.6; color: var(--muted); }

/* ---------- Dobra 6 · Familiar ---------- */
.family { padding-block: var(--section-y); background: var(--sand); }
.family__inner { max-width: 50rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.family__icon { width: 56px; height: 56px; color: var(--gold-ink); margin-bottom: 1.75rem; }
.family__text { margin: 1.5rem 0 2.5rem; font-size: var(--fs-lead); color: var(--muted); max-width: 38rem; }

/* ---------- Dobra 7 · Prova ---------- */
.proof__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; max-width: none; }
.carousel__controls { display: flex; gap: .75rem; flex-shrink: 0; }
.carousel__btn {
  display: grid; place-items: center; width: 52px; height: 52px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--petrol);
  cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease), opacity .3s;
}
.carousel__btn .icon { width: 22px; height: 22px; }
.carousel__btn:hover:not(:disabled) { background: var(--petrol); color: var(--ivory); }
.carousel__btn:disabled { opacity: .35; cursor: default; }

.carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 1.25rem) / 3);
  gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; scrollbar-width: none;
  padding-bottom: .5rem;
}
.carousel__track::-webkit-scrollbar { display: none; }

.testimonial { scroll-snap-align: start; }
.testimonial figure {
  height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: 2.25rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.testimonial blockquote { font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.5; color: var(--ink); }
.testimonial blockquote::before { content: "“"; display: block; font-size: 3.5rem; line-height: .6; color: var(--gold); margin-bottom: 1rem; }
.testimonial figcaption { display: flex; align-items: center; gap: 1rem; font-size: .9375rem; line-height: 1.4; color: var(--muted); }
.testimonial figcaption strong { color: var(--ink); font-weight: 600; }
.testimonial__avatar {
  display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%;
  background: var(--sage-200); color: var(--petrol); font-weight: 700; font-size: .875rem;
}
.testimonial--featured figure { background: var(--sage-100); border-color: transparent; }

/* ---------- Dobra 8 · Fechamento ---------- */
.closing {
  position: relative; overflow: hidden;
  padding-block: calc(var(--section-y) * 1.1);
  background: radial-gradient(120% 140% at 50% 0%, var(--petrol-600) 0%, var(--petrol) 45%, var(--petrol-900) 100%);
  color: var(--ivory); text-align: center;
}
.closing__inner { display: flex; flex-direction: column; align-items: center; max-width: 52rem; }
.closing__title {
  font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h1);
  line-height: 1.05; letter-spacing: -.025em; text-wrap: balance;
}
.closing__title em { color: var(--gold); }
.closing__text { margin: 1.75rem 0 2.75rem; font-size: var(--fs-lead); color: rgba(248, 245, 239, .8); }

/* ---------- Dobra 9 · Rodapé ---------- */
.site-footer { background: var(--petrol-900); color: rgba(248, 245, 239, .72); font-size: .9375rem; padding-top: 4rem; }
.site-footer__grid {
  display: grid; grid-template-columns: 1fr auto; gap: 2.5rem 4rem;
  padding-bottom: 3rem; border-bottom: 1px solid rgba(248, 245, 239, .12);
}
.brand--footer { margin-bottom: 1.25rem; }
.brand--footer .brand__name { color: var(--ivory); font-size: 1.625rem; }
.brand--footer .brand__role { color: var(--gold); }
.site-footer__contact p + p { margin-top: .4rem; }
.site-footer a { color: var(--ivory); text-decoration-color: rgba(184, 148, 90, .6); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--gold); }
.site-footer__legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  padding-block: 1.75rem; font-size: .8125rem; color: rgba(248, 245, 239, .55);
}

/* ---------- CTA flutuante ---------- */
.float-cta {
  position: fixed; z-index: 60; right: 1rem; bottom: 1rem;
  display: none; align-items: center; gap: .6rem;
  min-height: 56px; padding: .85rem 1.35rem;
  background: var(--petrol); color: var(--ivory); text-decoration: none; font-weight: 600; font-size: .9375rem;
  border-radius: 999px; box-shadow: 0 16px 34px -12px rgba(8, 42, 43, .6);
  transform: translateY(150%); transition: transform .45s var(--ease);
}
.float-cta .icon { width: 22px; height: 22px; }
.float-cta.is-visible { transform: translateY(0); }

/* ---------- Animação de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1080px) {
  .cards, .steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carousel__track { grid-auto-columns: calc((100% - 1.25rem) / 2); }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }

  /* Hero: intro → foto → botão */
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "media" "action";
    grid-template-rows: auto;
  }
  .hero__intro { padding-top: 0; }
  .hero__media { margin-top: 2.25rem; margin-right: 1rem; }
  .hero__media img { min-height: 0; max-height: none; aspect-ratio: 4 / 4.4; border-radius: 180px 180px var(--radius-lg) var(--radius-lg); }
  .hero__media::after { inset: 1rem -1rem -1rem 1rem; border-radius: 180px 180px var(--radius-lg) var(--radius-lg); }
  .hero__action { margin-top: 2.75rem; }

  .about__grid, .hearing__grid { grid-template-columns: minmax(0, 1fr); }
  .about__media { max-width: 520px; margin-right: 1.5rem; }
  .about__badge { right: -1.5rem; bottom: 1.5rem; }

  .site-footer__grid { grid-template-columns: 1fr; }

  .float-cta { display: inline-flex; }
  .site-footer__legal { padding-bottom: 6.5rem; }
}

@media (max-width: 640px) {
  .site-header .btn span { display: none; }
  .site-header .btn { width: 44px; height: 44px; min-height: 44px; padding: 0; }
  .site-header .btn .icon { width: 22px; height: 22px; }

  .btn { width: 100%; }
  .site-header .btn, .carousel__btn { width: auto; }

  .hero__facts { font-size: .875rem; }
  .hero__facts { gap: .35rem 1.1rem; }

  .credentials__item { grid-template-columns: 1fr; }

  /* Steps: um embaixo do outro */
  .steps__list { grid-template-columns: minmax(0, 1fr); }
  .step { display: grid; grid-template-columns: auto 1fr; column-gap: 1.25rem; padding: 1.75rem 1.25rem; }
  .step__num { grid-row: span 2; font-size: 2.25rem; margin-bottom: 0; }

  /* Cards 2 por linha no celular */
  .cards { gap: .75rem; }
  .card { padding: 1.5rem 1.15rem 1.65rem; }
  .card__icon { width: 40px; height: 40px; margin-bottom: 1.15rem; }
  .card__title { font-size: 1.1875rem; }
  .card p { font-size: .9375rem; }

  .proof__head { flex-direction: column; align-items: flex-start; }
  .carousel__track { grid-auto-columns: 88%; }
  .testimonial figure { padding: 1.75rem; }
}

@media (max-width: 380px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
}

/* Acessibilidade: movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
