/* Clínica Camargo — hero e cabeçalho
   Adaptação do modelo "liquid metal / liquid glass" à identidade:
   preto → Azul Profundo, prata → azul e ciano, Inter → Source Sans 3, serif itálico → Source Serif 4 itálico ciano. */

:root {
  --hx-bg: #00324A;
  --hx-text: #FFFFFF;
  --hx-muted: #B9D3DF;
  --hx-stat: #D3E7F0;
  --hx-border: rgba(211, 231, 240, .18);
  --hx-border-soft: rgba(211, 231, 240, .12);
  --hx-glow: 26, 194, 243;

  --logo: 15.5px;
  --logo-mark: 34px;
  --nav: 14px;
  --nav-h: 40px;
  --btn: 13.5px;
  --btn-h: 40px;
  --hero-btn-h: 46px;
  --h1: 50px;
  --lede: 16.5px;
  --badge: 12.5px;
  --stat-size: 13.5px;
  --header-y: 22px;
  --header-x: 40px;
  --stats-x: 72px;
  --stats-y: 36px;
  --hero-gap: 70px;
  --copy-max: 860px;
  --lede-max: 520px;
}

/* ---------------------------------------------------------------- moldura do hero */
.hx { position: relative; isolation: isolate; background: var(--hx-bg); color: var(--hx-text); overflow: hidden; }
.hx--home { min-height: 100vh; min-height: 100svh; }
.hx-page { position: relative; z-index: 1; display: grid; grid-template-rows: auto 1fr auto; min-height: inherit; }
.hx-grain {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* foto (ou vídeo) de fundo + escurecimento para leitura */
.hero-photo { position: absolute; inset: 0; z-index: 0; }
.hero-photo img, .hero-photo video { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 50, 74, .72) 0%, rgba(0, 50, 74, .18) 26%, rgba(0, 50, 74, .30) 44%, rgba(0, 50, 74, .86) 66%, #00324A 86%),
    radial-gradient(120% 70% at 50% 100%, rgba(0, 50, 74, .55), transparent 70%);
}

/* ---------------------------------------------------------------- cabeçalho (fora do main, sobreposto ao hero) */
.header-slot { position: absolute; top: 0; left: 0; right: 0; z-index: 50; }
.header-space { height: calc(var(--header-y) + max(var(--nav-h), var(--btn-h), var(--logo-mark)) + 10px); }
.header {
  position: relative; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: var(--header-y) var(--header-x) 10px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; justify-self: start; color: #fff; text-decoration: none; }
.logo svg { width: var(--logo-mark); height: var(--logo-mark); flex: none; border-radius: 9px; box-shadow: 0 0 0 1px rgba(211, 231, 240, .25); }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text strong { font-family: var(--serif); font-weight: 400; font-size: calc(var(--logo) * 1.3); letter-spacing: -.01em; }
.logo-text small { font-size: calc(var(--logo) * .62); letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--ciano); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 8px; justify-self: center; }
.nav-item { position: relative; }
.pill {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px;
  height: var(--nav-h); padding: 0 18px; border-radius: 7px;
  border: 1px solid rgba(150, 215, 240, .45);
  background: linear-gradient(105deg, #00243A 0%, #0B4F6E 48%, #2C7A99 100%);
  color: #F2FAFD; font-size: var(--nav); font-weight: 500; letter-spacing: -.01em; white-space: nowrap; text-decoration: none;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.pill::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .2) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.pill:hover, .pill:focus-visible, .pill[aria-current="page"] {
  color: #fff; border-color: rgba(var(--hx-glow), .9);
  background: linear-gradient(105deg, #012C44 0%, #0E6386 45%, #3FA6CC 100%);
  box-shadow: 0 0 18px rgba(var(--hx-glow), .25);
}
.pill:hover::before, .pill:focus-visible::before { transform: translateX(120%); }
.pill .chev { width: 12px; height: 12px; opacity: .8; }

.submenu-x {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 8px); left: 50%; min-width: 280px;
  transform: translate(-50%, 6px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  background: rgba(0, 36, 56, .9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(150, 215, 240, .3); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.submenu-x::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav-item:hover .submenu-x, .nav-item:focus-within .submenu-x { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.submenu-x li { margin: 0; }
.submenu-x a { display: block; padding: 9px 12px; border-radius: 8px; color: #E6F4FA; text-decoration: none; font-size: 14.5px; }
.submenu-x a:hover, .submenu-x a[aria-current="page"] { background: rgba(var(--hx-glow), .14); color: #fff; }

.header-cta { justify-self: end; }
.burger { display: none; }

/* ---------------------------------------------------------------- botões líquidos */
.bx {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 16px; border-radius: 6px;
  font-family: inherit; font-size: var(--btn); font-weight: 600; letter-spacing: -.01em; line-height: 1;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background .35s, border-color .35s, box-shadow .35s, color .35s, filter .35s;
}
.bx svg { width: 17px; height: 17px; flex: none; }
.bx::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, .45) 48%, transparent 76%);
  transform: translateX(-130%); transition: transform .65s ease;
}
.bx:hover::after, .bx:focus-visible::after { transform: translateX(130%); }
.bx-solid {
  background: linear-gradient(180deg, #FFFFFF 0%, #E6F6FC 48%, #BFE9F8 100%);
  color: #014665; border: 1px solid #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95);
}
.bx-solid:hover, .bx-solid:focus-visible {
  color: #014665; border-color: #EFFBFF;
  background: linear-gradient(180deg, #FFFFFF 0%, #E9FAFF 42%, #9FE0F7 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 22px rgba(var(--hx-glow), .45), 0 8px 18px rgba(255, 255, 255, .12);
}
.bx-ghost {
  background: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(0, 30, 46, .45) 50%, rgba(var(--hx-glow), .08));
  color: #fff; border: 1px solid rgba(198, 230, 242, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.bx-ghost:hover, .bx-ghost:focus-visible {
  color: #fff; border-color: rgba(var(--hx-glow), .8);
  background: linear-gradient(135deg, rgba(var(--hx-glow), .2), rgba(0, 30, 46, .35) 48%, rgba(var(--hx-glow), .16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 20px rgba(var(--hx-glow), .25);
}
.hero-actions .bx { height: var(--hero-btn-h); padding: 0 20px; font-size: calc(var(--btn) * 1.08); }
.hero-actions .bx-solid:hover { box-shadow: inset 0 1px 0 #fff, 0 0 26px rgba(var(--hx-glow), .5), 0 8px 18px rgba(255, 255, 255, .14); }
.hero-actions .bx-ghost {
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(0, 30, 46, .5) 46%, rgba(var(--hx-glow), .1));
  border-color: rgba(198, 230, 242, .55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.hero-actions .bx-ghost:hover { border-color: rgba(var(--hx-glow), .85); box-shadow: 0 0 24px rgba(var(--hx-glow), .3); }

/* ---------------------------------------------------------------- conteúdo do hero */
.hx-main { display: flex; align-items: flex-end; justify-content: center; padding: 8px 24px var(--hero-gap); min-height: 0; }
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; max-width: var(--copy-max); width: 100%; }

.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 9px 15px; border: 0; border-radius: 5px;
  background: linear-gradient(90deg, #1F7FA6 0%, #0B4F6E 52%, #012A40 100%);
  box-shadow: inset 0 0 0 1px rgba(150, 215, 240, .22);
  color: #F2FAFD; font-size: var(--badge); font-weight: 500; letter-spacing: .01em;
}
.badge-star { width: 18px; height: 20px; color: #fff; filter: drop-shadow(0 0 4px rgba(var(--hx-glow), .8)); flex: none; }

.hx h1 {
  display: flex; flex-direction: column; align-items: inherit; margin: 0;
  font-family: var(--sans); font-weight: 600; font-size: var(--h1); line-height: 1.1; letter-spacing: -.035em; color: #fff;
}
.headline-line { display: block; overflow: hidden; padding: .06em .15em .14em; }
.headline-line > span { display: inline-block; }
.hx h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.08em; letter-spacing: -.02em; color: var(--ciano); white-space: nowrap; }
.lede { max-width: var(--lede-max); margin: 18px 0 0; color: var(--hx-muted); font-size: var(--lede); line-height: 1.55; letter-spacing: -.005em; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }

/* ---------------------------------------------------------------- números de destaque */
.stats {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--stats-x) var(--stats-y); padding-bottom: max(var(--stats-y), env(safe-area-inset-bottom)); color: var(--hx-stat);
}
.stat { display: inline-flex; align-items: center; gap: 14px; font-size: var(--stat-size); letter-spacing: -.005em; white-space: nowrap; color: inherit; text-decoration: none; }
a.stat:hover { color: #fff; }
.stat strong { color: #fff; font-weight: 600; }
.stat-icon { width: 22px; height: 22px; flex: none; }
.stat-icon-wide { width: 42px; height: 23px; flex: none; }

/* ---------------------------------------------------------------- hero das páginas internas */
.hx--page { padding-bottom: 8px; }
.hx-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 2.5rem 3rem; padding-top: clamp(1.5rem, 4vw, 3rem); padding-bottom: 1.5rem; }
.hx-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.hx--page h1 { align-items: flex-start; font-size: calc(var(--h1) * .92); }
.hx--page .headline-line { padding-left: 0; }
.hx--page .lede { max-width: 600px; }
.hx--page .hero-actions { justify-content: flex-start; }
.hx-art { flex: 1 1 300px; min-width: 0; max-width: 380px; margin: 0 auto; }

/* ---------------------------------------------------------------- cabeçalho fixo ao rolar */
.is-stuck .header {
  position: fixed; top: 0; left: 0; right: 0; padding-top: 10px; padding-bottom: 10px;
  background: rgba(0, 40, 60, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hx-border-soft); box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  animation: desce .35s ease both;
}
@keyframes desce { from { transform: translateY(-100%); } to { transform: none; } }

/* ---------------------------------------------------------------- entrada (opacidade de repouso = 1) */
.appear {
  animation-duration: 1.05s; animation-fill-mode: both;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1); animation-delay: var(--d, .08s);
}
.appear--scale { animation-name: in-scale; }
.appear--soft { animation-name: in-soft; }
.appear--mask { animation-name: in-mask; }
.appear--pop { animation-name: in-pop; }
.appear--btn { animation-name: in-btn; }
.appear--side { animation-name: in-side; }
.appear--stat { animation-name: in-stat; }
.lede.appear { animation-duration: 1.25s; }
.badge-star { animation: in-star .9s .28s cubic-bezier(.16, 1, .3, 1) both; }
.hx h1 em { animation: in-em 1.2s .72s ease both; }
.hero-photo { animation: in-photo 1.8s cubic-bezier(.16, 1, .3, 1) both; }
.appear.is-in, .hero-photo.is-in { animation: none; opacity: 1; transform: none; clip-path: none; filter: none; }

@keyframes in-scale { from { opacity: 0; transform: scale(.84); } to { opacity: 1; transform: none; } }
@keyframes in-soft { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes in-mask { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }
@keyframes in-pop { 0% { opacity: 0; transform: scale(.9); } 70% { opacity: 1; transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes in-btn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes in-side { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes in-stat { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes in-star { 0% { transform: scale(.2) rotate(-50deg); } 65% { transform: scale(1.2) rotate(8deg); } 100% { transform: none; } }
@keyframes in-em { from { opacity: .35; filter: blur(4px); } to { opacity: 1; filter: none; } }
@keyframes in-photo { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .appear, .hero-photo, .hx h1 em, .badge-star { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; }
}

/* ---------------------------------------------------------------- telas grandes */
@media (min-width: 1280px) and (max-width: 1599px) {
  :root { --h1: 56px; --lede: 17px; --header-x: 48px; --stats-x: 80px; --copy-max: 900px; }
}
@media (min-width: 1600px) {
  :root { --logo: 17px; --logo-mark: 38px; --nav: 15px; --nav-h: 44px; --btn: 15px; --btn-h: 44px; --hero-btn-h: 50px; --h1: 66px; --lede: 18.5px; --badge: 13.5px; --stat-size: 15px; --header-y: 28px; --header-x: 64px; --stats-x: 96px; --stats-y: 44px; --copy-max: 980px; --lede-max: 580px; }
  .pill { padding: 0 20px; }
  .badge { margin-bottom: 26px; }
  .lede { margin-top: 22px; }
  .hero-actions { margin-top: 30px; gap: 12px; }
  .stat-icon { width: 24px; height: 24px; }
  .stat-icon-wide { width: 46px; height: 25px; }
}
@media (min-width: 1920px) {
  :root { --logo: 18px; --logo-mark: 42px; --nav: 16px; --nav-h: 48px; --btn: 16px; --btn-h: 48px; --hero-btn-h: 54px; --h1: 78px; --lede: 20px; --badge: 14.5px; --stat-size: 16px; --header-y: 32px; --header-x: 80px; --stats-x: 120px; --stats-y: 52px; --copy-max: 1120px; --lede-max: 640px; }
  .nav { gap: 10px; }
  .pill { padding: 0 22px; }
  .bx { padding: 0 22px; }
  .badge { padding: 10px 15px; }
}
@media (min-width: 2560px) {
  :root { --h1: 90px; --lede: 22px; --header-x: 120px; --stats-x: 160px; --copy-max: 1280px; --lede-max: 700px; }
}

/* ---------------------------------------------------------------- notebooks e tablets */
@media (min-width: 901px) and (max-width: 1279px) {
  :root { --logo: 15px; --logo-mark: 32px; --nav: 13px; --nav-h: 36px; --btn: 13px; --btn-h: 38px; --hero-btn-h: 42px; --h1: 44px; --lede: 15.5px; --badge: 12px; --stat-size: 12.5px; --header-y: 16px; --header-x: 28px; --stats-x: 36px; --stats-y: 28px; --hero-gap: 56px; --copy-max: 760px; --lede-max: 460px; }
  .pill { padding: 0 14px; }
  .badge { margin-bottom: 16px; }
  .lede { margin-top: 14px; }
  .hero-actions { margin-top: 20px; }
}
@media (min-width: 901px) and (max-height: 850px) {
  :root { --header-y: 14px; --stats-y: 24px; --hero-gap: 44px; --h1: 42px; }
  .badge { margin-bottom: 12px; }
  .lede { margin-top: 12px; }
  .hero-actions { margin-top: 16px; }
}
@media (min-width: 901px) and (max-height: 720px) {
  :root { --h1: 36px; --lede: 14.5px; --hero-gap: 30px; --stats-y: 18px; --nav-h: 32px; --btn-h: 34px; --hero-btn-h: 38px; }
  .badge { margin-bottom: 8px; }
}

/* ---------------------------------------------------------------- celular */
.menu-backdrop { display: none; }
@media (max-width: 900px) {
  :root { --logo: 15px; --logo-mark: 34px; --btn: 15px; --btn-h: 44px; --hero-btn-h: 50px; --h1: 38px; --lede: 16.5px; --badge: 12.5px; --stat-size: 15px; --header-y: 14px; --header-x: 16px; --stats-x: 20px; --stats-y: 28px; --hero-gap: 34px; }
  .header { grid-template-columns: 1fr auto auto; gap: 8px; padding-top: max(var(--header-y), env(safe-area-inset-top)); padding-left: max(var(--header-x), env(safe-area-inset-left)); padding-right: max(var(--header-x), env(safe-area-inset-right)); }
  .logo, .header-cta, .burger { position: relative; z-index: 80; }
  .header-cta { padding: 0 12px; }
  .header-cta .cta-long { display: none; }
  .burger {
    display: grid; place-content: center; gap: 5px; width: 44px; height: 44px; border-radius: 6px; cursor: pointer;
    border: 1px solid var(--hx-border); background: rgba(0, 30, 46, .55); transition: border-color .2s, background .2s;
  }
  .burger:hover { border-color: rgba(211, 231, 240, .32); background: rgba(255, 255, 255, .05); }
  .burger span { display: block; width: 16px; height: 1.5px; border-radius: 1px; background: #fff; transition: transform .25s ease, opacity .2s ease; }
  .menu-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .menu-open .burger span:nth-child(2) { opacity: 0; }
  .menu-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 24, 36, .55); opacity: 0; visibility: hidden; transition: opacity .28s, visibility .28s, backdrop-filter .28s; }
  .menu-open .menu-backdrop { opacity: 1; visibility: visible; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
  .nav {
    position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px;
    padding: 96px 22px 32px; padding-top: max(96px, calc(env(safe-area-inset-top) + 88px)); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .28s, visibility .28s, transform .28s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  .menu-open { overflow: hidden; }
  .nav .pill { width: 100%; height: 56px; font-size: 19px; border-radius: 10px; justify-content: center; }
  .pill .chev { display: none; }
  .submenu-x { position: static; transform: none; opacity: 1; visibility: visible; min-width: 0; margin-top: 8px; background: rgba(0, 36, 56, .6); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
  .submenu-x a { font-size: 15px; padding: 11px 12px; }
  .is-stuck .header { animation: none; backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(0, 40, 60, .97); }
  .menu-open .call-bar { display: none; }

  .hx--home { min-height: 100svh; }
  .hx-main { padding: 20px 20px var(--hero-gap); }
  .stats { flex-direction: column; justify-content: center; gap: 16px; }
  .stat { white-space: normal; }
  .hero-copy, .lede { max-width: 100%; }
  .hero-photo img, .hero-photo video { object-position: 32% 30%; }
  .hx-art { max-width: 240px; }
}
@media (max-width: 720px) {
  /* a barra fixa "Ligar / Como chegar" ocupa 68px no rodapé da tela */
  .hx--home { min-height: calc(100svh - 68px); }
  .stats { gap: 10px; padding-bottom: 22px; }
  .stat { font-size: 14px; }
}
@media (max-width: 560px) {
  :root { --h1: 34px; --lede: 16px; --header-x: 14px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .bx { width: 100%; }
  .submenu-x { grid-template-columns: 1fr; }
  .logo-text small { letter-spacing: .08em; }
}
