/* ==========================================================================
   Ambup — estilos do site institucional
   ========================================================================== */

:root {
  --red: #d40f14;
  --red-600: #b30c10;
  --red-50: #fff1f1;
  --red-100: #ffe1e1;
  --ink: #0f1b2d;
  --ink-2: #33415c;
  --muted: #5b6678;
  --line: #e6e9ef;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --green: #12805c;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .08);
  --shadow-lg: 0 2px 4px rgba(15, 27, 45, .06), 0 24px 48px rgba(15, 27, 45, .14);
  --container: 1180px;
  --header-h: 72px;
  --font-head: "Kanit", system-ui, sans-serif;
  --font-body: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-600); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h1, h2 { text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--ink); color: #c9d1de; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.1rem; color: var(--muted); }
.section--dark .section-head p { color: #aab4c4; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.section--dark .eyebrow { color: #ff8a8d; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 1rem/1 var(--font-body); text-decoration: none; white-space: nowrap;
  padding: 15px 24px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(212, 15, 20, .28); }
.btn--primary:hover { background: var(--red-600); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--red-50); color: var(--ink); }
.btn--outline-light { color: #fff; border-color: rgba(255,255,255,.35); }
.btn--outline-light:hover { border-color: #fff; color: #fff; }
.btn--sm { padding: 11px 18px; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header ------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .9); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(15,27,45,.05); }
/* O blur cria um novo contexto para position:fixed; desligado com o menu aberto */
.site-header.is-open { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header .container { display: flex; align-items: center; height: 100%; gap: 24px; }
.logo { display: inline-flex; flex: none; }
.logo img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 10px 12px; border-radius: 999px; transition: background .2s, color .2s; white-space: nowrap;
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--red); }
.header-cta { display: flex; gap: 10px; align-items: center; }
.menu-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; }

/* Hero --------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 520px at 85% 20%, var(--red-50), transparent 65%),
    radial-gradient(600px 400px at 0% 100%, #f2f5fa, transparent 70%);
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lead { font-size: 1.18rem; color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero-points { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.hero-points li { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; color: var(--ink); }
.hero-points svg { width: 20px; height: 20px; color: var(--green); flex: none; }

.hero-visual { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; }
.hero-art { position: relative; width: 100%; max-width: 400px; }
.hero-visual .blob {
  position: absolute; inset: 8% 4% 10% 8%; border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  background: linear-gradient(140deg, var(--red) 0%, #ff5a5e 100%); opacity: .95;
}
.hero-visual img.ambulance { position: relative; width: 100%; margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(15,27,45,.25)); }
/* Pop-up animado do hero: pedido -> busca -> ambulância acionada -> no local.
   Fica abaixo da ambulância (sem sobrepor), com fundo escuro para destacar. */
.status-card {
  position: relative; width: 100%; max-width: 460px; z-index: 2;
  background: var(--ink); color: #fff; border-radius: 20px; padding: 18px 20px 16px;
  box-shadow: 0 2px 4px rgba(15,27,45,.12), 0 24px 48px rgba(15,27,45,.28), inset 0 0 0 1px rgba(255,255,255,.06);
  --accent: #ff6b6f; --accent-bg: rgba(255, 107, 111, .16);
}
.status-card[data-phase="3"] { --accent: #3ddc97; --accent-bg: rgba(61, 220, 151, .16); }
.status-body { display: flex; align-items: center; gap: 14px; min-height: 56px; transition: opacity .3s ease, transform .3s ease; }
.status-card.is-changing .status-body { opacity: 0; transform: translateY(6px); }
.status-card .ico {
  position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--accent-bg); color: var(--accent);
}
.status-card .ico svg { width: 24px; height: 24px; }
.status-card[data-phase="1"] .ico::after {
  content: ""; position: absolute; inset: -4px; border-radius: 14px; border: 2px solid var(--accent); opacity: 0; animation: pulse 1.2s infinite;
}
@keyframes pulse { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
.status-label { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.status-text strong { display: block; color: #fff; font-size: 1.12rem; line-height: 1.3; }
.status-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.status-steps i { height: 5px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; position: relative; }
.status-steps i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.status-steps i.is-done::after { transform: scaleX(1); }
.status-steps i.is-active::after { animation: fill var(--step-ms, 2600ms) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

/* Page hero (inner pages) */
.page-hero { padding: 64px 0 56px; background: linear-gradient(180deg, var(--red-50), #fff); }
.page-hero .container { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 620px; }
.breadcrumb { font-size: .88rem; margin-bottom: 18px; color: var(--muted); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #aab1bd; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.summary-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.summary-card h2 { font-size: 1.15rem; margin-bottom: 14px; }
.summary-card ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.summary-card li { display: flex; gap: 10px; align-items: flex-start; }
.summary-card li svg { width: 20px; height: 20px; color: var(--green); flex: none; margin-top: 3px; }

/* Animação TIH x APH (página de operadoras) -------------------------------- */
.flow-demo { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 14px; }
.flow-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--bg-soft); padding: 4px; border-radius: 12px; }
.flow-tabs button {
  font: 700 .85rem/1.2 var(--font-body); border: 0; background: transparent; padding: 10px 8px; border-radius: 9px;
  color: var(--muted); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s;
}
.flow-tabs button strong { display: block; font-size: 1rem; font-family: var(--font-head); font-weight: 600; }
.flow-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,27,45,.12); }
.flow-tabs button[aria-selected="true"] strong { color: var(--red); }
.flow-demo svg { display: block; width: 100%; height: auto; margin: 10px 0 6px; overflow: visible; }
.flow-demo svg text { font: 700 11px var(--font-body); fill: var(--muted); text-anchor: middle; }
.flow-caption { display: flex; gap: 12px; align-items: center; min-height: 56px; border-top: 1px solid var(--line); padding: 12px 4px 2px; }
.flow-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font: 600 .9rem var(--font-head); transition: background .3s; }
.flow-demo.s4 .flow-num { background: var(--green); }
.flow-text { font-weight: 700; color: var(--ink); font-size: .95rem; line-height: 1.35; transition: opacity .25s; }
.flow-demo.is-changing .flow-text, .flow-demo.is-changing .flow-num { opacity: 0; }

.flow-demo .scene { transition: opacity .45s; }
.flow-demo .scene:not(.is-active) { opacity: 0; }
.flow-demo.no-anim, .flow-demo.no-anim * { transition: none !important; animation: none !important; }

/* Operadora */
.operator .op-body, .operator .op-head { fill: var(--ink); }
.operator .op-headset { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; }
.operator .op-screen { fill: #fff; stroke: var(--ink); stroke-width: 2.5; transition: fill .3s; }
.operator .op-stand { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.operator .op-typing circle { fill: var(--red); opacity: 0; }
.flow-demo.s1 .op-screen { fill: var(--red-50); }
.flow-demo.s1:not(.s2) .op-typing circle { animation: typing 1s infinite; }
.flow-demo.s1:not(.s2) .op-typing circle:nth-child(2) { animation-delay: .15s; }
.flow-demo.s1:not(.s2) .op-typing circle:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

/* Linhas que se desenham */
.flow-demo .draw { fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .9s ease; }

/* TIH */
.tih-line { stroke: var(--red); stroke-width: 2; opacity: .45; }
.flow-demo.s2 .tih-line { stroke-dashoffset: 0; }
.tih-req { fill: var(--red); opacity: 0; transition: transform .9s ease, opacity .2s; }
.flow-demo.s2 .tih-req { opacity: 1; transform: translate(var(--dx), var(--dy)); }
.flow-demo.s3 .tih-req { opacity: 0; }
.tih-term { transition: opacity .3s; }
.tih-term .screen { fill: #fff; stroke: var(--ink-2); stroke-width: 2; transition: fill .3s .8s, stroke .3s .8s; }
.tih-term .cross { stroke: var(--red); stroke-width: 3; stroke-linecap: round; }
.tih-term .stand { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }
.flow-demo.s2 .tih-term .screen { fill: var(--red-50); stroke: var(--red); }
.tih-chip { opacity: 0; transform: translateX(46px); transition: opacity .4s, transform .7s ease; }
.tih-chip .chip-bg { fill: #fff; stroke: var(--red); stroke-width: 1.5; transition: fill .3s, stroke .3s; }
.flow-demo svg .tih-chip text { fill: var(--ink); }
.tih-chip .chip-check { opacity: 0; transition: opacity .3s .2s; }
.tih-chip .chip-check circle { fill: var(--green); }
.tih-chip .chip-check path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow-demo.s3 .tih-chip { opacity: 1; transform: none; }
.flow-demo.s4 .tih-chip:not(.is-best), .flow-demo.s4 .tih-term:not(.is-best) { opacity: .3; transition-delay: 0s; }
.flow-demo.s4 .tih-chip.is-best .chip-bg { fill: #e7f6ef; stroke: var(--green); }
.flow-demo.s4 .tih-chip.is-best .chip-check { opacity: 1; }
.flow-demo.s4 .tih-term.is-best .screen { fill: #e7f6ef; stroke: var(--green); transition-delay: 0s; }
.flow-demo.s4 .tih-term.is-best .cross { stroke: var(--green); }

/* APH */
.city rect { fill: #eef1f6; }
.aph-line { stroke: var(--red); stroke-width: 2; opacity: .45; }
.flow-demo.s1 .aph-line { stroke-dashoffset: 0; }
.aph-req { fill: var(--red); opacity: 0; transition: transform .9s ease, opacity .2s; }
.flow-demo.s1 .aph-req { opacity: 1; transform: translate(var(--dx), var(--dy)); }
.flow-demo.s2 .aph-req { opacity: 0; }
.aph-pin { opacity: 0; transition: opacity .3s .8s; }
.aph-pin path { fill: var(--red); }
.aph-pin circle { fill: #fff; }
.flow-demo.s1 .aph-pin { opacity: 1; }
.aph-ripple circle { fill: rgba(212, 15, 20, .06); stroke: var(--red); stroke-width: 2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; transform: scale(0); opacity: 0; }
.flow-demo.s2:not(.s3) .aph-ripple circle { animation: ripple 1.8s ease-out infinite; }
.flow-demo.s2:not(.s3) .aph-ripple circle:nth-child(2) { animation-delay: .6s; }
.flow-demo.s2:not(.s3) .aph-ripple circle:nth-child(3) { animation-delay: 1.2s; }
@keyframes ripple { 0% { transform: scale(.05); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.amb { transition: opacity .3s; }
.amb .amb-body { fill: var(--red); stroke: #fff; stroke-width: 2; transition: fill .3s; }
.amb .amb-cross { stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
.amb .amb-ring { fill: none; stroke: var(--green); stroke-width: 2.5; opacity: 0; transition: opacity .3s; }
.flow-demo.s3 .scene-aph .amb:not(.is-near) { opacity: .3; }
.flow-demo.s3 .amb.is-near .amb-body { fill: var(--green); }
.flow-demo.s3 .amb.is-near .amb-ring { opacity: 1; animation: ring 1.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.aph-route { stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; transition-duration: 1.2s; }
.flow-demo.s4 .aph-route { stroke-dashoffset: 0; }
.flow-demo.s4 .aph-pin path { fill: var(--green); transition: fill .3s 1s; }

/* Empresas: pedido -> sua central -> proposta -> agenda */
.bld rect { fill: var(--ink-2); }
.bld .bld-body { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.bld .bld-door { fill: var(--ink); }
.emp-line { stroke: var(--red); stroke-width: 2; opacity: .45; }
.flow-demo.s1 .emp-line { stroke-dashoffset: 0; }
.emp-req { opacity: 0; transition: transform .9s ease, opacity .2s; }
.emp-req rect { fill: var(--red); }
.emp-req path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.flow-demo.s1 .emp-req { opacity: 1; transform: translateX(186px); }
.flow-demo.s2 .emp-req { opacity: 0; }
.emp-screen { fill: #fff; stroke: var(--ink); stroke-width: 2.5; transition: fill .3s, stroke .3s; }
.emp-stand { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.flow-demo.s2 .emp-screen { fill: var(--red-50); stroke: var(--red); }
.flow-demo.s4 .emp-screen { fill: #e7f6ef; stroke: var(--green); }
.flow-demo svg .t-strong { font-size: 13px; fill: var(--red); }
.flow-demo svg .t-ok { font-size: 12px; fill: var(--green); }
.emp-new, .emp-agenda { opacity: 0; transition: opacity .3s; }
.flow-demo.s2 .emp-new { opacity: 1; }
.flow-demo.s4 .emp-new { opacity: 0; }
.flow-demo.s4 .emp-agenda { opacity: 1; transition-delay: .3s; }
.emp-agenda rect, .emp-agenda path { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.emp-chip { opacity: 0; transition: opacity .3s, transform .9s ease; }
.emp-chip .chip-bg { fill: #fff; stroke: var(--red); stroke-width: 1.5; transition: fill .3s, stroke .3s; }
.flow-demo svg .emp-chip text { fill: var(--ink); transition: opacity .3s; }
.flow-demo svg .emp-chip .t2 { opacity: 0; fill: var(--green); }
.flow-demo.s3 .emp-chip { opacity: 1; transform: translateX(-90px); }
.flow-demo.s4 .emp-chip .chip-bg { fill: #e7f6ef; stroke: var(--green); }
.flow-demo.s4 .emp-chip .t1 { opacity: 0; }
.flow-demo.s4 svg .emp-chip .t2 { opacity: 1; }

/* Empresas: equipe no aplicativo */
.phone .phone-body { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.phone .phone-notch { fill: var(--ink); }
.flow-demo svg .phone-title { font: 600 14px var(--font-head); fill: var(--ink); transition: fill .3s; }
.flow-demo.s2 svg .phone-title { fill: var(--red); }
.flow-demo svg .row text { text-anchor: start; fill: #aab1bd; transition: fill .3s; }
.row circle { fill: #fff; stroke: var(--line); stroke-width: 2; transition: fill .3s, stroke .3s; }
.row path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow-demo.s2 .r1 circle, .flow-demo.s3 .r2 circle, .flow-demo.s3 .r3 circle, .flow-demo.s4 .r4 circle, .flow-demo.s4 .r5 circle { fill: var(--green); stroke: var(--green); }
.flow-demo.s2 svg .r1 text, .flow-demo.s3 svg .r2 text, .flow-demo.s3 svg .r3 text, .flow-demo.s4 svg .r4 text, .flow-demo.s4 svg .r5 text { fill: var(--ink); }
.flow-demo.s3 .r3 circle, .flow-demo.s3 svg .r3 text { transition-delay: .6s; }
.flow-demo.s4 .r4 circle, .flow-demo.s4 svg .r4 text { transition-delay: 1.6s; }
.flow-demo.s4 .r5 circle, .flow-demo.s4 svg .r5 text { transition-delay: 2.2s; }
.campo-route { stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; transition-duration: 1.8s; }
.flow-demo.s4 .campo-route { stroke-dashoffset: 0; }
.campo-pin path { fill: var(--red); transition: fill .3s; }
.campo-pin circle { fill: #fff; }
.flow-demo.s3 .pin-origem path { fill: var(--green); transition-delay: .8s; }
.flow-demo.s4 .pin-destino path { fill: var(--green); transition-delay: 1.8s; }
.mv-y, .mv-x { transition: transform .9s ease; }
.flow-demo.s3 .mv-y { transform: translateY(-24px); }
.flow-demo.s4 .mv-y { transform: translateY(-172px); }
.flow-demo.s4 .mv-x { transform: translateX(114px); transition-delay: .9s; }
.flow-demo.s1 .amb.is-team .amb-ring { opacity: 1; animation: ring 1.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.flow-demo.s3 .amb.is-team .amb-ring { animation: none; opacity: 0; }
.flow-demo.s1 .amb.is-team .amb-body { fill: var(--green); }

/* Gestão: remoções agendadas (ambulância, motorista e médico) */
.flow-demo svg .esc-head { font-size: 11px; fill: var(--ink); }
.esc-line { stroke: var(--green); stroke-width: 2.5; }
.flow-demo.s2 .esc-l1, .flow-demo.s3 .esc-l2, .flow-demo.s4 .esc-l3 { stroke-dashoffset: 0; }
.esc-amb, .esc-person { transition: opacity .3s .6s; }
.esc-amb .amb-body { fill: var(--red); stroke: #fff; stroke-width: 2; transition: fill .3s .6s; }
.esc-amb .amb-cross { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.esc-person .p-head, .esc-person .p-body { fill: var(--ink-2); transition: fill .3s .6s, stroke .3s .6s; }
.esc-med .p-body { fill: #fff; stroke: var(--ink-2); stroke-width: 2; }
.esc-med .p-cross { stroke: var(--red); stroke-width: 2; stroke-linecap: round; }
.esc-ring { fill: #e7f6ef; stroke: var(--green); stroke-width: 2; opacity: 0; transition: opacity .3s .6s; }
.flow-demo.s2 .esc-amb:not(.is-pick), .flow-demo.s3 .esc-mot:not(.is-pick), .flow-demo.s4 .esc-med:not(.is-pick) { opacity: .3; }
.flow-demo.s2 .esc-amb.is-pick .esc-ring, .flow-demo.s3 .esc-mot.is-pick .esc-ring, .flow-demo.s4 .esc-med.is-pick .esc-ring { opacity: 1; }
.flow-demo.s2 .esc-amb.is-pick .amb-body { fill: var(--green); }
.flow-demo.s3 .esc-mot.is-pick .p-head, .flow-demo.s3 .esc-mot.is-pick .p-body { fill: var(--green); }
.flow-demo.s4 .esc-med.is-pick .p-head { fill: var(--green); }
.flow-demo.s4 .esc-med.is-pick .p-body { stroke: var(--green); }
.esc-cal, .esc-done { opacity: 0; transition: opacity .4s; }
.flow-demo.s1 .esc-cal { opacity: 1; transition-delay: .4s; }
.esc-cal rect, .esc-cal path { fill: #fff; stroke: var(--red); stroke-width: 2; stroke-linecap: round; }
.flow-demo svg .esc-cal text { fill: var(--red); }
.flow-demo.s4 .esc-done { opacity: 1; transition-delay: 1.2s; }
.esc-done rect { fill: #e7f6ef; stroke: var(--green); stroke-width: 1.5; }
.flow-demo svg .esc-done text { fill: var(--green); font-size: 12px; }

/* Gestão: celular da equipe e histórico */
.g-phone, .g-hist { opacity: 0; transition: opacity .4s; }
.flow-demo.s3 .g-phone { opacity: 1; transition-delay: .4s; }
.g-phone .g-phone-bubble { fill: #fff; stroke: var(--green); stroke-width: 1.5; }
.g-phone .g-phone-body { fill: none; stroke: var(--ink); stroke-width: 2; }
.g-phone circle { fill: var(--green); }
.flow-demo svg .g-phone text { fill: var(--green); }
.flow-demo.s4 .g-hist { opacity: 1; transition-delay: 1.2s; }
.g-hist .g-hist-doc { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.g-hist .g-hist-lines { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.g-hist .g-hist-ok { fill: var(--green); }
.g-hist .g-hist-tick { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Sub navigation */
.subnav { position: sticky; top: var(--header-h); z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; padding: 16px 16px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: .95rem; white-space: nowrap; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a.is-active { color: var(--red); border-bottom-color: var(--red); }

/* Definition / intro block (GEO) ------------------------------------------- */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.intro-grid .big { font-size: 1.3rem; line-height: 1.55; color: var(--ink); font-family: var(--font-body); font-weight: 600; }
.modes { display: grid; gap: 16px; }
.mode { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #fff; }
.mode h3 { margin: 14px 0 10px; }
.mode p { margin: 0; color: var(--muted); }
.tag { display: inline-block; font: 800 .72rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.tag--red { background: var(--red-50); color: var(--red); }
.tag--ink { background: #eef1f6; color: var(--ink); }

/* Steps -------------------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 32px 28px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--red); color: #fff; font: 600 1.15rem/1 var(--font-head); margin-bottom: 20px;
}
.step h3 { margin-bottom: 10px; }
.step p { margin: 0; color: #aab4c4; }

/* Audience cards ----------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; text-decoration: none; color: inherit; transition: transform .25s, box-shadow .25s, border-color .25s;
}
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; color: inherit; }
.card .icon { width: 52px; height: 52px; border-radius: 14px; background: var(--red-50); color: var(--red); display: grid; place-items: center; margin-bottom: 20px; }
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 8px; }
.card .who { font-size: .9rem; font-weight: 700; color: var(--muted); margin-bottom: 16px; }
.card ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; font-size: .97rem; }
.card li { display: flex; gap: 10px; }
.card li svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: 4px; }
.card .more { margin-top: auto; font-weight: 800; color: var(--red); display: inline-flex; align-items: center; gap: 6px; }
.card .more svg { width: 18px; height: 18px; transition: transform .2s; }
a.card:hover .more svg { transform: translateX(4px); }

/* Features ----------------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.feature .icon { width: 46px; height: 46px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--red); display: grid; place-items: center; margin-bottom: 16px; }
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; }

/* Glossary ------------------------------------------------------------------ */
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.glossary dl { margin: 0; }
.term { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.term dt { font-family: var(--font-head); color: var(--ink); font-size: 1.2rem; margin-bottom: 6px; }
.term dt abbr { text-decoration: none; color: var(--red); }
.term dd { margin: 0; color: var(--muted); }

/* App ---------------------------------------------------------------------- */
.app-band { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; background: var(--ink); color: #c9d1de; border-radius: 24px; padding: 56px; position: relative; overflow: hidden; }
.app-band::after { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(212,15,20,.45), transparent 70%); }
.app-band h2 { color: #fff; }
.app-band p { color: #aab4c4; }
.app-band .downloads { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.download {
  display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px; padding: 16px 20px; color: #fff; text-decoration: none; transition: background .2s, border-color .2s;
}
.download:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.download svg { width: 30px; height: 30px; flex: none; }
.download small { display: block; color: #aab4c4; font-size: .8rem; }
.download strong { display: block; font-size: 1.02rem; }

/* FAQ / accordion ---------------------------------------------------------- */
.faq-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq-layout .section-head { position: sticky; top: calc(var(--header-h) + 80px); margin-bottom: 0; }
.accordion { display: grid; gap: 12px; }
.accordion details { background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.accordion details[open] { border-color: #d6dae3; box-shadow: var(--shadow); }
.accordion summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; position: relative;
  font-family: var(--font-body); font-weight: 800; color: var(--ink); font-size: 1.04rem; line-height: 1.4;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
  background: var(--bg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1b2d' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center/12px no-repeat;
  transition: transform .25s;
}
.accordion details[open] summary::after { transform: rotate(45deg); background-color: var(--red-50); }
.accordion .answer { padding: 0 24px 22px; color: var(--ink-2); }
.accordion .answer > :last-child { margin-bottom: 0; }
.accordion .answer ol, .accordion .answer ul { margin: 0 0 1em; }
.accordion .answer li { margin-bottom: 6px; }
.note { background: var(--red-50); border-left: 3px solid var(--red); padding: 12px 16px; border-radius: 0 10px 10px 0; font-size: .95rem; }
.ui { font-weight: 800; color: var(--ink); }

.manual-group + .manual-group { margin-top: 40px; }
.manual-group h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--muted); font-family: var(--font-body); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; }

/* Help strip */
.help-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.help-item { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.help-item .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--red-50); color: var(--red); display: grid; place-items: center; flex: none; }
.help-item .icon svg { width: 22px; height: 22px; }
.help-item h3 { font-size: 1.1rem; margin-bottom: 4px; }
.help-item p { margin: 0 0 10px; color: var(--muted); font-size: .97rem; }
.help-item a { font-weight: 800; }
.help-strip + .help-strip { margin-top: 20px; }

/* Contact ------------------------------------------------------------------ */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-list .icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; flex: none; }
.contact-list .icon svg { width: 20px; height: 20px; }
.contact-list small { display: block; color: #8e99ab; font-size: .82rem; }
.contact-list a { color: #fff; font-weight: 700; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.form { background: #fff; color: var(--ink-2); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); }
.form h3, .section--dark .form h3 { margin-bottom: 4px; color: var(--ink); }
.form > p { color: var(--muted); font-size: .95rem; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 800; font-size: .88rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(212,15,20,.12); }
.field .error { color: var(--red); font-size: .82rem; font-weight: 700; display: none; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--red); }
.field.is-invalid .error { display: block; }
.form .btn { width: 100%; margin-top: 18px; }
.form .privacy { font-size: .8rem; color: var(--muted); margin: 12px 0 0; text-align: center; }

/* CTA band ----------------------------------------------------------------- */
.cta-band { background: linear-gradient(120deg, var(--red) 0%, #e8383c 100%); color: #fff; border-radius: 24px; padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { margin: 0; color: rgba(255,255,255,.88); font-size: 1.1rem; }

/* Footer ------------------------------------------------------------------- */
.site-footer { background: #0a1322; color: #8e99ab; padding: 64px 0 32px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer .logo img { height: 28px; filter: brightness(0) invert(1); }
.site-footer p { margin: 16px 0 0; max-width: 320px; }
.site-footer h2 { font-family: var(--font-body); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: #c9d1de; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .88rem; }

/* WhatsApp floating -------------------------------------------------------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(0,0,0,.2);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .status-steps i.is-active::after { transform: scaleX(1); }
}

/* Responsive --------------------------------------------------------------- */
.menu-toggle .i-close, .site-header.is-open .menu-toggle .i-open { display: none; }
.site-header.is-open .menu-toggle .i-close { display: block; }
@media (max-width: 1240px) {
  .nav a { padding: 10px 8px; font-size: .9rem; }
  .site-header .container { gap: 16px; }
}
@media (max-width: 960px) {
  .section { padding: 72px 0; }
  .hero .container, .page-hero .container, .intro-grid, .faq-layout, .contact, .app-band { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 72px; }
  .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
  .faq-layout .section-head { position: static; }
  .cards, .features, .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .app-band, .cta-band { padding: 40px 32px; }
}
@media (max-width: 1140px) {
  .menu-toggle { display: inline-flex; }
  .nav, .header-cta { display: none; }
  .site-header.is-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: #fff; padding: 16px 24px 32px; overflow-y: auto;
  }
  .site-header.is-open .nav a { padding: 16px 4px; font-size: 1.1rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .site-header.is-open .nav .nav-cta { display: grid; gap: 12px; margin-top: 24px; }
  .site-header.is-open .nav .nav-cta a { border: 2px solid var(--line); border-radius: 999px; text-align: center; justify-content: center; }
  .site-header.is-open .nav .nav-cta a.btn--primary { border-color: var(--red); color: #fff; }
}
.nav .nav-cta { display: none; }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .cards, .features, .steps, .glossary, .help-strip, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .hero-art { max-width: 300px; }
  .status-text strong { font-size: 1rem; }
  .app-band, .cta-band { padding: 32px 22px; border-radius: 20px; }
  .form { padding: 24px 18px; }
  .page-hero { padding: 40px 0; }
  .intro-grid .big { font-size: 1.12rem; }
  .app-band::after { display: none; }
  .accordion summary { padding: 18px 52px 18px 18px; }
  .accordion .answer { padding: 0 18px 18px; }
}
