:root {
  --ink: #142033;
  --ink-soft: #243652;
  --muted: #5a6b80;
  --paper: #f4f7fb;
  --paper-deep: #e8eef6;
  --brand: #1a4f9c;
  --brand-mid: #2563b8;
  --accent: #1a4f9c;
  --accent-hover: #143d7a;
  --line: rgba(20, 32, 51, 0.12);
  --header-h: 58px;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Source Sans 3", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-mid);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.wrap {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.wrap.narrow {
  width: min(720px, calc(100% - 40px));
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(244, 247, 251, 0.92);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(244, 247, 251, 0.97);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.logo:hover {
  color: var(--ink);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2563b8, #1a4f9c);
  color: #f5f8fc;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  height: 36px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-soft);
}

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

.site-nav .nav-cta {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--brand);
  color: #f5f8fc !important;
}

.site-nav .nav-cta:hover {
  background: var(--brand-mid);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #f5f8fc;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 28, 55, 0.25) 0%, rgba(15, 28, 55, 0.7) 55%, rgba(12, 24, 48, 0.92) 100%),
    radial-gradient(80% 60% at 85% 15%, rgba(70, 130, 210, 0.35), transparent 58%),
    linear-gradient(125deg, #0f1c37 0%, #163568 45%, #1a4f9c 100%);
  transform: scale(1.02);
  animation: heroDrift 18s var(--ease) infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 38px,
      rgba(245, 248, 252, 0.035) 38px,
      rgba(245, 248, 252, 0.035) 39px
    );
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 56px 0 52px;
  max-width: 720px;
  margin-left: max(20px, calc((100% - 1080px) / 2 + 20px));
  margin-right: 20px;
  animation: riseIn 0.9s var(--ease) both;
}

.brand-lockup {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 600;
  line-height: 1.28;
  max-width: 14em;
}

.hero-lead {
  margin: 0 0 28px;
  max-width: 28em;
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.7;
  color: rgba(245, 248, 252, 0.88);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

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

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

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

.hero .btn-ghost {
  border-color: rgba(245, 248, 252, 0.45);
  color: #f5f8fc;
  background: transparent;
}

.hero .btn-ghost:hover {
  background: rgba(245, 248, 252, 0.1);
  color: #fff;
}

.section-contact .btn-ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.section-contact .btn-ghost:hover {
  border-color: var(--brand-mid);
  color: var(--brand);
}

/* ---------- sections ---------- */
.section {
  padding: 88px 0;
}

.section-head {
  margin-bottom: 36px;
  max-width: 34em;
}

.section h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.section h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
}

.section-lead {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.section-fit {
  background:
    linear-gradient(180deg, #eef3f9 0%, var(--paper) 100%);
}

.fit-list {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 22px;
}

.fit-list li {
  display: grid;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.fit-list strong {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
}

.fit-list span {
  color: var(--muted);
}

.section-cap {
  background: #ffffff;
  border-block: 1px solid var(--line);
}

.cap-block {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  max-width: 40em;
}

.cap-block:first-of-type {
  border-top: 1px solid var(--line);
}

.cap-block p {
  margin: 0;
  color: var(--muted);
}

.section-flow {
  background: var(--paper);
}

.flow-steps {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 28px;
  counter-reset: none;
}

.flow-steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #f5f8fc;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
}

.flow-steps p {
  margin: 0;
  color: var(--muted);
}

.section-device {
  background:
    linear-gradient(160deg, #0f1c37 0%, #163568 55%, #1a4f9c 100%);
  color: #f5f8fc;
}

.section-device .section-lead,
.section-device .device-note {
  color: rgba(245, 248, 252, 0.82);
}

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

.device-copy p {
  margin: 0 0 14px;
}

.device-note {
  font-size: 15px;
}

.device-panel {
  display: flex;
  justify-content: center;
}

.fake-oled {
  width: min(280px, 100%);
  aspect-ratio: 5 / 4;
  padding: 16px 18px;
  border-radius: 14px;
  background: #0a1528;
  border: 3px solid #2a3f63;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #b8cce8;
  animation: oledIn 1s var(--ease) 0.2s both;
}

.oled-bar {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(184, 204, 232, 0.35);
  color: #e8f0fc;
}

.oled-line + .oled-line {
  margin-top: 6px;
}

.section-contact {
  background: var(--paper-deep);
}

.contact-inner {
  text-align: left;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.contact-hint {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- footer ---------- */
.site-footer {
  padding: 36px 0 28px;
  background: var(--ink);
  color: rgba(244, 239, 228, 0.78);
  font-size: 14px;
}

.footer-inner {
  display: grid;
  gap: 18px;
}

.site-footer strong {
  display: block;
  color: #f5f8fc;
  font-family: var(--font-serif);
  font-size: 18px;
  margin-bottom: 4px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  color: rgba(244, 239, 228, 0.78);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.copy {
  opacity: 0.7;
}

/* ---------- motion ---------- */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroDrift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(-1.2%, -0.8%, 0);
  }
}

@keyframes oledIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-media,
  .hero-copy,
  .fake-oled,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- H5 ---------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: rgba(244, 247, 251, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav .nav-cta {
    margin-top: 10px;
    text-align: center;
    border-bottom: 0;
  }

  .hero-copy {
    margin-left: 20px;
    padding: 40px 0 36px;
  }

  .section {
    padding: 64px 0;
  }

  .device-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .device-panel {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .wrap,
  .wrap.narrow {
    width: calc(100% - 32px);
  }

  .logo-text {
    font-size: 16px;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    width: 100%;
  }

  .flow-steps li {
    grid-template-columns: 40px 1fr;
  }

  .step-num {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}
