/* --- ReviewShot Design System & Theme Engine --- */
:root {
  --primary: #0A84FF;
  --primary-hover: #0070E0;
  --primary-glow: rgba(10, 132, 255, 0.35);
  --purple: #5E5CE6;
  --pink: #FF375F;
  --gold: #FF9500;
  --star-gold: #FFB300;
  
  /* System Fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "New York", "Charter", "Georgia", "Songti SC", Cambria, serif;
  --font-rounded: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Text", "PingFang SC", system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme (Default) */
[data-theme="dark"] {
  --bg-page: #090A0F;
  --text-main: #FFFFFF;
  --text-secondary: #98989F;
  --text-tertiary: #636366;
  --dark-card: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.12);
  --site-header-bg: rgba(9, 10, 15, 0.82);
  --toggle-btn-bg: rgba(255, 255, 255, 0.08);
  --glow-opacity: 0.35;
  --workbench-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  --card-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --footer-bg: rgba(0, 0, 0, 0.3);
}

/* Light Theme */
[data-theme="light"] {
  --bg-page: #F7F7F8;
  --text-main: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --dark-card: #FFFFFF;
  --card-border: rgba(0, 0, 0, 0.08);
  --site-header-bg: rgba(247, 247, 248, 0.85);
  --toggle-btn-bg: rgba(0, 0, 0, 0.06);
  --glow-opacity: 0.2;
  --workbench-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
  --card-shadow: 0 20px 45px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --footer-bg: #FFFFFF;
}

/* Reset & Mobile Optimization */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  touch-action: manipulation;
  background-color: var(--bg-page);
  color: var(--text-main);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Ambient Glow Backgrounds */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: -1;
  opacity: var(--glow-opacity);
  will-change: transform;
  transition: opacity 0.3s ease;
}

.glow-top-left {
  width: min(500px, 80vw);
  height: min(500px, 80vw);
  background: radial-gradient(circle, var(--primary) 0%, rgba(10, 132, 255, 0) 70%);
  top: -100px;
  left: -80px;
}

.glow-top-right {
  width: min(600px, 90vw);
  height: min(600px, 90vw);
  background: radial-gradient(circle, var(--purple) 0%, rgba(94, 92, 230, 0) 70%);
  top: 80px;
  right: -100px;
}

.glow-bottom-center {
  width: min(700px, 100vw);
  height: min(500px, 80vw);
  background: radial-gradient(circle, var(--pink) 0%, rgba(255, 55, 95, 0) 70%);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.15;
}

/* Typography & Headers */
.gradient-text {
  background: linear-gradient(135deg, #0A84FF 0%, #7C3AED 50%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 12px;
  color: var(--text-main);
  line-height: 1.25;
}

.section-desc {
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--toggle-btn-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  background: rgba(10, 132, 255, 0.12);
  color: var(--primary);
  border-color: var(--primary);
}

.theme-toggle-btn .icon-sun,
.theme-toggle-btn .icon-moon {
  position: absolute;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

[data-theme="dark"] .theme-toggle-btn .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
[data-theme="dark"] .theme-toggle-btn .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="light"] .theme-toggle-btn .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
[data-theme="light"] .theme-toggle-btn .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Buttons & Touch Targets */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4F46E5);
  color: #fff;
  box-shadow: 0 4px 18px var(--primary-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 26px rgba(10, 132, 255, 0.5);
}

.btn-secondary {
  background: var(--dark-card);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
}

.btn-white {
  background: #1D1D1F;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-white {
  background: #FFFFFF;
  color: #000000;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: 10px;
  min-height: 36px;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1.02rem;
  border-radius: var(--radius-md);
  min-height: 48px;
}

.btn-block {
  width: 100%;
}

/* Header & Mobile Drawer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--site-header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  padding: 12px 0;
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.3px;
}

.logo-icon {
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}

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

.mobile-nav-cta {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px;
  z-index: 1002;
}

.mobile-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Hero Section */
.hero-section {
  padding: clamp(50px, 12vw, 90px) 0 clamp(40px, 8vw, 60px);
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--dark-card);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: clamp(0.78rem, 2.5vw, 0.86rem);
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: #34C759;
  border-radius: 50%;
  box-shadow: 0 0 8px #34C759;
}

.hero-title {
  font-size: clamp(2.1rem, 7.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -1px;
  margin-bottom: 18px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: clamp(1rem, 3.2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 32px;
  font-weight: 400;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 44px;
}

.play-icon {
  font-size: 0.75rem;
  color: var(--primary);
}

.hero-stats {
  display: inline-grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  background: var(--dark-card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 14px 28px;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: clamp(1.2rem, 4vw, 1.45rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-label {
  font-size: clamp(0.72rem, 2.2vw, 0.8rem);
  color: var(--text-tertiary);
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--card-border);
}

/* ==========================================================================
   Workbench & Live Card Stage
   ========================================================================== */
.demo-section {
  padding: clamp(40px, 8vw, 80px) 0;
}

.demo-card-workbench {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 36px;
  background: var(--dark-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--workbench-shadow);
  align-items: center;
  transition: var(--transition);
}

.workbench-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.control-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.template-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tpl-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(125, 125, 125, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.tpl-btn:hover {
  background: rgba(10, 132, 255, 0.08);
}

.tpl-btn.active {
  background: rgba(10, 132, 255, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(10, 132, 255, 0.25);
}

.tpl-swatch {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  flex-shrink: 0;
}

.minimal-swatch { background: #FAF8F5; border: 1px solid #D1D1D6; }
.appstore-swatch { background: #0A84FF; }
.quote-swatch { background: #FF9500; }
.brand-swatch { background: linear-gradient(135deg, #0A84FF, #5E5CE6); }
.dark-swatch { background: #121214; border: 1px solid #3A3A3C; }
.milestone-swatch { background: linear-gradient(135deg, #FF9500, #FF3B30); }

.tpl-info {
  display: flex;
  flex-direction: column;
}

.tpl-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
}

.tpl-sub {
  font-size: 0.68rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ratio-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ratio-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(125, 125, 125, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.ratio-pill {
  background: rgba(125, 125, 125, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-main);
}

.ratio-btn.active {
  background: rgba(10, 132, 255, 0.12);
  border-color: var(--primary);
  color: var(--text-main);
  font-weight: 600;
}

.ratio-btn.active .ratio-pill {
  background: var(--primary);
  color: #fff;
}

.sample-review-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-btn {
  background: rgba(125, 125, 125, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.sample-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Card Preview Stage */
.workbench-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  background: radial-gradient(circle at center, rgba(125, 125, 125, 0.05) 0%, transparent 75%);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
}

.card-stage-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.card-viewport {
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ratios */
.card-viewport.ratio-1-1 { width: 380px; height: 380px; }
.card-viewport.ratio-4-5 { width: 350px; height: 438px; }
.card-viewport.ratio-9-16 { width: 300px; height: 533px; }

/* Native Card Container */
.native-card-root {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

/* Stars */
.card-stars-row {
  display: flex;
  gap: 3px;
  font-size: 1.1rem;
  letter-spacing: 1px;
}
.stars-gold { color: #FFB300; }
.stars-orange { color: #FF9500; }
.stars-ink { color: #1C1C1E; }

.dot-sep {
  opacity: 0.4;
  margin: 0 4px;
}

/* App Footer */
.card-app-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-app-icon {
  border-radius: 7px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.footer-app-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.footer-app-name {
  font-family: var(--font-rounded);
  font-size: 0.85rem;
  font-weight: 700;
  color: #1C1C1E;
  line-height: 1.2;
}

.footer-storefront {
  font-size: 0.7rem;
  color: #8E8E93;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.card-app-footer.footer-dark {
  border-top-color: rgba(255, 255, 255, 0.12);
}
.card-app-footer.footer-dark .footer-app-name {
  color: #FFFFFF;
}
.card-app-footer.footer-dark .footer-storefront {
  color: rgba(255, 255, 255, 0.6);
}

.card-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  width: 100%;
  margin: 10px 0 4px;
}

/* Template 1: Minimal */
.native-card-root.template-minimal {
  background: #FAF8F5;
  color: #1C1C1E;
  padding: 26px 22px;
}
.tpl-minimal-layout {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}
.minimal-top { display: flex; justify-content: center; }
.minimal-center { margin: auto 0; display: flex; flex-direction: column; gap: 14px; }
.minimal-quote-text {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 3.2vw, 1.1rem);
  font-weight: 500;
  line-height: 1.55;
  color: #1C1C1E;
  padding: 0 4px;
}
.minimal-author-line { font-family: var(--font-serif); font-size: 0.82rem; color: #8E8E93; }
.minimal-bottom .card-app-footer { justify-content: flex-start; }

/* Template 2: App Store */
.native-card-root.template-appstore {
  background: #FFFFFF;
  color: #1C1C1E;
  padding: 24px 22px;
}
.tpl-appstore-layout {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}
.appstore-header { display: flex; flex-direction: column; gap: 6px; }
.appstore-title {
  font-family: var(--font-rounded);
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  font-weight: 800;
  color: #111;
  line-height: 1.3;
}
.appstore-body { margin: auto 0; }
.appstore-content {
  font-family: var(--font-rounded);
  font-size: clamp(0.85rem, 2.8vw, 0.92rem);
  line-height: 1.5;
  color: #3A3A3C;
  margin-bottom: 10px;
}
.appstore-author-meta { font-size: 0.76rem; color: #8E8E93; font-weight: 500; }
.appstore-author { font-weight: 600; color: #636366; }

/* Template 3: Quote */
.native-card-root.template-quote {
  background: #FAF8F5;
  color: #1C1C1E;
  padding: 24px 22px;
}
.tpl-quote-layout {
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.quote-symbol {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  line-height: 1;
  color: rgba(28, 28, 30, 0.18);
  margin-bottom: -14px;
  margin-left: -2px;
}
.quote-body { margin-bottom: auto; }
.quote-main-text {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 3.2vw, 1.05rem);
  font-weight: 700;
  line-height: 1.5;
  color: #1C1C1E;
}
.quote-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.quote-author-block { display: flex; flex-direction: column; }
.quote-author { font-family: var(--font-serif); font-size: 0.85rem; font-weight: 600; }
.quote-date { font-family: var(--font-serif); font-size: 0.72rem; color: #8E8E93; }

/* Template 4: Brand */
.native-card-root.template-brand {
  background: #FAF8F5;
  color: #1C1C1E;
  padding: 24px 20px;
}
.tpl-brand-layout {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}
.brand-top-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.brand-hero-icon {
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}
.brand-center { margin: auto 0; display: flex; flex-direction: column; gap: 8px; }
.brand-content-text {
  font-family: var(--font-rounded);
  font-size: clamp(0.88rem, 3vw, 0.95rem);
  font-weight: 600;
  line-height: 1.5;
  color: #1C1C1E;
}
.brand-author-tag { font-size: 0.8rem; color: #8E8E93; }
.brand-bottom-badge { font-size: 0.75rem; font-weight: 700; color: #8E8E93; }

/* Template 5: Dark */
.native-card-root.template-dark {
  background: #121214;
  color: #FFFFFF;
  padding: 26px 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.tpl-dark-layout {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}
.dark-top { display: flex; justify-content: center; }
.dark-center { margin: auto 0; display: flex; flex-direction: column; gap: 14px; }
.dark-quote-text {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 3.2vw, 1.1rem);
  font-weight: 500;
  line-height: 1.55;
  color: #FFFFFF;
}
.dark-author-line { font-family: var(--font-serif); font-size: 0.82rem; color: rgba(255, 255, 255, 0.65); }

/* Template 6: Milestone */
.native-card-root.template-milestone {
  background: #FAF8F5;
  color: #1C1C1E;
  padding: 24px 20px;
}
.tpl-milestone-layout {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}
.milestone-banner { display: flex; align-items: flex-start; justify-content: space-between; }
.milestone-banner-left { display: flex; flex-direction: column; gap: 4px; }
.milestone-badge-text {
  font-family: var(--font-rounded);
  font-size: clamp(0.92rem, 3vw, 1rem);
  font-weight: 900;
  color: #1C1C1E;
}
.celebrate-emoji { font-size: 1.6rem; }
.milestone-center { margin: auto 0; display: flex; flex-direction: column; gap: 6px; }
.milestone-quote {
  font-family: var(--font-serif);
  font-size: clamp(0.85rem, 2.8vw, 0.92rem);
  line-height: 1.5;
  color: #1C1C1E;
}
.milestone-author-line { font-size: 0.75rem; color: #8E8E93; }
.milestone-thanks {
  font-family: var(--font-rounded);
  font-size: 0.86rem;
  font-weight: 700;
  color: #FF3B30;
}

.preview-actions {
  margin-top: 20px;
  text-align: center;
}

.export-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Features Grid */
.features-section {
  padding: clamp(40px, 8vw, 80px) 0;
}

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

.feature-card {
  background: var(--dark-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 32px) clamp(20px, 4vw, 26px);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 132, 255, 0.3);
  box-shadow: 0 12px 30px rgba(10, 132, 255, 0.08);
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.bg-blue { background: rgba(10, 132, 255, 0.15); color: var(--primary); }
.bg-gold { background: rgba(255, 214, 10, 0.15); color: var(--gold); }
.bg-purple { background: rgba(94, 92, 230, 0.15); color: var(--purple); }
.bg-pink { background: rgba(255, 55, 95, 0.15); color: var(--pink); }

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Use Cases */
.usecases-section {
  padding: clamp(40px, 8vw, 80px) 0;
}

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

.usecase-item {
  background: var(--dark-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 32px) clamp(20px, 4vw, 28px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.usecase-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(10, 132, 255, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.usecase-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.usecase-item p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* FAQ Accordion */
.faq-section {
  padding: clamp(40px, 8vw, 80px) 0;
}

.faq-accordion {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: clamp(0.95rem, 3vw, 1.02rem);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  gap: 12px;
}

.faq-icon {
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
  padding: 0 20px;
}

.faq-item.active .faq-answer {
  padding-bottom: 18px;
}

.faq-answer p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* CTA Box */
.cta-section {
  padding: clamp(40px, 8vw, 80px) 0 clamp(60px, 10vw, 100px);
}

.cta-box {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.15) 0%, rgba(94, 92, 230, 0.15) 50%, rgba(255, 55, 95, 0.15) 100%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: clamp(36px, 8vw, 64px) clamp(20px, 5vw, 32px);
  text-align: center;
  box-shadow: var(--workbench-shadow);
  position: relative;
}

.cta-logo {
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
}

.cta-title {
  font-size: clamp(1.6rem, 5.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.cta-desc {
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 28px;
}

.cta-btns {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.cta-note {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 48px 0 36px;
  background: var(--footer-bg);
  transition: var(--transition);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.footer-slogan {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-top: 10px;
  max-width: 280px;
}

.footer-links-group {
  display: flex;
  gap: 48px;
}

.footer-col h4 {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-main);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* ==========================================================================
   H5 & Mobile Responsive Rules (< 860px)
   ========================================================================== */
@media (max-width: 860px) {
  .header-desktop-btn { display: none; }
  .mobile-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 80vw);
    height: 100vh;
    height: 100dvh;
    background: var(--site-header-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--card-border);
    padding: 80px 24px 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--card-border);
  }

  .mobile-nav-cta {
    display: block;
    width: 100%;
    margin-top: 20px;
  }

  /* Demo Sandbox on H5 */
  .demo-card-workbench {
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    gap: 24px;
    border-radius: var(--radius-lg);
  }

  .workbench-preview {
    order: 1;
    width: 100%;
    min-height: auto;
    padding: 20px 8px;
    background: transparent;
  }

  .workbench-controls {
    order: 2;
    width: 100%;
    gap: 20px;
  }

  .template-selector {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding-bottom: 6px;
    margin: 0 -4px;
  }

  .template-selector::-webkit-scrollbar {
    display: none;
  }

  .tpl-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 8px 12px;
    border-radius: 12px;
    gap: 8px;
  }

  .tpl-name {
    font-size: 0.8rem;
  }

  .tpl-sub {
    font-size: 0.65rem;
  }

  .ratio-selector {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 4px;
  }

  .ratio-btn {
    flex: 1 1 0;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
    text-align: center;
  }

  .ratio-btn span:last-child {
    display: none;
  }

  .ratio-btn.active span:last-child {
    display: inline;
    font-size: 0.72rem;
  }

  /* Card Viewport Responsive Auto Scale on H5 */
  .card-viewport.ratio-1-1 {
    width: min(340px, calc(100vw - 48px));
    height: min(340px, calc(100vw - 48px));
  }

  .card-viewport.ratio-4-5 {
    width: min(320px, calc(100vw - 48px));
    height: min(400px, calc((100vw - 48px) * 1.25));
  }

  .card-viewport.ratio-9-16 {
    width: min(280px, calc(100vw - 64px));
    height: min(498px, calc((100vw - 64px) * 1.77));
  }

  .native-card-root {
    border-radius: 20px;
  }

  /* Hero & Stats */
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .hero-stats {
    padding: 12px 16px;
    gap: 12px;
    width: 100%;
    max-width: 340px;
  }

  .stat-divider {
    height: 22px;
  }

  /* Footer */
  .footer-container {
    flex-direction: column;
    gap: 28px;
  }

  .footer-links-group {
    flex-direction: row;
    gap: 40px;
    width: 100%;
  }
}

@media (max-width: 400px) {
  .hero-title { font-size: 1.95rem; }
  .card-viewport.ratio-1-1 {
    width: calc(100vw - 40px);
    height: calc(100vw - 40px);
  }
  .native-card-root.template-minimal,
  .native-card-root.template-appstore,
  .native-card-root.template-quote,
  .native-card-root.template-brand,
  .native-card-root.template-dark,
  .native-card-root.template-milestone {
    padding: 18px 14px;
  }
}
