:root {
  --ink: #172033;
  --muted: #5c667a;
  --line: #d9e1ec;
  --paper: #ffffff;
  --soft: #f5f8fb;
  --blue: #1d4eff;
  --blue-dark: #1239b8;
  --cyan: #08a6c8;
  --mint: #18a985;
  --coral: #ff6b6b;
  --amber: #f4a340;
  --shadow: 0 24px 70px rgba(22, 42, 75, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.site-header[data-elevated="true"] {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(217, 225, 236, 0.9);
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.brand.small img {
  width: 30px;
  height: 30px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgba(23, 32, 51, 0.78);
  font-size: 15px;
  font-weight: 650;
}

.desktop-nav a {
  padding: 8px 0;
}

.desktop-nav a:hover {
  color: var(--blue);
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.header-action {
  color: var(--paper);
  background: var(--ink);
}

.button.primary {
  color: var(--paper);
  background: var(--blue);
  box-shadow: 0 14px 30px rgba(29, 78, 255, 0.28);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(217, 225, 236, 0.9);
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: 124px clamp(18px, 5vw, 72px) 74px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 248, 251, 0.78)),
    #eef4f8;
}

#glucose-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 880px;
}

.hero-logo {
  width: 82px;
  height: 82px;
  margin-bottom: 22px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(58px, 10vw, 136px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 720px;
  margin: 28px 0 0;
  color: #2d3850;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.28;
  font-weight: 560;
}

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

.hero-snapshot {
  position: absolute;
  right: clamp(18px, 7vw, 110px);
  bottom: 56px;
  z-index: 2;
  width: min(340px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid rgba(217, 225, 236, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.snapshot-bar,
.status-row,
.meter-top,
.risk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.snapshot-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
}

.snapshot-bar strong {
  flex: 1;
  font-size: 14px;
}

.snapshot-bar em {
  color: var(--mint);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.glucose-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 18px;
}

.glucose-value span {
  font-size: 58px;
  line-height: 1;
  font-weight: 880;
}

.glucose-value small,
.meter-value small {
  color: var(--muted);
  font-weight: 750;
}

.status-row {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
}

.mini-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 92px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.mini-chart span {
  display: block;
  min-height: 18px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.scroll-hint {
  position: absolute;
  left: clamp(18px, 5vw, 72px);
  bottom: 30px;
  z-index: 2;
  color: rgba(23, 32, 51, 0.58);
  font-size: 14px;
  font-weight: 700;
}

.section {
  padding: clamp(72px, 9vw, 126px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 800px;
}

.section h2,
.demo h2 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(34px, 5vw, 70px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro {
  background: var(--paper);
}

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

.intro-grid article,
.module-list article,
.care-steps article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.intro-grid article {
  padding: 26px;
}

.intro-grid span {
  color: var(--blue);
  font-weight: 850;
}

.intro-grid h3,
.module-list h3,
.prediction-copy h3 {
  margin: 18px 0 8px;
  font-size: 24px;
  line-height: 1.1;
}

.intro-grid p,
.module-list p,
.product-copy p,
.care-panel p,
.care-steps p,
.prediction-copy p,
.demo p,
.site-footer p {
  margin: 0;
  color: var(--muted);
}

.product-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 82px);
  align-items: start;
  background: var(--soft);
}

.product-copy {
  position: sticky;
  top: 112px;
}

.product-copy p {
  max-width: 560px;
  margin-top: 22px;
  font-size: 18px;
}

.module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.module-list article {
  min-height: 226px;
  padding: 24px;
}

.module-icon {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(23, 32, 51, 0.1);
}

.module-icon.glucose {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.module-icon.alert {
  background: linear-gradient(135deg, var(--coral), var(--amber));
}

.module-icon.meal {
  background: linear-gradient(135deg, var(--mint), #8bd16f);
}

.module-icon.meds {
  background: linear-gradient(135deg, #7251d4, var(--blue));
}

.care {
  background: #162033;
  color: var(--paper);
}

.care .eyebrow {
  color: #8fd7ff;
}

.care-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: 36px;
  align-items: end;
}

.care-panel p,
.care-steps p {
  color: rgba(255, 255, 255, 0.72);
}

.care-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.care-steps article {
  padding: 24px;
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.care-steps strong {
  display: block;
  margin-bottom: 10px;
  font-size: 19px;
}

.intelligence {
  background: var(--paper);
}

.prediction-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  margin-top: 42px;
}

.prediction-meter {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafdff;
  box-shadow: var(--shadow);
}

.meter-top span,
.risk-row span {
  color: var(--muted);
  font-weight: 700;
}

.meter-value {
  margin: 34px 0 24px;
  font-size: 62px;
  line-height: 1;
  font-weight: 880;
}

.risk-row {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.risk-row strong {
  color: var(--blue-dark);
}

.prediction-copy p {
  margin-top: 14px;
  max-width: 620px;
  font-size: 18px;
}

.security {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 76px);
  background: var(--soft);
}

.security-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.security-list li {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: #314058;
  font-weight: 650;
}

.demo {
  padding: clamp(76px, 10vw, 140px) clamp(18px, 5vw, 72px);
  color: var(--paper);
  background:
    linear-gradient(180deg, rgba(18, 57, 184, 0.82), rgba(23, 32, 51, 0.9)),
    #1239b8;
}

.demo .eyebrow {
  color: #bfeaff;
}

.demo-inner {
  max-width: 820px;
}

.demo p {
  max-width: 680px;
  margin: 20px 0 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 19px;
}

.demo .button.primary {
  color: var(--blue-dark);
  background: var(--paper);
  box-shadow: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .hero {
    align-items: start;
    padding-top: 112px;
  }

  .hero-snapshot {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 44px;
  }

  .scroll-hint {
    display: none;
  }

  .intro-grid,
  .product-band,
  .care-panel,
  .care-steps,
  .prediction-layout,
  .security {
    grid-template-columns: 1fr;
  }

  .product-copy {
    position: static;
  }
}

@media (max-width: 660px) {
  .site-header {
    padding: 14px 16px;
  }

  .header-action {
    display: none;
  }

  .hero-logo {
    width: 68px;
    height: 68px;
  }

  .hero-lead {
    font-size: 19px;
  }

  .button {
    width: 100%;
  }

  .intro-grid,
  .module-list {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 64px 16px;
  }

  .meter-value,
  .glucose-value span {
    font-size: 50px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
