:root {
  /* Base, from the new 4natomy interface */
  --ink: #050B16;
  --panel: #0C1628;
  --panel-2: #111E35;
  --line: #1B2943;
  --line-2: #2A3B5C;
  --text: #E6EDF7;
  --text-2: #B6C2D6;
  --muted: #8796B0;
  --blue: #2563EB;
  --blue-hi: #6B9BFF;

  /* Monitor channels: one color per clinical parameter, never decoration */
  --ch-ecg: #3BE38A;
  --ch-resp: #4C8DFF;
  --ch-pcg: #FF9A3D;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.55 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2rem, 74rem); margin-inline: auto; }

/* Type: Inter, tight and heavy for headlines and numbers */
h1, h2 { font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem); }
h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.3; }
p { text-wrap: pretty; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.75rem 1.25rem;
  border: 1px solid var(--line-2); border-radius: 0.75rem;
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn-small { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.9375rem; }
/* Official store badges, shown at the same height as the guidelines ask */
.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.stores img { width: auto; height: 3rem; }

/* Header */
.top { display: flex; align-items: center; gap: 2rem; padding-block: 1.25rem; }
.brand { flex-shrink: 0; }
.brand img { width: auto; height: 3.25rem; }
.menu { margin-left: auto; }
.menu ul { display: flex; gap: 1.75rem; padding: 0; list-style: none; }
.menu a { color: var(--text-2); font-size: 0.9375rem; text-decoration: none; }
.menu a:hover { color: var(--text); }
.langs { display: flex; gap: 0.25rem; }
.langs a { padding: 0.375rem 0.5rem; border-radius: 0.5rem; color: var(--muted); font-size: 0.875rem; font-weight: 700; text-decoration: none; }
.langs a:hover { color: var(--text); }
.langs a[aria-current] { background: var(--panel-2); color: var(--text); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 20rem; align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  padding-block: clamp(2rem, 5vw, 4.5rem) clamp(4rem, 8vw, 7rem);
}
.hero h1 { max-width: 12em; }
.lead { max-width: 34rem; margin-top: 1.75rem; color: var(--text-2); font-size: 1.25rem; }
.hero .stores { margin-top: 2rem; }
.note { margin-top: 1rem; color: var(--muted); font-size: 0.9375rem; }

/* Phone demo: copy of the current app screen (v1.2.1), colors sampled from its screenshots */
.demo { display: grid; justify-items: center; gap: 1rem; }
.phone { width: min(100%, 19.5rem); padding: 0.5rem; background: #0A1322; border: 1px solid var(--line-2); border-radius: 2.75rem; }
.app {
  --ch-ecg: #80FF00;
  --ch-resp: #027DFE;
  position: relative; display: flex; flex-direction: column; align-items: center;
  aspect-ratio: 9 / 19; padding: 10% 0 2%; overflow: hidden;
  background: #001737; border-radius: 2.25rem;
}
.app-logo { width: 69%; }
.app-exit {
  position: absolute; top: 36%; left: 0; display: grid; place-items: center;
  width: 11.5%; aspect-ratio: 1;
  background: #0167B1; border-radius: 0 0.5rem 0.5rem 0; color: #fff;
}
.app-exit svg { width: 62%; }
.hex-wrap { position: relative; width: 69%; aspect-ratio: 1.1547; margin-block: auto; }
.hex-halo, .hex, .hex-in { position: absolute; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.hex-halo { inset: -15%; background: #004566; }
.hex { inset: 0; background: #07CBF1; }
.hex-in { inset: 2.7%; overflow: hidden; background: #000; }
.hex-in canvas, .hex-in img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app-status {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 0 14%;
  color: #fff; font-size: 0.875rem; font-weight: 700; line-height: 1.2; text-align: center; text-transform: uppercase;
}
.app[data-state="idle"] .hex { background: #02BEFB; }
.app[data-state="idle"] .hex-in { background: #0085B0; }
.app[data-state="idle"] .hex-halo { animation: halo 1.6s ease-in-out infinite; }
.app[data-state="reading"] .hex-halo { display: none; }
.app[data-state="reading"] .app-status { clip-path: inset(50%); } /* hidden on screen, still announced */
@keyframes halo { 50% { opacity: 0.4; transform: scale(0.93); } }
.app-stop {
  display: grid; place-items: center;
  width: 44%; aspect-ratio: 4 / 1; margin-bottom: 4%;
  background: #A10800; border-radius: 999px;
  color: #fff; font-size: 0.8125rem; font-weight: 700;
}
.app[data-state="idle"] .app-stop { visibility: hidden; }
.app-foot { display: flex; justify-content: space-between; width: 100%; padding-inline: 6%; color: #fff; font-size: 0.625rem; font-weight: 700; }


/* Sections */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-head { display: grid; gap: 1rem; max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { color: var(--text-2); font-size: 1.125rem; }

/* How it works: a real sequence, so it is numbered */
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; padding: 0; list-style: none; counter-reset: step; }
.timeline li { position: relative; display: grid; align-content: start; gap: 0.5rem; padding-top: 4.5rem; counter-increment: step; }
.timeline li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  color: var(--blue-hi); font-size: 2.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1;
}
.timeline li::after { content: ''; position: absolute; top: 1.6rem; left: 2.5rem; right: -1.5rem; height: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline p { color: var(--text-2); }
/* Exams, laid out like monitor channels */
.exam-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0; list-style: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 1rem;
}
.exam-list li { display: grid; grid-template-columns: 10rem minmax(0, 1fr); align-items: center; gap: 1.25rem; padding: 1.25rem; }
.exam-list li:nth-child(n+3) { border-top: 1px solid var(--line); }
.exam-list li:nth-child(even) { border-left: 1px solid var(--line); }
.exam-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.exam-list h3 { margin-bottom: 0.25rem; }
.exam-list p { color: var(--text-2); font-size: 0.9375rem; }
.visual {
  height: 6rem; overflow: hidden;
  color: var(--c, var(--text));
  background: #040912; border: 1px solid var(--line); border-radius: 0.5rem;
}
.visual img { width: 100%; height: 100%; padding: 1.5rem; object-fit: contain; }
.visual svg { display: block; width: 100%; height: 100%; }
.visual path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* Pathology setup, with real app screens */
.setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(2.5rem, 6vw, 6rem); }
.setup-copy { display: grid; gap: 1.25rem; }
.setup-copy p, .points { color: var(--text-2); }
.points { display: grid; gap: 0.625rem; padding-left: 1.25rem; }
.points li::marker { color: var(--blue-hi); }
.screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(1rem, 3vw, 2rem); }
.screens img { border: 0.375rem solid #0A1322; border-radius: 1.75rem; outline: 1px solid var(--line-2); }
.screens img:nth-child(2) { margin-top: 3rem; }

/* Closing call to action */
.cta { display: grid; justify-items: start; gap: 1.25rem; }
.cta h2 { max-width: 14em; }
.cta p { max-width: 38rem; color: var(--text-2); font-size: 1.125rem; }
.cta .stores { margin-top: 0.75rem; }

.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 2rem 2.5rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.875rem;
}
.foot img { width: auto; height: 2.5rem; }

.load-error { padding-block: 4rem; color: var(--text-2); }

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .demo { justify-self: center; width: min(100%, 20rem); }
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .timeline li { padding: 0 0 0 4rem; }
  .timeline li::after { top: 3.75rem; bottom: -2rem; left: 1rem; right: auto; width: 1px; height: auto; }
  .setup { grid-template-columns: minmax(0, 1fr); }
  .screens { max-width: 30rem; }
}
@media (max-width: 860px) {
  .exam-list { grid-template-columns: minmax(0, 1fr); }
  .exam-list li:nth-child(n+2) { border-top: 1px solid var(--line); }
  .exam-list li:nth-child(even) { border-left: 0; }
}
@media (max-width: 720px) {
  .top { gap: 1rem; }
  .menu { display: none; }
  .langs { margin-left: auto; }
}
@media (max-width: 380px) {
  .top .btn { display: none; }
  .stores img { height: 2.625rem; }
}
@media (max-width: 480px) {
  .exam-list li { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; padding: 1rem; }
  .visual { height: 7rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity 0.7s ease, transform 0.7s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
