/* ============================================================
   RIO CAPSULE (力宝康) — Design System
   高端科技感 High-tech + 极简草本 Minimalist Botanical + 悬浮3D
   主导航/通用组件层
   ============================================================ */

:root {
  /* Brand palette */
  --dominant: #0A192F;      /* 深海蓝 */
  --onyx: #121212;          /* 曜石黑 */
  --secondary: #1B3B2B;     /* 森林深绿 */
  --accent-gold: #D4AF37;   /* 哑光流金 */
  --accent-silver: #E5E5E5; /* 钛银 */
  --gold-soft: rgba(212, 175, 55, 0.15);
  --gold-line: rgba(212, 175, 55, 0.4);

  /* Neutrals */
  --bg: #0A192F;
  --bg-deep: #060D18;
  --bg-card: #0F2240;
  --bg-card-2: #122B52;
  --text: #E8EAF0;
  --text-dim: #9AA6B8;
  --text-faint: #6B7686;
  --white: #FFFFFF;

  /* Typography */
  --font-display: "Montserrat", "Inter", "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Inter", "Helvetica Neue", system-ui, -apple-system, sans-serif;

  /* Effects */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-gold: 0 8px 40px -8px rgba(212, 175, 55, 0.45);
  --glass: rgba(12, 30, 60, 0.6);
  --border: 1px solid rgba(212, 175, 55, 0.18);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: radial-gradient(1200px 800px at 80% -10%, var(--bg-card-2) 0%, var(--bg) 45%, var(--bg-deep) 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.container { width: min(1200px, 92%); margin: 0 auto; }
section { padding: 96px 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; font-weight: 700; }
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-gold);
  display: inline-block;
}
.eyebrow::before { content: "◆ "; font-size: 0.6rem; opacity: 0.7; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 16px 32px;
  border-radius: var(--radius-pill);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s;
  position: relative; overflow: hidden;
}
.btn-gold {
  background: linear-gradient(135deg, #E8C65C 0%, var(--accent-gold) 45%, #B8922E 100%);
  color: #0A192F;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 14px 50px -8px rgba(212, 175, 55, 0.6); }
.btn-gold::after {
  content: ""; position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: shine 3.2s infinite;
}
@keyframes shine {
  0% { left: -60%; } 45% { left: 130%; } 100% { left: 130%; }
}
.btn-ghost {
  border: 1px solid rgba(229, 229, 229, 0.35);
  color: var(--accent-silver);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent-gold); color: var(--accent-gold); transform: translateY(-3px); }
.btn-dark { background: var(--onyx); color: var(--accent-gold); border: 1px solid var(--gold-line); }
.btn-dark:hover { transform: translateY(-3px); box-shadow: var(--shadow-gold); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 22px 0;
  transition: all 0.4s var(--ease);
}
.nav.scrolled {
  padding: 14px 0;
  background: rgba(6, 13, 24, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.8);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.nav__logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold-soft), transparent);
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.1rem; color: var(--accent-gold);
}
.logo-text { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.06em; font-size: 1.02rem; }
.logo-text span { color: var(--accent-gold); }
.nav__links { display: flex; gap: 34px; font-size: 0.92rem; font-weight: 500; }
.nav__links a { color: var(--text-dim); transition: color 0.3s; position: relative; }
.nav__links a:hover { color: var(--accent-gold); }
.nav__links a.is-active { color: var(--accent-gold); }
.nav__links a.is-active::after {
  content: ""; position: absolute; bottom: -8px; left: 0; right: 0;
  height: 2px; background: var(--accent-gold); border-radius: 2px;
}
.nav__cta { display: flex; align-items: center; gap: 20px; }
.nav__cart { position: relative; font-size: 1.2rem; color: var(--text); }
.cart-count {
  position: absolute; top: -8px; right: -10px;
  background: var(--accent-gold); color: #0A192F;
  font-size: 0.68rem; font-weight: 800;
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
}
.nav__cart-btn { padding: 11px 22px; font-size: 0.86rem; }

/* ---------- Cards / Glass ---------- */
.glass-card {
  background: var(--glass);
  border: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.card-gold-border { border: 1px solid var(--gold-line); box-shadow: var(--shadow-gold); }

/* ---------- Reveal animation ---------- */
/* 滚动渐入动画：默认可见（no-JS 安全），仅当 JS 启用 .reveal 动画时隐藏初始状态 */
html[data-animate] .reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html[data-animate] .reveal.in-view { opacity: 1; transform: translateY(0); }
html[data-animate] .reveal[data-delay="1"] { transition-delay: 0.1s; }
html[data-animate] .reveal[data-delay="2"] { transition-delay: 0.2s; }
html[data-animate] .reveal[data-delay="3"] { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) { html[data-animate] .reveal { opacity: 1 !important; transform: none !important; } }

/* ---------- Language switcher ---------- */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--radius-pill);
  border: 1px solid rgba(229, 229, 229, 0.25);
  font-size: 0.82rem; font-weight: 700; color: var(--text);
  transition: all 0.3s;
}
.lang-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.lang-btn::after { content: "▾"; font-size: 0.6rem; margin-left: 2px; opacity: 0.7; }
.lang-drop {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 190px; background: rgba(10, 25, 51, 0.97);
  border: 1px solid var(--gold-line); border-radius: var(--radius-sm);
  backdrop-filter: blur(12px); box-shadow: var(--shadow-lg);
  list-style: none; padding: 8px; display: none; z-index: 1100;
}
.lang-drop.open { display: block; }
.lang-drop li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--text-dim); font-size: 0.9rem; transition: all 0.2s;
}
.lang-drop li a:hover, .lang-drop li a.is-active { background: var(--gold-soft); color: var(--accent-gold); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid rgba(212, 175, 55, 0.12); padding: 64px 0 40px; background: var(--bg-deep); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: 1rem; margin-bottom: 18px; }
.footer ul { list-style: none; display: grid; gap: 12px; }
.footer ul a { color: var(--text-dim); font-size: 0.92rem; }
.footer ul a:hover { color: var(--accent-gold); }
.footer__brand p { color: var(--text-faint); font-size: 0.9rem; max-width: 280px; margin-top: 14px; }
.footer__bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text-faint); font-size: 0.82rem; flex-wrap: wrap; gap: 12px;
}

/* ---------- Sticky mobile buy bar ---------- */
.mobile-buy {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1001;
  background: rgba(6, 13, 24, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--gold-line);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  display: none; align-items: center; gap: 16px;
  transform: translateY(110%);
  transition: transform 0.4s var(--ease);
}
.mobile-buy.show { transform: translateY(0); }
.mobile-buy__thumb {
  width: 52px; height: 52px; border-radius: 10px;
  background: radial-gradient(circle at 35% 30%, rgba(212,175,55,0.5), #0A192F 70%);
  border: 1px solid var(--gold-line); flex-shrink: 0; position: relative;
}
.mobile-buy__price { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.mobile-buy__price small { display: block; font-size: 0.68rem; color: var(--text-dim); font-weight: 400; }
.mobile-buy .btn { flex: 1; padding: 13px; font-size: 0.9rem; }

/* Section label */
.sec-label {
  text-align: center; max-width: 720px; margin: 0 auto 64px;
}
.sec-label h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 16px 0 14px; }
.sec-label p { color: var(--text-dim); font-size: 1.05rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  section { padding: 72px 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .mobile-buy { display: flex; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
  .nav__cart-btn span { display: none; }
  .nav__cart-btn { padding: 11px 16px; }
}

/* ============================================================
   THEME: Light mode (html[data-theme="light"])
   ============================================================ */
html[data-theme="light"] {
  --dominant: #F6F4EE;
  --onyx: #FFFFFF;
  --bg: #F6F4EE;
  --bg-deep: #EDEAE1;
  --bg-card: #FFFFFF;
  --bg-card-2: #FBF9F4;
  --text: #1B2739;
  --text-dim: #5C6879;
  --text-faint: #8B95A5;
  --shadow-lg: 0 24px 60px -24px rgba(27, 39, 57, 0.18);
  --gold-soft: rgba(212, 175, 55, 0.12);
  --gold-line: rgba(176, 140, 30, 0.45);
}
html[data-theme="light"] .nav.scrolled {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 24px -12px rgba(27, 39, 57, 0.15);
}
html[data-theme="light"] .footer { border-top-color: rgba(27, 39, 57, 0.10); }
html[data-theme="light"] .info-block,
html[data-theme="light"] .detail-card,
html[data-theme="light"] .journey-card,
html[data-theme="light"] .value-card,
html[data-theme="light"] .entity-item,
html[data-theme="light"] .faq-item,
html[data-theme="light"] .cmp-card { border-color: rgba(27, 39, 57, 0.10); }
html[data-theme="light"] .value-card,
html[data-theme="light"] .cmp-card,
html[data-theme="light"] .cmp-table { background: rgba(27, 39, 57, 0.03); }
html[data-theme="light"] .cmp-table thead th { background: rgba(27, 39, 57, 0.05); }
html[data-theme="light"] .entity-item { background: rgba(255, 255, 255, 0.6); }
html[data-theme="light"] .hero__bg {
  background:
    radial-gradient(900px 600px at 15% 20%, rgba(27, 59, 43, 0.10), transparent 60%),
    radial-gradient(1000px 700px at 85% 10%, rgba(212, 175, 55, 0.12), transparent 55%),
    radial-gradient(1200px 900px at 60% 100%, rgba(237, 234, 225, 0.9), transparent 70%);
}
html[data-theme="light"] .mobile-buy {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -8px 30px -10px rgba(27, 39, 57, 0.15);
}
html[data-theme="light"] .mobile-buy__price { color: var(--text); }
html[data-theme="light"] .lang-drop { background: #FFFFFF; color: var(--text); box-shadow: 0 16px 40px -12px rgba(27,39,57,0.2); }

/* ============================================================
   NAV: theme button / burger / mobile drawer
   ============================================================ */
.nav__icon-btn {
  background: none; border: 1px solid var(--gold-line); border-radius: 999px;
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; transition: all .3s var(--ease); line-height: 1; padding: 0;
}
.nav__icon-btn:hover { background: var(--gold-soft); transform: translateY(-1px); }

.nav__burger {
  display: none; background: none; border: none; cursor: pointer; padding: 6px;
  flex-direction: column; gap: 6px; align-items: center;
}
.nav__burger span {
  display: block; width: 24px; height: 2px; border-radius: 2px;
  background: var(--text); transition: all .3s var(--ease);
}
.nav__burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1100;
  width: min(78vw, 340px); padding: 84px 26px 26px;
  background: var(--bg-deep); backdrop-filter: blur(18px);
  transform: translateX(105%); transition: transform .35s var(--ease);
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: -20px 0 60px -20px rgba(0,0,0,0.5);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer__links { display: flex; flex-direction: column; gap: 4px; }
.nav-drawer__links a {
  display: block; padding: 13px 14px; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; text-decoration: none; font-size: 1.02rem;
}
.nav-drawer__links a:active, .nav-drawer__links a.is-active { background: var(--gold-soft); color: var(--accent-gold); }
.nav-drawer__links a.is-active { color: var(--accent-gold); }
html[data-theme="light"] .nav-drawer__links a.is-active { color: #8F6E10; }
.nav-drawer__theme { align-self: flex-start; margin: 10px 0 0 8px; }
.nav-drawer__cart { text-align: center; margin-top: auto; }
body.no-scroll { overflow: hidden; }

@media (max-width: 900px) {
  .nav__burger { display: flex; }
}
@media (min-width: 901px) {
  .nav-drawer { display: none; }
}
