/* ============================================================
   CARELINK — professional med-tech dark UI
   Golos Text (display+body) · JetBrains Mono (data only)
   ============================================================ */
:root {
  --bg: #0a0c0e;
  --surface: rgba(255, 255, 255, .03);
  --surface-2: #101418;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --ink: #e9edef;
  --ink-dim: rgba(233, 237, 239, .62);
  --ink-faint: rgba(233, 237, 239, .38);
  --green: #3ecf8e;
  --green-dark: #157f56;
  --red: #e5484d;
  --amber: #d29922;
  --blue: #58a6ff;
  --font: "Golos Text", -apple-system, sans-serif;
  --font-m: "JetBrains Mono", monospace;
  --pad: clamp(20px, 5vw, 84px);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(62, 207, 142, .25); }

.mono { font-family: var(--font-m); font-weight: 400; }

/* ---- card primitive (restrained glass) ---- */
.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font); font-weight: 600; font-size: 15px; letter-spacing: 0;
  text-decoration: none; color: var(--ink);
  padding: 13px 26px; border-radius: 9px;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn--solid { background: var(--green); color: #06231733; color: #052e1f; }
.btn--solid:hover { background: #4fdb9d; }
.btn--glass { background: transparent; border: 1px solid var(--line-strong); }
.btn--glass:hover { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.04); }
.btn--xl { font-size: 16px; padding: 16px 34px; }

/* ---- shared type ---- */
.h2 {
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 46px); line-height: 1.15; letter-spacing: -.022em;
}
.h2 em { font-style: normal; color: var(--ink-dim); }
.section-eyebrow {
  font-family: var(--font-m);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 10px;
}

.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  display: inline-block;
  animation: dotFade 2.4s ease-in-out infinite;
}
@keyframes dotFade { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 40px;
  height: 64px; padding: 0 var(--pad);
  background: rgba(10, 12, 14, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .4s ease, opacity .4s ease;
}
.nav.nav--hidden { transform: translateY(-100%); opacity: 0; }
.nav__logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); margin-right: auto; }
.nav__logo-mark { height: 27px; width: auto; display: block; }
.nav__logo-word { font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.nav__logo-word b { font-weight: 600; color: var(--ink); }
.footer__brand { display: flex; align-items: center; gap: 9px; }
.footer__brand .nav__logo-mark { height: 24px; }
.nav__links { display: flex; gap: 32px; }
.nav__links a { color: var(--ink-dim); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .18s; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { padding: 9px 18px; font-size: 14px; }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100vh; z-index: 1;
  display: flex; align-items: center;
  padding: 140px var(--pad) 140px;
}
.hero__img-wrap { position: absolute; inset: 0; overflow: hidden; }
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 68% center; transform-origin: 60% 40%;
}
.hero__vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,12,14,.96) 0%, rgba(10,12,14,.78) 34%, rgba(10,12,14,.15) 64%, rgba(10,12,14,.55) 100%),
    linear-gradient(0deg, var(--bg) 2%, transparent 24%, transparent 80%, rgba(10,12,14,.8) 100%);
}
.hero__content { position: relative; max-width: 660px; }
.hero__eyebrow {
  font-size: 13.5px; color: var(--ink-dim); font-weight: 500;
  display: flex; align-items: center; gap: 10px; margin-bottom: 28px;
}
.hero__title {
  font-weight: 600;
  font-size: clamp(36px, 5vw, 68px); line-height: 1.06; letter-spacing: -.028em;
  margin-bottom: 26px;
}
.hero__title-line { display: block; overflow: hidden; }
.hero__title-line span { display: inline-block; }
.hero__title em { font-style: normal; color: var(--green); }
.hero__sub { max-width: 490px; color: var(--ink-dim); font-size: clamp(15px, 1.3vw, 17.5px); margin-bottom: 40px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__ecg { position: absolute; left: 0; right: 0; bottom: 100px; opacity: .22; pointer-events: none; }
.hero__ecg svg { width: 100%; height: 76px; }
.hero__stats {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap;
  padding: 18px var(--pad);
  font-size: 12px; letter-spacing: .04em; color: var(--ink-faint);
  border-top: 1px solid var(--line);
  background: rgba(10,12,14,.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hero__stats i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }

/* ============ PROBLEM ============ */
.problem { position: relative; z-index: 1; padding: 150px var(--pad) 130px; text-align: center; }
.problem__title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 16px; margin-bottom: 64px; }
.problem__big {
  font-weight: 600; letter-spacing: -.04em;
  font-size: clamp(64px, 10vw, 140px); line-height: 1; color: var(--ink);
}
.problem__big--red { color: var(--red); }
.problem__vs { font-weight: 400; font-size: clamp(16px, 2vw, 24px); color: var(--ink-dim); }
.problem__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; max-width: 1140px; margin: 0 auto; }
.problem__card { padding: 30px 28px; text-align: left; color: var(--ink-dim); font-size: 15px; }
.problem__num { color: var(--ink-faint); font-size: 11px; letter-spacing: .1em; display: block; margin-bottom: 14px; }

/* ============ ANATOMY ============ */
.anatomy { position: relative; z-index: 1; }
.anatomy__pin { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 90px var(--pad) 40px; }
.anatomy__eyebrow { align-self: center; }
.anatomy__stage {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  align-items: center; gap: clamp(20px, 4vw, 70px);
  max-width: 1200px; width: 100%; margin: 0 auto;
}
.anatomy__device {
  position: relative;
  height: min(72vh, 680px);
  aspect-ratio: 395 / 1403;
  margin: 0 auto;
}
.slayer {
  position: absolute;
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .55));
  will-change: transform, opacity;
}
/* exact coordinates from the single exploded render (union 395x1403) */
#s1 { left: 3.80%;  top: 0;      width: 93.92%; z-index: 6; }  /* верхняя крышка */
#s2 { left: 34.43%; top: 19.03%; width: 31.39%; z-index: 4; }  /* кнопка SOS */
#s3 { left: 13.16%; top: 25.30%; width: 73.16%; z-index: 3; }  /* плата IMU */
#s4 { left: 12.41%; top: 33.71%; width: 74.94%; z-index: 2; }  /* оптический сенсор */
#s5 { left: 2.03%;  top: 41.98%; width: 95.70%; z-index: 5; }  /* корпус с батареей */
#s6 { left: 0;      top: 63.08%; width: 100%;   z-index: 1; }  /* ремешок */
.anatomy__axis {
  position: absolute; left: 50%; top: -3%; bottom: 0; width: 1px;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.13) 0 6px, transparent 6px 13px);
}
.anatomy__ble { position: absolute; width: 60px; right: -28%; top: 20%; opacity: 0; z-index: 7; }

.anatomy__rail {
  position: absolute; left: 4px; right: 4px; top: calc(50% + 132px);
  display: flex; gap: 8px;
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint);
}
.anatomy__rail span {
  flex: 1; padding-top: 10px; white-space: nowrap;
  border-top: 1.5px solid rgba(255, 255, 255, .1);
  transition: color .3s ease, border-color .3s ease;
}
.anatomy__rail span.is-active { color: var(--green); border-color: var(--green); }

.anatomy__callouts { position: relative; min-height: 300px; }
.anatomy__step {
  position: absolute; inset: auto 0 auto 0; top: 50%; transform: translateY(-50%);
  padding: 32px 32px; opacity: 0; visibility: hidden;
}
.anatomy__step-idx { color: var(--green); font-size: 11px; letter-spacing: .12em; display: block; margin-bottom: 14px; }
.anatomy__step h3 { font-weight: 600; font-size: clamp(19px, 1.8vw, 24px); letter-spacing: -.015em; margin-bottom: 12px; }
.anatomy__step p { color: var(--ink-dim); font-size: 15px; }

/* ============ AI ============ */
.ai { position: relative; z-index: 1; padding: 170px var(--pad); overflow: hidden; }
.ai__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.ai__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(10,12,14,.62) 30%, rgba(10,12,14,.62) 70%, var(--bg) 100%); }
.ai__content { position: relative; max-width: 1140px; margin: 0 auto; }
.ai__lead { max-width: 520px; color: var(--ink-dim); font-size: 16.5px; margin: 22px 0 56px; }
.ai__scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.score {
  padding: 30px 26px; text-align: left;
  background: rgba(13, 16, 19, .72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.score__ring { width: 84px; height: 84px; margin-bottom: 22px; position: relative; }
.score__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score__ring circle { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 5; }
.score__ring .score__val {
  stroke: var(--green); stroke-linecap: round;
  stroke-dasharray: 276.5; stroke-dashoffset: 276.5;
}
.score__num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; color: var(--ink); }
.score h4 { font-weight: 600; font-size: 15.5px; letter-spacing: -.01em; margin-bottom: 6px; }
.score p { color: var(--ink-faint); font-size: 13.5px; }

/* ============ TIMELINE ============ */
.timeline { position: relative; z-index: 1; padding: 160px var(--pad); max-width: 1200px; margin: 0 auto; }
.timeline .h2 { margin-bottom: 72px; }
.timeline__track { position: relative; padding-left: 44px; }
.timeline__line { position: absolute; left: 12px; top: 6px; bottom: 6px; width: 1.5px; background: rgba(255,255,255,.09); }
.timeline__progress { width: 100%; height: 0%; background: var(--green); }
.timeline__items { display: flex; flex-direction: column; gap: 18px; }
.tl-item { padding: 24px 28px; display: flex; align-items: baseline; gap: 24px; max-width: 700px; }
.tl-item::after {
  content: ""; position: absolute; left: -38px; top: 31px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--green);
}
.tl-item[data-level="crit"]::after { border-color: var(--red); }
.tl-item[data-level="warn"]::after { border-color: var(--amber); }
.tl-item__time { color: var(--green); font-size: 14px; flex-shrink: 0; }
.tl-item[data-level="crit"] .tl-item__time { color: var(--red); }
.tl-item[data-level="warn"] .tl-item__time { color: var(--amber); }
.tl-item p { color: var(--ink-dim); font-size: 15px; }
.tl-item b { color: var(--ink); font-weight: 600; }

/* ============ DASH ============ */
.dash { position: relative; z-index: 1; padding: 140px var(--pad); max-width: 1240px; margin: 0 auto; }
.dash__lead { max-width: 540px; color: var(--ink-dim); font-size: 16.5px; margin: 22px 0 48px; }
.dash__board { padding: 22px; border-radius: 16px; background: var(--surface-2); }
.dash__head { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); padding: 4px 6px 20px; }
.dash__clock { margin-left: auto; color: var(--green); letter-spacing: .06em; }
.dash__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.pcard {
  background: rgba(255,255,255,.028); border: 1px solid var(--line);
  border-radius: 11px; padding: 18px;
  transition: border-color .2s ease;
}
.pcard:hover { border-color: var(--line-strong); }
.pcard[data-risk="high"] { border-color: rgba(229,72,77,.5); background: rgba(229,72,77,.05); }
.pcard[data-risk="med"] { border-color: rgba(210,153,34,.38); }
.pcard__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.pcard__name { font-weight: 600; font-size: 15px; }
.pcard__ward { font-size: 11px; color: var(--ink-faint); }
.pcard__vitals { display: flex; gap: 14px; font-size: 11px; color: var(--ink-faint); margin-bottom: 14px; flex-wrap: wrap; }
.pcard__vitals b { color: var(--ink); font-weight: 500; font-size: 13.5px; }
.pcard[data-risk="high"] .pcard__vitals b { color: var(--red); }
.pcard__risk { display: flex; align-items: center; gap: 12px; }
.pcard__risk i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.07); position: relative; overflow: hidden; }
.pcard__risk i::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 3px; background: var(--green); }
.pcard[data-risk="med"] .pcard__risk i::after { background: var(--amber); }
.pcard[data-risk="high"] .pcard__risk i::after { background: var(--red); }
.pcard__risk span { font-size: 10px; letter-spacing: .08em; color: var(--ink-faint); }

.alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 14px; }
.alert { padding: 20px 22px; border-radius: 11px; }
.alert__tag { display: inline-block; font-size: 10px; letter-spacing: .14em; padding: 4px 10px; border-radius: 5px; margin-bottom: 12px; }
.alert[data-a="crit"] .alert__tag { background: rgba(229,72,77,.13); color: #ff7b80; }
.alert[data-a="high"] .alert__tag { background: rgba(219,109,40,.13); color: #e8955c; }
.alert[data-a="med"] .alert__tag { background: rgba(210,153,34,.13); color: #dcb04e; }
.alert[data-a="info"] .alert__tag { background: rgba(88,166,255,.12); color: var(--blue); }
.alert p { font-size: 13.5px; color: var(--ink-dim); }

/* ============ NIGHT ============ */
.night { position: relative; z-index: 1; min-height: 88vh; display: flex; align-items: flex-end; overflow: hidden; }
.night__img { position: absolute; inset: 0; width: 100%; height: 115%; object-fit: cover; top: -15%; }
.night__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, transparent 34%, transparent 55%, rgba(10,12,14,.9) 100%); }
.night__copy { position: relative; padding: 0 var(--pad) 100px; max-width: 720px; }
.night__copy p { color: var(--ink-dim); font-size: 16.5px; margin-top: 22px; max-width: 500px; }

/* ============ LINE / METRICS ============ */
.line { position: relative; z-index: 1; padding: 150px var(--pad); }
.line__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(30px, 5vw, 80px); align-items: center; max-width: 1200px; margin: 0 auto; }
.line__photo {
  padding: clamp(28px, 3.5vw, 56px) clamp(20px, 2.5vw, 40px);
  border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(70% 55% at 50% 62%, rgba(62,207,142,.05), transparent 70%),
    var(--surface-2);
}
.line__photo img { width: 100%; display: block; }
.line__photo figcaption {
  padding: 26px 8px 0; font-family: var(--font-m);
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); text-align: center;
}
.line__metrics { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 40px 0 20px; }
.line__metrics li { padding: 24px 22px; }
.line__metrics b { font-family: var(--font-m); font-size: clamp(24px, 2.4vw, 32px); color: var(--ink); display: block; margin-bottom: 4px; font-weight: 500; letter-spacing: -.02em; }
.line__metrics span { color: var(--ink-faint); font-size: 13.5px; }
.line__note { font-size: 11px; color: var(--ink-faint); line-height: 1.8; }

/* ============ ROADMAP ============ */
.roadmap { position: relative; z-index: 1; padding: 140px var(--pad); max-width: 1200px; margin: 0 auto; }
.roadmap .h2 { margin-bottom: 64px; }
.roadmap__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.rmap { padding: 32px 30px; }
.rmap--mid { border-color: rgba(62,207,142,.3); }
.rmap__v { display: inline-block; font-family: var(--font-m); color: var(--ink-dim); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 22px; }
.rmap--mid .rmap__v { color: var(--green); }
.rmap ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.rmap li { color: var(--ink-dim); font-size: 14.5px; padding-left: 20px; position: relative; }
.rmap li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 1.5px; background: var(--ink-faint); }
.rmap--mid li::before { background: var(--green); }

/* ============ CTA ============ */
.cta { position: relative; z-index: 1; padding: 180px var(--pad) 160px; text-align: center; overflow: hidden; }
.cta__glow {
  position: absolute; left: 50%; top: 55%; transform: translate(-50%,-50%);
  width: 1100px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(62,207,142,.06), transparent 65%);
  pointer-events: none;
}
.cta__title { font-weight: 600; font-size: clamp(32px, 4.6vw, 60px); line-height: 1.1; letter-spacing: -.025em; margin-bottom: 24px; position: relative; }
.cta__sub { color: var(--ink-dim); font-size: 16.5px; max-width: 460px; margin: 0 auto 44px; position: relative; }
.cta__mono { margin-top: 28px; font-size: 12px; color: var(--ink-faint); letter-spacing: .08em; position: relative; }

/* ============ FOOTER ============ */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 56px var(--pad) 36px; }
.footer__row { display: flex; gap: 50px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 36px; }
.footer__legal { max-width: 620px; color: var(--ink-faint); font-size: 13px; }
.footer__legal b { color: var(--ink-dim); font-weight: 600; }
.footer__c { font-size: 11px; color: rgba(233,237,239,.28); letter-spacing: .1em; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .nav__links { display: none; }
  .anatomy__stage { grid-template-columns: 1fr; gap: 10px; }
  .anatomy__device { height: min(46vh, 440px); }
  .anatomy__callouts { min-height: 280px; }
  .anatomy__rail { top: calc(50% + 118px); }
  .anatomy__rail span { font-size: 8.5px; }
  .line__grid { grid-template-columns: 1fr; }
  .hero__img { object-position: 74% center; }
}
@media (max-width: 560px) {
  .hero__stats { gap: 14px; font-size: 11px; }
  .line__metrics { grid-template-columns: 1fr; }
  .tl-item { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
