:root {
  --primary: #9b8cf7;
  --primary-dark: #7c6cf0;
  --primary-light: #b4a8f9;
  --bg: #f4f2ff;
  --bg-deep: #ebe6ff;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --muted-soft: #94a3b8;
  --up: #ef4444;
  --rank-1: #ef4444;
  --rank-2: #f97316;
  --rank-3: #eab308;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max: 1120px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ——— Header ——— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(244, 242, 255, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(124, 108, 240, 0.12);
  background: rgba(244, 242, 255, 0.92);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
}

.brand-icon {
  width: 22px;
  height: 22px;
  fill: var(--primary-dark);
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  font-size: 0.9375rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--primary-dark);
}

.header-cta {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary-dark);
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-cta:hover {
  background: var(--primary);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding:
    calc(var(--header-h) + 48px)
    clamp(20px, 4vw, 48px)
    64px;
  overflow: hidden;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 78% 42%, rgba(155, 140, 247, 0.38), transparent 62%),
    radial-gradient(ellipse 50% 45% at 12% 78%, rgba(181, 168, 249, 0.28), transparent 55%),
    linear-gradient(165deg, #f7f5ff 0%, #efeaff 48%, #e8e2ff 100%);
  z-index: 0;
}

.hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 108, 240, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 108, 240, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-brand {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(3.25rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: var(--text);
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.hero-headline {
  margin: 0 0 14px;
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  font-weight: 600;
  color: var(--primary-dark);
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

.hero-support {
  margin: 0 0 32px;
  max-width: 28rem;
  font-size: 1.0625rem;
  color: var(--muted);
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.38s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: var(--primary-dark);
}

.btn-primary:hover {
  background: var(--primary);
}

.btn-ghost {
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(124, 108, 240, 0.28);
}

.btn-ghost:hover {
  background: #fff;
}

/* Phone mock ——— product visual */
.hero-visual {
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  animation: rise-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.phone-frame {
  width: min(100%, 320px);
  padding: 12px;
  border-radius: 36px;
  background: linear-gradient(160deg, #2a2438, #1a1624);
  box-shadow:
    0 28px 64px rgba(74, 58, 140, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-screen {
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg);
  min-height: 560px;
  padding: 10px 14px 18px;
}

.mock-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text);
}

.mock-status-dots {
  width: 42px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.mock-tabs {
  display: flex;
  gap: 18px;
  padding: 4px 4px 12px;
  font-size: 0.875rem;
  color: var(--muted-soft);
}

.mock-tabs .on {
  position: relative;
  color: var(--primary-dark);
  font-weight: 600;
}

.mock-tabs .on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.mock-board-title {
  padding: 10px 4px 8px;
  font-size: 1.125rem;
  font-weight: 700;
}

.mock-segment {
  display: inline-flex;
  gap: 2px;
  margin: 0 0 12px;
  padding: 3px;
  background: rgba(124, 108, 240, 0.1);
  border-radius: 10px;
  font-size: 0.75rem;
  color: var(--muted);
}

.mock-segment span {
  padding: 6px 12px;
  border-radius: 8px;
}

.mock-segment .on {
  color: #fff;
  background: var(--primary);
  font-weight: 600;
}

.mock-metric {
  margin-bottom: 8px;
  padding: 0 4px;
  font-size: 0.75rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.mock-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mock-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  border-bottom: 1px solid rgba(124, 108, 240, 0.08);
  font-size: 0.8125rem;
  opacity: 0;
  transform: translateX(8px);
  animation: list-in 0.55s ease forwards;
}

.mock-list li:nth-child(1) { animation-delay: 0.7s; }
.mock-list li:nth-child(2) { animation-delay: 0.82s; }
.mock-list li:nth-child(3) { animation-delay: 0.94s; }
.mock-list li:nth-child(4) { animation-delay: 1.06s; }
.mock-list li:nth-child(5) { animation-delay: 1.18s; }

.rank {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.15);
}

.rank.r1 { color: #fff; background: var(--rank-1); }
.rank.r2 { color: #fff; background: var(--rank-2); }
.rank.r3 { color: #fff; background: var(--rank-3); }

.name { font-weight: 600; }
.val { color: var(--muted); font-variant-numeric: tabular-nums; }
.delta { font-variant-numeric: tabular-nums; font-weight: 600; }
.delta.up { color: var(--up); }
.delta.flat { color: var(--muted-soft); }

@keyframes rise-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes list-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ——— Sections ——— */
.section {
  padding: clamp(72px, 12vw, 120px) clamp(20px, 4vw, 48px);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.section-lead {
  margin: 0 0 40px;
  max-width: 36rem;
  font-size: 1.0625rem;
  color: var(--muted);
}

.problem {
  background: linear-gradient(180deg, var(--bg-deep), var(--bg));
}

.problem .section-lead {
  margin-bottom: 0;
}

/* Features */
.feature-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 8vw, 80px);
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

.feature-copy h3 {
  margin: 0 0 12px;
  font-size: 1.375rem;
  font-weight: 700;
}

.feature-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.025rem;
}

.feature-art {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 242, 255, 0.65));
  border: 1px solid rgba(124, 108, 240, 0.12);
  border-radius: 20px;
}

.art-bars {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 140px;
  width: 100%;
  max-width: 260px;
}

.art-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary-dark));
  transform-origin: bottom;
  transform: scaleY(0.35);
  opacity: 0.55;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}

.feature-art.is-inview .art-bars span {
  transform: scaleY(1);
  opacity: 1;
}

.art-trend {
  width: 100%;
  max-width: 320px;
  color: var(--primary);
}

.trend-line {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  transition: stroke-dashoffset 1.1s ease;
}

.feature-art.is-inview .trend-line {
  stroke-dashoffset: 0;
}

.feature-art-plain {
  background: linear-gradient(150deg, #8f7ff0, #a594f8);
  border: none;
}

.art-quote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.08em;
  color: #fff;
  text-align: center;
}

/* How to */
.howto {
  background: #fff;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.steps li {
  padding-top: 8px;
  border-top: 2px solid var(--primary-light);
}

.step-num {
  display: block;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
}

.steps h3 {
  margin: 0 0 10px;
  font-size: 1.125rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.975rem;
}

/* Open */
.open {
  background:
    radial-gradient(ellipse 60% 80% at 85% 30%, rgba(155, 140, 247, 0.22), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
}

.open-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.open-search {
  margin: 0;
  font-size: 1.125rem;
}

.open-search strong {
  color: var(--primary-dark);
  letter-spacing: 0.06em;
}

.qr-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 240px;
  padding: 32px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(124, 108, 240, 0.14);
  border-radius: 20px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.qr-frame strong {
  color: var(--text);
  letter-spacing: 0.06em;
}

.qr-icon {
  width: 56px;
  height: 56px;
  color: var(--primary-dark);
}

/* Trust & contact */
.trust {
  background: #fff;
}

.trust-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 40rem;
}

.trust-list li {
  position: relative;
  padding: 0 0 20px 22px;
  color: var(--muted);
  font-size: 1.025rem;
}

.trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.trust-list li:last-child {
  padding-bottom: 0;
}

.contact {
  background: linear-gradient(180deg, var(--bg), #ebe7ff);
}

.contact-line {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
}

.contact-line a {
  color: var(--primary-dark);
  border-bottom: 1px solid rgba(124, 108, 240, 0.35);
}

.contact-hint {
  margin: 0;
  color: var(--muted);
}

/* Footer */
.site-footer {
  padding: 40px clamp(20px, 4vw, 48px) 48px;
  background: #1e1a2e;
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 20px;
  margin-bottom: 12px;
}

.footer-brand strong {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: #fff;
  letter-spacing: 0.06em;
}

.footer-note {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-inview {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--header-h) + 36px);
    padding-bottom: 48px;
  }

  .hero-visual {
    order: -1;
  }

  .phone-frame {
    width: min(100%, 280px);
  }

  .phone-screen {
    min-height: 480px;
  }

  .feature-row,
  .feature-row.reverse,
  .open-inner,
  .steps {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .steps {
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .hero-brand {
    letter-spacing: 0.04em;
  }

  .header-cta {
    padding: 8px 12px;
    font-size: 0.8125rem;
  }
}

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

  .hero-brand,
  .hero-headline,
  .hero-support,
  .hero-actions,
  .hero-visual,
  .mock-list li {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .art-bars span,
  .trend-line {
    transition: none;
  }

  .feature-art .art-bars span {
    transform: scaleY(1);
    opacity: 1;
  }

  .feature-art .trend-line {
    stroke-dashoffset: 0;
  }
}
