/* Landing hérnia inguinal · Dr. Marcelo Bianchin
   Direção: "split stage" — o médico fica sempre à vista enquanto se lê. */

:root {
  /* cor */
  --ground: #c4c9cf;      /* cinza-azulado da parede do consultório */
  --paper: #f4f4f1;
  --ink: #121519;
  --muted: #3d444c;
  --accent: #1f5c49;
  --accent-strong: #15453a;
  --accent-ink: #ffffff;
  --field: #0c2d5a;       /* azul-marinho da marca */
  --field-ink: #ffffff;
  --field-muted: #cdd7e5;
  --mark: #f2e29c;
  --tint: #e6e8e7;
  --tint-on: #d6e6de;
  --slip-a: #ffffff;
  --slip-b: #e3e4e2;

  /* tipo: cinco tamanhos */
  --step-small: 1rem;
  --step-body: clamp(1.1875rem, 1.12rem + 0.3vw, 1.3125rem);
  --step-lead: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  --step-head: clamp(2.125rem, 1.6rem + 1.9vw, 3.25rem);
  --step-display: clamp(2.75rem, 1.9rem + 3.2vw, 4.75rem);

  /* espaço */
  --edge: 12px;
  --pad-x: clamp(24px, 4.6vw, 80px);
  --pad-y: clamp(64px, 8vw, 132px);

  /* movimento */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-reveal: 800ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Zilla Slab", Georgia, serif;
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd, figure, blockquote, fieldset { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
strong { font-weight: 600; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--mark); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- tipo ---------- */
.display {
  font-size: var(--step-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.0;
}
.head {
  font-size: var(--step-head);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 0.55em;
}
.head-sm {
  font-size: var(--step-lead);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 2.4em 0 0.8em;
}
.lead { font-size: var(--step-lead); line-height: 1.35; }
.note { font-size: var(--step-small); color: var(--muted); margin-top: 28px; }

.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: text-decoration-color var(--t-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- botão ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 14px 28px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: var(--step-body);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button__icon { width: 26px; height: 26px; flex: none; }
.button--paper { background: var(--paper); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-strong); }
  .button--paper:hover { background: #ffffff; }
}

/* ---------- a divisão: leitura + palco fixo ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  gap: var(--edge);
  padding: var(--edge);
}
.split--flip { grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); padding-top: 0; }
.split__read { display: flex; flex-direction: column; gap: var(--edge); min-width: 0; }
.split__stage { position: relative; min-width: 0; }

.stage {
  position: sticky;
  top: var(--edge);
  height: calc(100svh - 2 * var(--edge));
  overflow: hidden;
  background: #101214;
}
.stage--field { background: var(--field); }

.layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.6s var(--ease-soft), visibility 0s linear 1.6s;
}
.layer.is-active { opacity: 1; visibility: visible; transition: opacity 1.6s var(--ease-soft), visibility 0s; }
.layer video,
.layer--cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.layer--cover img { object-position: 55% 30%; }

.layer--framed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: clamp(32px, 4vw, 64px);
  color: var(--field-ink);
}
.layer--framed img { width: min(100%, 560px); height: auto; }
.layer--framed figcaption { font-size: var(--step-small); color: var(--field-muted); text-align: center; }

.video-ui {
  position: absolute;
  left: 16px; right: 16px; bottom: 24px;
  display: flex;
  justify-content: center;
}
.layer video { cursor: pointer; }

/* ---------- cartões de leitura ---------- */
.card {
  background: var(--paper);
  padding: var(--pad-y) var(--pad-x);
}
.card > * { max-width: 36em; }
.card--field { background: var(--field); color: var(--field-ink); }

.card--hero {
  min-height: calc(100svh - 2 * var(--edge));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}
.wordmark { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.01em; }
.hero__id { display: flex; flex-direction: column; gap: 2px; }
.hero__tag { font-size: var(--step-body); font-weight: 500; line-height: 1.3; }
.card--hero .display { margin-top: 8px; }
.card--hero .lead { max-width: 24em; }
.hero__crm { font-size: var(--step-small); color: var(--muted); }
.hero__links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: var(--step-small); }

/* carta */
.card--letter { display: flex; flex-direction: column; gap: 28px; }
.letter__portrait { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.letter__body { display: flex; flex-direction: column; gap: 1.1em; max-width: 32em; }
.letter__body mark { background: var(--mark); color: var(--ink); padding: 0.05em 0.2em; font-weight: 500; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.letter__name { font-size: var(--step-lead); font-style: italic; font-weight: 500; }
.letter__role { font-size: var(--step-small); color: var(--muted); }

/* formação */
.statement p {
  font-size: var(--step-lead);
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  max-width: 22em;
}
.statement { margin-bottom: 1.2em; }
.statement::after { content: "Dr. Marcelo, no vídeo"; display: block; margin-top: 12px; font-size: var(--step-small); color: var(--muted); }

.rows li {
  display: flex;
  justify-content: space-between;
  align-items: first baseline;
  gap: 24px;
  padding: 10px 0;
}
.rows__value { flex: none; font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.rows__strong { background: var(--mark); margin: 6px -14px; padding: 12px 14px !important; font-weight: 500; }
.rows__strong .rows__value { color: var(--ink); }

.hospitals { display: flex; flex-direction: column; gap: 14px; }
.hospitals li { display: flex; align-items: center; gap: 16px; font-size: var(--step-small); line-height: 1.3; }
.hospitals img { width: 56px; height: 56px; flex: none; mix-blend-mode: multiply; }

/* ---------- depoimentos ---------- */
.wall {
  margin: 0 var(--edge) var(--edge);
  background: var(--field);
  color: var(--field-ink);
  padding: var(--pad-y) clamp(16px, 4vw, 72px);
  overflow: hidden;
}
.wall__intro {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  max-width: 1320px;
  margin: 0 auto;
}
.wall__text .lead { color: var(--field-muted); max-width: 22em; }

.slip {
  --s: 1.2;
  position: relative;
  width: calc(var(--w) * var(--s) * 1px + 28px);
  max-width: 100%;
  padding: 14px 14px 18px;
  background: var(--slip-a);
  transform: rotate(var(--r));
  transition: transform 260ms var(--ease-out);
}
.slip:nth-child(even) { background: var(--slip-b); }
.slip img { width: 100%; height: auto; }
.slip::before {               /* fita adesiva */
  content: "";
  position: absolute;
  top: -11px; left: 50%;
  width: 92px; height: 24px;
  background: rgba(242, 226, 156, 0.82);
  transform: translateX(-50%) rotate(-3deg);
}
.slip--featured { --s: 1.55; justify-self: center; }

.collage {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 44px 8px;
  max-width: 1360px;
  margin: clamp(64px, 7vw, 112px) auto 0;
}
.collage .slip { margin-inline: -6px; }

/* "Ver mais": sem JavaScript todos aparecem e o botão some */
.wall__more { display: none; justify-content: center; margin-top: clamp(48px, 5vw, 72px); }
.js .wall__more { display: flex; }
.js .collage:not(.is-open) .slip--extra { display: none; }
@media (hover: hover) and (pointer: fine) {
  .slip:hover { transform: rotate(0deg) scale(1.05); z-index: 3; }
}

/* ---------- ponte entre o médico e o paciente ---------- */
.bridge {
  margin: 0 var(--edge) var(--edge);
  background: var(--paper);
  padding: clamp(72px, 9vw, 152px) var(--pad-x);
}
.bridge .display { max-width: 15em; }
.bridge .lead { max-width: 30em; margin-top: 28px; color: var(--muted); }
@media (max-width: 600px) { .bridge .display { font-size: var(--step-head); line-height: 1.08; } }

/* ---------- sinais (lista interativa) ---------- */
.checks { display: flex; flex-direction: column; gap: 8px; margin-top: 32px; }
.checks label {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 64px;
  padding: 16px 18px;
  background: var(--tint);
  cursor: pointer;
  line-height: 1.35;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.checks label:active { transform: scale(0.99); }
.checks label:has(input:checked) { background: var(--tint-on); }
.checks input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 30px; height: 30px;
  margin: 0;
  border: 2px solid var(--ink);
  background: #ffffff;
  display: grid;
  place-content: center;
  cursor: pointer;
}
.checks input::after {
  content: "";
  width: 9px; height: 16px;
  border: solid var(--accent-ink);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) translate(-1px, -2px) scale(0.6);
  opacity: 0;
  transition: transform var(--t-hover) var(--ease-out), opacity var(--t-hover) ease;
}
.checks input:checked { background: var(--accent); border-color: var(--accent); }
.checks input:checked::after { transform: rotate(45deg) translate(-1px, -2px) scale(1); opacity: 1; }
.checks__result { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.checks__result p { font-size: var(--step-lead); line-height: 1.35; }
.alert { margin-top: 40px; padding: 18px 20px; background: #f3e1dc; font-size: var(--step-small); line-height: 1.5; }

/* ---------- não adiar ---------- */
#nao-adiar .lead { margin-bottom: 1em; }
#nao-adiar p:last-child { color: var(--field-muted); }

/* ---------- tratamento ---------- */
.figures { display: flex; flex-direction: column; gap: 28px; margin-top: 48px; }
.figures li { color: var(--muted); line-height: 1.4; }
.figures__big { display: block; color: var(--ink); font-size: var(--step-head); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.figures__note { font-size: var(--step-small); color: var(--muted); }
.inline-photo { margin-top: 36px; }
.inline-photo img { width: 100%; height: auto; }
.only-narrow { display: none; }

/* ---------- como funciona: o recibo ---------- */
.card--slip > p { color: var(--field-muted); }
.card--slip > p strong { color: var(--field-ink); }
.ticket {
  margin-top: 44px;
  width: min(100%, 520px);
  background: #ffffff;
  color: var(--ink);
  padding: 30px 28px 46px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 95.833% 100%, 91.667% calc(100% - 14px), 87.5% 100%, 83.333% calc(100% - 14px), 79.167% 100%, 75% calc(100% - 14px), 70.833% 100%, 66.667% calc(100% - 14px), 62.5% 100%, 58.333% calc(100% - 14px), 54.167% 100%, 50% calc(100% - 14px), 45.833% 100%, 41.667% calc(100% - 14px), 37.5% 100%, 33.333% calc(100% - 14px), 29.167% 100%, 25% calc(100% - 14px), 20.833% 100%, 16.667% calc(100% - 14px), 12.5% 100%, 8.333% calc(100% - 14px), 4.167% 100%, 0% calc(100% - 14px));
}
.ticket h3 { font-size: var(--step-body); font-weight: 600; margin: 28px 0 6px; }
.ticket h3:first-child { margin-top: 0; }
.ticket__row {
  display: flex;
  align-items: last baseline;
  gap: 6px;
  padding: 5px 0;
  font-size: var(--step-small);
  line-height: 1.4;
}
.ticket__row span:first-child { order: 1; flex: 0 1 auto; }
.ticket__row::before {
  content: "· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·";
  order: 2;
  flex: 1 1 20px;
  min-width: 20px;
  overflow: hidden;
  white-space: nowrap;
  color: #8a9097;
}
.ticket__row span:last-child { order: 3; flex: none; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.ticket__total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 28px -28px 0;
  padding: 12px 28px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: var(--step-small);
}

/* ---------- perguntas ---------- */
.faq p { margin-bottom: 22px; line-height: 1.55; }
.faq strong { font-weight: 600; }

/* ---------- convite final ---------- */
.invite {
  margin: 0 var(--edge) var(--edge);
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 96px);
  padding: clamp(48px, 6vw, 96px) var(--pad-x);
}
.invite__photo { justify-self: end; width: min(100%, 480px); }
.invite__photo img { width: 100%; height: auto; }
.invite__text { display: flex; flex-direction: column; gap: 28px; max-width: 30em; }
.invite__phone { font-size: var(--step-small); color: var(--muted); }

/* ---------- rodapé ---------- */
.footer {
  margin: 0 var(--edge) var(--edge);
  background: var(--field);
  color: var(--field-ink);
  padding: clamp(56px, 7vw, 112px) var(--pad-x) 40px;
}
.footer__name { font-size: var(--step-display); font-weight: 600; letter-spacing: -0.025em; line-height: 1; }
.footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 56px; }
.footer__cols h2 { font-size: var(--step-body); font-weight: 600; margin-bottom: 6px; }
.footer__cols p { font-size: var(--step-small); color: var(--field-muted); line-height: 1.55; }
.footer__legal { margin-top: 64px; font-size: var(--step-small); color: var(--field-muted); max-width: 52em; }

/* ---------- barra do WhatsApp (celular) ---------- */
.mobile-bar { display: none; }

/* ---------- celular e tablet ---------- */
@media (max-width: 1023px) {
  .split, .split--flip { grid-template-columns: minmax(0, 1fr); }
  .split:not(.split--flip) .split__stage { order: -1; }
  .split--flip { padding-top: 0; }
  .layer[data-layer="robo"] { display: none; }
  .stage { position: relative; top: auto; height: 66svh; min-height: 420px; }
  .layer[data-layer="retrato"] { display: none; }
  .video-ui { top: 16px; bottom: auto; justify-content: flex-end; }
  .video-ui .button { min-height: 52px; padding: 10px 18px; }
  .card--hero { min-height: 0; margin-top: -36px; position: relative; margin-inline: 12px; }
  .card--hero .display { margin-top: 0; }
  .only-narrow { display: block; }
  .wall__intro { grid-template-columns: minmax(0, 1fr); }
  .invite { grid-template-columns: minmax(0, 1fr); }
  .invite__photo { justify-self: start; width: min(100%, 420px); }
  .footer__cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: fixed;
    left: 12px; right: 12px; bottom: 12px;
    z-index: 20;
    min-height: 60px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: var(--step-body);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(140%);
    transition: transform 320ms var(--ease-out);
  }
  .mobile-bar.is-shown { transform: none; }
  .footer { padding-bottom: 104px; }
}
@media (max-width: 600px) {
  .slip { --s: 1; transform: rotate(calc(var(--r) * 0.6)); }
  .slip--featured { --s: 1; }
  .collage { gap: 30px 0; }
  .collage .slip { margin-inline: 0; }
  .hospitals { grid-template-columns: minmax(0, 1fr); }
  .rows li { flex-direction: column; gap: 2px; }
  .rows__strong { margin-inline: -10px; padding-inline: 10px !important; }
  .ticket { padding-inline: 20px; }
  .ticket__total { margin-inline: -20px; padding-inline: 20px; }
}

/* ---------- movimento ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] {
    opacity: 0;
    transform: translateY(18px);
    animation: rise var(--t-reveal) var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 90ms + 150ms);
  }
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 75ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* bilhetes caem girando e assentam */
  .js .slip[data-reveal] { transform: translateY(32px) rotate(calc(var(--r) * 3)); transition: opacity 700ms var(--ease-out), transform 1000ms var(--ease-out); }
  .js .slip[data-reveal].is-in { transform: rotate(var(--r)); }
  .js .slip[data-reveal].is-in.is-done { transition: transform 260ms var(--ease-out); transition-delay: 0ms; }

  /* foto do palco respira devagar */
  .layer--cover.is-active img,
  .layer--framed.is-active img { animation: drift 16s var(--ease-soft) both; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .js .slip[data-reveal].is-in:hover { transform: rotate(0deg) scale(1.05); }
}
@media (max-width: 600px) and (prefers-reduced-motion: no-preference) {
  .js .slip[data-reveal].is-in { transform: rotate(calc(var(--r) * 0.6)); }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .layer, .layer.is-active { transition: none; }
}
