/* Yalla Nihao — porcelain blue (青花瓷), the same palette as the app (Core/Theme/AppColors.swift). */
:root {
  --obsidian: #07142B;
  --navy: #0E1F3D;
  --navy-mid: #16305C;
  --accent: #1F4E8C;
  --sage: #8FA9D6;
  --mint: #DCE7F7;
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-alt: #E9EEF6;
  --text: #0E1F3D;
  --text-2: #56637A;
  --border: rgba(143, 169, 214, .28);
  --shadow: 0 10px 30px rgba(14, 31, 61, .08);
  --radius: 22px;
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:lang(zh) { --font: "Noto Sans SC", "PingFang SC", system-ui, sans-serif; }
:lang(en) { --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(244, 246, 250, .88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--text); font-weight: 500; font-size: 15px; }
.lang { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.lang { flex: none; }
.lang a { white-space: nowrap; font-size: 13px; padding: 4px 10px; border-radius: 999px; color: var(--text-2); font-weight: 500; }
.lang a:hover { text-decoration: none; color: var(--text); }
.lang a[aria-current="true"] { background: var(--navy); color: #fff; }

/* Hero */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--obsidian);
}
.hero::before {
  content: ""; position: absolute; inset: -20px;
  background: url("/img/hero.jpg") center / cover no-repeat;
  filter: blur(2px); transform: scale(1.04);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,20,43,.55) 0%, rgba(7,20,43,.8) 55%, rgba(7,20,43,.95) 100%);
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
  padding-top: 72px; padding-bottom: 0;
}
.hero-text { padding-bottom: 72px; align-self: center; }
.hero .eyebrow {
  display: inline-block; font-size: 14px; font-weight: 500;
  background: rgba(220,231,247,.16); border: 1px solid rgba(220,231,247,.28);
  color: var(--mint); padding: 4px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.2; margin: 0 0 16px; font-weight: 700; }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: rgba(255,255,255,.86); margin: 0 0 30px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 14px; font-weight: 600; font-size: 16px;
  border: 1px solid transparent; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-light { background: var(--mint); color: var(--navy); }
.btn-light:hover { background: #fff; }
.btn-ghost { border-color: rgba(220,231,247,.4); color: #fff; }
.btn-ghost:hover { background: rgba(220,231,247,.12); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-mid); }
.btn .sub { display: block; font-size: 12px; font-weight: 400; opacity: .75; }
.btn[aria-disabled="true"] { cursor: default; }

.hero-phone { align-self: end; display: flex; justify-content: center; }
.hero-phone img {
  width: min(320px, 78vw); height: min(560px, 150vw); object-fit: cover; object-position: top;
  border-radius: 44px 44px 0 0;
  border: 8px solid #0b1424; border-bottom: 0;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}

/* Sections */
section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.3; margin: 0 0 10px; }
.section-head p { color: var(--text-2); margin: 0; }
.kicker { display: flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.kicker::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--accent); }

/* Feature tiles — the same look as the Services grid in the app */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.tile .photo { position: relative; aspect-ratio: 4 / 3; background: var(--navy); }
.tile .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,31,61,.05) 30%, rgba(7,20,43,.82) 100%);
}
.tile .photo h3 {
  position: absolute; inset-inline: 16px; bottom: 12px; z-index: 1;
  margin: 0; color: #fff; font-size: 19px; line-height: 1.35;
}
.tile p { margin: 0; padding: 14px 16px 18px; color: var(--text-2); font-size: 15px; line-height: 1.65; }

.more { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 6px 14px; font-size: 14px;
}

/* Screens */
.screens-band { background: var(--surface-alt); }
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.screen { margin: 0; text-align: center; }
.screen img {
  width: 100%; max-width: 300px; margin: 0 auto 14px;
  border-radius: 38px; border: 7px solid #0b1424; box-shadow: 0 20px 50px rgba(14,31,61,.18);
}
.screen figcaption { color: var(--text-2); font-size: 15px; }

/* Privacy */
.promise {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.promise div {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.promise svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 10px; }
.promise h3 { margin: 0 0 4px; font-size: 18px; }
.promise p { margin: 0; color: var(--text-2); font-size: 15px; }

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--navy-mid), var(--obsidian));
  color: #fff; border-radius: 28px; padding: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta::after {
  content: "你好"; position: absolute; inset-inline-end: -10px; bottom: -40px;
  font-size: 170px; font-weight: 700; color: rgba(220,231,247,.06); font-family: "Noto Sans SC", sans-serif; line-height: 1;
  pointer-events: none;
}
.cta h2 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); }
.cta p { margin: 0; color: rgba(255,255,255,.78); }
.cta .btn { position: relative; z-index: 1; }

/* Document pages */
.doc-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 56px 0 36px; }
.doc-hero h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); }
.doc-hero .meta { color: var(--text-2); margin-top: 6px; }
.doc { padding: 40px 0 88px; }
.doc .wrap { max-width: 780px; }
.doc h2 {
  font-size: 22px; margin: 40px 0 10px; display: flex; align-items: center; gap: 10px;
}
.doc h2::before { content: ""; width: 4px; height: 22px; border-radius: 2px; background: var(--accent); flex: none; }
.doc h3 { font-size: 18px; margin: 26px 0 6px; }
.doc p, .doc li { color: #26334a; }
.doc ul { padding-inline-start: 22px; }
.doc li { margin: 6px 0; }
.doc .note { background: var(--mint); border-radius: 14px; padding: 12px 16px; color: var(--navy); font-size: 15px; }
.doc a { text-decoration: underline; text-underline-offset: 3px; }

/* Support */
.support-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: start; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 8px; font-size: 22px; }
.card p { color: var(--text-2); margin: 0 0 18px; }
.phone { font-size: 22px; font-weight: 700; margin-bottom: 18px; }
details { border-bottom: 1px solid var(--border); padding: 14px 0; }
details:last-child { border-bottom: 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 10px 0 0; color: var(--text-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 44px; color: var(--text-2); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 18px; margin-inline-start: auto; }
.site-footer .links a { color: var(--text-2); }
.site-footer img { height: 20px; width: auto; opacity: .9; }
.sig { display: inline-flex; gap: 5px; direction: ltr; }

/* Responsive */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .promise { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .lang { margin-inline-start: auto; }
  .brand img { height: 19px; }
  .site-header .wrap { gap: 10px; }
  .lang a { padding: 4px 8px; font-size: 12px; }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; gap: 8px; }
  .hero-text { padding-bottom: 28px; }
  section { padding: 60px 0; }
  .screens { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .screen { scroll-snap-align: center; }
  .support-grid { grid-template-columns: 1fr; }
  .cta { padding: 30px 24px; }
  .site-footer .links { margin-inline-start: 0; }
}
@media (max-width: 460px) {
  .features { grid-template-columns: 1fr; }
  .promise { grid-template-columns: 1fr; }
  .tile .photo { aspect-ratio: 16 / 9; }
  .actions .btn { flex: 1 1 100%; justify-content: center; }
}
