/* ==========================================================================
   xemu Official Website - Main Stylesheet
   Flat, modern, professional. Color scheme derived from logo (#42e335).
   ========================================================================== */

/* ---------- CSS Variables (Design Tokens) ---------- */
:root {
  /* Brand colors - derived from logo */
  --color-primary: #42e335;
  --color-primary-dark: #2db823;
  --color-primary-darker: #1f8a17;
  --color-primary-light: #6fee65;
  --color-primary-tint: #eafce8;
  --color-primary-glow: rgba(66, 227, 53, 0.35);

  /* Neutrals */
  --color-bg: #ffffff;
  --color-bg-alt: #f6f8fa;
  --color-bg-dark: #0d1117;
  --color-bg-dark-alt: #161b22;
  --color-surface: #ffffff;
  --color-surface-border: #e1e4e8;
  --color-text: #1a1a1a;
  --color-text-secondary: #586069;
  --color-text-muted: #6a737d;
  --color-text-inverse: #ffffff;
  --color-text-inverse-secondary: #c9d1d9;
  --color-border: #e1e4e8;
  --color-border-dark: #30363d;

  /* Functional */
  --color-warning: #f5a623;
  --color-success: #2db823;
  --color-danger: #d73a49;
  --color-info: #0969da;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", "Ubuntu Mono",
    Consolas, "Liberation Mono", Menlo, monospace;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 8px 24px rgba(66, 227, 53, 0.25);

  /* Layout */
  --container-max: 1200px;
  --header-height: 64px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
}

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

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

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

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-darker);
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

pre {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse-secondary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.9375rem;
  line-height: 1.6;
}

code {
  background: var(--color-bg-alt);
  color: var(--color-primary-darker);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-3xl) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-2xl);
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-md);
}

.section--dark .section-head .eyebrow {
  color: var(--color-primary);
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.section-head p {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
}

.section--dark .section-head p {
  color: var(--color-text-inverse-secondary);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.brand:hover {
  text-decoration: none;
  color: var(--color-text);
}

.brand img {
  height: 32px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.main-nav a {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.main-nav a:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
  text-decoration: none;
}

.main-nav a.is-active {
  color: var(--color-primary-darker);
  background: var(--color-primary-tint);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

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

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  position: relative;
  transition: all var(--transition-fast);
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
  width: 18px;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
  width: 18px;
}

.nav-toggle.is-open span {
  background: transparent;
}

.nav-toggle.is-open span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.is-open span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.2;
}

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

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

.btn--primary {
  background: var(--color-primary);
  color: #07210a;
  box-shadow: var(--shadow-primary);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  color: #ffffff;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-primary);
  color: var(--color-primary-darker);
}

.btn--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.btn--dark:hover {
  background: var(--color-bg-dark-alt);
  color: var(--color-primary);
}

.btn--lg {
  padding: 0.95rem 2rem;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--space-3xl) 0 var(--space-2xl);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--color-primary-tint), transparent 60%),
    var(--color-bg);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero__content .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  background: var(--color-primary-tint);
  color: var(--color-primary-darker);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.hero__content h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.hero__content h1 .accent {
  color: var(--color-primary-dark);
}

.hero__content p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 540px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.hero__meta-item {
  display: flex;
  flex-direction: column;
}

.hero__meta-item strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  font-family: var(--font-mono);
}

.hero__meta-item span {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.hero__visual {
  position: relative;
}

.hero__device {
  background: var(--color-bg-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero__device::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(66, 227, 53, 0.18), transparent 50%);
  pointer-events: none;
}

.hero__device-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  position: relative;
}

.hero__device-logo img {
  height: 40px;
}

.hero__device-logo span {
  font-family: var(--font-mono);
  color: var(--color-primary);
  font-size: 0.9375rem;
}

.hero__screen {
  background: #000;
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border-dark);
}

.hero__screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(66, 227, 53, 0.04) 2px, rgba(66, 227, 53, 0.04) 4px),
    linear-gradient(135deg, #0d1117 0%, #1a2317 50%, #0d1117 100%);
}

.hero__screen-label {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.hero__screen-label span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.hero__screen-label span:first-child { background: #ff5f56; }
.hero__screen-label span:nth-child(2) { background: #ffbd2e; }
.hero__screen-label span:nth-child(3) { background: #27c93f; }

.hero__screen-text {
  position: absolute;
  bottom: var(--space-lg);
  left: var(--space-lg);
  right: var(--space-lg);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.8;
  opacity: 0.85;
}

.hero__device-status {
  position: relative;
  margin-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-inverse-secondary);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
}

.hero__device-status .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  margin-right: 0.4rem;
  box-shadow: 0 0 8px var(--color-primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Card grid ---------- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  height: 100%;
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
  color: var(--color-primary-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.card p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.card__list {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card__list li {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.card__list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 0.55rem;
}

/* ---------- Use cases (homepage) ---------- */
.usecase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  margin-bottom: var(--space-2xl);
}

.usecase:nth-child(even) .usecase__visual {
  order: -1;
}

.usecase:last-child {
  margin-bottom: 0;
}

.usecase__content .eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
}

.usecase__content h3 {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  line-height: 1.25;
}

.usecase__content p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.usecase__content ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: var(--space-md);
}

.usecase__content ul li {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  font-size: 0.9375rem;
}

.usecase__content ul li::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2307210a' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: 0.2rem;
}

.usecase__visual {
  background: var(--color-bg-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.usecase__visual--alt {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary-darker));
}

.usecase__visual-icon {
  width: 80px;
  height: 80px;
  color: var(--color-primary);
  opacity: 0.9;
}

.usecase__visual--alt .usecase__visual-icon {
  color: #ffffff;
}

/* ---------- Stats band ---------- */
.stats-band {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: var(--space-2xl) 0;
}

.stats-band__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

.stats-band__item strong {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stats-band__item span {
  color: var(--color-text-inverse-secondary);
  font-size: 0.875rem;
}

/* ---------- Compatibility bar ---------- */
.compat-bar {
  background: var(--color-bg-alt);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin-top: var(--space-2xl);
}

.compat-bar__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.compat-bar__head h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.compat-bar__head span {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.compat-bar__track {
  height: 12px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
  margin-bottom: var(--space-md);
}

.compat-bar__seg {
  height: 100%;
  transition: width 0.6s ease;
}

.compat-bar__seg--playable { background: var(--color-primary); }
.compat-bar__seg--ingame { background: var(--color-primary-light); }
.compat-bar__seg--menu { background: var(--color-warning); }
.compat-bar__seg--intro { background: #d73a49; }

.compat-bar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  font-size: 0.8125rem;
}

.compat-bar__legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-secondary);
}

.compat-bar__legend li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

.compat-bar__legend .playable::before { background: var(--color-primary); }
.compat-bar__legend .ingame::before { background: var(--color-primary-light); }
.compat-bar__legend .menu::before { background: var(--color-warning); }
.compat-bar__legend .intro::before { background: #d73a49; }

/* ---------- Download table ---------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.platform-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
}

.platform-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.platform-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  color: var(--color-primary-dark);
}

.platform-card__icon svg {
  width: 100%;
  height: 100%;
}

.platform-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.platform-card__ver {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.platform-card__req {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-align: left;
  background: var(--color-bg-alt);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.platform-card__req strong {
  display: block;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  font-size: 0.8125rem;
}

/* ---------- Steps (guide) ---------- */
.steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--space-lg);
  align-items: flex-start;
}

.step__num {
  counter-increment: step;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #07210a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 1.125rem;
}

.step__num::before {
  content: counter(step);
}

.step__body {
  padding-top: 0.4rem;
}

.step__body h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.step__body p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.step__body .note {
  background: var(--color-primary-tint);
  border-left: 3px solid var(--color-primary);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  margin-top: var(--space-md);
}

/* ---------- FAQ ---------- */
.faq {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 820px;
  margin: 0 auto;
}

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

.faq__item summary {
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  gap: var(--space-md);
}

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

.faq__item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--color-primary-dark);
  font-weight: 300;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item summary:hover {
  background: var(--color-bg-alt);
}

.faq__answer {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ---------- Feature matrix table ---------- */
.feature-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}

.feature-table thead {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.feature-table th,
.feature-table td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--color-border);
}

.feature-table th {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.feature-table tbody tr:hover {
  background: var(--color-bg-alt);
}

.feature-table td.yes { color: var(--color-primary-darker); font-weight: 600; }
.feature-table td.no { color: var(--color-text-muted); }
.feature-table code {
  font-size: 0.8125rem;
}

/* ---------- Code block (download/install) ---------- */
.code-block {
  background: var(--color-bg-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--space-md) 0;
}

.code-block__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem var(--space-md);
  background: var(--color-bg-dark-alt);
  border-bottom: 1px solid var(--color-border-dark);
  color: var(--color-text-inverse-secondary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.code-block pre {
  margin: 0;
  border-radius: 0;
  padding: var(--space-md) var(--space-lg);
  background: transparent;
}

/* ---------- Download modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(13, 17, 23, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal.is-open {
  display: flex;
  animation: fadeIn 0.2s ease;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}
button { outline: none } 
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal__dialog {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

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

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.modal__head h3 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.modal__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  line-height: 1;
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.modal__body {
  padding: var(--space-xl);
}

.qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.qr-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
}

.qr-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.qr-card__img {
  width: 180px;
  height: 180px;
  margin: 0 auto var(--space-md);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-card__img svg {
  width: 100%;
  height: 100%;
}

.qr-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.qr-card p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.qr-card__platform-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}

.modal__notice {
  background: var(--color-primary-tint);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.875rem;
  color: var(--color-text);
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
}

.modal__notice svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary-dark);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, var(--color-primary-tint), transparent 70%),
    var(--color-bg-alt);
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--color-border);
}

.page-hero__inner {
  max-width: 760px;
  text-align: center;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-text-secondary);
}

.breadcrumb a:hover {
  color: var(--color-primary-dark);
}

.breadcrumb__sep {
  color: var(--color-border);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.page-hero p {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

/* ---------- Content blocks ---------- */
.prose {
  max-width: 820px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.prose p {
  margin-bottom: var(--space-md);
  color: var(--color-text);
  line-height: 1.8;
}

.prose ul,
.prose ol {
  margin: var(--space-md) 0;
  padding-left: 1.25rem;
}

.prose ul li,
.prose ol li {
  margin-bottom: 0.5rem;
  list-style: disc;
  color: var(--color-text-secondary);
}

.prose ol li {
  list-style: decimal;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.cta-band p {
  color: var(--color-text-inverse-secondary);
  max-width: 540px;
  margin: 0 auto var(--space-xl);
}

.cta-band .btn--primary {
  background: var(--color-primary);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse-secondary);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--color-border-dark);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  color: var(--color-text-inverse);
  font-weight: 800;
  font-size: 1.25rem;
}

.footer-brand img {
  height: 32px;
}

.footer-grid p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.footer-grid h4 {
  color: var(--color-text-inverse);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.footer-grid ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-grid ul a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.footer-grid ul a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-lg);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-bg-dark-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-inverse-secondary);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-primary);
  color: #07210a;
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .usecase {
    grid-template-columns: 1fr;
  }
  .usecase:nth-child(even) .usecase__visual {
    order: 0;
  }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats-band__grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-surface);
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-110%);
    transition: transform var(--transition-base);
  }
  .main-nav.is-open {
    transform: translateY(0);
  }
  .main-nav a {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }
  .nav-toggle { display: flex; }
  .header-cta .btn--ghost { display: none; }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
  .platform-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero__meta { flex-direction: column; gap: var(--space-md); }
  .qr-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-lg); }
  .section { padding: var(--space-2xl) 0; }
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.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;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  background: var(--color-primary);
  color: #07210a;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  z-index: 3000;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-md);
}

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