*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #060912;
  --bg-soft: #0c1222;
  --surface: #111827;
  --surface-2: #1a2236;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  --text: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --accent: #818cf8;
  --accent-2: #38bdf8;
  --accent-glow: rgba(129, 140, 248, 0.35);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1120px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main {
  position: relative;
  z-index: 1;
}

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

.container {
  width: min(100% - 48px, var(--container));
  margin: 0 auto;
}

/* Ambient background */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.ambient-orb-1 {
  width: 560px;
  height: 560px;
  top: -180px;
  right: -120px;
  background: rgba(99, 102, 241, 0.18);
}

.ambient-orb-2 {
  width: 420px;
  height: 420px;
  top: 45%;
  left: -140px;
  background: rgba(56, 189, 248, 0.1);
}

.ambient-orb-3 {
  width: 500px;
  height: 500px;
  bottom: -120px;
  right: -80px;
  background: rgba(99, 102, 241, 0.12);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(6, 9, 18, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s, backdrop-filter 0.35s;
}

.header.scrolled {
  background: rgba(6, 9, 18, 0.92);
  border-bottom-color: var(--border);
}

.header-row {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  color: var(--accent);
}

.brand-icon svg { width: 100%; height: 100%; }

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.brand-sub {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--text-3);
  margin-top: 2px;
}

.menu {
  display: flex;
  gap: 32px;
  margin-left: auto;
}

.menu a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s;
}

.menu a:hover { color: var(--text); }

.header-cta {
  display: flex;
  gap: 10px;
}

.menu-btn {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-btn.open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn.open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-sm { padding: 9px 18px; font-size: 13px; }

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn-block { width: 100%; }

.btn-disabled {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-3);
  cursor: default;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 80px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.chip {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.25);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #c4b5fd, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 16px;
  color: var(--text-2);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-lead strong { color: var(--text); font-weight: 600; }

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-trust {
  list-style: none;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
}

.hero-trust svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* Phone mockup */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.phone {
  width: 280px;
  background: linear-gradient(160deg, #1e293b, #0f172a);
  border-radius: 36px;
  padding: 12px;
  border: 1px solid var(--border-light);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(99, 102, 241, 0.15);
}

.phone-notch {
  width: 100px;
  height: 24px;
  background: #0a0f1a;
  border-radius: 0 0 16px 16px;
  margin: 0 auto 8px;
}

.phone-screen {
  background: linear-gradient(180deg, #131b2e 0%, #0a0f1a 100%);
  border-radius: 28px;
  padding: 24px 20px;
  min-height: 420px;
}

.screen-header {
  margin-bottom: 28px;
}

.screen-greet {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.screen-date {
  font-size: 12px;
  color: var(--text-3);
}

.sleep-ring {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
}

.sleep-ring svg { width: 100%; height: 100%; }

.sleep-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sleep-ring-text strong {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.sleep-ring-text span {
  font-size: 11px;
  color: var(--text-3);
}

.screen-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.screen-stats div {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}

.screen-stats strong {
  display: block;
  font-size: 10px;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 2px;
}

.screen-stats span {
  font-size: 13px;
  font-weight: 600;
}

.screen-ai {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-2);
}

.ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  animation: float 4s ease-in-out infinite;
}

.float-card svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.float-card-1 { top: 12%; right: 0; animation-delay: 0s; }
.float-card-2 { bottom: 18%; left: -8px; animation-delay: -2s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Sections — unified dark theme */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section-tint {
  background: rgba(255, 255, 255, 0.015);
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

.section-head-left {
  text-align: left;
  margin: 0 0 0;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  color: var(--text);
}

.section-head p {
  font-size: 15px;
  color: var(--text-2);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.about-card:hover {
  border-color: rgba(129, 140, 248, 0.25);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.about-card-main {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}

.about-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.about-card p {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 12px;
  line-height: 1.75;
}

.about-card p:last-child { margin-bottom: 0; }

.about-card a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(129, 140, 248, 0.12);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--accent);
}

.about-icon svg { width: 22px; height: 22px; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.feature:hover {
  border-color: rgba(129, 140, 248, 0.3);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
  transform: translateY(-3px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.feature-icon svg { width: 24px; height: 24px; }

.fi-purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.fi-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.fi-cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.fi-indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.fi-violet { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.fi-sky { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }

.feature h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.feature p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

/* Platforms */
.platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}

.platform {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.platform:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.25);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

.platform-highlight {
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
}

.platform-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(129, 140, 248, 0.12);
  padding: 4px 10px;
  border-radius: 100px;
}

.platform-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  color: var(--text);
}

.platform-icon svg { width: 100%; height: 100%; }

.platform h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.platform p {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 24px;
}

.platform-muted { opacity: 0.65; }

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.contact-row {
  display: flex;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  gap: 24px;
}

.contact-row:last-child { border-bottom: none; }

.contact-label {
  flex-shrink: 0;
  width: 88px;
  font-size: 13px;
  color: var(--text-3);
}

.contact-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.contact-value a {
  color: var(--accent);
}

.contact-value a:hover { text-decoration: underline; }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.brand-footer .brand-sub { color: var(--text-3); }

.footer-desc {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
  max-width: 280px;
}

.footer-links h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-2);
}

.footer-links a {
  display: block;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

.footer-bar {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: 12px;
  color: var(--text-3);
}

/* Legal pages */
.legal-page {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-h) + 48px) 0 80px;
  min-height: 60vh;
}

.legal-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 36px;
}

.legal-page h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text);
}

.legal-page p,
.legal-page li {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 12px;
  line-height: 1.85;
}

.legal-page ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-wrap {
  max-width: 760px;
}

.legal-page h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 10px;
  color: var(--text);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 13px;
}

.legal-table th,
.legal-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--text-2);
}

.legal-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 600;
}

.legal-table a { color: var(--accent); }

@media (max-width: 768px) {
  .legal-table { font-size: 12px; }
  .legal-table th, .legal-table td { padding: 8px; }
}

.legal-page a { color: var(--accent); }
.legal-page a:hover { text-decoration: underline; }

.legal-back {
  margin-top: 48px;
  font-size: 14px;
}

.legal-back a {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-layout { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .phone { width: 260px; }
  .about-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 12px 24px 24px;
    background: rgba(6, 9, 18, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
  }

  .menu.open { display: flex; }

  .menu a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }

  .header-cta { display: none; }
  .menu-btn { display: flex; }

  .hero { min-height: auto; padding-bottom: 64px; }
  .hero-trust { gap: 16px; }
  .float-card { display: none; }

  .section { padding: 72px 0; }
  .features { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
