/* ─────────────────────────────────────────────────────────────
   Haio One · S26 官网
   配色与字号取自 App 的深色主题（haio-one-frontend/src/theme）。
   ───────────────────────────────────────────────────────────── */

:root {
  /* 深色主题 — darkColors in src/theme/colors.ts */
  --bg:            #0A0A0F;
  --surface:       #15151B;
  --elevated:      #1F1F26;
  --overlay:       #2A2A33;
  --border:        #2A2A33;
  --border-subtle: #1F1F26;
  --border-strong: #3A3A45;

  --ink:    #F0F0F5;
  --ink-2:  #A0A0B8;
  --ink-3:  #60607A;

  --accent:      #FF6B1A;
  --accent-dark: #D4510E;
  --accent-dim:  rgba(255, 107, 26, 0.14);

  /* 各项指标色 — health palette */
  --m-hr:    #FF5C7A;
  --m-spo2:  #5BA3FF;
  --m-sleep: #9A85FF;
  --m-steps: #FF6B1A;
  --m-temp:  #FFC857;
  --m-hrv:   #30D9A3;
  --m-bp:    #E05252;
  --m-ecg:   #00C2D6;

  --display: 'Syne', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --sans: 'DM Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

  --page: 1280px;
  --gut: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: #FF8C4A; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0;
}

h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin: 14px 0 0;
  text-wrap: balance;
}

.lede {
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 38em;
  margin: 20px 0 0;
}

section { padding: 112px 0; }
section + section { border-top: 1px solid var(--border-subtle); }

/* ── Header ────────────────────────────────────────────────── */

.site-head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 34px; height: 34px; flex: none;
  border-radius: 11px;
  background: linear-gradient(to top right, #ea5a18, #f2db4e);
  display: grid; place-items: center;
}
.brand-mark span {
  width: 21px; height: 21px;
  border-radius: 7px;
  background: var(--bg);
  display: grid; place-items: center;
}
.brand-mark span i {
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(to bottom, #f2db4e, #ea5a18);
}
.brand-name {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a { font-size: 14.5px; color: #C8C8D8; }
.site-nav a:hover { color: var(--ink); }

/* ── Buttons ───────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 32px;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--sans);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: #0A0A12; }
.btn-primary:hover { background: #FF8134; color: #0A0A12; }

.btn-ghost { border-color: rgba(240, 240, 245, 0.26); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-sm { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 21px; }

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 780px;
  height: 92vh;
  max-height: 1000px;
  display: flex;
  align-items: flex-end;
  padding: 0 0 104px;
  border-top: none;
  overflow: hidden;
}

/* The generated scene image drops in here. The gradient underneath is a
   deliberate fallback so the hero still reads if the file is missing. */
.hero-media {
  position: absolute;
  inset: 0;
  background-color: #101016;
  background-image: url('../img/hero-scene.jpg');
  background-size: cover;
  background-position: 68% center;
  background-repeat: no-repeat;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(10,10,15,.96) 0%, rgba(10,10,15,.80) 32%, rgba(10,10,15,.12) 64%, rgba(10,10,15,0) 100%),
    linear-gradient(to top, rgba(10,10,15,.95) 0%, rgba(10,10,15,0) 42%);
}

.hero .wrap { position: relative; z-index: 2; width: 100%; }

.hero h1 {
  font-size: clamp(46px, 6.4vw, 84px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -2.6px;
  color: #FFFFFF;
  margin: 22px 0 0;
  max-width: 16em;
  text-wrap: balance;
}

.hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.85;
  color: #C8C8D8;
  max-width: 30em;
  margin: 26px 0 0;
}

.hero-cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 42px; }

.hero-meta { font-size: 13.5px; color: var(--ink-2); }
.hero-meta b { color: var(--ink); font-weight: 600; }

/* ── Feature: blood pressure ───────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.figure {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.figure img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 只在图片缺失时出现，说明该放哪个文件；图片就位后完全不显示。 */
.figure-empty {
  display: none;
  position: absolute;
  inset: 0;
  padding: 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: 21px;
  border: 1px dashed var(--border-strong);
}
.figure-empty em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.figure.is-empty img { display: none; }
.figure.is-empty .figure-empty { display: flex; }

.claims { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.claims li { display: flex; gap: 14px; }
.claims .bullet {
  width: 3px; flex: none; border-radius: 2px; background: var(--accent);
}
.claims h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; color: var(--ink); }
.claims p { margin: 0; font-size: 15px; line-height: 1.75; color: var(--ink-2); }

/* ── Metric grid ───────────────────────────────────────────── */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 48px;
}
.metric {
  background: var(--bg);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 168px;
}
.metric-dot { width: 9px; height: 9px; border-radius: 50%; }
.metric h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--ink); }
.metric p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-3); }

/* ── App section ───────────────────────────────────────────── */

.app-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  align-items: center;
}

.phones { display: flex; gap: 26px; align-items: flex-start; }

/* 应用截图。两张等宽等高，缺图时显示占位说明而不是破图。 */

.shot { margin: 0; width: 300px; flex: none; display: flex; flex-direction: column; gap: 14px; }

.shot .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 34px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.shot-empty {
  display: none;
  position: absolute;
  inset: 0;
  padding: 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: 33px;
  border: 1px dashed var(--border-strong);
}
.shot-empty em { font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }

.shot.is-empty img { display: none; }
.shot.is-empty .shot-empty { display: flex; }

.shot figcaption { font-size: 13px; color: var(--ink-3); text-align: center; }

/* ── Spec table ────────────────────────────────────────────── */

.specs { margin-top: 48px; border-top: 1px solid var(--border); }
.spec-group { border-bottom: 1px solid var(--border); padding: 34px 0; }
.spec-group > h3 {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.4px;
  color: var(--ink-3);
  text-transform: uppercase;
}
.spec-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  padding: 11px 0;
}
.spec-row dt { font-size: 15px; color: var(--ink-3); }
.spec-row dd { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink); }
.spec-row dd .en { display: block; font-size: 13px; color: var(--ink-3); margin-top: 3px; }

/* ── Download ──────────────────────────────────────────────── */

.download {
  border-radius: 26px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255,107,26,.16) 0%, rgba(10,10,15,0) 58%),
    var(--surface);
  padding: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 64px;
  align-items: start;
}

.dl-file {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.dl-file .fname { font-size: 15px; font-weight: 600; color: var(--ink); }
.dl-file .fmeta { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.steps li { counter-increment: s; display: flex; gap: 16px; }
.steps li::before {
  content: counter(s);
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  background: var(--elevated);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  display: grid; place-items: center;
}
.steps p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.steps b { color: var(--ink); font-weight: 600; }

.note {
  margin-top: 28px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

/* ── Footer ────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--border-subtle);
  padding: 56px 0 72px;
}
.foot-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 28px; flex-wrap: wrap; }
.foot-links a { font-size: 14px; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); }
.foot-legal { font-size: 13px; color: var(--ink-3); margin: 24px 0 0; max-width: 76ch; line-height: 1.8; }
.foot-legal a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.foot-legal a:hover { color: var(--ink-2); }

/* ── Motion ────────────────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.hero .eyebrow { animation: rise .6s .05s both cubic-bezier(.2,.8,.2,1); }
.hero h1       { animation: rise .6s .16s both cubic-bezier(.2,.8,.2,1); }
.hero-sub      { animation: rise .6s .28s both cubic-bezier(.2,.8,.2,1); }
.hero-cta      { animation: rise .6s .40s both cubic-bezier(.2,.8,.2,1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 1100px) {
  :root { --gut: 40px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-stage { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .phones { justify-content: flex-start; overflow-x: auto; padding-bottom: 8px; }
  .download { grid-template-columns: minmax(0, 1fr); gap: 44px; padding: 48px; }
}

@media (max-width: 720px) {
  :root { --gut: 22px; }
  section { padding: 76px 0; }
  .site-nav { display: none; }
  .hero { min-height: 640px; height: auto; padding: 190px 0 72px; }
  .hero-media { background-position: 74% center; }
  .hero h1 { letter-spacing: -1.4px; max-width: none; }
  .hero-cta { gap: 14px; }
  .btn { width: 100%; justify-content: center; }
  .hero-cta .hero-meta { width: 100%; }
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .spec-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .download { padding: 32px 24px; }
  .shot { width: 260px; }
}
