* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rail-blue: #60A5FA;
  --rail-blue-dark: #1E3A5F;
  --rail-blue-mid: #3B82F6;
  --rail-green: #4ADE80;
  --rail-amber: #FBBF24;
  --rail-red: #F87171;
  --rail-purple: #818CF8;

  --bg-primary: #0D1117;
  --bg-card: #141B27;
  --bg-input: #1A2235;
  --border: #1E2A3A;
  --border-light: #2A3450;

  --text-primary: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #6B7280;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rail-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ─────────────────────────────────────────────────────────── */

header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.brand:hover { text-decoration: none; }

.brand .mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--rail-blue-dark);
  color: var(--rail-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

nav.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav.site-nav a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
}
nav.site-nav a:hover { color: var(--rail-blue); text-decoration: none; }
nav.site-nav a.active { color: var(--rail-blue); }

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

.store-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border-light);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--rail-blue); transform: translateY(-1px); }

.btn-primary {
  background: var(--rail-blue-dark);
  color: var(--rail-blue);
  border-color: var(--rail-blue-dark);
}
.btn-primary:hover { border-color: var(--rail-blue); }

.btn-ghost { color: var(--text-primary); }

/* ── Feature grid ────────────────────────────────────────────────── */

.section { padding: 56px 0; }
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ── Generic content sections (support/privacy) ─────────────────── */

.page-header {
  padding: 48px 0 8px;
}
.page-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.page-header p { color: var(--text-secondary); }

main.content { padding: 24px 0 64px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  margin-bottom: 24px;
}

.card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.card h3 { font-size: 1rem; font-weight: 600; margin: 18px 0 8px; }
.card h3:first-child { margin-top: 0; }

.card p, .card li { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 10px; }
.card ul, .card ol { padding-left: 22px; margin-bottom: 14px; }
.card strong { color: var(--text-primary); }

.card table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 0.88rem;
}
.card th, .card td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.card th { color: var(--text-primary); font-weight: 600; }

.faq-q { color: var(--text-primary); font-weight: 600; margin-top: 18px; }
.faq-q:first-child { margin-top: 0; }

.updated-badge {
  display: inline-block;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* ── Form (bug report) ──────────────────────────────────────────── */

form.report-form { display: flex; flex-direction: column; gap: 16px; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--rail-blue);
}

.field textarea { resize: vertical; min-height: 120px; }

.field-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

button.submit-btn {
  background: var(--rail-blue-mid);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
button.submit-btn:hover { opacity: 0.9; }
button.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-status {
  font-size: 0.9rem;
  padding: 12px 14px;
  border-radius: 8px;
  display: none;
}
.form-status.show { display: block; }
.form-status.success {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--rail-green);
}
.form-status.error {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--rail-red);
}

/* ── Footer ──────────────────────────────────────────────────────── */

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer.site-footer a { color: var(--text-muted); }
footer.site-footer .links { margin-top: 8px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
