/* ===== Risco Cirúrgico MED — landing page ===== */
:root {
  --bg: #060b14;
  --bg-alt: #0a1220;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e6edf6;
  --text-dim: #9fb0c3;
  --cyan: #22d3ee;
  --emerald: #34d399;
  --grad: linear-gradient(100deg, #22d3ee, #34d399);
  --radius: 18px;
  --font-head: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1120px, 92%); margin: 0 auto; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-head);
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  text-decoration: none !important;
  white-space: nowrap;
}
.btn-sm { padding: .5rem 1.1rem; font-size: .82rem; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1rem; }
.btn-primary {
  background: var(--grad);
  color: #04222b;
  box-shadow: 0 8px 28px rgba(34, 211, 238, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(52, 211, 153, .35); }
.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,.03);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.btn-outline {
  color: var(--cyan);
  border-color: rgba(34,211,238,.45);
  padding: .8rem 1.5rem;
}
.btn-outline:hover { background: rgba(34,211,238,.1); }
.calc-form .btn-primary { padding: .8rem 1.6rem; margin-top: 1.1rem; width: 100%; }

/* ===== Nav ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .3s ease, box-shadow .3s ease;
}
.nav.scrolled {
  background: rgba(6, 11, 20, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  width: min(1180px, 94%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: .85rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.02rem;
  color: var(--text);
  text-decoration: none !important;
}
.brand strong { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-pulse { display: grid; place-items: center; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.12); opacity: .8 } }
.nav-links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav-links a {
  color: var(--text-dim);
  font-size: .92rem;
  font-weight: 400;
  transition: color .2s;
  text-decoration: none !important;
}
.nav-links a:hover { color: var(--text); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
#hero3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(34,211,238,.10), transparent 65%),
    linear-gradient(180deg, rgba(6,11,20,.55) 0%, rgba(6,11,20,.25) 45%, var(--bg) 100%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; width: min(880px, 92%); padding: 7rem 0 5rem; }
.hero-kicker {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .78rem;
  color: var(--emerald);
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.6vw, 4rem);
  line-height: 1.12;
  letter-spacing: -.02em;
}
.hero-sub {
  margin: 1.4rem auto 2.2rem;
  max-width: 640px;
  color: var(--text-dim);
  font-size: 1.06rem;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-badges { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; margin-top: 2.4rem; }
.badge {
  font-size: .76rem;
  font-family: var(--font-head);
  letter-spacing: .04em;
  padding: .34rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text-dim);
}
.hero-scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 40px;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 14px;
  z-index: 2;
}
.hero-scroll span {
  position: absolute; top: 7px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--cyan);
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(14px); opacity: 0 } 100% { opacity: 0 } }

/* ===== Sections ===== */
.section { padding: 6rem 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-kicker {
  text-align: center;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: .74rem;
  color: var(--emerald);
  margin-bottom: .8rem;
}
.section-title {
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}
.section-sub {
  text-align: center;
  color: var(--text-dim);
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* ===== Calculators ===== */
.calc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.calc-tab {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .55rem 1.15rem;
  cursor: pointer;
  transition: all .2s ease;
}
.calc-tab:hover { color: var(--text); border-color: rgba(34,211,238,.4); }
.calc-tab.active {
  background: var(--grad);
  color: #04222b;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(34,211,238,.25);
}
.calc-panel { display: none; animation: fadeUp .45s ease; }
.calc-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

.calc-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.4rem;
  align-items: start;
}
.calc-form { padding: 1.8rem; }
.calc-form h3 { font-family: var(--font-head); font-size: 1.15rem; margin-bottom: .35rem; }
.calc-desc { color: var(--text-dim); font-size: .88rem; margin-bottom: 1.2rem; }

.field { display: block; margin-bottom: .9rem; }
.field > span { display: block; font-size: .84rem; color: var(--text-dim); margin-bottom: .35rem; font-weight: 400; }
.field input, .field select {
  width: 100%;
  background: rgba(0,0,0,.32);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .65rem .85rem;
  outline: none;
  transition: border-color .2s;
}
.field input:focus, .field select:focus { border-color: var(--cyan); }
.field select option { background: var(--bg-alt); }

.check {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .5rem .6rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
  font-size: .92rem;
}
.check:hover { background: rgba(255,255,255,.045); }
.check input { margin-top: .28em; accent-color: var(--cyan); width: 16px; height: 16px; flex: none; }
.check em { color: var(--emerald); font-style: normal; font-size: .78rem; margin-left: .3rem; }
.check-cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: .6rem; }

.field-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .9rem .8rem .5rem;
  margin-bottom: .9rem;
}
.field-group legend {
  font-size: .8rem;
  color: var(--text-dim);
  padding: 0 .5rem;
  font-weight: 400;
}

.calc-result {
  padding: 1.8rem;
  position: sticky;
  top: 90px;
  min-height: 200px;
}
.result-hint { color: var(--text-dim); font-size: .9rem; }
.result-score {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1.1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.result-class { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; margin: .4rem 0 .2rem; }
.result-risk { font-size: 1rem; margin-bottom: .8rem; }
.result-detail { color: var(--text-dim); font-size: .86rem; border-top: 1px solid var(--border); padding-top: .8rem; margin-top: .8rem; }
.result-detail ul { margin: .4rem 0 0 1.1rem; }
.result-detail li { margin-bottom: .3rem; }
.risk-meter { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin: .8rem 0 1rem; }
.risk-meter > div { height: 100%; border-radius: 6px; background: var(--grad); width: 0; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.risk-low { color: var(--emerald); }
.risk-mid { color: #fbbf24; }
.risk-high { color: #f87171; }

.crosslink {
  margin-top: 2.6rem;
  padding: 1.8rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
  flex-wrap: wrap;
}
.crosslink h3 { font-family: var(--font-head); margin-bottom: .4rem; }
.crosslink p { color: var(--text-dim); font-size: .94rem; max-width: 620px; }

/* ===== App section ===== */
.app-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.6rem;
  align-items: center;
}
.app-shot img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  background: #0d1524;
}
.feature-list { list-style: none; margin-bottom: 1.6rem; }
.feature-list li {
  padding: .55rem 0 .55rem 1.9rem;
  position: relative;
  color: var(--text-dim);
  font-size: .95rem;
}
.feature-list li strong { color: var(--text); font-weight: 600; }
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .95em;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(34,211,238,.5);
}
.download-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dl-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  text-align: center;
  padding: 1.5rem 1rem 1.3rem;
  text-decoration: none !important;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.dl-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,.5);
  box-shadow: 0 18px 44px rgba(34,211,238,.15);
}
.dl-os { font-family: var(--font-head); font-weight: 700; color: var(--text); margin-top: .5rem; }
.dl-file { font-size: .78rem; color: var(--text-dim); }
.dl-btn {
  margin-top: .8rem;
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 600;
  color: var(--cyan);
  border: 1px solid rgba(34,211,238,.45);
  border-radius: 999px;
  padding: .4rem 1.1rem;
}
.dl-note { margin-top: 1.2rem; font-size: .82rem; color: var(--text-dim); }

/* ===== Algoritmos ===== */
.algo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.algo-card { padding: 1.6rem; transition: transform .2s ease, border-color .2s ease; }
.algo-card:hover { transform: translateY(-4px); border-color: rgba(52,211,153,.4); }
.algo-card h3 { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: .5rem; }
.algo-card h3::after {
  content: "";
  display: block;
  width: 34px; height: 3px;
  margin-top: .45rem;
  border-radius: 3px;
  background: var(--grad);
}
.algo-card p { color: var(--text-dim); font-size: .88rem; }

/* ===== Equipe ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  max-width: 900px;
  margin: 0 auto;
}
.team-card { padding: 2rem 1.6rem; text-align: center; }
.team-card img {
  margin: 0 auto 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  filter: saturate(.92);
}
.team-card h3 { font-family: var(--font-head); font-size: 1.08rem; }
.team-card p { color: var(--text-dim); font-size: .88rem; margin-top: .3rem; }
.team-link { display: inline-block; margin-top: .7rem; font-size: .86rem; font-weight: 500; }
.team-icon {
  width: 72px; height: 72px;
  margin: 0 auto 1.3rem;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: var(--cyan);
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
}

/* ===== Rede ===== */
.network-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.net-card {
  padding: 1.7rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  text-decoration: none !important;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.net-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,.5);
  box-shadow: 0 18px 44px rgba(0,0,0,.35);
}
.net-card h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.net-card p { color: var(--text-dim); font-size: .89rem; flex: 1; }
.net-go { font-size: .84rem; font-weight: 500; color: var(--cyan); }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 3.2rem 0 2rem; background: var(--bg-alt); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 1.8rem;
}
.footer-brand img { margin-bottom: .8rem; opacity: .9; }
.footer-brand p { color: var(--text-dim); font-size: .86rem; max-width: 320px; }
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { color: var(--text-dim); font-size: .9rem; }
.footer-links a:hover { color: var(--text); }
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-legal p { font-size: .78rem; color: var(--text-dim); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .algo-grid, .network-grid { grid-template-columns: 1fr 1fr; }
  .calc-grid, .app-grid { grid-template-columns: 1fr; }
  .calc-result { position: static; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(6,11,20,.97);
    border-bottom: 1px solid var(--border);
    padding: .6rem 4%;
  }
  .nav.open .nav-links a { padding: .8rem 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; margin-left: auto; }
  .algo-grid, .network-grid, .team-grid, .download-cards { grid-template-columns: 1fr; }
  .check-cols { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
  .crosslink { flex-direction: column; align-items: flex-start; }
}

/* ===== Avisos legais / termo de responsabilidade ===== */
.notice {
  margin: 0 auto 2rem;
  max-width: 820px;
  padding: .9rem 1.2rem;
  border: 1px solid rgba(251, 191, 36, .35);
  border-left: 3px solid #fbbf24;
  border-radius: 12px;
  background: rgba(251, 191, 36, .07);
  color: var(--text-dim);
  font-size: .88rem;
  text-align: left;
}
.notice strong { color: var(--text); }

.result-disclaimer {
  margin-top: .9rem;
  padding-top: .7rem;
  border-top: 1px dashed var(--border);
  font-size: .74rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.disclaimer {
  margin-top: 2.6rem;
  padding: 1.8rem 2rem;
  scroll-margin-top: 90px; /* compensa a nav fixa ao chegar por âncora */
}
.disclaimer h3 {
  font-family: var(--font-head);
  font-size: 1.12rem;
  margin-bottom: 1rem;
}
.disclaimer ul { margin: 0 0 0 1.1rem; }
.disclaimer li {
  color: var(--text-dim);
  font-size: .88rem;
  line-height: 1.65;
  margin-bottom: .7rem;
}
.disclaimer li strong { color: var(--text); }
.disclaimer-foot {
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-dim);
}
@media (max-width: 640px) {
  .disclaimer { padding: 1.4rem 1.2rem; }
}

/* ===== Bibliografia por calculadora ===== */
.calc-ref {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.calc-ref h4 {
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .6rem;
}
.calc-ref ul { list-style: none; margin: 0; }
.calc-ref li {
  font-size: .78rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin-bottom: .55rem;
}
.calc-ref li:last-child { margin-bottom: 0; }
.calc-ref em { color: var(--text-dim); font-style: italic; }
.calc-ref a { color: var(--cyan); word-break: break-word; }
.ref-nota { color: var(--text); font-weight: 500; }
