/* Triariz: a identidade do pitch (Archivo em duas larguras, cores do monitor multiparâmetro),
   em página de rolagem. O aparelho 3D fica fixo ao fundo e muda de pose a cada seção. */
:root {
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --screen: #0A1622;
  --clinic: #EDF1F0;
  --clinic-2: #E1E7E6;
  --proof: #0C4A43;
  --ecg: #2BD68F;
  --spo2: #4CC9F0;
  --resp: #F2C94C;
  --gut: clamp(16px, 5vw, 136px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--screen); color: #EEF3F2; font-family: var(--font);
  -webkit-font-smoothing: antialiased; font-kerning: normal; overflow-x: hidden;
  transition: background-color .9s cubic-bezier(.65, 0, .35, 1);
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { list-style: none; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ecg); outline-offset: 3px; border-radius: 4px; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gut); pointer-events: none;
}
.topbar a { pointer-events: auto; text-decoration: none; }
.word { font-weight: 800; font-stretch: 125%; font-size: 24px; letter-spacing: -.01em; }
.by { font-size: 15px; color: var(--soft, #9FB2C2); }
.by b { color: inherit; font-weight: 800; letter-spacing: .02em; }
.by:hover { color: #fff; }

/* cada seção define suas cores; o fundo do body acompanha via JS */
.sec {
  position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center;
  --text: #EEF3F2; --soft: #9FB2C2; --muted: #6F8599; --accent: var(--ecg); --card: #102235; --line: #1E3348;
  color: var(--text);
}
.sec[data-theme="teal"] { --soft: #BFDCD4; --muted: #8FBDB1; }
.sec[data-theme="light"], .sec[data-theme="sand"] { --text: #132230; --soft: #4B5A66; --muted: #6E7C87; --accent: #0A7A52; --card: #F7F9F8; --line: #CDD6D5; }
body.light-ui .topbar { color: #132230; --soft: #4B5A66; }
body.light-ui .by:hover { color: #000; }
.inner { width: 100%; padding: 120px var(--gut); }

/* escala: display / h2 / lead / corpo, no espírito do pitch */
.display { font-size: clamp(48px, 7.8vw, 148px); font-weight: 650; line-height: .96; letter-spacing: -.04em; max-width: 9.5ch; text-wrap: balance; }
h2 { font-size: clamp(34px, 4.6vw, 80px); font-weight: 620; line-height: 1.02; letter-spacing: -.03em; max-width: 16ch; text-wrap: balance; }
h2.xl { font-size: clamp(40px, 6vw, 112px); line-height: .98; letter-spacing: -.04em; max-width: 15ch; }
.lead { margin-top: 28px; font-size: clamp(19px, 1.9vw, 34px); line-height: 1.36; color: var(--soft); max-width: 34ch; text-wrap: pretty; }
.accent-line { margin-top: 28px; font-size: clamp(19px, 1.7vw, 30px); line-height: 1.3; color: var(--accent); font-weight: 560; max-width: 26ch; }
.note, .source { margin-top: 20px; font-size: 15px; line-height: 1.45; color: var(--muted); max-width: 54ch; }

/* capa */
#capa .inner { padding-top: 140px; }
.ecg-bg { position: absolute; left: 0; bottom: 3vh; width: 100%; height: 200px; opacity: .32; z-index: -1; }
.ecg-bg path, .mini-ecg path, .monitor path { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ecg-bg path { stroke: var(--ecg); stroke-width: 3; }
.scroll-hint { margin-top: 56px; font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.scroll-hint::before { content: ''; width: 1px; height: 40px; background: linear-gradient(var(--ecg), transparent); animation: drip 2.2s ease-in-out infinite; }
@keyframes drip { 0%, 100% { transform: scaleY(.3); transform-origin: top; } 50% { transform: scaleY(1); } }

/* sinais: a seção é alta e o conteúdo fica parado enquanto a rolagem troca o sinal */
.tall { display: block; height: 420vh; }
.sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.signals { margin-top: 36px; display: grid; gap: 2px; counter-reset: s; }
.signals button {
  all: unset; cursor: pointer; display: block; position: relative; padding: 7px 0 7px 44px;
  font-size: clamp(17px, 1.6vw, 28px); line-height: 1.35; color: var(--muted); transition: color .4s;
}
.signals button b { color: var(--soft); font-weight: 600; transition: color .4s; }
.signals button::before { content: ''; position: absolute; left: 0; top: 50%; width: 22px; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--c); opacity: .35; transition: opacity .4s, width .4s; }
.signals li.on button { color: var(--text); }
.signals li.on button b { color: var(--c); }
.signals li.on button::before { opacity: 1; width: 32px; }
.signals button:focus-visible { outline-offset: 2px; }

/* como funciona: três passos em sequência */
.steps { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 1300px; }
.steps li { background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 32px; display: grid; align-content: start; gap: 12px; }
.steps .n { font-stretch: 68%; font-weight: 560; font-size: 64px; line-height: .9; color: var(--accent); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: clamp(22px, 1.8vw, 32px); font-weight: 640; letter-spacing: -.015em; line-height: 1.12; }
.steps p { color: var(--soft); font-size: clamp(16px, 1.2vw, 20px); line-height: 1.45; }
.mini-ecg { width: 100%; height: 50px; margin-top: 4px; }
.mini-ecg path { stroke: var(--ecg); stroke-width: 2.5; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* monitor */
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 120px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.monitor { background: var(--screen); border-radius: 14px; padding: 18px 22px; border: 1px solid #1E3348; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6); display: grid; gap: 4px; }
.ch { display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #1E3348; }
.ch:last-child { border-bottom: 0; }
.ch .lbl { font-size: 15px; font-weight: 600; }
.ch svg { width: 100%; height: 56px; }
.ch path { stroke-width: 2.4; }
.m-ecg { stroke: var(--ecg); } .m-pleth { stroke: var(--spo2); } .m-resp { stroke: var(--resp); }
.val { font-stretch: 66%; font-weight: 560; font-size: clamp(48px, 5vw, 84px); line-height: .9; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .ch { grid-template-columns: 72px minmax(0, 1fr) 64px; } }

/* prova */
.bars { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: end; max-width: 520px; --h: 320px; }
.col { display: grid; grid-template-rows: auto var(--h) auto; gap: 12px; }
.col i { display: block; align-self: end; border-radius: 6px 6px 0 0; transform-origin: 50% 100%; }
.b1 { height: var(--h); background: #D23B3B; }
.b2 { height: calc(var(--h) * .508); background: #0A7A52; }
.bar-val { font-stretch: 68%; font-weight: 560; font-size: clamp(56px, 6vw, 110px); line-height: .9; font-variant-numeric: tabular-nums; }
.col span { font-size: 16px; color: var(--soft); }
.bars figcaption { grid-column: 1 / -1; font-size: 17px; color: var(--soft); }
@media (max-width: 520px) { .bars { --h: 200px; } }

/* onde */
.places { margin-top: 48px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--text); max-width: 1400px; }
.places li { padding: 24px 24px 24px 0; }
.places li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.places h3 { font-size: clamp(22px, 2vw, 34px); font-weight: 620; line-height: 1.1; letter-spacing: -.02em; }
@media (max-width: 900px) {
  .places { grid-template-columns: 1fr 1fr; }
  .places li:nth-child(3) { padding-left: 0; border-left: 0; }
  .places li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* marcos */
.timeline { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; max-width: 1100px; position: relative; padding-top: 28px; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--accent) 0 30%, var(--line) 30%); }
.timeline li { display: grid; gap: 8px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 0; top: -36px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent); }
.timeline li + li::before { background: var(--clinic-2); border: 3px solid var(--accent); box-shadow: none; }
.year { font-stretch: 68%; font-weight: 560; font-size: clamp(56px, 5vw, 96px); line-height: .9; color: var(--accent); }
.timeline h3 { font-size: clamp(22px, 1.8vw, 30px); font-weight: 640; }
.timeline p { color: var(--soft); font-size: 18px; max-width: 40ch; }
@media (max-width: 700px) { .timeline { grid-template-columns: 1fr; } .timeline li + li::before { display: none; } }

/* fim */
.fim-inner { padding-top: 46vh; text-align: center; display: grid; justify-items: center; }
.fim-inner h2, .fim-inner .lead { margin-left: auto; margin-right: auto; }
.ctas { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; border-radius: 999px; background: var(--ecg); color: #06281A; font-weight: 650; font-size: 17px; text-decoration: none; border: 1.5px solid var(--ecg); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border-color: #3A526A; }
.btn.ghost:hover { border-color: var(--text); }

.foot { position: relative; z-index: 1; padding: 32px var(--gut) 48px; font-size: 14px; color: #6F8599; display: grid; gap: 4px; background: var(--screen); }

/* celular: o aparelho fica em cima, o texto embaixo */
@media (max-width: 900px) {
  .display { font-size: clamp(40px, 11vw, 64px); }
  #capa { align-items: flex-end; }
  #capa .inner { padding-bottom: 72px; }
  .sticky { align-items: flex-end; }
  .sinais-inner { padding-bottom: 40px; padding-top: 0; }
  .signals { margin-top: 18px; }
  .signals button { padding: 5px 0 5px 36px; }
  .sinais-inner .note { display: none; }
  .sinais-inner .accent-line { margin-top: 14px; }
  .fim-inner { padding-top: 52vh; }
}

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
  .scroll-hint::before { animation: none; }
}
