:root {
  --brand: #2e7d5b;
  --brand-dark: #1b4332;
  /* Fixed CTA color for the store badges — deliberately not overridden by
     the dark theme below, since --brand-dark is repurposed there as a light
     accent shade, which would otherwise wash out the white badge text. */
  --cta-bg: #1b4332;
  --bg: #ffffff;
  --surface: #f4f8f6;
  --text: #16241d;
  --text-muted: #52685c;
  --border: #dfe9e3;
  --shadow: 0 8px 24px rgba(27, 67, 50, 0.08);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --brand: #4caf82;
  --brand-dark: #a7e8c8;
  --bg: #101410;
  --surface: #171d18;
  --text: #eef4f0;
  --text-muted: #a8b8ae;
  --border: #263229;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #4caf82;
    --brand-dark: #a7e8c8;
    --bg: #101410;
    --surface: #171d18;
    --text: #eef4f0;
    --text-muted: #a8b8ae;
    --border: #263229;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

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

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

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.lang-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

/* Deliberately the one colorful thing in an otherwise neutral header, so
   it's visible without scrolling to the full #support section below —
   collapses to an icon-only pill on narrow screens (same footprint as
   .icon-btn) rather than crowding out the brand/lang-link/theme-toggle. */
.nav-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.nav-support-btn:hover {
  transform: translateY(-2px);
}

.nav-support-btn svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .nav-support-btn {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .nav-support-btn .btn-label {
    display: none;
  }
}

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

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

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

.store-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--cta-bg);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.store-badge .badge-text {
  text-align: start;
  line-height: 1.15;
}

.store-badge .badge-text small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.85;
}

.store-badge .badge-text strong {
  font-size: 1rem;
}

/* ---- Sections ---- */
section {
  padding: 64px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
}

/* ---- Features ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 24px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---- Screenshots ---- */
.screenshots-scroller {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screenshots-scroller img {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 220px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---- Download / QR ---- */
.download-section {
  background: var(--surface);
  border-radius: 28px;
  margin: 0 24px;
  text-align: center;
}

.download-section .container {
  padding: 56px 24px;
}

.qr-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.qr-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.qr-card img {
  width: 140px;
  height: 140px;
}

.qr-card p {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- Support ---- */
#support .container {
  text-align: center;
}

.support-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.support-badge:hover {
  transform: translateY(-2px);
}

.support-badge svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: #fff;
}

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

.site-footer a {
  text-decoration: underline;
}

/* ---- Policy / article pages ---- */
.policy {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.policy h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 8px;
}

.policy .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.policy h2 {
  font-size: 1.25rem;
  margin: 36px 0 12px;
}

.policy p,
.policy li {
  color: var(--text-muted);
}

.policy ul {
  padding-inline-start: 20px;
}

@media (max-width: 640px) {
  .hero {
    padding: 48px 0 40px;
  }

  section {
    padding: 48px 0;
  }

  .download-section {
    margin: 0 16px;
  }
}
