/* Renova Meds — página institucional. Aliases curtos sobre os tokens (assets/tokens.css) */
:root {
  --azul: var(--rs-azul-70);
  --noite: var(--rs-azul-90);
  --tinta: var(--rs-tinta);
  --tinta-60: var(--rs-tinta-60);
}

/* ===== base ===== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--tinta);
  background: var(--rs-branco);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: var(--azul); text-underline-offset: 3px; }
a:hover { color: var(--rs-azul-80); }
/* Foco da ferramenta: tracejado ouro, nunca removido */
:focus-visible { outline: 4px dashed var(--rs-ouro); outline-offset: 4px; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--azul); color: var(--rs-branco); }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.small { color: var(--tinta-60); font-size: var(--fs-small); line-height: var(--lh-small); }
.skip {
  position: absolute; left: 16px; top: -80px; z-index: 70; padding: 12px 18px;
  border-radius: var(--radius-sm); background: var(--rs-branco); color: var(--azul); font-weight: var(--fw-semibold); box-shadow: var(--elev-2);
}
.skip:focus { top: 12px; }

/* ===== cabeçalho ===== */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--rs-divisor); }
@supports (backdrop-filter: blur(8px)) {
  .header { background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.3) blur(10px); }
}
.header .wrap { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 22px); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; border-radius: var(--radius-sm); }
.brand img { width: auto; height: 40px; }
/* selo institucional: a ferramenta é um produto da THM */
.selo-thm { display: none; align-items: center; gap: 8px; padding-left: clamp(10px, 1.6vw, 22px); border-left: 1px solid var(--rs-borda); color: var(--tinta-60); font-size: 12.5px; line-height: 1; white-space: nowrap; }
.selo-thm svg { width: 43px; height: 13px; fill: var(--tinta); }
.selo-thm .ponto { fill: var(--azul); }
.nav-links { display: none; gap: 2px; margin-left: auto; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--tinta); font-size: 15px; font-weight: var(--fw-medium); text-decoration: none; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--azul); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.header .btn { margin-left: auto; }
@media (min-width: 620px) { .selo-thm { display: inline-flex; } }
@media (min-width: 940px) {
  .nav-links { display: flex; }
  .header .btn { margin-left: 0; }
}
@media (max-width: 420px) {
  .brand img { height: 34px; }
  .header .btn { padding-inline: 16px; font-size: 14.5px; }
}

/* ===== botões (cápsula, como na ferramenta) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 24px;
  border: 2px solid var(--azul); border-radius: var(--radius-pill);
  background: var(--azul); color: var(--rs-branco);
  font: inherit; font-size: 15.5px; font-weight: var(--fw-semibold); line-height: 1.15; text-align: center; text-decoration: none;
  cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.btn:hover { border-color: var(--rs-azul-80); background: var(--rs-azul-80); color: var(--rs-branco); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-outline { background: var(--rs-branco); color: var(--azul); }
.btn-outline:hover { border-color: var(--azul); background: var(--rs-azul-5); color: var(--azul); }

/* ===== abertura ===== */
.hero { background: linear-gradient(180deg, var(--rs-azul-5) 0%, var(--rs-branco) 78%); }
.hero-grid { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; padding-block: clamp(32px, 6vh, 72px) clamp(36px, 6vh, 72px); }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); } }
.publico {
  display: inline-flex; align-items: center; min-height: 30px; margin-bottom: 20px; padding: 4px 14px;
  border: 1px solid var(--rs-azul-10); border-radius: var(--radius-pill); background: var(--rs-branco);
  color: var(--azul); font-size: 13.5px; font-weight: var(--fw-semibold); line-height: 1.3;
}
h1 { max-width: 15em; color: var(--noite); font-size: var(--fs-display); font-weight: var(--fw-semibold); line-height: var(--lh-display); letter-spacing: -.026em; text-wrap: balance; }
h1 .hl { color: var(--azul); }
.lead { max-width: 34em; margin-top: 20px; color: var(--tinta); font-size: var(--fs-lead); line-height: var(--lh-lead); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ===== formulário de contato ===== */
.form {
  display: grid; gap: 14px; padding: clamp(20px, 2.2vw, 28px);
  border: 1px solid var(--rs-azul-10); border-radius: var(--radius-md);
  background: var(--rs-branco); box-shadow: var(--elev-cartao);
}
.form h2 { color: var(--noite); font-size: 20px; font-weight: var(--fw-semibold); line-height: 1.2; letter-spacing: -.01em; }
.field label { color: var(--tinta); font-size: var(--fs-small); font-weight: var(--fw-semibold); line-height: 1.3; }
.seg-op { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-op label { position: relative; display: block; cursor: pointer; }
.seg-op input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg-op span {
  display: flex; align-items: center; gap: 8px; height: 100%; min-height: 46px; padding: 8px 10px;
  border: 1px solid var(--rs-campo); border-radius: var(--radius-sm);
  background: var(--rs-branco); color: var(--tinta); font-size: 14.5px; font-weight: var(--fw-semibold); line-height: 1.2;
  transition: background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
/* a bolinha diz o estado sem depender só da cor */
.seg-op span::before { content: ""; flex: none; width: 16px; height: 16px; border: 2px solid var(--rs-campo); border-radius: 50%; background: var(--rs-branco); }
.seg-op input:checked + span { border-color: var(--azul); background: var(--rs-azul-5); box-shadow: inset 0 0 0 1px var(--azul); color: var(--azul); }
.seg-op input:checked + span::before { border-color: var(--azul); box-shadow: inset 0 0 0 3px var(--rs-branco), inset 0 0 0 8px var(--azul); }
.seg-op input:focus-visible + span { outline: 4px dashed var(--rs-ouro); outline-offset: 3px; }
.row2 { display: grid; gap: 14px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 5px; min-width: 0; align-content: start; }
.field[hidden] { display: none; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 9px 12px;
  border: 1px solid var(--rs-campo); border-radius: var(--radius-sm);
  background-color: var(--rs-branco); color: var(--tinta);
  font: inherit; font-size: 16px; line-height: 1.35;
  -webkit-appearance: none; appearance: none;
}
.field select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231351B4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 12px center; background-repeat: no-repeat; background-size: 16px;
}
.field textarea { min-height: 44px; max-height: 180px; resize: vertical; overflow: auto; }
.field ::placeholder { color: var(--tinta-60); opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--azul); }
.field [aria-invalid="true"] { border-color: var(--rs-vermelho); box-shadow: inset 0 0 0 1px var(--rs-vermelho); }
.err { display: none; color: var(--rs-vermelho); font-size: 13.5px; font-weight: var(--fw-medium); line-height: 1.3; }
.field [aria-invalid="true"] ~ .err { display: block; }
.btn-enviar { width: 100%; min-height: 48px; font-size: 16px; }
.form .small a { padding-block: 4px; font-weight: var(--fw-semibold); }
#status:empty { display: none; }
.status { display: grid; gap: 4px; padding: 12px 14px; border-left: 4px solid var(--azul); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14.5px; line-height: 1.4; }
.status.ok { border-color: var(--rs-verde); background: var(--rs-sucesso-fundo); }
.status.fail { border-color: var(--rs-vermelho); background: var(--rs-vermelho-fundo); }

/* ===== seções ===== */
.sec { padding-block: var(--section-y); }
.sec.faixa { background: var(--rs-pagina); }
.rotulo { margin-bottom: 14px; color: var(--azul); font-size: var(--fs-mini); font-weight: var(--fw-semibold); letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; }
.sec h2:not(.rotulo) { max-width: 22em; color: var(--noite); font-size: var(--fs-h2); font-weight: var(--fw-semibold); line-height: var(--lh-h2); letter-spacing: -.02em; text-wrap: balance; }

/* ===== como funciona ===== */
.passos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; margin-top: 6px; }
@media (min-width: 900px) { .passos { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
@media (max-width: 359px) { .passos { grid-template-columns: 1fr; } }
.passos li { padding-top: 16px; border-top: 2px solid var(--rs-azul-10); }
.passos .n { display: block; margin-bottom: 10px; color: var(--azul); font-size: 13px; font-weight: var(--fw-bold); letter-spacing: .08em; line-height: 1; font-variant-numeric: tabular-nums; }
.passos h3 { color: var(--noite); font-size: var(--fs-h3); font-weight: var(--fw-semibold); line-height: var(--lh-h3); }
.passos p { margin-top: 6px; color: var(--tinta-60); font-size: 15px; line-height: 1.45; }

/* ===== a ferramenta ===== */
.zig { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; }
@media (min-width: 1000px) { .zig { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); } }
.papeis { margin-top: 24px; border-top: 1px solid var(--rs-borda); }
.papeis > div { padding: 14px 0; border-bottom: 1px solid var(--rs-borda); }
.papeis dt { color: var(--noite); font-weight: var(--fw-semibold); line-height: 1.35; }
.papeis dd { margin-top: 2px; color: var(--tinta-60); font-size: 15px; line-height: 1.45; }
.mais { margin-top: 18px; font-weight: var(--fw-semibold); }
.mais a { padding-block: 8px; }
.tela { overflow: hidden; border: 1px solid var(--rs-borda); border-radius: 10px; background: var(--rs-branco); box-shadow: var(--elev-suave); }
.tela-recorte { position: relative; }
/* a tela continua para baixo: o recorte termina em um esmaecido, não em uma linha cortada */
.tela-recorte::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--rs-branco)); pointer-events: none; }
.tela img { width: 100%; aspect-ratio: 1240 / 700; object-fit: cover; object-position: top left; }
.tela figcaption { padding: 10px 14px; border-top: 1px solid var(--rs-divisor); color: var(--tinta-60); font-size: 13px; line-height: 1.4; }

/* ===== padrões e integrações ===== */
.padroes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin-top: 24px; }
@media (min-width: 900px) { .padroes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.padroes > div { padding-left: 14px; border-left: 3px solid var(--azul); }
.padroes dt { color: var(--noite); font-weight: var(--fw-semibold); line-height: 1.35; }
.padroes dd { margin-top: 2px; color: var(--tinta-60); font-size: 15px; line-height: 1.45; }
.estagio { max-width: 56em; margin-top: 28px; color: var(--tinta-60); font-size: 15px; line-height: 1.55; }
.estagio strong { color: var(--tinta); font-weight: var(--fw-semibold); }
.aviso { max-width: 56em; margin-top: 12px; padding: 12px 16px; border-left: 4px solid var(--rs-ouro); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--rs-aviso-fundo); color: var(--tinta); font-size: 15px; line-height: 1.5; }

/* ===== rodapé: assinatura institucional da THM Tecnologia ===== */
.thm {
  --thm-fundo: #080c22; --thm-tinta: #eef1f8; --thm-apoio: #9aa1bb; --thm-linha: #1d2550; --thm-link: #9db8ff;
  position: relative; padding-block: clamp(36px, 5vw, 52px) 28px;
  background: var(--thm-fundo); color: var(--thm-apoio); font-size: 14.5px; line-height: 1.55;
}
/* faixa da marca THM */
.thm::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, #6366f1, #22d3ee); }
.thm .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; }
.thm-sobre, .thm-id { grid-column: 1 / -1; }
@media (min-width: 800px) {
  .thm .wrap { grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
  .thm-sobre { grid-column: auto; }
}
.thm-marca { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--thm-tinta); font-size: 15px; font-weight: var(--fw-semibold); letter-spacing: -.01em; }
.thm-marca svg { width: 66px; height: 20px; fill: var(--thm-tinta); }
.thm-sobre p:not(.thm-marca) { max-width: 40ch; }
.thm h2 { margin-bottom: 10px; color: var(--thm-tinta); font-size: var(--fs-mini); font-weight: var(--fw-semibold); letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; }
.thm a { color: var(--thm-link); }
.thm a:hover { color: var(--thm-tinta); }
.thm li a { display: inline-block; padding-block: 5px; text-decoration: none; }
.thm li a:hover { text-decoration: underline; }
.junto { white-space: nowrap; }
@media (pointer: coarse) { .thm li a { padding-block: 10px; } }
.thm-id { display: grid; gap: 8px; padding-top: 22px; border-top: 1px solid var(--thm-linha); font-size: 13px; }
.legal-card summary { display: inline-flex; align-items: center; min-height: 40px; color: var(--thm-link); font-weight: var(--fw-semibold); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.legal-body { margin-top: 6px; padding: 18px 20px; border: 1px solid var(--thm-linha); border-radius: var(--radius-md); background: rgba(255, 255, 255, .04); line-height: 1.6; }
.legal-body h3 { margin: 14px 0 6px; color: var(--thm-tinta); font-size: 14px; font-weight: var(--fw-semibold); }
.legal-body p + p { margin-top: 8px; }
.legal-body strong { color: var(--thm-tinta); font-weight: var(--fw-semibold); }
.thm-copy { margin-top: 4px; }

/* ===== chamada flutuante (só em telas pequenas, depois que o formulário sai da tela) ===== */
.fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  box-shadow: var(--elev-2); visibility: hidden; opacity: 0; transform: translateY(24px);
  transition: opacity var(--dur), transform var(--dur), visibility 0s linear var(--dur);
}
.fab.show { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
@media (min-width: 940px) { .fab { display: none; } }

/* ===== página simples de retorno do formulário (sem JavaScript) ===== */
.retorno { display: grid; place-items: center; min-height: 100vh; padding: 32px 20px; background: var(--rs-pagina); }
.retorno main { width: 100%; max-width: 560px; padding: clamp(24px, 4vw, 36px); border: 1px solid var(--rs-azul-10); border-radius: var(--radius-md); background: var(--rs-branco); box-shadow: var(--elev-suave); }
.retorno img { width: auto; height: 40px; margin-bottom: 24px; }
.retorno h1 { font-size: 24px; line-height: 1.2; letter-spacing: -.01em; }
.retorno p { margin-top: 12px; }

/* ===== movimento: discreto, e só quando o script está ativo ===== */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .passos .reveal:nth-child(2) { transition-delay: 70ms; }
.js .passos .reveal:nth-child(3) { transition-delay: 140ms; }
.js .passos .reveal:nth-child(4) { transition-delay: 210ms; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== telas pequenas ===== */
@media (max-width: 560px) {
  .actions .btn { flex: 1 1 100%; }
}

/* ===== impressão ===== */
@media print {
  .header, .fab, .skip, .actions { display: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .thm { background: none; color: #000; }
  .thm::before { display: none; }
  .thm a, .thm h2, .thm-marca, .legal-card summary, .legal-body strong, .legal-body h3 { color: #000; }
  .thm-marca svg { fill: #000; }
}
