/* ==========================================================================
   VPNAN - 设计令牌与全局基础样式
   ========================================================================== */

:root {
  /* ---- 设计令牌 ---- */
  --bg: #FCF7ED;
  --bg-panel: #FFFDF8;
  --bg-panel2: #F3EBDA;
  --border: #E4D9C2;
  --accent: #0C8A47;
  --accent-dark: #086A37;
  --text: #292115;
  --text-muted: #6E6350;
  --success: #2E9E5B;
  --warn: #C98A1B;
  --error: #BF3B2C;

  --flag-red: #BC4238;
  --flag-blue: #3B5878;
  --flag-gold: #D2A445;
  --flag-white: #FBFAF3;
  --flag-ink: #332A1B;

  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 12px;

  --font-display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;

  --shadow-win: 0 2px 4px rgba(41, 33, 21, .06), 0 32px 64px -26px rgba(41, 33, 21, .30);
  --tint-accent: rgba(12, 138, 71, .08);

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='pn'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23pn)'/%3E%3C/svg%3E");

  --gutter: 32px;
  --gutter-sm: 16px;
  --header-h: 64px;
}

/* ---- Reset ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
}

body {
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--noise);
  background-size: 140px 140px;
  opacity: .045;
  pointer-events: none;
  z-index: 60;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---- 容器 ---- */
.container {
  max-width: 1248px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.wrap {
  max-width: 1248px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---- 通用工具类 ---- */
.no-break { white-space: nowrap; }
.mono { font-family: var(--font-mono); }

/* ---- 窄屏防溢出：行内 code 长串换行兜底 ---- */
code {
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--bg-panel2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}

pre code {
  display: block;
  overflow-x: auto;
  padding: 14px 16px;
  background: var(--bg-panel);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

/* ---- 锚点跳转补偿（可访问性） ---- */
html { scroll-padding-top: calc(var(--header-h) + 16px); }

/* ---- 键盘焦点可见 ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- 滚动淡入（reveal 体系，默认可见，隐藏态由 JS 加 pending） ---- */
.reveal { transition: opacity .5s ease, transform .5s ease; }
.reveal.pending { opacity: 0; transform: translateY(16px); }

/* ==========================================================================
   顶部导航
   ========================================================================== */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 20;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.brand svg { display: block; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--r-xs);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: inset 0 0 0 rgba(0, 0, 0, 0);
  transition: color .15s, background-color .15s, box-shadow .15s;
}

.main-nav a svg { display: block; flex: 0 0 auto; }

.main-nav a:hover {
  color: var(--text);
  background: var(--bg-panel);
  box-shadow: inset 0 2px 0 var(--accent);
}

.main-nav a.active {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.header-side {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--bg-panel);
  cursor: pointer;
  position: relative;
}

.lang-switch svg { display: block; flex: 0 0 auto; }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: 0 12px 24px -10px rgba(41, 33, 21, .28);
  padding: 6px;
  min-width: 150px;
  display: none;
  z-index: 40;
}

.lang-dropdown.open { display: block; }

.lang-dropdown a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.lang-dropdown a:hover { background: var(--bg-panel2); }

.lang-dropdown a.current { color: var(--accent); }

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 18px;
  border-radius: var(--r-xs);
  background: var(--text);
  color: var(--bg-panel);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: box-shadow .15s, transform .15s;
}

.btn-login:hover {
  box-shadow: inset 0 2px 0 var(--accent);
  transform: translateY(-1px);
}

/* ---- 移动端汉堡 ---- */
.hamburger {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-xs);
  color: var(--text);
}

.hamburger svg { display: block; }

.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 90;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px var(--gutter-sm) 40px;
}

html.nav-open { overflow: hidden; }

html.nav-open .mobile-drawer { display: block; }

.mobile-nav-list {
  list-style: none;
  border-top: 1px solid var(--border);
}

.mobile-nav-list li { border-bottom: 1px solid var(--border); }

.mobile-nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.mobile-nav-list a svg { display: block; flex: 0 0 auto; }

.mobile-nav-list a.active { color: var(--accent); }

.mobile-lang-list {
  list-style: none;
  margin-top: 24px;
}

.mobile-lang-list li { border-bottom: 1px solid var(--border); }

.mobile-lang-list a {
  display: block;
  min-height: 48px;
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.mobile-lang-list a.current { color: var(--accent); }

.mobile-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 24px;
  padding: 12px 20px;
  border-radius: var(--r-xs);
  background: var(--text);
  color: var(--bg-panel);
  font-size: 15px;
  font-weight: 700;
  width: 100%;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 46px 0 40px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 52px;
  align-items: center;
}

.hero-copy { position: relative; z-index: 2; min-width: 0; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .02em;
}

.kicker .k-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--tint-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kicker .k-dot svg { display: block; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(52px, 5.5vw, 72px);
  line-height: 1.13;
  letter-spacing: -.022em;
  margin: 20px 0 16px;
  text-wrap: balance;
}

.hero h1 .kw { color: var(--accent); }

.hero-sub {
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 34em;
  margin-bottom: 24px;
}

.hero-sub strong { color: var(--text); font-weight: 700; }

.cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15.5px;
  padding: 13px 28px;
  border-radius: var(--r-sm);
  min-height: 48px;
  transition: transform .15s, box-shadow .15s, background-color .15s;
}

.btn-main {
  background: var(--text);
  color: var(--bg-panel);
  box-shadow: 0 1px 0 rgba(41, 33, 21, .2), 0 10px 22px -12px rgba(41, 33, 21, .5);
}

.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 3px 0 var(--accent), 0 14px 26px -12px rgba(41, 33, 21, .5);
}

.btn-main svg { display: block; }

.btn-ghost {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 700;
}

.btn-ghost:hover {
  box-shadow: inset 0 2px 0 var(--accent);
  transform: translateY(-2px);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-bottom: 26px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-item svg { display: block; flex: 0 0 auto; }

.hero-meta {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 16px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--text-muted);
  text-transform: uppercase;
  flex: 0 0 84px;
}

.platform-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.platform-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.platform-item svg { display: block; color: var(--text); opacity: .78; }

.flag-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.flag-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.flag-item .flag-svg {
  display: inline-flex;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--border);
  flex-shrink: 0;
}

.flag-item .flag-svg svg {
  display: block;
  border-radius: 4px;
}

/* ==========================================================================
   客户端窗口装置（首屏视觉记忆点）
   ========================================================================== */

.hero-win {
  position: relative;
  z-index: 1;
  padding: 18px 6px 14px 10px;
  min-width: 0;
}

.win-wrap {
  position: relative;
  transform: rotate(1.5deg);
}

.win-wrap::before {
  content: "";
  position: absolute;
  inset: 14px -12px -14px 12px;
  background: var(--bg-panel2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transform: rotate(-1.6deg);
  z-index: 0;
}

.win {
  position: relative;
  z-index: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-win);
  overflow: hidden;
}

.win::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--noise);
  background-size: 140px 140px;
  opacity: .035;
  pointer-events: none;
}

.win-titlebar {
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 0 16px;
  height: 44px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(var(--bg-panel), #FCF6EA);
}

.win-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.win-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.win-dots .d1 { background: var(--error); }
.win-dots .d2 { background: var(--warn); }
.win-dots .d3 { background: var(--success); }

.win-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.win-tab {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}

.win-tab.on { color: var(--text); }

.win-tab.on::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.win-title-note {
  margin-left: auto;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .05em;
}

.win-body {
  display: grid;
  grid-template-columns: 1.32fr 1fr;
}

.win-list {
  border-right: 1px solid var(--border);
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .04em;
}

.list-head .mono { font-size: 11px; }

.line-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 16px;
  border-bottom: 1px solid var(--border);
}

.line-row:last-child { border-bottom: none; }

.line-row.current {
  background: var(--tint-accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.mini-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.mini-flag svg { display: block; border-radius: 50%; }

.line-name {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .01em;
}

.line-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text-muted);
  background: var(--bg-panel2);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}

.line-check {
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex;
}

.check-seal {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tint-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.check-seal svg { display: block; }

.pending-seal {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px dashed var(--border);
  display: block;
}

.win-side {
  display: flex;
  flex-direction: column;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, rgba(228, 217, 194, .5) 27px, rgba(228, 217, 194, .5) 28px);
}

.side-block { padding: 12px 16px; }

.side-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.plan-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  box-shadow: 0 4px 10px -6px rgba(41, 33, 21, .18);
}

.plan-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.plan-price {
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.plan-price .per {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.plan-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: .01em;
}

.side-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 16px;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--accent);
  position: relative;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 2px rgba(8, 106, 55, .55);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-panel);
  box-shadow: 0 1px 2px rgba(41, 33, 21, .35);
}

.toggle-label {
  font-size: 14px;
  font-weight: 800;
}

.toggle-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 7px;
}

.win-status {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .03em;
  background: linear-gradient(#FCF6EA, var(--bg-panel));
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--tint-accent);
  flex-shrink: 0;
}

.win-seal {
  position: absolute;
  top: -16px;
  right: -14px;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--accent), var(--accent-dark));
  border: 3px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px -8px rgba(8, 106, 55, .55);
  transform: rotate(-6deg);
}

.win-seal svg { display: block; }

/* ==========================================================================
   下一区块边缘（可滚动暗示）
   ========================================================================== */

.peek {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 26px 0 60px;
  position: relative;
  z-index: 2;
}

.peek .overline {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--accent-dark);
  text-transform: uppercase;
}

.peek h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -.015em;
  margin-top: 8px;
}

/* ==========================================================================
   SVG 配色钩子
   ========================================================================== */

.sv-accent { color: var(--accent); }
.sv-ink { color: var(--text); }
.f-red { fill: var(--flag-red); }
.f-blue { fill: var(--flag-blue); }
.f-gold { fill: var(--flag-gold); }
.f-white { fill: var(--flag-white); }
.f-ink { fill: var(--flag-ink); }

/* ==========================================================================
   响应式断点
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto !important; }
  .reveal,
  .reveal.pending {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .hero h1 { font-size: clamp(40px, 7vw, 52px); }
  .hero-win { padding: 10px 4px; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .hamburger { display: inline-flex; }
  .header-side { margin-left: auto; }
  .hero { padding: 32px 0 28px; }
  .hero h1 { font-size: 28px; line-height: 1.2; }
  .hero-sub { font-size: 15px; }
  .btn { font-size: 14.5px; padding: 12px 22px; }
  .win-wrap { transform: none; }
  .win-wrap::before { inset: 8px -6px -8px 6px; transform: none; }
  .meta-label { flex: 0 0 70px; font-size: 9.5px; }
  .platform-row { gap: 12px; }
  .flag-row { gap: 12px; }
}

@media (max-width: 640px) {
  .container,
  .wrap { padding-inline: var(--gutter-sm); }
  .hero-grid { gap: 32px; }
  .hero h1 { font-size: 28px; }
  .hero h1 .no-break { white-space: normal; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { justify-content: center; }
  .win-body { grid-template-columns: 1fr; }
  .win-list { border-right: none; border-bottom: 1px solid var(--border); }
  .win-seal { top: -12px; right: -8px; width: 44px; height: 44px; }
  .win-titlebar { gap: 8px; }
  .win-tab { padding: 0 8px; }
  .trust-row { gap: 6px 12px; }
  .lang-switch-wrap { display: none; }
  .header-side { gap: 10px; }
  .btn-login { padding: 8px 14px; min-height: 36px; }
}

/* ---- 装饰性微倾斜在窄屏重置（防横向溢出） ---- */
@media (max-width: 640px) {
  .tilt,
  .tilt-sm {
    transform: none !important;
  }
}

/* ---- 绝对定位装饰元素防伸出视口 ---- */
.overflow-clip {
  overflow-x: clip;
}