:root {
  --brand: #6366f1;
  --accent: #7c3aed;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --text: #212121;
  --text-secondary: #5f5f6b;
  --border: rgba(0, 0, 0, 0.12);
  --on-brand: #ffffff;
  --error: #b00020;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1e1e1e;
    --text: #e8e8e8;
    --text-secondary: #a8a8b3;
    --border: rgba(255, 255, 255, 0.16);
    --accent: #a78bfa;
    --error: #ff8a9b;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow {
  max-width: 760px;
}

/* Cabecera */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

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

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

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

.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

/* Hero */

.hero {
  background: var(--brand);
  color: var(--on-brand);
  padding: 56px 0;
}

.hero .wrap {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1 1 320px;
}

.hero-logo {
  flex: 0 1 220px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  line-height: 1.15;
}

.hero p {
  margin: 0 0 24px;
  font-size: 1.125rem;
  max-width: 34em;
}

/* Botones de descarga */

.stores {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store {
  display: block;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  line-height: 1.3;
}

.store strong {
  display: block;
  font-size: 1.0625rem;
}

.store span {
  font-size: 0.8125rem;
  opacity: 0.9;
}

/* Secciones */

.section {
  padding: 48px 0;
}

.section h2 {
  margin: 0 0 8px;
  font-size: 1.625rem;
  line-height: 1.25;
}

.section .lead {
  margin: 0 0 24px;
  color: var(--text-secondary);
  max-width: 44em;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.card h3 {
  margin: 0 0 6px;
  font-size: 1.0625rem;
  color: var(--accent);
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Páginas de texto (legales, recuperación) */

.doc {
  padding: 40px 0 56px;
}

.doc h1 {
  margin: 0 0 4px;
  font-size: 1.875rem;
  line-height: 1.2;
}

.doc .updated {
  margin: 0 0 28px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.doc h2 {
  margin: 32px 0 8px;
  font-size: 1.25rem;
}

.doc li {
  margin-bottom: 6px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}

.panel h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.panel p {
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.panel .error {
  color: var(--error);
}

.button {
  display: inline-block;
  background: var(--brand);
  color: var(--on-brand);
  border: 0;
  border-radius: 8px;
  padding: 12px 28px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  background: #4f46e5;
}

[hidden] {
  display: none !important;
}

/* Pie */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
}

.site-footer ul {
  display: flex;
  gap: 8px 20px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer p {
  margin: 0;
}
