:root {
  --bg: #e6ebf2;
  --ink: #111418;
  --ink-soft: #5a6472;
  --line: #c7d0db;
  --accent: #1a73e8;
  --accent-deep: #1558b0;
  --ok: #2e7d32;
  --warn: #f57f17;
  --danger: #c62828;
  --font-display: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", sans-serif;
  --font-ui: "Segoe UI", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Noto Sans SC", sans-serif;
  --shadow-shot: 0 28px 80px rgba(17, 20, 24, 0.22), 0 2px 0 rgba(255, 255, 255, 0.35) inset;
}

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

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ——— Nav ——— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: rgba(230, 235, 242, 0.82);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid rgba(199, 208, 219, 0.85);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.brand-lockup img { border-radius: 7px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.nav-links a:hover { color: var(--accent); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-btn {
  min-width: 44px;
  min-height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

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

.lang-btn.is-active {
  background: var(--accent);
  color: #fff;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px 32px 0;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 78% 18%, rgba(26, 115, 232, 0.22), transparent 58%),
    radial-gradient(ellipse 40% 35% at 12% 70%, rgba(21, 88, 176, 0.1), transparent 50%),
    linear-gradient(168deg, #f2f5f9 0%, #e3e9f1 42%, #d4dce8 100%);
  pointer-events: none;
}

.hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(17, 20, 24, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 20, 24, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 70% at 55% 35%, #000 10%, transparent 72%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 0 8px;
}

.hero-copy {
  max-width: 520px;
  animation: rise-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}

.hero-brand img {
  width: clamp(44px, 5vw, 56px);
  height: clamp(44px, 5vw, 56px);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(26, 115, 232, 0.28);
}

.hero h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  max-width: 16em;
}

.hero-lead {
  margin: 0 0 26px;
  font-size: 1.06rem;
  color: var(--ink-soft);
  max-width: 36ch;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.97rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 30px rgba(26, 115, 232, 0.34);
}

.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  background: #fff;
  transform: translateY(-1px);
}

.hero-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 8px;
  min-height: 48vh;
  perspective: 1600px;
}

.shot {
  width: 100%;
}

.shot-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-shot);
  background: #e8e8e8;
}

.shot--hero {
  width: min(1100px, 100%);
  transform: translateY(12%) rotateX(4deg) scale(1.02);
  transform-origin: center bottom;
  animation: stage-in 1.05s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gallery-block .shot-img {
  box-shadow: 0 20px 48px rgba(17, 20, 24, 0.16);
}

/* ——— Realistic app chrome ——— */
.app {
  font-family: var(--font-ui);
  background: #e8e8e8;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  overflow: hidden;
  color: #222;
  user-select: none;
}

.app--main { min-height: 0; }

.app-chrome {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: linear-gradient(180deg, #3a3a3a, #2b2b2b);
  color: #fff;
}

.app-chrome--light {
  background: linear-gradient(180deg, #f7f7f7, #ebebeb);
  border-bottom: 1px solid #d0d0d0;
}

.traffic {
  position: absolute;
  left: 12px;
  display: flex;
  gap: 7px;
}

.traffic i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #555;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.traffic i:nth-child(1) { background: #ff5f57; }
.traffic i:nth-child(2) { background: #febc2e; }
.traffic i:nth-child(3) { background: #28c840; }

.chrome-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.chrome-title img {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.chrome-title--dark { color: #222; }

.app-shell {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 220px;
  min-height: 340px;
  background: #f5f5f5;
}

.app--shot .app-shell { min-height: 300px; }

.app-nav {
  background: #fff;
  border-right: 1px solid #e0e0e0;
  padding-top: 8px;
}

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding-left: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

.nav-btn .nav-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}

.nav-btn.is-active {
  color: var(--accent);
  font-weight: 700;
}

.nav-btn.is-active .nav-bar { background: var(--accent); }

.app-work {
  padding: 12px 14px 14px;
  overflow: hidden;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-width: 640px;
}

.form-stack--tight { gap: 10px; }

.f-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.f-row--top { align-items: flex-start; }

.f-row > label {
  width: 108px;
  flex-shrink: 0;
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

.f-row > label.narrow { width: 72px; }

.f-input,
.f-combo {
  min-height: 32px;
  padding: 5px 8px;
  background: #fff;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  font-size: 13px;
  color: #222;
  display: flex;
  align-items: center;
}

.f-input.grow,
.f-combo.grow { flex: 1; min-width: 0; }

.f-input.muted { color: #999; }

.f-combo {
  justify-content: space-between;
  gap: 8px;
}

.f-btn {
  min-height: 30px;
  padding: 4px 12px;
  background: #f5f5f5;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: default;
  white-space: nowrap;
}

.f-btn.danger { color: var(--danger); }
.f-btn.primary-lite {
  background: #e8f0fe;
  border-color: #a8c7fa;
  color: #0d47a1;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid #c8c8c8;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.info-fields {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
}

.f-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #333;
}

.f-check i {
  width: 16px;
  height: 16px;
  border: 1px solid #888;
  border-radius: 2px;
  background: #fff;
  position: relative;
}

.f-check i.checked {
  background: var(--accent);
  border-color: var(--accent);
}

.f-check i.checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sign-btn {
  margin-left: 116px;
  margin-top: 4px;
  min-height: 40px;
  background: #d0d0d0;
  border: none;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 700;
  color: #222;
  cursor: default;
}

.warn-note {
  margin: 0 0 0 116px;
  font-size: 12px;
  color: #c62828;
  line-height: 1.35;
}

.app-log {
  background: #fafafa;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 6px;
  font-size: 13px;
}

.log-tools {
  display: flex;
  gap: 4px;
}

.log-tools button {
  padding: 2px 8px;
  font-size: 11px;
  background: #f5f5f5;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  color: #444;
  cursor: default;
}

.log-body {
  padding: 4px 10px 12px;
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  font-size: 11px;
  color: #555;
  line-height: 1.55;
}

.log-line {
  display: flex;
  gap: 8px;
}

.log-line time {
  color: #999;
  flex-shrink: 0;
}

.ok { color: var(--ok) !important; }
.warn { color: var(--warn) !important; }

/* ——— Certificates window ——— */
.app--certs {
  background: #f5f5f5;
  max-width: 560px;
  margin-left: auto;
}

.certs-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.certs-panel {
  background: #fff;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  padding: 12px;
}

.certs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.certs-actions { display: flex; gap: 6px; }

.certs-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 120px;
}

.cert-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border-radius: 2px;
  font-size: 13px;
}

.cert-item.is-selected { background: #e8f0fe; }
.cert-name { font-weight: 600; color: #222; }
.cert-meta { font-size: 12px; color: #666; }

.certs-form {
  background: #fff;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.certs-form-actions { display: flex; justify-content: flex-end; }

.certs-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #666;
}

/* ——— Result window ——— */
.app--result {
  background: #f0f2f5;
  max-width: 480px;
}

.result-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.result-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 14px;
}

.result-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}

.result-name {
  font-size: 17px;
  font-weight: 700;
}

.muted-sm {
  font-size: 12px;
  color: #888;
}

.kv {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 10px;
  font-size: 12px;
  margin-top: 8px;
  color: #8a8a8a;
}

.kv strong {
  font-weight: 600;
  color: #222;
  word-break: break-all;
}

.badge-ok {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 11px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.result-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

/* ——— Marketing sections ——— */
.section { padding: 96px 32px; }

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-head {
  max-width: 520px;
  margin-bottom: 44px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.8vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.features {
  background: linear-gradient(180deg, #dde4ee 0%, #eef2f7 100%);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.feature-list li {
  display: grid;
  grid-template-columns: minmax(170px, 250px) 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.feature-list h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
}

.feature-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.gallery { background: #f0f4f9; }

.gallery-block {
  display: grid;
  grid-template-columns: 0.85fr 1.35fr;
  gap: 40px;
  align-items: center;
  margin: 0 0 64px;
}

.gallery-block--reverse { grid-template-columns: 1.35fr 0.85fr; }
.gallery-block--reverse figcaption { order: 2; }

.gallery-block figcaption h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
}

.gallery-block figcaption p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.download {
  background:
    radial-gradient(ellipse 55% 70% at 50% 0%, rgba(26, 115, 232, 0.13), transparent 55%),
    linear-gradient(180deg, #e8edf3, #d8e0ec);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.download-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(17, 20, 24, 0.06);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.download-btn:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(26, 115, 232, 0.16);
}

.download-os {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0;
}

.download-meta {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.download-action {
  margin-top: 14px;
  font-weight: 700;
  color: var(--accent);
}

.site-footer {
  padding: 36px 32px 48px;
  border-top: 1px solid var(--line);
  background: #dde4ee;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  max-width: 36em; /* ch is too narrow for CJK; keep one line when space allows */
  line-height: 1.5;
}

@media (min-width: 900px) {
  .site-footer p {
    white-space: nowrap;
  }
}

.footer-telegram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #229ed9;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 24px rgba(34, 158, 217, 0.28);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.footer-telegram:hover {
  background: #1b8bc2;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(34, 158, 217, 0.34);
}

.tg-icon {
  flex-shrink: 0;
}

/* ——— Motion ——— */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes stage-in {
  from { opacity: 0; transform: translateY(24%) rotateX(7deg) scale(0.97); }
  to { opacity: 1; transform: translateY(12%) rotateX(4deg) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .shot--hero { transform: translateY(8%); }
}

/* ——— Responsive ——— */
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 88px minmax(0, 1fr) 180px; }
  .feature-list li { grid-template-columns: 1fr; gap: 8px; }
  .gallery-block,
  .gallery-block--reverse { grid-template-columns: 1fr; }
  .gallery-block--reverse figcaption { order: 0; }
  .download-grid { grid-template-columns: 1fr; }
  .shot--hero {
    transform: translateY(8%) rotateX(3deg);
  }
  @keyframes stage-in {
    to { transform: translateY(8%) rotateX(3deg) scale(1); }
  }
}

@media (max-width: 720px) {
  .site-nav, .hero, .section, .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-right { gap: 10px; }
  .nav-links { gap: 12px; font-size: 0.84rem; }
  .lang-btn { min-width: 40px; }
  .hero { min-height: auto; }
  .hero h1 { max-width: none; }
  .hero-stage { min-height: 36vh; perspective: none; }
  .shot--hero { transform: none; animation-name: rise-in; }

  .app-shell { grid-template-columns: 1fr; }
  .app-nav, .app-log { display: none; }
  .sign-btn, .warn-note { margin-left: 0; }
  .f-row > label { width: 100%; }
  .f-row { flex-wrap: wrap; }
  .app--certs, .app--result { max-width: none; margin: 0; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
}
