/* =========================================================
   Flycast.cn - Official Website Stylesheet
   Flat / Modern / Professional - Violet Brand System
   ========================================================= */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Brand palette - derived from Flycast logo */
  --c-violet-deep: #5f01c0;
  --c-violet: #7231e6;
  --c-violet-bright: #934ef9;
  --c-violet-light: #b78bfb;
  --c-violet-soft: #e8defb;
  --c-violet-tint: #faf8ff;

  /* Neutrals */
  --c-ink: #1a0d2e;
  --c-ink-2: #2d1b4e;
  --c-muted: #6b5b8a;
  --c-muted-2: #9b8fb5;
  --c-line: #e8e0f5;
  --c-line-2: #f0eaf8;
  --c-bg: #ffffff;
  --c-bg-alt: #faf8ff;
  --c-bg-dark: #1a0d2e;

  /* Functional */
  --c-success: #16a34a;
  --c-warning: #d97706;
  --c-danger: #dc2626;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #7231e6 0%, #934ef9 100%);
  --grad-brand-deep: linear-gradient(135deg, #5f01c0 0%, #7231e6 50%, #934ef9 100%);
  --grad-hero: radial-gradient(ellipse at top right, rgba(147, 78, 249, 0.18) 0%, transparent 55%),
               radial-gradient(ellipse at bottom left, rgba(114, 49, 230, 0.12) 0%, transparent 50%);

  /* Typography */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(26, 13, 46, 0.06);
  --sh-md: 0 4px 12px rgba(26, 13, 46, 0.08);
  --sh-lg: 0 12px 32px rgba(114, 49, 230, 0.12);
  --sh-xl: 0 24px 64px rgba(114, 49, 230, 0.18);

  /* Layout */
  --container: 1200px;
  --container-narrow: 880px;

  /* Transitions */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-violet); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-violet-deep); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, button, textarea, select { font: inherit; color: inherit; }

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--c-ink);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: var(--s-4); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--c-muted);
}

.text-muted { color: var(--c-muted); }
.text-mono { font-family: var(--font-mono); }
.text-center { text-align: center; }

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- 4. Layout Helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}
.container-narrow { max-width: var(--container-narrow); }

.section {
  padding: var(--s-9) 0;
}
.section-sm { padding: var(--s-8) 0; }
.section-lg { padding: var(--s-9) 0; }
.section-alt { background: var(--c-bg-alt); }
.section-dark {
  background: var(--c-bg-dark);
  color: rgba(255, 255, 255, 0.85);
}
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }

.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: var(--s-8) 0; }
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }

/* ---------- 5. Section Header ---------- */
.section-head {
  max-width: 720px;
  margin: 0 auto var(--s-7);
  text-align: center;
}
.section-head .eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-violet);
  background: var(--c-violet-soft);
  padding: 6px 14px;
  border-radius: var(--r-full);
  margin-bottom: var(--s-4);
}
.section-head h2 { margin-bottom: var(--s-4); }
.section-head p { color: var(--c-muted); font-size: 1.0625rem; }
.section-head.left { text-align: left; margin-left: 0; }

/* ---------- 6. Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-weight: 700;
  font-size: 1.1875rem;
  color: var(--c-ink);
}
.nav-brand:hover { color: var(--c-violet); }
.nav-brand img { width: 36px; height: 36px; border-radius: var(--r-sm); }
.nav-brand .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-brand .brand-text small {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--c-muted);
  letter-spacing: 0.05em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.nav-link {
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-ink-2);
  transition: all var(--t-fast);
}
.nav-link:hover { background: var(--c-violet-tint); color: var(--c-violet); }
.nav-link.active { color: var(--c-violet); background: var(--c-violet-soft); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: var(--s-3);
  padding: 9px 18px;
  background: var(--grad-brand);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.nav-cta svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--sh-lg);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 880px) {
  .nav-menu {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: var(--s-4) var(--s-5) var(--s-6);
    gap: var(--s-1);
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--sh-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--t-base);
  }
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link { padding: 12px 14px; }
  .nav-cta { margin-left: 0; margin-top: var(--s-2); justify-content: center; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1.5px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(114, 49, 230, 0.25);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(114, 49, 230, 0.35);
}

.btn-secondary {
  background: #fff;
  color: var(--c-violet);
  border-color: var(--c-violet-soft);
}
.btn-secondary:hover {
  border-color: var(--c-violet);
  background: var(--c-violet-tint);
  color: var(--c-violet-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-line);
}
.btn-ghost:hover {
  border-color: var(--c-violet);
  color: var(--c-violet);
  background: var(--c-violet-tint);
}

.btn-dark {
  background: var(--c-ink);
  color: #fff;
}
.btn-dark:hover { color: #fff; background: var(--c-ink-2); }

.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- 8. Hero ---------- */
.hero {
  position: relative;
  padding: var(--s-9) 0 var(--s-8);
  background: var(--c-bg);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-hero);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--s-8);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-7); }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--c-ink-2);
  margin-bottom: var(--s-5);
  box-shadow: var(--sh-sm);
}
.hero-eyebrow .badge {
  display: inline-block;
  background: var(--grad-brand);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}

.hero h1 { margin-bottom: var(--s-5); }
.hero h1 .gradient-text { display: inline; }
.hero-subtitle {
  font-size: 1.1875rem;
  color: var(--c-muted);
  margin-bottom: var(--s-6);
  max-width: 540px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-7);
}
.hero-platforms {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--c-line);
}
.hero-platforms .platform-label {
  font-size: 0.8125rem;
  color: var(--c-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.platform-icons {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.platform-icons .pi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-ink-2);
}
.platform-icons .pi svg { width: 18px; height: 18px; color: var(--c-violet); }

/* Hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-xl);
  background: var(--grad-brand-deep);
  box-shadow: var(--sh-xl);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.18) 0%, transparent 50%);
}
.hero-visual .logo-mark {
  position: relative;
  z-index: 1;
  width: 60%;
  max-width: 280px;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.25));
}
.hero-visual .float-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--r-md);
  padding: 12px 16px;
  box-shadow: var(--sh-lg);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.hero-visual .float-card .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-success);
}
.hero-visual .float-card.fc-1 { top: 24px; left: 24px; }
.hero-visual .float-card.fc-2 { bottom: 24px; right: 24px; }
.hero-visual .float-card.fc-3 { bottom: 80px; left: 32px; }

/* ---------- 9. Stats Bar ---------- */
.stats-bar {
  background: var(--c-ink);
  color: #fff;
  padding: var(--s-7) 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  text-align: center;
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-6); }
}
.stat-item .stat-num {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--c-violet-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.stat-item .stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* ---------- 10. Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: all var(--t-base);
  position: relative;
}
.card:hover {
  border-color: var(--c-violet-light);
  box-shadow: var(--sh-lg);
  transform: translateY(-4px);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  background: var(--c-violet-tint);
  color: var(--c-violet);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-4);
}
.card-icon svg { width: 28px; height: 28px; }
.card-icon.solid {
  background: var(--grad-brand);
  color: #fff;
}
.card h3 { margin-bottom: var(--s-3); font-size: 1.1875rem; }
.card p { color: var(--c-muted); font-size: 0.9375rem; }

/* Scenario card variant */
.scenario-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  position: relative;
  transition: all var(--t-base);
  overflow: hidden;
}
.scenario-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--grad-brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--t-base);
}
.scenario-card:hover {
  border-color: var(--c-violet-light);
  box-shadow: var(--sh-lg);
  transform: translateY(-3px);
}
.scenario-card:hover::before { transform: scaleY(1); }
.scenario-card .sc-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-violet-bright);
  letter-spacing: 0.1em;
  margin-bottom: var(--s-3);
}
.scenario-card h3 { margin-bottom: var(--s-3); }
.scenario-card p { color: var(--c-muted); font-size: 0.9375rem; }
.scenario-card .sc-tag {
  display: inline-block;
  margin-top: var(--s-4);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-violet);
  background: var(--c-violet-soft);
  padding: 4px 10px;
  border-radius: var(--r-full);
}

/* ---------- 11. Platform download cards ---------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-5);
}
.platform-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  transition: all var(--t-base);
  position: relative;
}
.platform-card:hover {
  border-color: var(--c-violet);
  box-shadow: var(--sh-lg);
  transform: translateY(-4px);
}
.platform-card .pc-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.platform-card .pc-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--c-violet-tint);
  color: var(--c-violet);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.platform-card .pc-icon svg { width: 24px; height: 24px; }
.platform-card .pc-title { font-size: 1.1875rem; font-weight: 700; }
.platform-card .pc-version {
  font-size: 0.8125rem;
  color: var(--c-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.platform-card .pc-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--c-line-2);
  border-bottom: 1px solid var(--c-line-2);
  margin-bottom: var(--s-4);
}
.platform-card .pc-meta .meta-item .meta-label {
  font-size: 0.6875rem;
  color: var(--c-muted-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.platform-card .pc-meta .meta-item .meta-val {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-ink);
  margin-top: 2px;
}
.platform-card .pc-req {
  font-size: 0.8125rem;
  color: var(--c-muted);
  margin-bottom: var(--s-5);
  line-height: 1.55;
  flex-grow: 1;
}
.platform-card .pc-actions { display: flex; gap: var(--s-2); }
.platform-card .pc-actions .btn { flex: 1; }

/* ---------- 12. Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
thead {
  background: var(--c-violet-tint);
}
thead th {
  text-align: left;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--c-ink);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody td {
  padding: 14px 18px;
  border-top: 1px solid var(--c-line-2);
  color: var(--c-ink-2);
  vertical-align: top;
}
tbody tr:hover { background: var(--c-violet-tint); }
.table-key {
  font-weight: 600;
  color: var(--c-ink);
  display: block;
}
.table-sub {
  font-size: 0.8125rem;
  color: var(--c-muted);
  display: block;
  margin-top: 2px;
}

/* ---------- 13. Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-5);
  counter-reset: step;
}
.step {
  position: relative;
  padding: var(--s-6);
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: var(--s-3);
}
.step h4 { margin-bottom: var(--s-2); font-size: 1.0625rem; }
.step p { color: var(--c-muted); font-size: 0.9375rem; }

/* ---------- 14. Game cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-5);
}
.game-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t-base);
}
.game-card:hover {
  border-color: var(--c-violet);
  box-shadow: var(--sh-lg);
  transform: translateY(-4px);
}
.game-cover {
  aspect-ratio: 4 / 3;
  background: var(--grad-brand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  position: relative;
  overflow: hidden;
}
.game-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.2) 0%, transparent 60%);
}
.game-cover .gc-text { position: relative; z-index: 1; padding: var(--s-4); text-align: center; }
.game-body { padding: var(--s-5); }
.game-body h3 {
  font-size: 1.0625rem;
  margin-bottom: 6px;
}
.game-body .game-meta {
  font-size: 0.8125rem;
  color: var(--c-muted);
  margin-bottom: var(--s-3);
}
.game-body .game-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
}
.rating-stars { color: var(--c-violet-bright); letter-spacing: 2px; }
.rating-label { font-weight: 600; color: var(--c-ink); }
.rating-label.l5 { color: var(--c-success); }
.rating-label.l4 { color: var(--c-success); }
.rating-label.l3 { color: var(--c-warning); }

/* ---------- 15. Timeline ---------- */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 40px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--c-violet) 0%, var(--c-violet-soft) 100%);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--s-7);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--c-violet);
  box-shadow: 0 0 0 4px var(--c-violet-soft);
}
.timeline-item .tl-year {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-violet);
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.timeline-item h4 { margin-bottom: 6px; }
.timeline-item p { color: var(--c-muted); font-size: 0.9375rem; }

/* ---------- 16. FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  margin-bottom: var(--s-3);
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.faq-item.open { border-color: var(--c-violet-light); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: var(--s-5);
  font-weight: 600;
  color: var(--c-ink);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.faq-q .faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--c-violet);
  transition: transform var(--t-base);
}
.faq-item.open .faq-q .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-base);
  padding: 0 var(--s-5);
}
.faq-item.open .faq-a { max-height: 600px; padding-bottom: var(--s-5); }
.faq-a p { color: var(--c-muted); font-size: 0.9375rem; }

/* ---------- 17. CTA section ---------- */
.cta-band {
  background: var(--grad-brand-deep);
  border-radius: var(--r-xl);
  padding: var(--s-8) var(--s-7);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.18) 0%, transparent 50%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: var(--s-3); }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 580px; margin: 0 auto var(--s-5); font-size: 1.0625rem; }
.cta-band .btn { background: #fff; color: var(--c-violet-deep); }
.cta-band .btn:hover { background: var(--c-violet-tint); transform: translateY(-2px); }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ---------- 18. Download Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 13, 46, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.modal-overlay.open { opacity: 1; visibility: visible;   left: 0;
  right: 0;
  top: 0;
  bottom: 0;}
button { outline: none } 
.modal {
  background: #fff;
  border-radius: var(--r-xl);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--sh-xl);
  transform: translateY(20px) scale(0.96);
  transition: transform var(--t-base);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-6);
  border-bottom: 1px solid var(--c-line);
}
.modal-header h3 { font-size: 1.25rem; margin: 0; }
.modal-header .modal-sub {
  font-size: 0.875rem;
  color: var(--c-muted);
  margin-top: 4px;
}
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  transition: all var(--t-fast);
}
.modal-close:hover { background: var(--c-violet-tint); color: var(--c-violet); }
.modal-close svg { width: 20px; height: 20px; }

.modal-body { padding: var(--s-6); }
.qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
}
@media (max-width: 540px) {
  .qr-grid { grid-template-columns: 1fr; }
}
.qr-block {
  text-align: center;
  padding: var(--s-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-bg-alt);
  transition: border-color var(--t-fast);
}
.qr-block:hover { border-color: var(--c-violet-light); }
.qr-block img {
  width: 180px;
  height: 180px;
  margin: 0 auto var(--s-3);
  border-radius: var(--r-sm);
  background: #fff;
  padding: 8px;
  border: 1px solid var(--c-line);
}
.qr-block .qr-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 4px;
}
.qr-block .qr-sub {
  font-size: 0.8125rem;
  color: var(--c-muted);
}

.modal-alt-links {
  padding: var(--s-5);
  background: var(--c-violet-tint);
  border-radius: var(--r-md);
  margin-bottom: var(--s-5);
}
.modal-alt-links h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-violet-deep);
  margin-bottom: var(--s-3);
}
.modal-alt-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--c-line);
  font-size: 0.9375rem;
}
.modal-alt-link:last-child { border-bottom: none; }
.modal-alt-link .mal-name { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.modal-alt-link .mal-name svg { width: 18px; height: 18px; color: var(--c-violet); }
.modal-alt-link .mal-url { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--c-muted); }

.modal-notice {
  font-size: 0.8125rem;
  color: var(--c-muted);
  display: flex;
  gap: 10px;
  padding: var(--s-4);
  background: var(--c-bg-alt);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c-violet);
}
.modal-notice svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--c-violet); margin-top: 2px; }

/* ---------- 19. Feature blocks ---------- */
.feature-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--s-7);
  align-items: center;
  padding: var(--s-7) 0;
  border-bottom: 1px solid var(--c-line);
}
.feature-block:last-child { border-bottom: none; }
.feature-block:nth-child(even) { grid-template-columns: 1.1fr 0.9fr; }
.feature-block:nth-child(even) .fb-visual { order: 2; }
.feature-block:nth-child(even) .fb-content { order: 1; }
@media (max-width: 880px) {
  .feature-block, .feature-block:nth-child(even) {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .feature-block:nth-child(even) .fb-visual { order: 0; }
  .feature-block:nth-child(even) .fb-content { order: 0; }
}
.feature-block .fb-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--c-violet);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.feature-block h3 { margin-bottom: var(--s-4); font-size: 1.625rem; }
.feature-block p { color: var(--c-muted); margin-bottom: var(--s-4); }
.feature-block .fb-list { display: flex; flex-direction: column; gap: var(--s-3); }
.feature-block .fb-list li {
  display: flex;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--c-ink-2);
}
.feature-block .fb-list li svg {
  width: 20px; height: 20px;
  color: var(--c-violet);
  flex-shrink: 0;
  margin-top: 1px;
}
.fb-visual {
  background: var(--c-violet-tint);
  border-radius: var(--r-xl);
  padding: var(--s-7);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.fb-visual .fbv-icon {
  width: 88px;
  height: 88px;
  color: var(--c-violet);
}
.fb-visual .fbv-icon svg { width: 100%; height: 100%; }
.fb-visual .fbv-deco {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(147, 78, 249, 0.18) 0%, transparent 50%);
}

/* ---------- 20. Page Hero (inner pages) ---------- */
.page-hero {
  background: var(--c-bg-alt);
  padding: var(--s-8) 0 var(--s-7);
  border-bottom: 1px solid var(--c-line);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-hero);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: var(--s-4); max-width: 720px; }
.page-hero p { color: var(--c-muted); font-size: 1.125rem; max-width: 640px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--c-muted);
  margin-bottom: var(--s-4);
}
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-violet); }
.breadcrumb svg { width: 14px; height: 14px; }

/* ---------- 21. Callout / Note ---------- */
.callout {
  background: var(--c-violet-tint);
  border-left: 4px solid var(--c-violet);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin: var(--s-5) 0;
  display: flex;
  gap: 14px;
}
.callout svg { width: 22px; height: 22px; color: var(--c-violet); flex-shrink: 0; }
.callout .callout-body { font-size: 0.9375rem; color: var(--c-ink-2); }
.callout .callout-body strong { color: var(--c-violet-deep); }
.callout.notice { background: #fef3c7; border-color: var(--c-warning); }
.callout.notice svg { color: var(--c-warning); }
.callout.success { background: #dcfce7; border-color: var(--c-success); }
.callout.success svg { color: var(--c-success); }

/* ---------- 22. Community / Contact list ---------- */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-4);
}
.community-card {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-5);
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}
.community-card:hover {
  border-color: var(--c-violet);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.community-card .cc-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--c-violet-tint);
  color: var(--c-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.community-card .cc-icon svg { width: 22px; height: 22px; }
.community-card .cc-title { font-weight: 600; font-size: 0.9375rem; }
.community-card .cc-sub { font-size: 0.8125rem; color: var(--c-muted); margin-top: 2px; }

/* ---------- 23. Footer ---------- */
.site-footer {
  background: var(--c-bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--s-8) 0 var(--s-5);
  margin-top: var(--s-9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--s-6);
  padding-bottom: var(--s-7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.footer-brand img { width: 36px; height: 36px; border-radius: var(--r-sm); }
.footer-brand .fb-name { color: #fff; font-weight: 700; font-size: 1.0625rem; }
.footer-brand .fb-tag { color: rgba(255,255,255,0.5); font-size: 0.75rem; }
.footer-desc { font-size: 0.875rem; color: rgba(255,255,255,0.6); margin-bottom: var(--s-4); max-width: 320px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--t-fast);
}
.footer-social a:hover {
  background: var(--c-violet);
  color: #fff;
}
.footer-social svg { width: 18px; height: 18px; }

.footer-col h4 {
  color: #fff;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9375rem;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s-5);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
  gap: var(--s-3);
}
.footer-bottom a { color: rgba(255, 255, 255, 0.5); }
.footer-bottom a:hover { color: #fff; }

/* ---------- 24. Badge / Chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--r-full);
  background: var(--c-violet-soft);
  color: var(--c-violet-deep);
  letter-spacing: 0.02em;
}
.chip.success { background: #dcfce7; color: var(--c-success); }
.chip.warning { background: #fef3c7; color: var(--c-warning); }
.chip svg { width: 12px; height: 12px; }

/* ---------- 25. Utility ---------- */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-6 { margin-bottom: var(--s-6); }
.mb-7 { margin-bottom: var(--s-7); }

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
