/* ==========================================================
   Dr. Pedro Funari — site institucional
   Cores extraídas da identidade (cartão de visita)
   ========================================================== */
:root {
  --blue: #00649D;
  --blue-700: #004E7B;
  --blue-900: #04243A;
  --ink: #0B1B26;
  --grey: #6D6E70;
  --grey-300: #A7A9AC;
  --line: #E3E8EC;
  --paper: #FFFFFF;
  --mist: #F3F6F8;
  --cyan: #8CC3E6; /* tom claro do azul da marca, para texto sobre fundo escuro */
  --night: #0B1C2A;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;

  --radius: 16px;
  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::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);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
h3 { font-size: 1.45rem; font-weight: 500; }
p { margin: 0 0 1em; }

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--cyan); }

.todo { background: #FFF4C2; color: #6B5300; font-style: normal; padding: 0 4px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 500; font-size: 1rem;
  text-decoration: none;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px -10px rgba(0,100,157,.7); }
.btn--primary:hover { background: var(--blue-700); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--white { background: #fff; color: var(--blue); }
.btn--sm { padding: 10px 18px; font-size: .92rem; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 30px -18px rgba(4,36,58,.35); }
.header:not(.is-solid) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.header:not(.is-solid) .brand__symbol { filter: brightness(0) invert(1); }
.header:not(.is-solid) .brand__name { color: #fff; }
.header:not(.is-solid) .brand__sub { color: rgba(255,255,255,.7); }
.header:not(.is-solid) .burger span { background: #fff; }
@media (min-width: 921px) {
  .header:not(.is-solid) .nav a:not(.btn) { color: #fff; }
  .header:not(.is-solid) .nav a:not(.btn)::after { background: #fff; }
  .header:not(.is-solid) .nav__cta { background: #fff; color: var(--blue); box-shadow: none; }
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__symbol { width: 40px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); font-size: 1.6rem; color: var(--blue); font-weight: 400; letter-spacing: .01em; }
.brand__sub { font-family: var(--font-display); font-size: .82rem; color: var(--grey); font-weight: 300; letter-spacing: .04em; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { text-decoration: none; font-size: .95rem; color: var(--ink); position: relative; padding: 6px 0; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--blue); transition: right .3s var(--ease); }
.nav a:not(.btn):hover::after, .nav a.is-current::after { right: 0; }

.burger { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 6px 0; transition: transform .3s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero (foto) ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 920px);
  display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 48px) 0 88px;
  background: var(--night);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg, .hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__bg img { object-fit: cover; object-position: 60% 25%; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,28,42,.94) 0%, rgba(11,28,42,.82) 32%, rgba(11,28,42,.25) 58%, rgba(11,28,42,.05) 100%),
    linear-gradient(0deg, rgba(11,28,42,.85) 0%, rgba(11,28,42,0) 40%);
}
.hero__content { position: relative; }
.hero__content > * { max-width: 600px; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(2.7rem, 6.2vw, 5.4rem);
  line-height: .94;
  letter-spacing: .005em;
  color: #fff;
  margin-bottom: 18px;
}
.hero__place { margin: 4px 0 6px; }
.hero__sub { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.3; color: #9FC6E2; font-weight: 500; margin-bottom: 26px; }
.hero__lead { font-size: 1.05rem; color: rgba(255,255,255,.78); max-width: 520px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn--cta { background: var(--blue); color: #fff; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; border-radius: 6px; box-shadow: 0 12px 28px -12px rgba(0,100,157,.9); }
.btn--cta:hover { background: #0A78B8; }
.btn--outline-light { border-color: rgba(255,255,255,.35); color: #fff; border-radius: 6px; }
.btn--outline-light:hover { border-color: #fff; }

/* Faixa de credenciais */
.creds { background: var(--night); color: #fff; border-top: 1px solid rgba(255,255,255,.08); }
.creds__list { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.creds__list li { padding: 26px 22px; display: flex; flex-direction: column; gap: 2px; }
.creds__list li:first-child { padding-left: 0; }
.creds__list li + li { border-left: 1px solid rgba(255,255,255,.1); }
.creds__list strong { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; letter-spacing: .02em; color: #fff; }
.creds__list span { font-size: .88rem; color: #8FA6B6; }


.dot { width: 8px; height: 8px; border-radius: 50%; background: #FF4D4D; box-shadow: 0 0 0 0 rgba(255,77,77,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,77,.6); } 70% { box-shadow: 0 0 0 10px rgba(255,77,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); } }

/* ---------- Section heads ---------- */
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head > p:not(.eyebrow) { color: #4A5A65; font-size: 1.1rem; }
.section-head--light h2 { color: #fff; }
.section-head--light > p:not(.eyebrow) { color: #A9BCCB; }

/* ---------- Robotics ---------- */
.robotics {
  position: relative;
  background: var(--night);
  color: #DDE7EE;
  padding: 120px 0;
  overflow: clip;
  isolation: isolate;
}

.robotics__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: start; }

/* Simulador */
.sim {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(92,200,245,.22);
  border-radius: 24px;
  padding: 20px;
  position: sticky; top: calc(var(--header-h) + 24px);
}
.sim__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sim__label { font-family: var(--font-display); letter-spacing: .16em; text-transform: uppercase; font-size: .85rem; color: #fff; display: inline-flex; align-items: center; gap: 10px; }
.sim__hint { font-size: .85rem; color: #8FA6B6; }
.sim__stage { position: relative; border-radius: 16px; overflow: hidden; background: #02080D; aspect-ratio: 16 / 11; touch-action: none; cursor: crosshair; }
#simCanvas { width: 100%; height: 100%; display: block; }
.sim__legend { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: #B9C9D4; pointer-events: none; }
.sw { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.sw--hand { background: #8C96A0; }
.sw--robot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.sim__controls { display: flex; gap: 10px; margin: 16px 0 12px; flex-wrap: wrap; }
.toggle {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.05); color: #DDE7EE;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 10px 16px;
  font: inherit; font-size: .92rem; cursor: pointer;
  transition: background .25s, border-color .25s;
}
.toggle__dot { width: 30px; height: 18px; border-radius: 999px; background: rgba(255,255,255,.2); position: relative; transition: background .25s; flex: none; }
.toggle__dot::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.toggle.is-on { border-color: rgba(92,200,245,.5); background: rgba(92,200,245,.1); }
.toggle.is-on .toggle__dot { background: var(--cyan); }
.toggle.is-on .toggle__dot::after { transform: translateX(12px); }
.sim__note { font-size: .82rem; color: #7F95A5; margin: 0; }

.robotics__side { display: flex; flex-direction: column; gap: 28px; }
.robotics__video { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid rgba(92,200,245,.2); }
.robotics__video video { width: 100%; height: 100%; object-fit: cover; }
.robotics__video-tag { position: absolute; left: 14px; bottom: 14px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: #fff; background: rgba(11,28,42,.6); padding: 5px 12px; border-radius: 999px; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.features li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.08); }
.features__num { font-family: var(--font-display); color: var(--cyan); font-size: 1.1rem; letter-spacing: .06em; padding-top: 2px; }
.features h3 { color: #fff; font-size: 1.3rem; margin-bottom: 4px; }
.features p { color: #9FB3C2; margin: 0; font-size: .97rem; }

/* Comparativo */
.compare { margin-top: 80px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); border-radius: 24px; padding: 28px; }
.compare__tabs { display: inline-flex; background: rgba(255,255,255,.06); border-radius: 999px; padding: 4px; margin-bottom: 26px; flex-wrap: wrap; }
.compare__tabs button { font: inherit; font-size: .95rem; border: 0; background: none; color: #A9BCCB; padding: 10px 20px; border-radius: 999px; cursor: pointer; transition: background .25s, color .25s; }
.compare__tabs button.is-active { background: var(--blue); color: #fff; }
.compare__rows { display: grid; gap: 4px; }
.compare__row { display: grid; grid-template-columns: 140px 1fr 1.1fr; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.compare__k { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; color: #7F95A5; }
.compare__v { color: #fff; }
.bar { height: 6px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.bar__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .8s var(--ease); }
.compare__foot { margin: 18px 0 0; font-size: .9rem; color: #7F95A5; }

/* ---------- Specialties ---------- */
.specialties { padding: 120px 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative;
  padding: 32px 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(4,36,58,.35); border-color: rgba(0,100,157,.3); }
.card__icon { width: 44px; height: 44px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 22px; }
.card h3 { color: var(--ink); }
.card p { color: #4A5A65; font-size: .98rem; margin: 0; }
.card__link { display: inline-block; margin-top: 16px; color: var(--blue); text-decoration: none; font-weight: 500; }
.card--accent { background: var(--blue); border-color: var(--blue); }
.card--accent h3, .card--accent p, .card--accent .card__link { color: #fff; }
.card--accent .card__icon { stroke: #fff; }

/* ---------- Bariatric ---------- */
.bariatric { padding: 120px 0; background: var(--mist); }
.bariatric__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 72px; align-items: center; }
.bariatric__media img { border-radius: 24px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.bariatric p { color: #4A5A65; }
.journey { list-style: none; padding: 0; margin: 36px 0 0; counter-reset: s; position: relative; }
.journey::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(var(--blue), rgba(0,100,157,.1)); }
.journey li { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 12px 0; position: relative; }
.journey__step { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--blue); color: var(--blue); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.2rem; }
.journey h3 { font-size: 1.3rem; margin-bottom: 2px; }
.journey p { margin: 0; font-size: .97rem; }

/* ---------- About ---------- */
.about { padding: 120px 0; }
.about__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; }
.about__role { font-family: var(--font-display); color: var(--blue); font-size: 1.2rem; letter-spacing: .02em; }
.about p { color: #3E4E59; }
.timeline { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.timeline li { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: baseline; font-size: .97rem; font-weight: 500; }
.timeline span { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; letter-spacing: .03em; color: var(--blue); }
.timeline small { display: block; font-size: .88rem; font-weight: 400; color: var(--grey); margin-top: 2px; }
/* Pesquisa científica */
.research { margin-top: 32px; padding: 26px 26px 10px; border-radius: 18px; background: var(--mist); border: 1px solid var(--line); }
.research__head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.research__icon { flex: none; width: 52px; height: 52px; padding: 11px; border-radius: 14px; background: var(--blue); fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.research__icon circle { fill: #fff; stroke: none; }
.research__head h3 { margin: 0 0 2px; font-size: 1.45rem; color: var(--ink); }
.research__head p { margin: 0; font-size: .93rem; color: var(--grey); }
.research__list { list-style: none; margin: 0; padding: 0; }
.research__list li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.research__list svg { width: 30px; height: 30px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.research__list strong { display: block; font-weight: 600; font-size: .98rem; color: var(--ink); }
.research__list span { display: block; font-size: .9rem; color: #4A5A65; }
.about__media { position: relative; }
.about__media > img { border-radius: 24px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about__quote {
  position: absolute; left: -32px; bottom: 32px; max-width: 320px;
  background: var(--blue); color: #fff; padding: 24px 26px; border-radius: 18px;
  box-shadow: 0 30px 50px -24px rgba(0,100,157,.6);
}
.about__quote img { width: 34px; margin-bottom: 10px; }
.about__quote p { margin: 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; color: #fff; }

/* ---------- Gallery ---------- */
.gallery { overflow: hidden; padding: 0 0 120px; }
.gallery__track { display: flex; gap: 16px; width: max-content; animation: marquee 50s linear infinite; }
.gallery__track img { height: 360px; width: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 18px; }
.gallery:hover .gallery__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- FAQ ---------- */
.faq { padding: 120px 0; background: var(--mist); }
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.faq .section-head { position: sticky; top: calc(var(--header-h) + 32px); margin: 0; }
.faq__photo { margin-top: 28px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 18px; }
.faq__list details { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; transition: border-color .25s; }
.faq__list details[open] { border-color: rgba(0,100,157,.35); }
.faq__list summary { list-style: none; cursor: pointer; padding: 22px 60px 22px 24px; font-weight: 500; position: relative; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--blue); transition: transform .3s var(--ease); font-weight: 300; }
.faq__list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__list details p { padding: 0 24px 22px; margin: 0; color: #4A5A65; }

/* ---------- Contact ---------- */
.contact { background: var(--blue); color: #fff; padding: 110px 0; position: relative; overflow: hidden; }

.contact__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; position: relative; }
.contact__logo { width: 190px; margin-bottom: 40px; }
.contact h2 { color: #fff; }
.contact__list { list-style: none; padding: 0; margin: 24px 0 34px; }
.contact__list li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.18); }
.contact__k { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .14em; font-size: .82rem; color: rgba(255,255,255,.7); padding-top: 3px; }
.contact__list a { text-decoration: none; font-size: 1.1rem; }
.contact__list a:hover { text-decoration: underline; }
.contact__map { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: rgba(255,255,255,.1); box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.contact__map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.2) contrast(1.05); }

/* ---------- Footer ---------- */
.footer { background: var(--blue-900); color: #8FA6B6; padding: 28px 0; font-size: .88rem; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-right: 72px; }
@media (max-width: 640px) { .footer { padding-bottom: 96px; } .footer__inner { padding-right: 0; } }
.footer p { margin: 0; }
.footer__credit { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,.6); }
.footer__credit a { display: inline-flex; align-items: center; opacity: .45; transition: opacity .3s; }
.footer__credit a:hover, .footer__credit a:focus-visible { opacity: .9; }
.footer__credit img { width: 72px; height: auto; }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25D366; color: #fff;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.35);
  transition: transform .25s var(--ease);
}
.wa-float:hover { transform: scale(1.07); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gallery__track { animation: none; }
  .dot { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { gap: 20px; }
  .robotics__grid { grid-template-columns: 1fr; }
  .sim { position: relative; top: 0; }
  .robotics__side { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 920px) {
  :root { --header-h: 66px; }
  .burger { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 8px 20px 24px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav__cta { margin-top: 18px; justify-content: center; }

  .bariatric__grid, .about__grid, .faq__grid, .contact__grid { grid-template-columns: 1fr; gap: 44px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .faq .section-head { position: static; }
  .about__media { order: -1; }
  .about__quote { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .robotics, .specialties, .bariatric, .about, .faq { padding: 84px 0; }
  .contact { padding: 84px 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .brand__name { font-size: 1.4rem; }
  .brand__sub { font-size: .74rem; }
  .brand__symbol { width: 34px; }
  .cards { grid-template-columns: 1fr; }
  .robotics__side { grid-template-columns: 1fr; }
  .sim { padding: 14px; }
  .sim__stage { aspect-ratio: 1 / 1; }
  .compare { padding: 20px; }
  .compare__tabs { display: flex; width: 100%; }
  .compare__tabs button { flex: 1; padding: 10px 8px; font-size: .85rem; }
  .compare__row { grid-template-columns: 1fr; gap: 6px; }
  .contact__list li { grid-template-columns: 1fr; gap: 2px; }
  .gallery__track img { height: 280px; }
  .footer__inner { flex-direction: column; }
}

/* ---------- Hero responsivo ---------- */
@media (max-width: 1080px) {
  .creds__list { grid-template-columns: 1fr 1fr; }
  .creds__list li { padding: 20px 18px; }
  .creds__list li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .creds__list li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.1); }
}
@media (max-width: 760px) {
  .hero { min-height: 0; display: block; padding: 0 0 40px; }
  /* Foto inteira no topo, na proporção original, apagando para o escuro */
  .hero__bg { position: relative; display: block; height: auto; }
  .hero__bg img { position: relative; height: auto; aspect-ratio: 820 / 1142; object-fit: cover; }
  .hero__shade {
    top: 0; bottom: auto; height: calc(100vw * 1142 / 820);
    background: linear-gradient(0deg, rgba(11,28,42,1) 0%, rgba(11,28,42,.7) 22%, rgba(11,28,42,0) 48%),
                linear-gradient(180deg, rgba(11,28,42,.55) 0%, rgba(11,28,42,0) 18%);
  }
  .hero__content { margin-top: -38vw; }
  .hero__title { font-size: clamp(2.5rem, 11vw, 3.3rem); }
  .hero__sub { font-size: 1.2rem; margin-bottom: 18px; }
  .hero__lead { font-size: .98rem; }
  .creds__list { grid-template-columns: 1fr; }
  .creds__list li, .creds__list li + li, .creds__list li:nth-child(odd) { padding: 16px 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }

}

/* ==========================================================
   Robótica: vídeo fixo + texto rolando
   ========================================================== */
.scrolly { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.scrolly__media { position: relative; align-self: stretch; }
.scrolly__sticky {
  position: sticky; top: calc(var(--header-h) + 28px);
  border-radius: 24px; overflow: hidden;
  aspect-ratio: 4 / 5; max-height: calc(100svh - var(--header-h) - 56px);
  border: 1px solid rgba(92,200,245,.22);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.8);
}
.scrolly__sticky video { width: 100%; height: 100%; object-fit: cover; }
.scrolly__count {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--font-display); letter-spacing: .1em; font-size: .95rem; color: rgba(255,255,255,.7);
  background: rgba(11,28,42,.55); backdrop-filter: blur(8px); padding: 5px 12px; border-radius: 999px;
}
.scrolly__count b { color: var(--cyan); font-weight: 600; }
.scrolly__progress { position: absolute; left: 16px; right: 16px; bottom: 52px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.scrolly__progress i { display: block; height: 100%; width: 25%; background: var(--cyan); border-radius: inherit; transition: width .5s var(--ease); }
.scrolly__steps { list-style: none; margin: 0; padding: 8vh 0 18vh; }
.step {
  min-height: 52vh; display: flex; flex-direction: column; justify-content: center;
  opacity: .28; transform: translateX(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.step.is-active { opacity: 1; transform: none; }
.step .features__num { font-size: 1.1rem; margin-bottom: 10px; }
.step h3 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 400; margin-bottom: 12px; }
.step p { color: #A9BCCB; font-size: 1.08rem; max-width: 30em; margin: 0; }

.sim-row { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; margin-top: 40px; }
.sim-row__copy h3 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 400; }
.sim-row__copy p:not(.eyebrow) { color: #A9BCCB; }
.sim { position: relative; top: auto; }

@media (max-width: 920px) {
  .scrolly { grid-template-columns: 1fr; gap: 0; }
  .scrolly__media { height: auto; position: sticky; top: var(--header-h); z-index: 2; padding: 12px 0; background: var(--night); }
  .scrolly__sticky { position: relative; top: 0; aspect-ratio: 16 / 10; max-height: 38svh; width: 100%; }
  .scrolly__progress { bottom: 46px; }
  .scrolly__steps { padding: 4vh 0 8vh; }
  .step { min-height: 46svh; }
  .sim-row { grid-template-columns: 1fr; gap: 28px; }
}

/* ==========================================================
   Galeria arrastável
   ========================================================== */
.gallery { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.gallery::-webkit-scrollbar { display: none; }
.gallery.is-dragging { cursor: grabbing; }
.gallery__track { animation: none; padding: 0 20px; }
.gallery__track img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
.gallery__hint { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -96px 0 120px; font-size: .85rem; color: var(--grey); letter-spacing: .04em; }
.gallery__hint svg { width: 22px; height: 22px; stroke: var(--blue); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

/* ==========================================================
   Pesquisa científica: ícones animados
   ========================================================== */
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }

/* frasco: bolhas subindo */
.research__icon .bubble { transform-box: fill-box; transform-origin: center; opacity: 0; }
.research.is-visible .research__icon .bubble { animation: bubble 2.6s ease-in infinite; }
.research.is-visible .research__icon .b2 { animation-delay: .9s; }
.research.is-visible .research__icon .b3 { animation-delay: 1.7s; }
@keyframes bubble {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-16px) scale(1.2); }
}
.research__icon { transition: transform .4s var(--ease); }
.research:hover .research__icon { transform: rotate(-8deg) scale(1.05); }

/* lupa: varredura */
.ri { transform-box: fill-box; transform-origin: center; overflow: visible; }
.research.is-visible .ri--search { animation: scan 3.2s 1.5s ease-in-out infinite; }
@keyframes scan { 0%, 100% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-2px,-1px) rotate(-8deg); } 60% { transform: translate(2px,1px) rotate(6deg); } }

/* globo: meridiano girando */
.ri__meridian { transform-box: fill-box; transform-origin: center; }

@keyframes spin-y { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }

/* livro: página virando */
.ri__page { transform-box: view-box; transform-origin: 24px 24px; opacity: 0; }
.research.is-visible .ri__page { animation: page 3.4s 2s var(--ease) infinite; }
@keyframes page {
  0%, 15% { opacity: 0; transform: scaleX(1); }
  20% { opacity: 1; }
  55% { opacity: 1; transform: scaleX(-1); }
  65%, 100% { opacity: 0; transform: scaleX(-1); }
}
.research__list li { transition: transform .3s var(--ease); }
.research__list li:hover { transform: translateX(4px); }
.research__list li:hover .ri { animation-duration: 1.2s; }

/* ==========================================================
   Áreas de atuação: hover animado
   ========================================================== */
.card { overflow: hidden; isolation: isolate; --mx: 50%; --my: 50%; }
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(0,100,157,.12), transparent 70%);
  opacity: 0; transition: opacity .35s;
}
.card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.card:hover::before, .card:focus-within::before { opacity: 1; }
.card:hover::after, .card:focus-within::after { transform: scaleX(1); }
.card--accent::before { background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255,255,255,.18), transparent 70%); }
.card--accent::after { background: linear-gradient(90deg, #fff, var(--cyan)); }

.card__icon { transition: transform .45s var(--ease); transform-origin: center bottom; }
.card:hover .card__icon { transform: translateY(-4px) scale(1.1) rotate(-6deg); }

.card h3 { transition: color .3s; }
.card:not(.card--accent):hover h3 { color: var(--blue); }
.card__link { transition: letter-spacing .3s var(--ease); }
.card:hover .card__link { letter-spacing: .04em; }

@media (prefers-reduced-motion: reduce) {
  .research .drawable { animation: none !important; stroke-dashoffset: 0 !important; }
  .research .bubble, .ri, .ri__meridian, .ri__page { animation: none !important; }
  .card__icon .drawable { animation: none !important; }
  .journey li, .journey__step { transition: none !important; animation: none !important; }
  .step { opacity: 1; transform: none; }
  .gallery__hint svg { animation: none; }
}

/* Publicações */
.pubs { margin: 6px 0 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.pubs__title { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .14em; font-size: .82rem; color: var(--grey); margin: 0 0 12px; }
.pub {
  position: relative; display: block; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 10px;
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
a.pub:hover { border-color: rgba(0,100,157,.4); transform: translateY(-2px); box-shadow: 0 16px 30px -22px rgba(4,36,58,.45); }
.pub > span { display: block; }
.pub__meta { font-size: .8rem; color: var(--grey); margin-bottom: 4px; padding-right: 80px; }
.pub__meta b { color: var(--blue); font-weight: 600; }
.pub__tag { display: inline !important; background: var(--blue); color: #fff; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; }
.pub__name { font-weight: 600; font-size: .95rem; line-height: 1.35; color: var(--ink); }
.pub__pt { font-size: .86rem; color: #4A5A65; margin-top: 4px; }
.pub__go { position: absolute; top: 16px; right: 18px; font-size: .78rem; font-weight: 600; color: var(--blue); }
.pub--book { background: linear-gradient(135deg, #fff 60%, rgba(0,100,157,.06)); }
@media (max-width: 640px) { .pub__meta { padding-right: 0; } .pub__go { position: static; margin-top: 8px; } }

/* Botões de agendamento nas seções */
.section-cta { display: flex; justify-content: center; margin-top: 48px; }
.about .section-cta, .bariatric .section-cta { justify-content: flex-start; margin-top: 32px; }
.faq .section-cta { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .hero__ctas { margin-top: 24px; }
  .hero__ctas .btn, .section-cta .btn { width: 100%; justify-content: center; }
  .wa-float { width: 54px; height: 54px; right: 16px; bottom: 16px; }
}

/* ==========================================================
   Revisão de acabamento (skill taste)
   Regra de cantos: botões 8px · blocos e fotos 16px · chips/abas em pílula
   ========================================================== */
.btn { border-radius: 8px; }
.btn--cta, .btn--outline-light { border-radius: 8px; }
.card, .research, .compare, .sim, .faq__list details, .scrolly__sticky,
.bariatric__media img, .about__media > img, .faq__photo, .gallery__track img,
.contact__map, .sim__stage, .pub { border-radius: var(--radius); }
.sim__stage { border-radius: 12px; }

/* sem brilhos/neon */
.sw--robot { box-shadow: none; }
.scrolly__sticky { border-color: rgba(255,255,255,.08); box-shadow: 0 30px 60px -40px rgba(0,0,0,.6); }
.sim { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.03); }
.compare { background: rgba(255,255,255,.03); }
.card::after { background: var(--blue); }
.card--accent::after { background: #fff; }
.btn--primary, .btn--cta { box-shadow: none; }
.gallery__hint svg { animation: none; }

/* comparativo sem barras: só texto */
.compare__row { grid-template-columns: 160px 1fr 1fr; }

/* passos da robótica sem numeração */
.step { transform: none; }
.step h3 { margin-bottom: 10px; }

/* fundo da seção escura: cor sólida */
.robotics { background: var(--night); }
.creds, .hero { background-color: var(--night); }

/* Sobre: foto fixa ao lado do texto longo */
@media (min-width: 921px) {
  .about__grid { align-items: start; }
  .about__media { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* ---------- Ícones desenhados (comprimento real, funciona no Safari) ---------- */
.drawable { stroke-dasharray: var(--len); stroke-dashoffset: 0; }
.research .drawable { stroke-dashoffset: var(--len); }
.research.is-visible .drawable { animation: draw 1.1s var(--ease) both; }
.research.is-visible .research__list li:nth-child(1) .drawable { animation-delay: .35s; }
.research.is-visible .research__list li:nth-child(2) .drawable { animation-delay: .6s; }
.research.is-visible .research__list li:nth-child(3) .drawable { animation-delay: .85s; }
/* o meridiano do globo desenha e depois gira */
.research.is-visible .ri__meridian.drawable { animation: draw 1.1s .6s var(--ease) both, spin-y 2.8s 1.8s linear infinite; }
.card:hover .card__icon .drawable { animation: draw .9s var(--ease) both; }

/* ---------- Robótica: textos mais próximos ---------- */
.scrolly__steps { padding: 4vh 0 10vh; }
.step { min-height: 34vh; }
@media (max-width: 920px) {
  .scrolly__steps { padding: 2vh 0 6vh; }
  .step { min-height: 30svh; }
}

/* ---------- Bariátrica: etapas acendem em sequência ---------- */
.journey::before { background: rgba(0,100,157,.18); }
.journey::after {
  content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 1px;
  background: var(--blue); transform: scaleY(0); transform-origin: top;
  transition: transform 1.6s var(--ease) .2s;
}
.journey.is-on::after { transform: scaleY(1); }
.journey__step { position: relative; z-index: 1; transition: background .4s, color .4s, transform .4s var(--ease), box-shadow .4s; }
.journey li.is-on .journey__step { background: var(--blue); color: #fff; animation: pop .5s var(--ease); }
.journey li h3 { transition: color .3s; }
.journey li:hover .journey__step { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(0,100,157,.12); }
.journey li:hover h3 { color: var(--blue); }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
