:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --border: rgba(24, 26, 24, 0.09);
  --text: #1a1d1b;
  --secondary: #5a625d;
  --muted: #8b948f;
  --accent: #12804a;
  --primary-fg: #f8f7f4;
  --primary-bg: #1a1d1b;
  --radius-ctl: 10px;
  --radius-card: 12px;
}

[data-theme="dark"] {
  --bg: #131514;
  --surface: #1a1d1b;
  --border: rgba(232, 235, 232, 0.08);
  --text: #e8ebe8;
  --secondary: #a3ada7;
  --muted: #6d7570;
  --accent: #58f392;
  --primary-fg: #131514;
  --primary-bg: #f2f4f2;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 24px;
  background: var(--bg);
  transition: background-color 0.25s ease;
}

.nav::after {
  content: "";
  position: absolute;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  bottom: 0;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 16px;
}

.brand img { width: 28px; height: 28px; border-radius: 8px; display: block; }

.brand em { font-style: normal; color: var(--accent); }

.nav nav { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--secondary); }

.nav nav a:not(.cta):hover { color: var(--text); }

.nav .cta:hover { opacity: 0.85; color: var(--primary-fg); }

#themeToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-ctl);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--secondary);
  cursor: pointer;
}

#themeToggle:hover { color: var(--text); }

#themeToggle svg { width: 16px; height: 16px; }

.nav .cta svg { width: 15px; height: 15px; fill: currentColor; }

html[data-theme="light"] #themeToggle .moon { display: none; }
html[data-theme="dark"] #themeToggle .sun { display: none; }

.nav .cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: var(--radius-ctl);
  background: var(--primary-bg);
  color: var(--primary-fg);
  font-weight: 500;
  font-size: 14px;
  transition: opacity 0.15s ease;
}

main { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 96px 40px calc(6% + 12px) 0;
}

.hero-text { max-width: 560px; }

.hero-brand {
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.hero-brand em { font-style: normal; color: var(--accent); }

.hero-text h1 em { font-style: normal; color: var(--accent); }

.hero-text h1 {
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.hero-text p { margin: 24px 0 32px; color: var(--secondary); font-size: 16.5px; }

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

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius-ctl);
  font-weight: 500;
  font-size: 15.5px;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.btn.primary {
  background: var(--primary-bg);
  color: var(--primary-fg);
}

.btn.primary:hover { opacity: 0.85; }

.btn.quiet {
  border: 1px solid var(--border);
  color: var(--secondary);
}

.btn.quiet:hover { border-color: var(--muted); color: var(--text); }

.meta {
  margin-top: 32px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.hero-visual {
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  width: clamp(240px, 28vw, 300px);
  aspect-ratio: 1216 / 2688;
  cursor: pointer;
}

.hero-visual img {
  position: absolute;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(20, 24, 22, 0.12);
  transition: top 0.35s cubic-bezier(0.3, 0.8, 0.3, 1), left 0.35s cubic-bezier(0.3, 0.8, 0.3, 1), width 0.35s cubic-bezier(0.3, 0.8, 0.3, 1);
}

[data-theme="dark"] .hero-visual img { box-shadow: none; }

.hero-visual .shot-a {
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
}

.hero-visual .shot-b {
  z-index: 1;
  top: min(5%, 34px);
  left: min(11%, 34px);
  width: 100%;
}

.hero-visual.swapped .shot-a {
  z-index: 1;
  top: min(5%, 34px);
  left: min(11%, 34px);
  width: 100%;
}

.hero-visual.swapped .shot-b {
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
}

.section { padding: 80px 0; position: relative; }

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.sec-sub { color: var(--secondary); margin: 10px 0 36px; max-width: 560px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px 22px 24px;
  transition: border-color 0.15s ease;
}

.card:hover { border-color: var(--muted); }

.card svg { width: 18px; height: 18px; color: var(--muted); }

.card h3 { font-size: 16px; font-weight: 600; margin: 12px 0 6px; }

.card p { color: var(--secondary); font-size: 14px; }

.shot-row { display: flex; gap: 16px; flex-wrap: wrap; }

.shot-row img {
  width: 232px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 720px;
}

.dl {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  transition: border-color 0.15s ease;
}

.dl:hover { border-color: var(--accent); }

.dl-arch { font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }

.dl-desc { color: var(--secondary); margin: 6px 0 16px; font-size: 14px; }

.dl-go { color: var(--accent); font-weight: 500; font-size: 14px; }

.fine {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 32px;
  max-width: 720px;
}

footer {
  position: relative;
  max-width: 1040px;
  margin: 40px auto 0;
  padding: 36px 24px 48px;
  color: var(--muted);
  font-size: 13px;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  border-top: 1px solid var(--border);
}

.foot-links { display: flex; gap: 20px; margin-bottom: 14px; }

.foot-links a { color: var(--secondary); }

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

footer p { margin: 4px 0; }

@media (max-width: 860px) {
  .hero { flex-direction: column; align-items: center; padding: 56px 0 calc(16% + 12px); gap: 36px; }
  .hero-visual { width: min(56vw, 320px); align-self: center; }
  .nav { padding: 10px 16px; }
  .nav nav { gap: 12px; }
  .nav nav a:not(.cta) { display: none; }
  .nav nav .cta { display: inline-flex; padding: 7px 12px; font-size: 13px; gap: 5px; }
  .nav .cta svg { width: 13px; height: 13px; }
  .shot-row { gap: 12px; }
  .shot-row img { width: calc(50% - 6px); max-width: none; }
  .section { padding: 56px 0; }
  .grid { grid-template-columns: 1fr; }
  main { padding: 0 16px; }
  footer { padding: 28px 16px 40px; }
}

@media (max-width: 360px) {
  .nav .brand span { display: none; }
}

.jump-word { color: var(--accent); }

.card.flash { animation: card-flash 0.9s ease; }

@keyframes card-flash {
  0% { background: var(--accent); border-color: var(--accent); }
  100% { background: var(--surface); border-color: var(--border); }
}

.card { scroll-margin-top: 88px; }
