@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Sora:wght@500;600;700&display=swap");

:root {
  --bg: #eef5fa;
  --surface: #ffffff;
  --text: #122433;
  --muted: #5a6f82;
  --brand: #1f7ab8;
  --brand-dark: #155f91;
  --brand-soft: #d7ebf8;
  --line: #cfe0ee;
  --soft: #e8f3fb;
  --ink: #0d2436;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(18, 55, 86, 0.07);
  --max: 1120px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Sora", "Noto Sans SC", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(180deg, #dceef9 0%, transparent 280px),
    radial-gradient(900px 420px at 90% -5%, #c8e4f6 0%, transparent 55%),
    radial-gradient(700px 380px at 0% 30%, #e4f2fb 0%, transparent 50%),
    var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(207, 224, 238, 0.9);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--display);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand span {
  font-size: 16px;
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: background 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, top 0.2s ease;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 14px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
}

/* Layout */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 18px 56px;
}

body.home .container {
  padding-top: 0;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

body.home .container > .band,
body.home .container > .hero-bleed {
  width: 100%;
}

body.home .band-inner,
body.home .hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

/* ===== HOME HERO ===== */
.hero-bleed {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(125deg, #0f4f7a 0%, #1a6fa8 42%, #2a8ec4 78%, #4aa8d4 100%);
  color: #fff;
  margin-bottom: 0;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: center;
}

.hero-bleed::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 80%, rgba(255, 255, 255, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 35%);
  pointer-events: none;
}

.hero-bleed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 64' preserveAspectRatio='none'%3E%3Cpath fill='%23eef5fa' d='M0,32 C240,64 480,0 720,24 C960,48 1200,64 1440,24 L1440,64 L0,64 Z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  padding-top: 36px !important;
  padding-bottom: 72px !important;
  width: 100%;
}

.brand-mark {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #fff;
  animation: rise 0.7s ease both;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700;
  line-height: 1.35;
  max-width: 16em;
  animation: rise 0.75s ease 0.08s both;
}

.hero-copy .hero-lead {
  margin: 0 0 22px;
  max-width: 34em;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  animation: rise 0.75s ease 0.16s both;
}

.hero-copy .hero-lead a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  animation: float-in 0.9s ease 0.2s both;
}

.phone-frame {
  width: min(280px, 72vw);
  border-radius: 28px;
  padding: 10px;
  background: rgba(8, 28, 44, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 48px rgba(8, 30, 48, 0.28);
  animation: bob 5.5s ease-in-out infinite;
}

.phone-frame img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  background: #0b1a28;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark,
  .hero-copy h1,
  .hero-copy .hero-lead,
  .hero-visual,
  .phone-frame {
    animation: none;
  }
}

/* CTA */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: rise 0.75s ease 0.24s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 14px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: #fff;
  color: var(--brand-dark);
}

.btn-primary:hover {
  background: #eef7fd;
  color: var(--brand-dark);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-solid {
  background: var(--brand);
  color: #fff;
}

.btn-solid:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn-line {
  background: transparent;
  color: var(--brand-dark);
  border-color: var(--line);
}

.btn-line:hover {
  background: var(--soft);
  color: var(--brand-dark);
}

/* Legacy hero (subpages / fallback) */
.hero {
  background: linear-gradient(145deg, #155f91 0%, #1f7ab8 50%, #3f97c9 100%);
  color: #fff;
  border-radius: 16px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.25;
}

.hero p {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: 16px;
  opacity: 0.96;
}

/* Content bands */
.band {
  padding: 42px 0 8px;
}

.band + .band {
  border-top: 1px solid rgba(207, 224, 238, 0.7);
}

.band-alt {
  background: rgba(255, 255, 255, 0.55);
}

.section-head {
  margin-bottom: 18px;
}

.section-head .eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.35;
  color: var(--ink);
}

.section-head .lead,
.lead {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 14px;
}

.prose p {
  margin: 0 0 14px;
}

.prose h3 {
  margin: 28px 0 10px;
  font-size: 19px;
  color: #163950;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 8px;
}

/* Layer chips */
.layer-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}

.layer-list li {
  margin: 0;
  padding: 14px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  border-top: 3px solid var(--brand);
}

.layer-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--ink);
}

.layer-list span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* Shared section card (subpages) */
.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.section h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.35;
  color: #15324a;
}

.section h3 {
  margin: 22px 0 10px;
  font-size: 18px;
  color: #1d4666;
}

.section p {
  margin: 0 0 14px;
  color: var(--text);
}

.section ul,
.section ol {
  margin: 0 0 14px;
  padding-left: 1.2em;
  color: var(--text);
}

.section li {
  margin-bottom: 8px;
}

/* Screenshots */
.shot {
  margin: 16px 0 8px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b1a28;
}

.shot img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #0b1a28;
}

.shot figcaption {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
  background: #f3f8fc;
}

.shot-feature {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.shot-feature img {
  max-height: 640px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
  margin: 20px 0;
}

.split-reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.split-reverse .split-media {
  order: -1;
}

.card-lite {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.card-lite h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--ink);
}

.card-lite p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.steps li {
  position: relative;
  margin: 0;
  padding: 16px 16px 16px 58px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 20px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.faq-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}

.faq-item p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.faq-item a {
  font-weight: 500;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 16px 40px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.page-title {
  margin: 8px 0 16px;
  font-size: clamp(24px, 3.5vw, 34px);
  color: var(--ink);
}

.page-pad {
  padding-left: 16px;
  padding-right: 16px;
}

.error-box {
  text-align: center;
  padding: 48px 20px;
}

.error-box .code {
  font-family: var(--display);
  font-size: 64px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 8px;
}

.toc-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}

.toc-inline a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--brand-dark);
  font-size: 13px;
  text-decoration: none;
}

.toc-inline a:hover {
  background: #dcebf8;
}

@media (max-width: 960px) {
  .layer-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: left;
    padding-top: 28px !important;
    padding-bottom: 80px !important;
  }

  .hero-visual {
    order: -1;
  }

  .phone-frame {
    width: min(220px, 58vw);
  }

  .split,
  .split-reverse {
    grid-template-columns: 1fr;
  }

  .split-reverse .split-media {
    order: 0;
  }
}

@media (max-width: 860px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 28px 18px;
  }

  .section {
    padding: 18px 14px;
  }

  .brand span {
    font-size: 14px;
  }

  .nav-inner {
    position: relative;
    flex-wrap: nowrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    font-size: 15px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 120;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 12px 14px;
    border-radius: 8px;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: var(--soft);
  }

  .band {
    padding: 32px 0 4px;
  }
}

@media (max-width: 560px) {
  .cta-row .btn {
    width: 100%;
  }

  .layer-list {
    grid-template-columns: 1fr;
  }

  .page-pad {
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-pad .section {
    padding: 16px 12px;
  }

  .brand-mark {
    letter-spacing: 0.02em;
  }
}
