/* ===== Design tokens ===== */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --nav: rgba(245, 245, 247, 0.8);
  --text: #1d1d1f;
  --sub: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --dash: rgba(0, 0, 0, 0.12);
  --accent: #0071e3;
  --chip: rgba(0, 0, 0, 0.05);
  --shadow: rgba(0, 0, 0, 0.1);
}

:root[data-theme="dark"] {
  --bg: #000000;
  --card: #1c1c1e;
  --nav: rgba(22, 22, 23, 0.8);
  --text: #f5f5f7;
  --sub: #98989d;
  --line: rgba(255, 255, 255, 0.12);
  --dash: rgba(255, 255, 255, 0.16);
  --accent: #2997ff;
  --chip: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.5);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'SF Pro Text', 'PingFang SC', system-ui, sans-serif;
  transition: background 0.45s;
  min-height: 100vh;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transition: background 0.45s;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  max-width: 640px;
  margin: 0 auto;
}

.nav-logo { color: var(--accent); display: block; }

.nav-brand {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-controls {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-select {
  height: 32px;
  background: var(--chip);
  border: none;
  border-radius: 16px;
  color: var(--sub);
  font-size: 13px;
  font-family: inherit;
  padding: 0 12px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.3s;
}

.theme-toggle {
  width: 44px;
  height: 32px;
  background: var(--chip);
  border: none;
  border-radius: 16px;
  color: var(--sub);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

/* ===== Layout ===== */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Hero ===== */
.hero {
  padding: 44px 0 12px;
  text-align: center;
}

.hero-title {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  white-space: nowrap;
  position: relative;
}

.hero-word {
  display: inline-block;
  position: relative;
  z-index: 1;
  animation: wordUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.hero-word:nth-child(1) { animation-delay: 0.1s; }
.hero-word:nth-child(2) { animation-delay: 0.3s; }
.hero-word:nth-child(3) { animation-delay: 0.5s; }
.hero-word:nth-child(4) { animation-delay: 0.7s; }

@keyframes wordUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.inf-wander {
  position: absolute;
  left: 0;
  top: 50%;
  margin-top: -11px;
  pointer-events: none;
  will-change: transform;
  transition: opacity 0.5s;
  color: var(--accent);
  z-index: 2;
}

.inf-wander svg { display: block; }

.inf-dot { filter: drop-shadow(0 0 4px currentColor); }

/* 拉丁语系标题：字号缩小并允许换行 */
.hero-title.latin {
  font-size: 24px;
  white-space: normal;
  flex-wrap: wrap;
  gap: 6px 12px;
  line-height: 1.25;
}

.hero-sub {
  font-size: 15px;
  line-height: 1.5;
  margin-top: 14px;
  color: var(--sub);
}

/* ===== App grid ===== */
.apps { padding: 32px 0 8px; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 14px;
}

.app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  transition: transform 0.25s;
}

.app-icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24%;
  overflow: hidden;
  box-shadow: 0 4px 14px var(--shadow);
  background: var(--card);
  transition: background 0.45s;
}

.app-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.app-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.app-type {
  font-size: 11px;
  color: var(--sub);
}

.app-item--soon {
  cursor: default;
}

.app-icon--soon {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24%;
  border: 1.5px dashed var(--dash);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--sub);
}

.app-item--soon .app-name { color: var(--sub); }
.app-item--soon .app-type { color: transparent; }

/* ===== Vlog ===== */
.vlog { padding: 28px 0 8px; }

.vlog-card {
  display: block;
  text-decoration: none;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 14px var(--shadow);
  transition: transform 0.25s, background 0.45s;
}

.vlog-media {
  display: block;
  position: relative;
}

.vlog-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #a8c8e8, #6a92c4);
  background-size: cover;
  background-position: center;
}

.vlog-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vlog-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 4px 9px;
  border-radius: 10px;
}

.vlog-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px 16px;
}

.vlog-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.vlog-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

/* ===== Socials ===== */
.socials { padding: 28px 0 8px; }

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 12px;
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  transition: transform 0.25s;
}

.social-tile {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24%;
  box-shadow: 0 4px 14px var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-tile--x { border: 1px solid var(--line); }

.social-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* ===== Footer ===== */
.footer {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 24px 0 28px;
  font-size: 12px;
  color: var(--sub);
}

.footer a {
  color: var(--sub);
  padding: 14px 0; /* 触达区 ≥44px */
}

/* ===== Hover / touch states ===== */
@media (hover: hover) {
  .app-item:hover { transform: scale(1.04); }
  .vlog-card:hover { transform: scale(1.015); }
  .social-item:hover { transform: scale(1.05); }
  .app-item--soon:hover { transform: none; }
}

.app-item:active { transform: scale(1.04); }
.vlog-card:active { transform: scale(1.015); }
.social-item:active { transform: scale(1.05); }
.app-item--soon:active { transform: none; }

/* ===== Responsive ≥768px ===== */
@media (min-width: 768px) {
  .app-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { padding-top: 56px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .hero-word { animation: none; }
  .inf-wander {
    position: static;
    display: inline-block;
    margin-top: 0;
    opacity: 0.9;
  }
  .app-item, .vlog-card, .social-item { transition: none; }
}

/* ===== 子页面（隐私政策 / 支持） ===== */
.page {
  padding: 44px 0 60px;
}

.page h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}

.page h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 8px;
}

.page p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--sub);
  margin: 8px 0;
}

.page a { color: var(--accent); text-decoration: none; }

.back-link {
  display: inline-block;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  padding: 12px 0;
  margin-top: 16px;
}
