/* StepSnap 步刻 — Official Website Stylesheet
 * Palette anchored to the native macOS AppIcon:
 * Warm archival paper (#FAF9F7) · Obsidian ink (#15171F) · Vermilion coral (#E54534)
 */
:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-soft: #f3f1ed;
  --ink: #15171f;
  --ink-secondary: #525664;
  --ink-muted: #767b89;
  --border: #e6e3dd;
  --border-strong: #d4cfc5;
  --accent: #e54534;
  --accent-hover: #cf3727;
  --accent-soft: rgba(229, 69, 52, 0.09);
  --dark-bg: #13151b;
  --dark-surface: #1b1e26;
  --dark-border: rgba(255, 255, 255, 0.1);
  --dark-ink: #f5f5f7;
  --dark-muted: #9da3b2;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 4px rgba(21, 23, 31, 0.05);
  --shadow-md: 0 12px 32px rgba(21, 23, 31, 0.08), 0 2px 6px rgba(21, 23, 31, 0.04);
  --shadow-lg: 0 22px 54px rgba(21, 23, 31, 0.13), 0 4px 12px rgba(21, 23, 31, 0.05);
  --wrap-max: 1120px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

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

button {
  font-family: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  font-size: 14px;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 227, 221, 0.85);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.02em;
  min-height: 44px;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: block;
}

.brand-sub {
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 13.5px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-secondary);
  padding: 6px 2px;
  transition: color 0.15s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}

.lang-toggle button {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  min-height: 30px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-toggle button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  padding: 11px 20px;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.14s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(229, 69, 52, 0.24);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 18px rgba(229, 69, 52, 0.28);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: #bab4a8;
  background: #fdfcfb;
}

.btn-nav {
  font-size: 13.5px;
  padding: 8px 14px;
  min-height: 36px;
}

/* 1. Hero */
.hero {
  padding: 36px 0 56px;
}

.hero-copy {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 28px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(29px, 3.8vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}

.hero-lead {
  margin: 0 auto 20px;
  max-width: 620px;
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.6;
  color: var(--ink-secondary);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-meta {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Before -> After Visual Flow */
.hero-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.flow-panel {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.flow-panel-result {
  border-color: rgba(229, 69, 52, 0.34);
  box-shadow: 0 18px 44px rgba(21, 23, 31, 0.11), 0 0 0 1px rgba(229, 69, 52, 0.08);
}

.flow-panel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  background: #fcfbf9;
}

.flow-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.flow-step-num.result {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.flow-panel-media {
  aspect-ratio: 16 / 10;
  background: #1a273b;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-panel-result .flow-panel-media {
  background: #f2ede3;
}

.flow-panel-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.flow-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* Shared Section Rhythm */
.section {
  padding: 68px 0;
  border-top: 1px solid rgba(230, 227, 221, 0.72);
  scroll-margin-top: 72px;
}

.section-tinted {
  background: #f5f3ef;
}

.section-head {
  max-width: 620px;
  margin-bottom: 28px;
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.section-sub {
  margin: 0;
  font-size: 15.5px;
  color: var(--ink-secondary);
}

.section-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.section-bar .section-head {
  margin-bottom: 0;
}

/* 2. Core Demo Tabs + Full-Width Real App Stage */
.demo-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.demo-tab {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.demo-tab:hover {
  border-color: var(--border-strong);
}

.demo-tab.active {
  border-color: rgba(229, 69, 52, 0.6);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.demo-tab strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.demo-tab.active strong {
  color: var(--accent);
}

.demo-tab span {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.stage-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(21, 23, 31, 0.12);
  background: #1b1e26;
  box-shadow: var(--shadow-lg);
}

.stage-frame-light {
  background: #ebe6df;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.stage-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* 3. Export Switcher + Compact Format Strip */
.pill-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 11px;
}

.pill-switch button {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  min-height: 34px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pill-switch button:hover {
  color: var(--ink);
}

.pill-switch button.active {
  background: var(--ink);
  color: #ffffff;
}

.format-strip {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.format-strip li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.format-strip strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.format-strip span {
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* 4. Pricing */
.pricing-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.pricing-header-row .section-head {
  margin-bottom: 0;
}

.currency-switch {
  display: inline-flex;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 999px;
}

.currency-switch button {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
  min-height: 34px;
  border-radius: 999px;
  cursor: pointer;
}

.currency-switch button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.price-card.pro {
  border: 1.5px solid rgba(229, 69, 52, 0.55);
  box-shadow: 0 16px 38px rgba(229, 69, 52, 0.08);
}

.price-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.pill-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-secondary);
}

.pill-badge.accent {
  background: var(--accent);
  color: #ffffff;
}

.seat-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 10px;
  gap: 4px;
}

.seat-tabs button {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 10px;
  min-height: 36px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.seat-tabs button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.price-amount {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.price-card.pro .price-amount {
  color: var(--accent);
}

.price-original {
  font-size: 16px;
  color: var(--ink-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.price-unit {
  font-size: 13px;
  color: var(--ink-muted);
}

.price-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.check-mark {
  color: var(--ink-muted);
  font-weight: 700;
  flex-shrink: 0;
}

.price-card.pro .check-mark {
  color: var(--accent);
}

.price-cta-wrap {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-cta-wrap .btn {
  width: 100%;
}

.checkout-region-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.55;
}

.checkout-toast {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13.5px;
  display: none;
}

.checkout-toast.show {
  display: block;
}

/* Compact FAQ */
.faq-block {
  margin-top: 48px;
}

.faq-heading {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  padding: 15px 18px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: transform 0.16s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-body {
  padding: 0 18px 16px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.65;
}

/* Legal & Welcome Subpages (shared styles) */
.legal-main {
  padding: 52px 0 84px;
}

.legal-article {
  max-width: 780px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.legal-article h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.6vw, 34px);
  letter-spacing: -0.025em;
}

.legal-updated {
  margin: 0 0 28px;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.legal-article h2 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.legal-article p,
.legal-article li {
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.75;
}

.legal-article ul {
  padding-left: 20px;
}

.legal-callout {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  margin: 20px 0;
  font-size: 14.5px;
  color: var(--ink);
}

/* Footer */
.site-footer {
  background: var(--dark-bg);
  color: var(--dark-muted);
  border-top: 1px solid var(--dark-border);
  padding: 36px 0 32px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--dark-border);
}

.footer-id {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  color: var(--dark-ink);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.footer-mail {
  font-size: 13.5px;
  color: var(--dark-muted);
  transition: color 0.15s ease;
}

.footer-mail:hover {
  color: #ffffff;
}

.footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13.5px;
}

.footer-nav a {
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  font-size: 12.5px;
}

.footer-bottom a:hover {
  color: #ffffff;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-flow {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .flow-arrow {
    margin: 0 auto;
    transform: rotate(90deg);
  }
  .demo-tabs {
    grid-template-columns: 1fr;
  }
  .format-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pricing-grid,
  .faq-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links,
  .brand-sub {
    display: none;
  }
  .btn-nav {
    padding: 7px 11px;
    font-size: 13px;
  }
  .wrap {
    padding: 0 18px;
  }
  .hero {
    padding: 32px 0 48px;
  }
  .section {
    padding: 52px 0;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .format-strip {
    grid-template-columns: 1fr;
  }
  .price-card {
    padding: 22px;
  }
  .legal-article {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
