:root {
  color-scheme: light;
  --color-bg: #f7f8fa;
  --color-panel: #ffffff;
  --color-fg: #172033;
  --color-muted: #5f6f84;
  --color-accent: #176f9f;
  --color-accent-dark: #105375;
  --color-warm: #b46a2b;
  --color-border: #d9e1ea;
  --color-soft: #eef5f8;
  --color-shadow: rgba(23, 32, 51, 0.12);
  --radius: 8px;
  --content-width: 1120px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  line-height: 1.6;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input {
  font: inherit;
}

a {
  color: var(--color-accent);
}

a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.site-header,
main,
.site-footer {
  width: min(var(--content-width), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-fg);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.brand img {
  border-radius: var(--radius);
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

nav a {
  color: var(--color-muted);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

nav a:hover {
  color: var(--color-accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 32px;
  align-items: center;
  min-height: 68vh;
  padding: 64px 0 38px;
}

.hero-copy h1,
.content-page h1 {
  max-width: 820px;
  margin: 0;
  font-size: 4.8rem;
  line-height: 1;
  letter-spacing: 0;
}

.hero-text,
.lead {
  max-width: 710px;
  margin: 24px 0 0;
  color: var(--color-muted);
  font-size: 1.18rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-warm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-actions,
.download-grid,
.feature-grid,
.link-grid,
.source-panel {
  display: grid;
  gap: 14px;
}

.hero-actions {
  grid-template-columns: repeat(2, max-content);
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.button.primary {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(23, 111, 159, 0.2);
}

.button.primary:hover {
  background: var(--color-accent-dark);
}

.button.secondary {
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-fg);
}

.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
}

.hero-visual {
  display: grid;
  gap: 20px;
  justify-items: center;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-panel);
  box-shadow: 0 24px 60px var(--color-shadow);
  padding: 30px;
}

.hero-visual figcaption {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.35;
  text-align: center;
}

.hero-visual strong {
  display: block;
  color: var(--color-fg);
}

.app-icon {
  width: 160px;
  height: 160px;
  border-radius: 32px;
}

.section {
  margin: 28px 0;
  padding: 42px 0;
  border-top: 1px solid var(--color-border);
}

.section.compact {
  padding-bottom: 24px;
}

.section-heading {
  max-width: 780px;
}

.section-heading h2,
.section h2,
.content-page h2 {
  margin: 0;
  font-size: 2.65rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p,
.section p,
.content-page p {
  color: var(--color-muted);
}

.download-grid,
.feature-grid,
.link-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

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

.download-card,
.feature-grid article,
.donate-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--color-panel);
}

.download-card h3,
.feature-grid h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.download-card p,
.feature-grid p {
  margin: 0;
}

.subtle-link {
  justify-self: center;
  color: var(--color-muted);
  font-weight: 700;
  text-decoration: none;
}

.subtle-link:hover {
  color: var(--color-accent);
}

.steps {
  margin: 22px 0 0;
  padding-left: 1.35rem;
}

.steps li {
  margin: 12px 0;
}

.steps strong {
  display: block;
  color: var(--color-fg);
}

.link-grid a {
  display: grid;
  align-items: center;
  min-height: 82px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-soft);
  padding: 18px;
  color: var(--color-fg);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.link-grid a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.faq-list details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-panel);
  padding: 18px 20px;
}

.faq-list summary {
  cursor: pointer;
  color: var(--color-fg);
  font-weight: 700;
  line-height: 1.2;
}

.faq-list p {
  margin: 12px 0 0;
}

.split,
.source-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 24px;
}

.donate-box p {
  margin: 0;
  font-size: 0.95rem;
}

.content-page {
  max-width: 860px;
  padding: 66px 0 36px;
}

.content-page h1 {
  font-size: 3.6rem;
}

.content-page h2 {
  margin-top: 42px;
  font-size: 2rem;
}

.plain-list {
  margin: 16px 0 0;
  padding-left: 1.25rem;
  color: var(--color-muted);
}

.plain-list li {
  margin: 8px 0;
}

.page-cta {
  margin-top: 34px;
}

.site-footer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 18px;
  padding: 34px 0 42px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 700;
}

@media (max-width: 860px) {
  .hero,
  .download-grid,
  .feature-grid,
  .link-grid,
  .split,
  .source-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 3.1rem;
  }

  .content-page h1 {
    font-size: 2.65rem;
  }

  .section-heading h2,
  .section h2 {
    font-size: 2.15rem;
  }
}

@media (max-width: 719px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero-copy h1 {
    font-size: 2.65rem;
  }

  .hero-text,
  .lead {
    font-size: 1.05rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --color-bg: #0f141a;
    --color-panel: #161d25;
    --color-fg: #edf3fb;
    --color-muted: #a8b4c4;
    --color-accent: #64b5db;
    --color-accent-dark: #9bd5ef;
    --color-warm: #e3a765;
    --color-border: #2b3542;
    --color-soft: #172530;
    --color-shadow: rgba(0, 0, 0, 0.42);
  }

  .button.primary {
    color: #07111d;
  }

  .button.secondary,
  .hero-visual,
  .download-card,
  .feature-grid article,
  .donate-box,
  .faq-list details {
    background: var(--color-panel);
  }
}
