:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --ink: #101012;
  --muted: rgba(16, 16, 18, 0.62);
  --soft: rgba(255, 255, 255, 0.78);
  --dark: #050505;
  --dark-card: #141416;
  --line: rgba(0, 0, 0, 0.08);
  --blue: #0071e3;
  --cyan: #77d6ff;
  --green: #8df7b3;
  --shadow: rgba(0, 0, 0, 0.16) 0 24px 70px;
  --radius: 28px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.02em;
}

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

.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 54px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.76);
  color: white;
  backdrop-filter: saturate(180%) blur(22px);
}

.brand, .nav-links, .hero-actions, .quick-row, .legend {
  display: flex;
  align-items: center;
}

.brand { gap: 10px; font-size: 14px; font-weight: 650; }
.dot-logo {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle, white 1.1px, transparent 1.4px) 0 0 / 6px 6px,
    #111;
  font-size: 12px;
}
.nav-links { gap: 28px; font-size: 12px; opacity: 0.86; }
.nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: white;
  color: black;
  font-size: 12px;
  font-weight: 650;
}

.hero-section {
  min-height: calc(100vh - 54px);
  padding: 86px clamp(20px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  background:
    radial-gradient(circle at 78% 35%, rgba(0,113,227,.12), transparent 26%),
    linear-gradient(180deg, #fff, #f5f5f7);
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 920px;
  margin-bottom: 22px;
  font-size: clamp(52px, 8vw, 108px);
  line-height: 0.94;
  letter-spacing: -0.075em;
}
.hero-subtitle, .section-heading p, .trend-panel p, .split-section p {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.35;
}
.hero-actions { gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.button {
  min-height: 44px;
  padding: 13px 21px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 650;
}
.button.primary { background: var(--blue); color: white; }
.button.ghost { border: 1px solid rgba(0,0,0,.18); background: rgba(255,255,255,.66); }

.phone-shell {
  position: relative;
  width: min(100%, 390px);
  margin: 0 auto;
  padding: 18px 18px 24px;
  border: 10px solid #111;
  border-radius: 54px;
  background: #060607;
  color: white;
  box-shadow: rgba(0, 0, 0, 0.3) 0 44px 90px;
  overflow: hidden;
}
.phone-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 34%, rgba(119,214,255,.16), transparent 34%);
  pointer-events: none;
}
.phone-status, .quick-row { position: relative; justify-content: space-between; }
.phone-status { font-size: 13px; opacity: .76; padding: 6px 8px 18px; }
.score-orbit {
  position: relative;
  height: 270px;
  display: grid;
  place-items: center;
}
.ring { position: absolute; border-radius: 50%; border: 12px solid; }
.ring-one { width: 238px; height: 238px; border-color: var(--cyan) rgba(255,255,255,.09) var(--cyan) var(--cyan); transform: rotate(34deg); }
.ring-two { width: 190px; height: 190px; border-color: white white rgba(255,255,255,.1) white; transform: rotate(-18deg); }
.ring-three { width: 142px; height: 142px; border-color: var(--green) rgba(255,255,255,.08) var(--green) var(--green); transform: rotate(80deg); }
.score-core { text-align: center; z-index: 1; }
.score-core span { display:block; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.score-core strong { display:block; font-size: 74px; line-height: .9; letter-spacing: -.08em; }
.score-core small { color: rgba(255,255,255,.52); }
.score-summary { position: relative; margin: 0 8px 18px; color: rgba(255,255,255,.72); text-align: center; line-height: 1.35; }
.quick-row { gap: 10px; }
.quick-row div {
  flex: 1;
  padding: 13px 10px;
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  text-align: center;
}
.quick-row span, .quick-row small { display: block; }
.quick-row span { font-weight: 760; }
.quick-row small { color: rgba(255,255,255,.48); font-size: 11px; }

.dashboard-section, .split-section, .trend-section, .system-section { padding: 86px clamp(20px, 5vw, 72px); }
.section-heading { text-align: center; margin: 0 auto 34px; max-width: 820px; }
.section-heading.left { text-align: left; margin-left: 0; }
.section-heading h2, .trend-panel h2, .split-section h2 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: .98;
  letter-spacing: -.06em;
  margin-bottom: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metric-card {
  min-height: 178px;
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  box-shadow: rgba(0,0,0,.06) 0 12px 34px;
}
.metric-label { color: var(--muted); font-weight: 700; font-size: 13px; }
.metric-value { margin: 28px 0 8px; display:flex; align-items: baseline; gap: 5px; }
.metric-value span { font-size: 46px; font-weight: 790; letter-spacing: -.07em; }
.metric-value small { color: var(--muted); font-weight: 700; }
.metric-trend { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--blue); }
.metric-card.prime { background: #050505; color: white; }
.metric-card.prime .metric-label, .metric-card.prime small { color: rgba(255,255,255,.56); }

.dark { background: #000; color: white; }
.dark .eyebrow { color: var(--green); }
.dark p { color: rgba(255,255,255,.62); }
.split-section {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.signal-list { display: grid; gap: 14px; }
.signal-card {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle, rgba(255,255,255,.12) 1px, transparent 1.3px) 0 0 / 12px 12px,
    var(--dark-card);
}
.signal-card h3 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.signal-card strong { font-size: 34px; letter-spacing: -.06em; color: var(--green); }
.signal-card p:last-child { grid-column: 1 / -1; margin: 0; font-size: 17px; }

.trend-panel {
  padding: clamp(22px, 4vw, 52px);
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 36px;
  align-items: end;
  border-radius: 38px;
  background: white;
  box-shadow: var(--shadow);
}
.trend-bars {
  height: 320px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  align-items: end;
}
.trend-day { height: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; align-items: end; position: relative; padding-bottom: 28px; }
.trend-day span { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; color: var(--muted); font-weight: 760; }
.bar { border-radius: 999px 999px 8px 8px; min-height: 16%; }
.bar.sleep { background: var(--cyan); }
.bar.recovery { background: #111; }
.bar.strain { background: radial-gradient(circle, #111 2px, transparent 2.8px) 0 0 / 8px 8px, #f1f1f3; border: 1px solid rgba(0,0,0,.08); }
.legend { grid-column: 2; justify-content: center; gap: 18px; color: var(--muted); font-size: 13px; font-weight: 760; }

.system-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.system-card {
  padding: 26px;
  border-radius: 30px;
  background: white;
  min-height: 230px;
}
.system-card span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--blue); }
.system-card h3 { margin: 42px 0 12px; font-size: 28px; letter-spacing: -.05em; }
.system-card p { color: var(--muted); line-height: 1.45; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-section, .split-section, .trend-panel { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .system-grid { grid-template-columns: 1fr; }
  .legend { grid-column: 1; }
}

@media (max-width: 560px) {
  .top-nav { padding: 0 14px; }
  .nav-cta { display:none; }
  .hero-section { padding-top: 42px; }
  h1 { font-size: 48px; }
  .metric-grid { grid-template-columns: 1fr; }
  .phone-shell { border-width: 7px; border-radius: 42px; }
  .trend-bars { height: 230px; gap: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .ring { animation: breathe 5s ease-in-out infinite alternate; }
  .ring-two { animation-delay: .7s; }
  .ring-three { animation-delay: 1.1s; }
  @keyframes breathe { from { scale: .985; } to { scale: 1.015; } }
}
