/* ==========================================================================
   COTRIFRONSUR · Portada de descarga (/ y /descargar)
   Hereda variables de marca (negro + amarillo) sin cargar app.css completo.
   ========================================================================== */

:root {
  --bg: #0b0b0d;
  --surface: #161618;
  --surface-2: #1f1f22;
  --surface-3: #2a2a2e;
  --border: #34343a;
  --text: #f5f5f4;
  --text-2: #c2c2c7;
  --muted: #a1a1aa;
  --yellow: #facc15;
  --yellow-press: #eab308;
  --yellow-soft: rgba(250, 204, 21, 0.14);
  --on-yellow: #111111;
  --radius: 16px;
  --radius-lg: 24px;
  --tap: 56px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.dl-page {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(120% 60% at 50% 0%, rgba(250, 204, 21, 0.16), transparent 60%), var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.dl-shell {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 8px 20px calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dl-hero {
  text-align: center;
  display: grid;
  gap: 10px;
}
.dl-logo {
  width: 140px;
  height: 140px;
  margin: 0 auto 4px;
  border-radius: 50%;
}
.dl-title {
  font-size: 30px;
  font-weight: 800;
  text-wrap: balance;
}
.dl-title span { color: var(--yellow); }
.dl-subtitle {
  color: var(--text-2);
  font-size: 18px;
}

.dl-notice {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--yellow-soft);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fde68a;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.dl-actions {
  display: grid;
  gap: 16px;
}
.dl-action-group {
  display: grid;
  gap: 6px;
  text-align: center;
}
.dl-action-note {
  color: var(--text-2);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  text-align: center;
  background: var(--surface-3);
  color: var(--text);
  transition: transform 0.1s ease, background-color 0.15s ease;
  user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--yellow);
  color: var(--on-yellow);
}
.btn-primary:active { background: var(--yellow-press); }
.btn-outline {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 2px var(--yellow);
}
.btn-xl {
  min-height: 64px;
  font-size: 20px;
  border-radius: 18px;
}
.btn-block {
  display: flex;
  width: 100%;
}

.btn-icon { width: 24px; height: 24px; margin-right: 10px; flex: none; }

/* Barra de arriba: marca a la izquierda, tuerquita de la administración a la derecha */
.dl-top {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: calc(10px + var(--safe-top)) 12px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dl-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.dl-home img { width: 36px; height: 36px; border-radius: 50%; }
.dl-gear {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.dl-gear svg { width: 26px; height: 26px; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.dl-gear:hover, .dl-gear:focus-visible { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.dl-gear:hover svg, .dl-gear:focus-visible svg { transform: rotate(90deg); }

.dl-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 6px;
  color: var(--yellow);
  font-weight: 600;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dl-login { justify-self: center; }

/* Tarjetas de aviso */
.dl-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.dl-card > div { display: grid; gap: 8px; }
.dl-card h2 { font-size: 19px; font-weight: 800; }
.dl-card p { color: var(--text-2); font-size: 15px; }
.dl-card strong { color: var(--text); }
.dl-card-warn { background: var(--yellow-soft); border-color: rgba(250, 204, 21, 0.45); }
.dl-card-icon { width: 30px; height: 30px; color: var(--yellow); margin-top: 2px; }
.dl-warn-strong { padding-top: 8px; border-top: 1px solid rgba(250, 204, 21, 0.3); }
#iphoneNote { grid-template-columns: 1fr; }

/* Pasos con dibujito */
.dl-guide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.dl-section-title { font-size: 21px; font-weight: 800; }
.dl-section-sub { color: var(--text-2); font-size: 15px; margin-top: -8px; }
.dl-steps { margin: 0; padding: 0; list-style: none; counter-reset: paso; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.dl-step {
  counter-increment: paso;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.dl-step-text { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; }
.dl-step-text::before {
  content: counter(paso);
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--on-yellow);
  font-weight: 800;
}
.dl-step h3 { font-size: 17px; font-weight: 800; align-self: center; }
.dl-step p { color: var(--text-2); font-size: 15px; }
.dl-step strong { color: var(--text); }

.dl-mock {
  margin-left: 48px;
  padding: 14px;
  border-radius: 14px;
  background: #f4f4f5;
  color: #18181b;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.dl-mock strong { color: #18181b; }
.dl-mock small { display: block; color: #52525b; font-size: 12px; }
.mock-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--on-yellow);
  font-weight: 800;
}
.mock-notif { display: flex; align-items: center; gap: 10px; }
.mock-notif-icon { width: 32px; height: 32px; border-radius: 50%; background: #1a73e8; color: #fff; display: grid; place-items: center; flex: none; }
.mock-notif-icon svg { width: 18px; height: 18px; }
.mock-row { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mock-toggle { width: 44px; height: 26px; border-radius: 13px; background: #1a73e8; position: relative; flex: none; }
.mock-toggle::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.mock-dialog { flex-direction: column; align-items: flex-start; gap: 4px; }
.mock-link { color: #1a73e8; font-weight: 700; padding-top: 4px; }
.mock-link.is-strong { text-decoration: underline; text-underline-offset: 3px; }
.mock-install img { border-radius: 10px; }

.dl-brands-title { font-size: 17px; font-weight: 800; margin-top: 6px; }
.dl-brands { display: grid; gap: 8px; }
.dl-brand {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
}
.dl-brand summary {
  min-height: 48px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.dl-brand summary::after { content: "+"; color: var(--yellow); font-size: 22px; font-weight: 700; }
.dl-brand[open] summary::after { content: "−"; }
.dl-brand summary::-webkit-details-marker { display: none; }
.dl-brand p { padding: 0 0 14px; color: var(--text-2); font-size: 15px; }
.dl-brand strong { color: var(--text); }

.dl-faq { display: grid; gap: 8px; }
.dl-faq .dl-section-title { margin-bottom: 6px; }

.dl-foot {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: auto;
}

@media (min-width: 720px) {
  .dl-title { font-size: 38px; }
}
@media (max-width: 400px) {
  .dl-shell { padding-left: 14px; padding-right: 14px; }
  .dl-guide { padding: 14px; }
  .dl-step { padding: 12px; }
  .dl-mock { margin-left: 0; }
}
@media (max-width: 340px) {
  .btn-xl { font-size: 18px; padding: 10px 14px; }
  .dl-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .dl-gear svg { transition: none; }
}
