:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #050b14;
  --bg-deep: #030812;
  --panel: #0c1828;
  --panel-soft: rgba(255, 255, 255, 0.028);
  --text: #f3f7fb;
  --muted: #a8b9cb;
  --cyan: #5ee7ff;
  --cyan-strong: #12c9eb;
  --blue: #2ca3ff;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.065);
  --ok: #56d9a1;
  --warn: #ffc96b;
  --bad: #ff8b8b;
  --shadow: 0 35px 100px rgba(0, 0, 0, 0.45);
  --content: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 10%, rgba(44, 183, 255, 0.12), transparent 27rem),
    radial-gradient(circle at 8% 70%, rgba(40, 97, 174, 0.1), transparent 32rem),
    var(--bg);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img,
video {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: #03101a;
  background: var(--cyan);
  border-radius: 9px;
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px max(22px, calc((100vw - var(--content)) / 2));
  background: rgba(5, 11, 20, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
  font-weight: 800;
}

.mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #06101c;
  background: linear-gradient(145deg, var(--cyan), #128bdc);
  box-shadow: 0 10px 30px rgba(18, 201, 235, 0.2);
}

.mark svg {
  width: 28px;
}

.brand small,
.brand strong {
  display: block;
}

.brand small {
  color: #b7cadd;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand strong {
  color: #fff;
  font-size: 18px;
}

.site-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.site-switch a {
  padding: 8px 12px;
  color: #9db1c5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease;
}

.site-switch a:hover,
.site-switch a:focus-visible {
  color: #fff;
}

.site-switch a[aria-current="page"] {
  color: #e8fbff;
  background: rgba(94, 231, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(94, 231, 255, 0.18);
}

.page-nav {
  display: flex;
  gap: 20px;
  color: #c2d1e1;
  font-size: 12px;
}

.page-nav a {
  opacity: 0.78;
  transition: color 160ms ease, opacity 160ms ease;
}

.page-nav a:hover,
.page-nav a:focus-visible {
  color: var(--cyan);
  opacity: 1;
}

.wrap {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding-inline: 28px;
}

.section {
  padding: 104px 0;
  border-top: 1px solid var(--line-soft);
}

.section[id] {
  scroll-margin-top: 92px;
}

.section-deep {
  background: linear-gradient(180deg, rgba(7, 18, 31, 0.34), rgba(3, 8, 18, 0.4));
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(38px, 5vw, 72px);
  align-items: center;
}

.section-grid.reverse .section-copy {
  order: 2;
}

.section-grid.reverse .section-visual {
  order: 1;
}

.section-copy {
  min-width: 0;
}

.eyebrow,
.kicker {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin: 15px 0 24px;
  font-size: clamp(48px, 5.8vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 {
  margin: 12px 0 20px;
  font-size: clamp(38px, 4.7vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

h3 {
  margin-bottom: 9px;
  font-size: 17px;
  line-height: 1.2;
}

.lead,
.section-copy > p,
.intro-copy {
  color: #adbed0;
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.7;
}

.section-copy > p + p {
  margin-top: -7px;
}

.safety,
.highlight-line {
  margin-top: 24px;
  padding: 16px 18px;
  color: #cfdfed;
  border-left: 2px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, rgba(94, 231, 255, 0.08), transparent);
  font-size: 14px;
  font-weight: 650;
}

.highlight-line {
  color: #e2f8fc;
  letter-spacing: 0.025em;
}

.media-frame {
  position: relative;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.media-frame video,
.media-frame img {
  width: 100%;
  display: block;
  border-radius: 19px;
  background: #06101c;
}

.video-shell {
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-status {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  padding: 7px 10px;
  color: #d9edf7;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(3, 10, 18, 0.78);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(40px, 5vw, 70px);
  align-items: center;
  padding: 70px 0 82px;
}

.hero .lead {
  max-width: 680px;
}

.hero .section-visual {
  position: relative;
}

.hero .section-visual::before {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: -1;
  background: radial-gradient(circle, rgba(50, 202, 240, 0.15), transparent 65%);
  filter: blur(8px);
}

.story-rail {
  padding: 24px 0 36px;
  border-top: 1px solid var(--line-soft);
}

.story-rail ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-rail li {
  position: relative;
  min-height: 78px;
  display: flex;
  align-items: center;
  padding: 15px;
  color: #d7e6f2;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.026);
  font-size: 13px;
  font-weight: 760;
}

.story-rail li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -14px;
  z-index: 2;
  color: var(--cyan);
}

.patient-crop {
  position: relative;
  aspect-ratio: 16 / 7.4;
  overflow: hidden;
  contain: layout paint;
  border-radius: 19px;
  background: #eaf1f5;
}

.patient-crop img {
  position: absolute;
  top: -38%;
  left: 0;
  width: 100%;
  max-width: none;
  border-radius: 0;
}

.crop-label {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 3;
  padding: 8px 11px;
  color: #05212b;
  border-radius: 999px;
  background: rgba(94, 231, 255, 0.94);
  box-shadow: 0 10px 30px rgba(5, 11, 20, 0.26);
  font-size: 11px;
  font-weight: 850;
}

.protocol-stack {
  position: relative;
  min-height: 610px;
}

.protocol-main,
.protocol-focus {
  position: absolute;
  overflow: hidden;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 19, 32, 0.96);
  box-shadow: var(--shadow);
}

.protocol-main {
  inset: 0 14% 80px 0;
  border-radius: 25px;
}

.protocol-focus {
  right: 0;
  bottom: 0;
  width: 88%;
  border-radius: 21px;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(94, 231, 255, 0.08);
}

.protocol-main img,
.protocol-focus img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
  border-radius: 16px;
}

.protocol-focus img {
  aspect-ratio: 3 / 0.75;
}

.protocol-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 8px 11px;
  color: #dffaff;
  border: 1px solid rgba(94, 231, 255, 0.25);
  border-radius: 999px;
  background: rgba(4, 12, 21, 0.8);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.state-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 26px 0;
}

.state-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.026);
}

.state-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.state-card span {
  color: #98aabd;
  font-size: 11px;
  line-height: 1.45;
}

.state-card.ok strong { color: var(--ok); }
.state-card.warn strong { color: var(--warn); }
.state-card.bad strong { color: var(--bad); }

.trace-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 38px;
}

.trace-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}

.trace-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  color: #03101a;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--cyan), var(--blue));
  font-size: 12px;
  font-weight: 900;
}

.trace-card p {
  margin: 0;
  color: #94a8bb;
  font-size: 13px;
  line-height: 1.55;
}

.versions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 40px;
}

.version-step {
  position: relative;
  padding: 18px 22px 18px 28px;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.024);
}

.version-step:first-child {
  border-left: 1px solid var(--line);
  border-radius: 18px 0 0 18px;
}

.version-step:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 18px 18px 0;
}

.version-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  z-index: 2;
  width: 16px;
  height: 16px;
  border-top: 1px solid var(--cyan);
  border-right: 1px solid var(--cyan);
  background: #07111d;
  transform: translateY(-50%) rotate(45deg);
}

.version-step small {
  display: block;
  color: #7890a6;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.version-step strong {
  display: block;
  margin-top: 4px;
  color: #e5f2f8;
  font-size: 14px;
}

.closing {
  padding: 112px 0 132px;
  text-align: center;
}

.closing-box {
  max-width: 970px;
  margin: 0 auto;
  padding: 66px clamp(26px, 6vw, 72px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0, rgba(94, 231, 255, 0.13), transparent 58%),
    rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow);
}

.closing-box p {
  max-width: 740px;
  margin-inline: auto;
  color: #aebfd0;
  font-size: 18px;
}

.closing-quote {
  margin-top: 30px;
  color: #ecfbff;
  font-size: clamp(18px, 2.1vw, 25px);
  font-weight: 780;
}

/* Seguimiento Clínico: se conserva la composición visual publicada. */
.hero-opening {
  padding: 28px 0 56px;
}

.opening-video,
.product-video {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: #06101c;
  box-shadow: var(--shadow);
}

.legacy-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 64px;
  align-items: center;
}

.legacy-copy p {
  color: #adbed0;
  font-size: 19px;
}

.video-note,
.smallline {
  margin-top: 14px;
  color: #7f94a8;
  font-size: 12px;
}

.video-note {
  text-align: center;
}

.brief-demo {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow);
}

.fake-app {
  position: relative;
  height: 480px;
  overflow: hidden;
  color: #0e1a27;
  border-radius: 20px;
  background: #eaf0f5;
  transform-origin: center;
  animation: briefZoom 8s ease-in-out infinite;
}

.fake-top {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid #cad5df;
  background: #f8fbfd;
  font-weight: 800;
}

.fake-body {
  height: calc(100% - 48px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  padding: 16px;
}

.timeline,
.brief-card {
  padding: 15px;
  border: 1px solid #d5dee6;
  border-radius: 13px;
  background: #fff;
}

.event {
  padding: 11px 0;
  border-bottom: 1px solid #e2e8ee;
}

.event small { color: #718292; }
.event b { display: block; font-size: 13px; }
.event span { color: #506274; font-size: 11px; }
.brief-card h3 { margin: 0 0 12px; font-size: 15px; }

.brief-item {
  margin: 9px 0;
  padding: 8px 10px;
  border-left: 3px solid #12c9eb;
  border-radius: 0 8px 8px 0;
  background: #f5fbfd;
}

.brief-item small { display: block; color: #687d91; font-size: 9px; text-transform: uppercase; }
.brief-item b { font-size: 12px; }

.focus-ring {
  position: absolute;
  top: 17%;
  right: 7%;
  width: 39%;
  height: 67%;
  opacity: 0;
  border: 2px solid rgba(18, 201, 235, 0.9);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(4, 11, 18, 0.18), 0 0 32px rgba(18, 201, 235, 0.25);
  animation: focus 8s infinite;
}

.brief-caption {
  position: absolute;
  left: 45px;
  bottom: 42px;
  padding: 8px 11px;
  color: #e7f5ff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.88);
  font-size: 11px;
}

.strip {
  padding: 88px 0;
  border-top: 1px solid var(--line-soft);
}

.strip-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 34px;
}

.strip-head h2 { margin: 10px 0 0; }
.strip-head p { max-width: 470px; color: #9eb0c2; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card,
.wide {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  object-position: top;
  border-radius: 13px;
}

.card-copy { padding: 14px 10px 12px; }
.card-copy b { display: block; font-size: 15px; }
.card-copy span { color: #8fa4b7; font-size: 12px; }
.wide { margin-top: 18px; padding: 12px; border-radius: 22px; }
.wide img { width: 100%; display: block; border-radius: 14px; }

.creator-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  box-shadow: var(--shadow);
}

.creator-card h2 { margin: 0 0 12px; font-size: clamp(28px, 3vw, 44px); }
.creator-card p { max-width: 850px; margin: 0; color: #aebdca; line-height: 1.7; }

.creator-contact {
  padding: 13px 18px;
  color: #dffaff;
  border: 1px solid rgba(94, 231, 255, 0.3);
  border-radius: 999px;
  background: rgba(94, 231, 255, 0.08);
  font-weight: 700;
  white-space: nowrap;
}

.legacy-cta {
  padding: 100px 0 125px;
  text-align: center;
}

.legacy-cta .closing-box { max-width: 880px; padding: 58px 30px; }

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@keyframes focus {
  0%, 28% { opacity: 0; }
  40%, 77% { opacity: 1; }
  90%, 100% { opacity: 0; }
}

@keyframes briefZoom {
  0%, 22% { transform: scale(1); }
  42%, 76% { transform: scale(1.08) translateX(-2%); }
  90%, 100% { transform: scale(1); }
}

@media (max-width: 1080px) {
  .page-nav { display: none; }
  .trace-grid { grid-template-columns: repeat(3, 1fr); }
  .trace-card:last-child { grid-column: span 2; }
  .protocol-stack { min-height: 520px; }
}

@media (max-width: 900px) {
  .topbar { min-height: 68px; padding-inline: 16px; gap: 12px; }
  .brand-copy { display: none; }
  .site-switch { margin-left: 0; flex: 1; justify-content: flex-end; }
  .site-switch a { padding: 8px 10px; font-size: 11px; }
  .wrap { padding-inline: 19px; }
  .hero,
  .section-grid,
  .legacy-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; gap: 36px; padding: 64px 0 72px; }
  .section { padding: 76px 0; }
  .section-grid.reverse .section-copy,
  .section-grid.reverse .section-visual { order: initial; }
  .section-copy { order: 1 !important; }
  .section-visual { order: 2 !important; }
  .story-rail ol { grid-template-columns: 1fr; }
  .story-rail li { min-height: 58px; }
  .story-rail li:not(:last-child)::after { content: "↓"; right: 24px; bottom: -17px; }
  .protocol-stack { min-height: 500px; }
  .trace-grid { grid-template-columns: repeat(2, 1fr); }
  .trace-card:last-child { grid-column: auto; }
  .versions { grid-template-columns: 1fr 1fr; gap: 10px; }
  .version-step,
  .version-step:first-child,
  .version-step:last-child { border: 1px solid var(--line); border-radius: 14px; }
  .version-step:not(:last-child)::after { display: none; }
  .cards { grid-template-columns: 1fr; }
  .strip-head { display: block; }
  .creator-card { grid-template-columns: 1fr; }
  .creator-contact { text-align: center; white-space: normal; }
  .opening-video,
  .product-video { border-radius: 18px; }
  .fake-body { grid-template-columns: 1fr; }
  .brief-card { position: absolute; right: 12px; bottom: 12px; left: 12px; max-height: 58%; overflow: hidden; }
  .focus-ring { top: 40%; right: 6%; left: 6%; width: auto; height: 50%; }
}

@media (max-width: 620px) {
  .mark { width: 42px; height: 42px; border-radius: 12px; }
  .mark svg { width: 24px; }
  .site-switch a { padding-inline: 9px; }
  h1 { font-size: clamp(42px, 13vw, 58px); }
  h2 { font-size: clamp(35px, 10vw, 48px); }
  .lead,
  .section-copy > p,
  .intro-copy { font-size: 17px; }
  .media-frame { padding: 6px; border-radius: 20px; }
  .media-frame video,
  .media-frame img { border-radius: 14px; }
  .patient-crop { aspect-ratio: 0.92 / 1; }
  .patient-crop img { top: -50%; left: -74%; width: 245%; }
  .protocol-stack { min-height: 560px; display: grid; gap: 14px; }
  .protocol-main,
  .protocol-focus { position: relative; inset: auto; width: 100%; padding: 6px; }
  .protocol-main { height: 365px; }
  .protocol-main img { object-position: 38% top; }
  .protocol-focus img { aspect-ratio: auto; }
  .state-row { grid-template-columns: 1fr; }
  .trace-grid { grid-template-columns: 1fr; }
  .trace-card { min-height: 0; }
  .trace-number { margin-bottom: 16px; }
  .versions { grid-template-columns: 1fr; }
  .closing { padding: 82px 0 100px; }
  .closing-box { padding: 48px 22px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
