:root {
  color-scheme: light;
  --bg-color: #f6f1e8;
  --bg-elevated: rgba(255, 251, 244, 0.86);
  --section-warm: rgba(255, 248, 238, 0.86);
  --section-cool: rgba(245, 248, 251, 0.8);
  --text-main: #1b232b;
  --text-muted: #63707b;
  --accent-color: #2c3a4a;
  --accent-hover: #3f5267;
  --accent-soft: #d2a35e;
  --card-bg: rgba(255, 252, 247, 0.92);
  --card-bg-alt: rgba(252, 247, 239, 0.9);
  --kofi-button-bg: #2b3547;
  --kofi-button-text: #fffaf2;
  --border-color: rgba(27, 35, 43, 0.08);
  --border-strong: rgba(27, 35, 43, 0.14);
  --section-line: rgba(44, 58, 74, 0.12);
  --shadow-sm: 0 6px 18px rgba(21, 28, 35, 0.06);
  --shadow-lg: 0 24px 56px rgba(21, 28, 35, 0.14);
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg-color: #10161d;
  --bg-elevated: rgba(23, 31, 40, 0.9);
  --section-warm: rgba(32, 42, 54, 0.88);
  --section-cool: rgba(20, 29, 38, 0.88);
  --text-main: #eef3f8;
  --text-muted: #a2afbb;
  --accent-color: #d2a35e;
  --accent-hover: #e3b56e;
  --accent-soft: #51657a;
  --card-bg: rgba(27, 37, 48, 0.92);
  --card-bg-alt: rgba(33, 44, 56, 0.9);
  --kofi-button-bg: #d2a35e;
  --kofi-button-text: #10161d;
  --border-color: rgba(238, 243, 248, 0.08);
  --border-strong: rgba(238, 243, 248, 0.14);
  --section-line: rgba(238, 243, 248, 0.1);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 28px 66px rgba(0, 0, 0, 0.34);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background:
    radial-gradient(circle at top left, rgba(210, 163, 94, 0.2), transparent 26%),
    radial-gradient(circle at right 10% top 12%, rgba(63, 82, 103, 0.16), transparent 22%),
    linear-gradient(180deg, var(--bg-color) 0%, color-mix(in srgb, var(--bg-color) 88%, black 12%) 100%);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.navbar,
.hero,
.feature-card,
.steps-section,
.downloads-section,
.help-section,
.support-section {
  position: relative;
  z-index: 1;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.brand-logo.small {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

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

.nav-link,
.theme-toggle,
.btn {
  transition: all 0.2s ease;
}

.nav-link,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

.nav-link:hover,
.theme-toggle:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

.theme-toggle {
  gap: 10px;
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
}

.theme-toggle-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-color));
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.22);
}

.hero,
.steps-section,
.downloads-section,
.help-section,
.support-section {
  background: var(--bg-elevated);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 38px;
  margin-bottom: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    var(--bg-elevated);
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.12rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 92%;
}

.button-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  color: #fffaf2;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: color-mix(in srgb, var(--card-bg) 78%, transparent);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
.btn-tertiary:hover {
  background: color-mix(in srgb, var(--card-bg) 70%, transparent);
}

.btn-tertiary {
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.hero-points {
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--text-muted);
}

.hero-points li::before {
  content: "•";
  color: var(--accent-soft);
  padding-right: 10px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}

.kofi-widget-slot {
  display: inline-flex;
  align-items: center;
}

.kofi-widget-slot a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 48px !important;
  padding: 0 22px !important;
  border-radius: 999px !important;
  background: var(--kofi-button-bg) !important;
  color: var(--kofi-button-text) !important;
  box-shadow: var(--shadow-sm) !important;
  text-decoration: none !important;
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

.kofi-widget-slot a * {
  color: var(--kofi-button-text) !important;
}

.kofi-widget-slot img {
  margin-right: 10px !important;
}

.kofi-widget-slot a:hover {
  transform: translateY(-1px);
}

.kofi-hero-slot {
  position: absolute;
  right: 157px;
  bottom: -60px;
}

.icon-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-soft) 32%, transparent) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: 0;
}

.app-icon-large {
  width: 256px;
  height: 256px;
  border-radius: 56px;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.features,
.downloads-grid,
.help-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.features {
  padding-bottom: 28px;
}

.feature-card,
.download-card,
.help-card {
  background: var(--card-bg);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3,
.download-card h3,
.help-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-card p,
.download-card p,
.help-card p,
.section-heading p,
.step p,
.download-meta {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.steps-section,
.downloads-section,
.help-section,
.support-section {
  padding: 34px;
  margin-bottom: 28px;
  position: relative;
}

.steps-section::before,
.downloads-section::before,
.help-section::before,
.support-section::before {
  content: "";
  position: absolute;
  left: 34px;
  right: 34px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--section-line), transparent);
}

.steps-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    var(--section-cool);
}

.downloads-section {
  background:
    linear-gradient(180deg, rgba(210, 163, 94, 0.06), transparent),
    var(--section-warm);
}

.help-section {
  background:
    linear-gradient(180deg, rgba(63, 82, 103, 0.06), transparent),
    var(--section-cool);
}

.support-section {
  background:
    linear-gradient(180deg, rgba(210, 163, 94, 0.08), transparent),
    var(--section-warm);
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2 {
  font-size: 2.35rem;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

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

.step {
  text-align: center;
  padding: 24px 18px;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-soft) 22%, transparent);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin: 0 auto 18px;
}

.step h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.download-card.featured {
  background:
    linear-gradient(180deg, rgba(210, 163, 94, 0.12), transparent),
    var(--card-bg-alt);
}

.download-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 34px;
  border-radius: 999px;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent-soft) 24%, transparent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.download-meta {
  margin-bottom: 10px;
}

.download-card .btn {
  margin-top: 18px;
}

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

.help-card ol {
  margin: 16px 0 14px 18px;
  color: var(--text-muted);
}

.help-card li + li {
  margin-top: 8px;
}

.support-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}

.kofi-support-slot {
  justify-content: flex-end;
}

.support-copy h2 {
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.support-copy p {
  color: var(--text-muted);
  max-width: 680px;
}

.footer {
  background: color-mix(in srgb, var(--bg-elevated) 86%, transparent);
  padding: 34px 0;
  margin-top: 34px;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--section-line), transparent);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

@media (max-width: 980px) {
  .hero,
  .features,
  .steps-grid,
  .downloads-grid,
  .help-grid,
  .support-section {
    grid-template-columns: 1fr;
  }

  .hero,
  .support-section {
    display: grid;
  }

  .hero {
    gap: 32px;
  }

  .hero p {
    max-width: 100%;
  }

  .kofi-hero-slot {
    position: static;
    margin-top: 18px;
  }
}

@media (max-width: 780px) {
  .container {
    width: min(100vw - 24px, 100%);
  }

  .navbar,
  .footer-content,
  .footer-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
  }

  .steps-section,
  .downloads-section,
  .help-section,
  .support-section,
  .hero {
    padding: 24px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 11vw, 3.8rem);
  }

  .button-group,
  .nav-links {
    gap: 10px;
  }

  .btn,
  .nav-link,
  .theme-toggle {
    width: 100%;
  }

  .kofi-widget-slot,
  .kofi-widget-slot a {
    width: 100%;
  }

  .steps-section::before,
  .downloads-section::before,
  .help-section::before,
  .support-section::before {
    left: 24px;
    right: 24px;
  }
}
