:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #f2f7f5;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --quiet: #9a9aa1;
  --line: rgba(0, 0, 0, 0.08);
  --primary: #0d5e53;
  --primary-soft: #dff2ed;
  --doctor: #2f6f67;
  --patient: #4c8aa8;
  --family: #a56a2a;
  --danger: #c65b55;
  --radius-xl: 34px;
  --radius-lg: 26px;
  --shadow-soft: 0 26px 80px rgba(18, 45, 42, 0.12);
  --shadow-device: 0 34px 90px rgba(0, 0, 0, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fs-body: 14px;
  --fs-body-lg: 15px;
  --fs-h2: clamp(26px, 2.6vw, 34px);
  --fs-display: clamp(34px, 3.8vw, 52px);
  --lh-body: 1.82;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 52% 0%, rgba(255, 255, 255, 0.96), transparent 540px),
    linear-gradient(180deg, #fbfbfd 0%, var(--bg) 44%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

.page {
  overflow: hidden;
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(251, 251, 253, 0.78);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: saturate(180%) blur(22px);
}

.nav {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 720;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(13, 94, 83, 0.14);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 540;
}

.nav-links a:hover {
  color: var(--accent, var(--primary));
}

section {
  position: relative;
  padding: clamp(76px, 9vw, 126px) 0;
}

.hero {
  min-height: 100vh;
  padding-top: 124px;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  gap: clamp(36px, 5vw, 78px);
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent, var(--primary));
  font-size: 13px;
  font-weight: 720;
}

.kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent, var(--primary)), color-mix(in srgb, var(--accent, var(--primary)) 36%, #ffffff));
}

h1 {
  margin-top: 24px;
  max-width: 630px;
  color: var(--ink);
  font-size: var(--fs-display);
  line-height: 1.12;
  letter-spacing: -0.032em;
  font-weight: 760;
}

.lead {
  max-width: 600px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(15px, 0.95vw, 16px);
  line-height: var(--lh-body);
  font-weight: 460;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease), background 300ms var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--accent, var(--primary));
  box-shadow: 0 14px 36px color-mix(in srgb, var(--accent, var(--primary)) 28%, transparent);
}

.button.secondary {
  color: var(--accent, var(--primary));
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid color-mix(in srgb, var(--accent, var(--primary)) 18%, transparent);
}

.note {
  max-width: 620px;
  margin-top: 16px;
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.72;
}

.visual-stage {
  position: relative;
  min-height: clamp(430px, 42vw, 620px);
  display: grid;
  place-items: center;
  perspective: 1500px;
}

.visual-glow {
  position: absolute;
  inset: 8% -4% -2% 8%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 42%, color-mix(in srgb, var(--accent, var(--primary)) 24%, transparent), transparent 34%),
    radial-gradient(circle at 72% 74%, rgba(13, 94, 83, 0.12), transparent 38%);
  filter: blur(18px);
  opacity: 0.86;
  pointer-events: none;
}

.device {
  position: relative;
  margin: 0 auto;
  background: linear-gradient(145deg, #fafafa, #d9dce1);
  box-shadow: var(--shadow-device);
}

.device-screen {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.device-screen img,
.device-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.workstation-device {
  width: min(860px, 100%);
  padding: 16px 16px 0;
  border-radius: 20px 20px 10px 10px;
}

.workstation-device .device-screen {
  aspect-ratio: 16 / 10;
  border-radius: 12px 12px 5px 5px;
}

.workstation-device::after {
  content: "";
  display: block;
  width: calc(100% + 92px);
  height: 25px;
  margin-left: -46px;
  border-radius: 0 0 26px 26px;
  background: linear-gradient(180deg, #dfe2e6, #bfc4ca);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
}

.tablet-device {
  width: min(760px, 100%);
  padding: clamp(12px, 1.4vw, 18px);
  border-radius: clamp(28px, 3vw, 42px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(210, 218, 222, 0.9) 68%, rgba(176, 187, 193, 0.92));
  box-shadow: 34px 40px 90px rgba(26, 63, 60, 0.18), 8px 18px 36px rgba(0, 0, 0, 0.1);
  transform: rotateX(5deg) rotateY(-10deg) rotateZ(-1.2deg);
  transform-style: preserve-3d;
}

.tablet-device::before {
  content: "";
  position: absolute;
  inset: clamp(12px, 1.4vw, 18px);
  z-index: 2;
  border-radius: clamp(20px, 2.4vw, 30px);
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.34), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.14));
  pointer-events: none;
  mix-blend-mode: screen;
}

.tablet-device::after {
  content: "";
  position: absolute;
  right: -18px;
  top: 7%;
  z-index: -1;
  width: 32px;
  height: 86%;
  border-radius: 0 34px 34px 0;
  background: linear-gradient(90deg, rgba(164, 174, 180, 0.82), rgba(236, 241, 243, 0.88));
  box-shadow: 18px 18px 50px rgba(30, 58, 55, 0.14);
  transform: translateZ(-28px) skewY(-5deg);
}

.tablet-device .device-screen {
  aspect-ratio: 16 / 10.05;
  border-radius: clamp(20px, 2.4vw, 30px);
}

.phone-device {
  width: min(300px, 100%);
  padding: 14px 12px 18px;
  border-radius: 32px;
}

.phone-device .device-screen {
  aspect-ratio: 9 / 19.5;
  border-radius: 24px;
}

.media-stack {
  display: grid;
  gap: clamp(48px, 7vw, 84px);
}

.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.72fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
}

.story-row.reverse {
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.04fr);
}

.story-copy h2,
.section-head h2 {
  color: var(--ink);
  font-size: var(--fs-h2);
  line-height: 1.16;
  letter-spacing: -0.028em;
  font-weight: 760;
}

.story-copy p,
.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.pill-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent, var(--primary)) 82%, #243534);
  background: color-mix(in srgb, var(--accent, var(--primary)) 11%, #ffffff);
  font-size: 13px;
  font-weight: 680;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.screenshot-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fff;
}

.screenshot-card figcaption {
  padding: 16px 18px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.68;
}

.phone-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.phone-gallery .screenshot-card img {
  aspect-ratio: 9 / 16.8;
  object-fit: cover;
  object-position: top center;
}

.section-head {
  max-width: 860px;
  margin: 0 auto clamp(34px, 5vw, 56px);
  text-align: center;
}

.boundary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: clamp(30px, 4vw, 44px);
  border-radius: var(--radius-xl);
  color: #fff;
  background: var(--accent, var(--primary));
  box-shadow: var(--shadow-soft);
}

.boundary h2 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
}

.boundary p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.78;
}

.boundary .button.secondary {
  color: var(--accent, var(--primary));
  background: #fff;
}

.cross-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.cross-links a {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 650;
}

.site-footer {
  padding: 28px 0 42px;
  color: var(--quiet);
  font-size: 13px;
}

.site-footer .shell {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.doctor-theme {
  --accent: var(--doctor);
}

.patient-theme {
  --accent: var(--patient);
}

.family-theme {
  --accent: var(--family);
}

@media (max-width: 1040px) {
  .hero,
  .story-row,
  .story-row.reverse,
  .boundary {
    grid-template-columns: 1fr;
  }

  .visual-stage {
    min-height: auto;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .phone-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .nav-links {
    display: none;
  }

  section {
    padding: 70px 0;
  }

  .hero {
    padding-top: 108px;
    gap: 34px;
  }

  h1 {
    font-size: clamp(30px, 8vw, 38px);
  }

  .lead {
    font-size: 15px;
    line-height: 1.8;
  }

  .button,
  .actions {
    width: 100%;
  }

  .tablet-device {
    padding: 9px;
    border-radius: 24px;
    transform: rotateX(3deg) rotateY(-5deg) rotateZ(-1deg);
  }

  .tablet-device::before {
    inset: 9px;
    border-radius: 18px;
  }

  .tablet-device::after {
    right: -10px;
    width: 18px;
    transform: translateZ(-18px) skewY(-4deg);
  }

  .tablet-device .device-screen {
    border-radius: 18px;
  }

  .phone-gallery {
    grid-template-columns: 1fr;
  }

  .boundary {
    border-radius: 24px;
  }
}
