:root {
  --azul: #1B3FD6;
  --claro: #EEF2FF;
  --marinho: #0E1533;
  --laranja: #FF8A3D;
  --texto-2: #2B3558;
  --sobre-azul: #E4EAFF;
  --titulo: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --corpo: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #FFFFFF; color: var(--marinho); font-family: var(--corpo); font-size: 16px; line-height: 1.6; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--titulo); letter-spacing: -.035em; text-wrap: balance; }
a { color: var(--azul); }
a:hover { color: var(--marinho); }
:focus-visible { outline: 3px solid var(--laranja); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: 76px; }
.pular { position: absolute; left: -9999px; top: 8px; background: var(--marinho); color: #FFFFFF; padding: 12px 16px; border-radius: 8px; z-index: 40; }
.pular:focus { left: 8px; color: #FFFFFF; }
.pg { position: relative; overflow-x: clip; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; width: 100%; }

/* Cabeçalho */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.top-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 32px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: flex-end; gap: 10px; text-decoration: none; color: var(--azul); font-family: var(--titulo); font-weight: 700; font-size: 28px; letter-spacing: -.03em; line-height: 1; min-height: 44px; }
.brand:hover { color: var(--azul); }
.brand svg { display: block; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 0 26px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--marinho); text-decoration: none; padding: 12px 0; }
.nav a:hover { color: var(--azul); }
.prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--laranja); transform-origin: 0 50%; transform: scaleX(0); }

/* Trilha de fundo */
.trail { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.trail path { fill: none; stroke: var(--laranja); stroke-width: 3; stroke-linecap: round; opacity: .38; stroke-dasharray: 1; }

/* Botões e textos comuns */
.eyebrow { font-family: var(--corpo); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--azul); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 28px; border-radius: 999px; font-family: var(--titulo); font-weight: 600; font-size: 16px; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .2s ease, background-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-o { background: var(--laranja); color: #1A1206; }
.btn-o:hover { color: #1A1206; }
.btn-l { border-color: var(--marinho); color: var(--marinho); }
.btn-l:hover { color: var(--marinho); background: var(--claro); }
.btn-b { background: var(--azul); color: #FFFFFF; }
.btn-b:hover { color: #FFFFFF; }
.btn-m { background: #A94812; color: #FFFFFF; border-radius: 12px; font-family: 'Plus Jakarta Sans', var(--corpo); }
.btn-m:hover { color: #FFFFFF; background: #8F390B; }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }
.h2 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.04; font-weight: 700; }
.sub { font-size: 18px; color: var(--texto-2); max-width: 460px; }

/* Hero */
.hero { position: relative; z-index: 1; padding: 32px 0 56px; min-height: calc(100svh - 64px); display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 48px; align-items: center; }
.hero-txt { display: flex; flex-direction: column; gap: 26px; }
.hero h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.02; font-weight: 700; }
.hero h1 span { color: var(--azul); }
.lead { font-size: 19px; color: var(--texto-2); max-width: 540px; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }
.mark-wrap { justify-self: center; width: 100%; max-width: 500px; }
.mark { position: relative; aspect-ratio: 680 / 588; width: 100%; }
.mark svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.scrollhint { display: inline-flex; align-items: center; gap: 10px; margin-top: 36px; font-size: 14px; color: var(--texto-2); font-weight: 500; }
.scrollhint i { display: block; width: 2px; height: 36px; background: var(--marinho); border-radius: 2px; }

/* O que fazemos: cartões que se empilham */
.svc { position: relative; z-index: 1; padding: 96px 0 40px; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 48px 72px; align-items: start; }
.svc-head { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 36px; padding-bottom: 96px; }
.card { position: sticky; min-height: 360px; border-radius: 32px; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; box-shadow: 0 30px 60px -30px rgba(14,21,51,.45); }
.card h3 { font-size: 30px; font-weight: 700; line-height: 1.1; }
.card p { font-size: 17px; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-txt { display: flex; flex-direction: column; gap: 12px; }
.num { font-family: var(--titulo); font-weight: 700; font-size: 15px; letter-spacing: .08em; }
.shape { width: 56px; height: 56px; display: block; }
.c1 { top: 96px; background: var(--claro); color: var(--marinho); }
.c1 p { color: var(--texto-2); }
.c1 .shape { border-radius: 50%; background: var(--azul); }
.c2 { top: 122px; background: var(--azul); color: #FFFFFF; }
.c2 p { color: var(--sobre-azul); }
.c2 .shape { background: var(--laranja); }
.c3 { top: 148px; background: var(--marinho); color: #FFFFFF; }
.c3 p { color: var(--sobre-azul); }
.c3 .shape { border-radius: 56px 56px 0 0; background: #6E8BF5; }
.c4 { top: 174px; background: var(--laranja); color: #1A1206; }
.c4 .shape { border-radius: 0 56px 56px 0; background: var(--marinho); }

/* Produto: MedIter */
.mx { position: relative; z-index: 1; padding: 110px 0 60px; }
.mx-pre { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 0 24px; margin-bottom: 48px; }
.mx-pre h2 { font-size: clamp(36px, 6vw, 88px); font-weight: 700; line-height: 1; }
.mx-panel { position: relative; margin: 0 16px; border-radius: 40px; background: #EDE8DF; color: #1C1917; font-family: 'Plus Jakarta Sans', var(--corpo); padding: 72px 0; overflow: hidden; }
.mx-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 40px 72px; align-items: center; }
.mx-name { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.mx-name h3 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(46px, 7vw, 100px); font-weight: 700; line-height: 1; letter-spacing: -.02em; display: flex; align-items: center; gap: .3em; color: #1C1917; }
.mx-name h3 svg { width: 1.28em; height: 1.28em; flex: none; display: block; }
.mx-name h3 b { font-weight: 700; color: #A94812; }
.mx-name p { color: #5C534C; font-size: 19px; }
.pill { background: #E7F5F1; color: #155850; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; }
.mx-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.mx-txt p { font-size: 20px; color: #5C534C; line-height: 1.55; }
.ring { position: absolute; right: -180px; bottom: -260px; width: 640px; height: 640px; border-radius: 50%; border: 2px solid #DDD8CE; pointer-events: none; }
.ring2 { position: absolute; right: -60px; bottom: -140px; width: 400px; height: 400px; border-radius: 50%; border: 2px solid #F0CBAA; pointer-events: none; }

/* Como trabalhamos */
.pil { position: relative; z-index: 1; padding: 100px 0 80px; }
.pil h2 { margin-top: 16px; max-width: 760px; }
.pil-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 48px; margin-top: 56px; }
.pil-item { display: flex; flex-direction: column; gap: 14px; background: #FFFFFF; padding: 8px 0; }
.big-n { font-family: var(--titulo); font-weight: 800; font-size: 120px; line-height: .9; color: #FFFFFF; -webkit-text-stroke: 4px var(--azul); paint-order: stroke fill; letter-spacing: -.04em; }
.pil-item h3 { font-size: 24px; font-weight: 700; }
.pil-item p { color: var(--texto-2); font-size: 17px; }

/* Oportunidades */
.opp { position: relative; z-index: 1; padding: 80px 0 120px; }
.opp h2 { margin-top: 16px; max-width: 820px; }
.opp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 20px; margin-top: 48px; }
.door { display: flex; flex-direction: column; gap: 14px; padding: 30px; border: 2px solid var(--marinho); border-radius: 28px; text-decoration: none; color: var(--marinho); background: #FFFFFF; min-height: 280px; transition: background-color .3s ease, color .3s ease, translate .3s ease; }
.door:hover { background: var(--marinho); color: #FFFFFF; translate: 0 -8px; }
.door h3 { font-size: 22px; font-weight: 700; }
.door p { flex-grow: 1; font-size: 16px; }
.go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.go svg { transition: transform .3s ease; }
.door:hover .go svg { transform: translateX(6px); }

/* Sobre */
.about { position: relative; z-index: 1; background: var(--azul); color: #FFFFFF; padding: 140px 0; }
.about-in { display: flex; flex-direction: column; gap: 40px; max-width: 1040px; }
.about h2 { font-size: clamp(40px, 6vw, 84px); font-weight: 700; line-height: 1; }
.about h2 span { color: var(--laranja); }
.fill-p { font-family: var(--titulo); font-weight: 600; font-size: clamp(24px, 3vw, 40px); line-height: 1.3; letter-spacing: -.02em; }
.fill { background-image: linear-gradient(#FFFFFF, #FFFFFF), linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.3)); background-repeat: no-repeat; background-size: 100% 100%, 100% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Contato */
.ct { position: relative; z-index: 1; background: #FFFFFF; padding: 120px 0; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 48px 72px; }
.ct-intro { display: flex; flex-direction: column; gap: 18px; }
form { display: flex; flex-direction: column; gap: 18px; }
.campo { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 14px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 52px; padding: 0 16px; border: 2px solid var(--marinho); border-radius: 14px; font: inherit; color: var(--marinho); background: #FFFFFF; }
textarea { padding: 14px 16px; min-height: 130px; resize: vertical; }
.armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form .btn { align-self: flex-start; }
.aviso { font-size: 15px; font-weight: 500; min-height: 24px; }
.aviso.ok { color: #0B6B3A; }
.aviso.erro { color: #B3261E; }
.fine { font-size: 14px; color: var(--texto-2); }

/* Rodapé */
.foot { position: relative; z-index: 1; background: var(--marinho); color: var(--sobre-azul); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding-top: 32px; padding-bottom: 32px; font-size: 15px; }
.foot a { color: var(--sobre-azul); }
.foot a:hover { color: #FFFFFF; }
.foot .brand { color: #FFFFFF; font-size: 22px; gap: 8px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Páginas de texto (privacidade, 404) */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 32px 96px; display: flex; flex-direction: column; gap: 20px; min-height: calc(100svh - 170px); }
.doc h1 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.1; }
.doc h2 { font-size: 22px; letter-spacing: -.015em; margin-top: 16px; }
.doc p, .doc li { color: var(--texto-2); font-size: 17px; }
.doc ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

/* Entrada (ao abrir a página) */
@keyframes enterL { from { opacity: 0; transform: translate(-18%, 12%) rotate(-10deg); } }
@keyframes enterR { from { opacity: 0; transform: translate(16%, 14%) rotate(8deg); } }
@keyframes enterDot { from { opacity: 0; transform: translateY(-70%) scale(.3); } }
@keyframes upIn { from { opacity: 0; transform: translateY(28px); } }
@keyframes hint { 0% { transform: scaleY(0); transform-origin: 50% 0; } 50% { transform: scaleY(1); transform-origin: 50% 0; } 51% { transform-origin: 50% 100%; } 100% { transform: scaleY(0); transform-origin: 50% 100%; } }

@media (prefers-reduced-motion: no-preference) {
  .b1 { animation: enterL 1.1s cubic-bezier(.2,.8,.2,1) both; }
  .b2 { animation: enterR 1.1s .12s cubic-bezier(.2,.8,.2,1) both; }
  .b3 { animation: enterDot 1s .45s cubic-bezier(.3,1.5,.5,1) both; }
  .hero-txt > * { animation: upIn .8s cubic-bezier(.2,.8,.2,1) both; }
  .hero-txt > *:nth-child(2) { animation-delay: .08s; }
  .hero-txt > *:nth-child(3) { animation-delay: .16s; }
  .hero-txt > *:nth-child(4) { animation-delay: .24s; }
  .scrollhint i { animation: hint 1.8s ease-in-out infinite; }

  /* Efeitos ligados à rolagem (navegadores com suporte) */
  @supports (animation-timeline: scroll()) {
    .prog { animation: grow linear both; animation-timeline: scroll(); }
    @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    .trail path { animation: draw linear both; animation-timeline: scroll(); }
    @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
    .mark-wrap { animation: drift linear both; animation-timeline: scroll(); animation-range: 0px 900px; }
    @keyframes drift { to { transform: translateY(160px) rotate(-6deg) scale(.9); opacity: .2; } }
    .rv { animation: rv linear both; animation-timeline: view(); animation-range: entry 0% entry 75%; }
    @keyframes rv { from { opacity: 0; transform: translateY(64px); } }
    .fill { animation: fill linear both; animation-timeline: view(); animation-range: entry 30% cover 62%; }
    @keyframes fill { from { background-size: 0% 100%, 100% 100%; } }
  }
}

/* Revelação da MedIter fixa na tela: só em telas largas e altas o bastante */
@media (prefers-reduced-motion: no-preference) and (min-width: 761px) and (min-height: 600px) {
  @supports (animation-timeline: scroll()) {
    .mx { height: 1900px; padding: 0; view-timeline: --mx block; }
    .mx-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
    .mx-pre { position: absolute; left: 0; right: 0; top: 0; bottom: 0; justify-content: center; margin: 0; animation: fadeOut linear both; animation-timeline: --mx; animation-range: contain 10% contain 40%; }
    @keyframes fadeOut { to { opacity: 0; transform: scale(.92); } }
    .mx-panel { position: absolute; left: 16px; right: 16px; top: 76px; bottom: 16px; margin: 0; padding: 0; display: flex; align-items: center; animation: reveal linear both; animation-timeline: --mx; animation-range: contain 0% contain 45%; }
    @keyframes reveal { from { clip-path: circle(0% at 50% 58%); } to { clip-path: circle(80% at 50% 58%); } }
    .mx-in > * { animation: rise linear both; animation-timeline: --mx; animation-range: contain 28% contain 58%; }
    .mx-in > *:nth-child(2) { animation-range: contain 34% contain 64%; }
    @keyframes rise { from { opacity: 0; transform: translateY(80px); } }
    .ring { animation: ringGrow linear both; animation-timeline: --mx; }
    @keyframes ringGrow { from { transform: scale(.6); } to { transform: scale(1.15); } }
  }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .brand { font-size: 24px; }
  .top-in { padding-top: 6px; padding-bottom: 4px; }
  .nav { font-size: 13px; gap: 0 14px; flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .nav a { padding: 10px 0; white-space: nowrap; }
  .hero { padding-top: 24px; }
  .svc-head { position: static; }
  .card { padding: 28px; min-height: 300px; }
  .mx { padding: 72px 0 40px; }
  .mx-panel { margin: 0 8px; border-radius: 28px; padding: 48px 0; }
  .big-n { font-size: 88px; }
  .about { padding: 96px 0; }
  .ct { padding: 80px 0; }
  .doc { padding: 40px 20px 72px; }
}
