/* =========================================================
   DiagnoRad — Landing page
   Seção: Header + Hero
   Tipografia: Cabin (títulos/UI) + Lato (textos)
   ========================================================= */

:root {
  /* Marca */
  --navy-900: #16233a;
  --navy-800: #1d2f4b;
  --navy-700: #24395c;
  --blue-600: #2f5f96;
  --blue-500: #3f7bb8;
  --blue-400: #6f9ec9;
  --blue-050: #eef4fa;

  --ink: #16233a;
  --ink-soft: #5b6779;
  --ink-mute: #8791a1;

  --bg: #f7f8fa;
  --surface: #ffffff;
  --line: #e4e8ee;

  --radius: 20px;
  --radius-panel: 32px; /* painel azul do hero */

  --shadow-md: 0 12px 32px -12px rgba(22, 35, 58, 0.18);

  --font-display: "Cabin", "Lato", system-ui, sans-serif;
  --font-text: "Lato", system-ui, sans-serif;

  --header-h: 100px; /* 2*(gap+pad) + 40px do botão: centra logo/menu com os botões */
  --panel-ratio: 0.34; /* painel azul: fração da largura do conteúdo */
  --shell: min(1360px, 100% - 160px); /* largura do conteúdo, centralizado */
  --shell-side: calc((100% - var(--shell)) / 2);
  --panel-divisa: calc(
    var(--shell-side) + var(--shell) * (1 - var(--panel-ratio))
  ); /* borda esquerda do painel */
  --panel-gap: 15px; /* respiro externo do painel */
  --panel-pad: 15px; /* respiro interno do painel */
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-text);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
h1,
h2,
p {
  margin: 0;
}
button {
  font: inherit;
}

.container {
  width: var(--shell);
  margin-inline: auto;
}

/* ---------- Ícones ---------- */
.ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}
.btn--primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover {
  background: var(--navy-800);
  box-shadow: 0 18px 34px -14px rgba(22, 35, 58, 0.5);
}
.btn--ghost {
  padding: 0;
  margin-left: 16px;
  gap: 8px;
  background: transparent;
  color: var(--navy-900);
  border: 0;
  box-shadow: none;
}
.btn--ghost .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
  animation: arrow-nudge 1.6s ease-in-out infinite;
}
.btn--ghost:hover {
  color: var(--blue-600);
  background: transparent;
}
@keyframes arrow-nudge {
  0%,
  60%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(5px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn--ghost .ico {
    animation: none;
  }
}
/* botão claro — usado sobre o painel azul */
.btn--light {
  background: var(--surface);
  color: var(--navy-900);
  border: 1px solid transparent;
}
.btn--light:hover {
  background: var(--navy-800);
  color: #fff;
  border-color: var(--navy-800);
}
.btn--header {
  height: 40px;
  padding: 0 20px;
  font-size: 0.96rem;
  gap: 9px;
}
.btn--header .ico {
  width: 17px;
  height: 17px;
}
.btn .ico--solid {
  width: 17px;
  height: 17px;
}
.btn--header .ico--solid {
  width: 17px;
  height: 17px;
}

/* botões de ícone (Instagram / e-mail) */
.icon-btn {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 999px;
  /* ícone sempre em branco pleno; a borda é que acende no hover */
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* ícones vetorizados em preenchimento (WhatsApp / Instagram) */
.ico--solid,
.icon-btn svg.ico--solid {
  fill: currentColor;
  stroke: none;
  overflow: visible;
}
.icon-btn svg.ico--solid {
  width: 12px;
  height: 12px;
}
/* o glifo do Instagram ocupa menos do viewBox — sobe 2px para casar com o @ */
.icon-btn--ig svg {
  width: 20px;
  height: 20px;
}
.icon-btn:hover {
  background: transparent;
  border-color: #fff;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 8px) 0 72px;
  overflow: hidden;
  isolation: isolate;
}

/* painel azul: altura total da primeira dobra */
.hero__panel {
  position: absolute;
  top: var(--panel-gap);
  right: var(--shell-side);
  bottom: var(--panel-gap);
  left: var(--panel-divisa);
  background: var(--blue-500);
  border-radius: var(--radius-panel);
  overflow: hidden;
  z-index: -2;
}

/* marca d'água: o ícone gigante sangrando pelas bordas do painel */
.hero__panel::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -16%;
  transform: translateX(-50%);
  height: 100%;
  aspect-ratio: 1300 / 1209;
  background: var(--navy-900);
  -webkit-mask: url("assets/icone.svg") no-repeat center / contain;
  mask: url("assets/icone.svg") no-repeat center / contain;
  opacity: 0.1;
  pointer-events: none;
}

/* =========================================================
   Header — logo + menu à esquerda, ações à direita
   ========================================================= */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo__mark {
  width: 46px;
  height: 46px;
}
.logo__text {
  display: block;
}
.logo__word {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--navy-900);
}
.logo__word em {
  font-style: normal;
  color: var(--blue-500);
}
.logo__tag {
  display: block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 3px;
  padding-left: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-right: auto;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav a {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav a:hover,
.nav a.is-active {
  color: var(--navy-900);
}

.header-actions {
  position: absolute;
  top: calc(var(--panel-gap) + var(--panel-pad)); /* mesmo respiro dos cards */
  right: calc(var(--shell-side) + var(--panel-pad));
  display: flex;
  align-items: center;
  gap: 10px;
}

/* hambúrguer (mobile) */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--navy-800);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Coluna de texto ---------- */
.hero__inner {
  width: var(--shell);
}
.hero__content {
  max-width: min(600px, 52%);
}

.eyebrow {
  font-family: var(--font-text);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 12px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 3.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.028em;
  color: var(--navy-900);
  text-wrap: balance;
}
.hero__title span {
  color: var(--blue-600);
}

.hero__text {
  margin-top: 24px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 32em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 38px;
}

/* ---------- A dupla, sobre a divisa do painel ---------- */
.hero__people {
  position: absolute;
  left: var(--panel-divisa); /* divisa do painel azul */
  bottom: var(--panel-gap);
  width: calc(var(--shell) * 0.44);
  height: 85%;
  transform: translateX(-16%);
  z-index: -1;
  pointer-events: none;
}
.person {
  position: absolute;
  bottom: 0;
  width: auto;
  max-width: none;
}
/* Pedro à esquerda, na mesma altura do Antônio */
.person--pedro {
  left: 8%;
  height: 100%;
  bottom: 0;
  z-index: 2;
}
/* Antônio à direita, à frente e bem próximo do Pedro */
.person--antonio {
  left: -19%;
  height: 100%;
  z-index: 1;
}

/* ---------- Credenciais — canto inferior direito do painel ---------- */
.doctors {
  position: absolute;
  right: calc(var(--shell-side) + var(--panel-pad));
  bottom: calc(var(--panel-gap) + var(--panel-pad));
  z-index: 3;
  display: grid;
  justify-items: end;
  gap: 12px;
  max-width: min(360px, 42vw);
}
.doctor {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  padding: 6px 20px 6px 6px;
  box-shadow: 0 22px 40px -22px rgba(11, 26, 46, 0.65);
}
.doctor__photo {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
}
.doctor__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.doctor__photo--zoom img {
  transform: scale(1.25);
  transform-origin: 53% 32%;
}
.doctor__plus {
  position: absolute;
  inset: 0;
  background: rgba(22, 35, 58, 0.8);
  opacity: 0;
  transition: opacity 0.25s ease;
}
/* o "+" desenhado em duas barras finas, centrado na foto */
.doctor__plus::before,
.doctor__plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: #fff;
  border-radius: 1px;
}
.doctor__plus::before {
  width: 12px;
  height: 1.4px;
  transform: translate(-50%, -50%);
}
.doctor__plus::after {
  width: 1.4px;
  height: 12px;
  transform: translate(-50%, -50%);
}
.doctor:hover .doctor__plus,
.doctor__photo:focus-visible .doctor__plus {
  opacity: 1;
}
.doctor__info {
  white-space: nowrap;
}
.doctor strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy-900);
}
.doctor small {
  display: block;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-600);
}
.doctor p {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* =========================================================
   Headlines — troca conforme o scroll
   ========================================================= */
.headlines {
  position: relative;
  /* 1 tela por headline: define o "curso" do scroll */
  height: 300vh;
  background: var(--bg);
}

.headlines__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  overflow: hidden;
}

.headlines__stage {
  /* mais largo que o shell padrão: o texto ocupa quase toda a tela */
  width: min(1560px, 100% - 96px);
  display: grid;
  align-self: center;
  justify-items: center;
  text-align: center;
  padding-block: 80px;
}

.headline {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.6s;
  pointer-events: none;
}
.headline.is-past {
  transform: translateY(-28px);
}
.headline.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
  pointer-events: auto;
}

.headline__eyebrow {
  margin-bottom: 20px;
}

.headline__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--navy-900);
  text-wrap: balance;
  max-width: 100%;
  margin-inline: auto;
}
.headline__title span {
  color: var(--blue-600);
}

.headline__sub {
  margin-top: 28px;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  color: var(--ink-soft);
}

.headlines__progress {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-bottom: 56px;
}
.headlines__progress span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--line);
  transition: background-color 0.4s ease, width 0.4s ease;
}
.headlines__progress span.is-active {
  width: 30px;
  background: var(--blue-600);
}

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 1280px) {
  :root {
    --panel-ratio: 0.36;
    --shell: min(1360px, 100% - 112px);
  }
  .header-inner {
    gap: 24px;
  }
  .nav {
    gap: 22px;
    font-size: 0.92rem;
  }
  .hero__content {
    max-width: 48%;
  }
  .doctors {
    max-width: min(280px, 44vw);
  }
}

@media (max-width: 1080px) {
  :root {
    --header-h: 96px;
    --panel-ratio: 0.44;
    --shell: calc(100% - var(--panel-gap) * 2);
  }
  .container,
  .hero__inner {
    width: min(1440px, 100% - 56px);
  }
  .nav-toggle {
    display: flex;
  }
  .nav {
    position: absolute;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 28px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0.25s;
  }
  body.nav-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .header-actions {
    position: static;
    margin-left: auto;
  }
  .btn--header {
    display: none;
  }
  .doctors {
    display: none;
  }
  .hero__content {
    max-width: 49%;
  }
  .hero__people {
    width: calc(var(--shell) * 0.5);
    height: 80%;
    transform: translateX(-4%);
  }
}

@media (max-width: 860px) {
  .headlines__stage {
    width: min(1560px, 100% - 48px);
    padding-block: 64px;
  }
  .headline__title {
    text-wrap: pretty;
  }
  .headlines__progress {
    padding-bottom: 40px;
  }

  :root {
    --header-h: 80px;
  }

  .hero {
    min-height: 0;
    display: block;
    padding: calc(var(--header-h) + 28px) 0 var(--panel-gap);
  }
  .hero__panel {
    top: auto;
    left: var(--panel-gap);
    right: var(--panel-gap);
    height: 52vw;
    min-height: 320px;
  }
  .icon-btn {
    color: var(--navy-800);
    border-color: var(--navy-800);
    background: transparent;
  }

  .hero__content {
    max-width: 640px;
  }
  .hero__title {
    font-size: clamp(2rem, 6.4vw, 2.7rem);
  }

  .hero__people {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    height: 52vw;
    min-height: 320px;
    margin-top: 44px;
  }
  .person--pedro {
    left: 4%;
    height: 91.1%;
    bottom: 0;
  }
  .person--antonio {
    left: 32%;
    height: 94%;
    bottom: 0;
  }
}

@media (max-width: 620px) {
  .container,
  .hero__inner {
    width: min(1440px, 100% - 36px);
  }
  .logo__mark {
    width: 40px;
    height: 40px;
  }
  .logo__word {
    font-size: 1.35rem;
  }
  .logo__tag {
    font-size: 0.55rem;
    letter-spacing: 0.14em;
  }
  .icon-btn {
    width: 42px;
    height: 42px;
  }
  .nav-toggle {
    width: 42px;
    height: 42px;
  }

  .eyebrow {
    font-size: 0.72rem;
  }
  .hero__text {
    font-size: 1rem;
  }
  .hero__actions {
    gap: 12px;
    margin-top: 30px;
  }
  .btn:not(.btn--header) {
    width: 100%;
    padding: 15px 22px;
  }

  .hero__panel,
  .hero__people {
    height: 82vw;
    min-height: 0;
  }
  .logo__tag {
    display: none;
  }
  .person--pedro {
    left: 1%;
  }
  .person--antonio {
    left: 30%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto;
  }
  .headline {
    transform: none !important;
  }
}
