/* =========================================================
   TRAMO. 1.9 — ESTILOS DE PÁGINA DE DESCARGA
   ========================================================= */

:root {
  --bg: #F6F5F0;
  --bg-gradient: none;
  --surface: #FFFFFF;
  --surface-soft: #FAF9F5;
  --surface-warm: #F4EFE4;
  --ink: #1D2520;
  --ink-muted: #556159;
  --ink-faint: #849088;
  --accent: #2D4F3E;
  --accent-hover: #213B2E;
  --accent-contrast: #F6F5F0;
  --accent-soft: rgba(45, 79, 62, 0.09);
  --border: #E4E2D8;
  --topbar-bg: rgba(246, 245, 240, 0.86);
  --shadow: 0 18px 44px -18px rgba(29, 37, 32, 0.09);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Aspecto 2: Cielo Patagónico */
body[data-theme="cielo"] {
  --bg: #DCE6F2;
  --bg-gradient: linear-gradient(180deg, #CFE0F5 0%, #E4E3F0 48%, #F4E6DC 100%);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-soft: rgba(255, 255, 255, 0.62);
  --surface-warm: rgba(248, 236, 224, 0.78);
  --ink: #1C2634;
  --ink-muted: #4D5B6E;
  --ink-faint: #7B8899;
  --accent: #2C4A6E;
  --accent-hover: #1E3552;
  --accent-contrast: #FFFFFF;
  --accent-soft: rgba(44, 74, 110, 0.1);
  --border: rgba(44, 74, 110, 0.14);
  --topbar-bg: rgba(207, 224, 245, 0.82);
}

/* Aspecto 3: Oscuro (Midnight Matcha) */
body[data-theme="oscuro"] {
  --bg: #121714;
  --bg-gradient: none;
  --surface: #1A211D;
  --surface-soft: #212A25;
  --surface-warm: #24231D;
  --ink: #EEF1EE;
  --ink-muted: #A3B0A8;
  --ink-faint: #6D7A72;
  --accent: #7FB095;
  --accent-hover: #96C4AB;
  --accent-contrast: #121714;
  --accent-soft: rgba(127, 176, 149, 0.14);
  --border: #2A352F;
  --topbar-bg: rgba(18, 23, 20, 0.86);
  --shadow: 0 20px 48px -18px rgba(0, 0, 0, 0.45);
}

/* Aspecto 4: Cálido (Terracota) */
body[data-theme="calido"] {
  --bg: #F5EFEA;
  --bg-gradient: none;
  --surface: #FFFDFB;
  --surface-soft: #F9F3EE;
  --surface-warm: #F2E4D9;
  --ink: #2B211C;
  --ink-muted: #69574E;
  --ink-faint: #968379;
  --accent: #9E4F33;
  --accent-hover: #823E26;
  --accent-contrast: #FFFDFB;
  --accent-soft: rgba(158, 79, 51, 0.1);
  --border: #E6D8CE;
  --topbar-bg: rgba(245, 239, 234, 0.86);
}

/* Aspecto 5: Océano */
body[data-theme="oceano"] {
  --bg: #EEF3F6;
  --bg-gradient: none;
  --surface: #FFFFFF;
  --surface-soft: #F5F8FA;
  --surface-warm: #E7EFF4;
  --ink: #172733;
  --ink-muted: #4C606E;
  --ink-faint: #7E919E;
  --accent: #1F5B78;
  --accent-hover: #16445B;
  --accent-contrast: #FFFFFF;
  --accent-soft: rgba(31, 91, 120, 0.1);
  --border: #D7E2E8;
  --topbar-bg: rgba(238, 243, 246, 0.86);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.dl-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- TOPBAR CONTINUO --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.3s ease;
}

.topbar.is-scrolled {
  border-bottom-color: var(--border);
}

.topbar-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-contrast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.brand:hover .brand-badge {
  transform: scale(1.04);
}

.brand-badge-sm {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.brand-word {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}

.brand-dot {
  display: inline-block;
  width: 4.5px;
  height: 4.5px;
  border-radius: 1.2px;
  background: var(--accent);
  margin-left: 1.5px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.theme-btn {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  color: var(--ink);
}

.theme-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-cta:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* --- HERO DE DESCARGA --- */
.dl-hero {
  padding: 64px 24px 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 16px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.dl-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.dl-hero h1 span {
  color: var(--ink-faint);
}

.dl-lead {
  margin: 0 0 36px;
  max-width: 540px;
  font-size: 1.1rem;
  color: var(--ink-muted);
}

/* --- TARJETA PRINCIPAL DE DESCARGA --- */
.dl-single {
  max-width: 640px;
}

.dl-card-main {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin-top: 12px;
}

.folder-tab {
  position: absolute;
  top: -11px;
  left: 28px;
  width: 112px;
  height: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.dl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 8px;
}

.dl-card-main h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dl-card-main p {
  margin: 0 0 24px;
  color: var(--ink-muted);
  font-size: 0.96rem;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.button-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.dl-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.dl-facts dt {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 3px;
}

.dl-facts dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--ink);
  word-break: break-all;
}

/* --- SHA-256 --- */
.hash-section {
  margin-top: 16px;
}

.hash-toggle {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.hash-toggle:hover {
  color: var(--ink);
}

.hash-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hash-box[hidden] {
  display: none;
}

.hash {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  word-break: break-all;
}

.copy-hash-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.copy-hash-btn:hover {
  border-color: var(--accent);
}

.dl-alert {
  margin-top: 16px;
  max-width: 640px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #FDECEA;
  color: #7A271A;
  font-size: 0.88rem;
  font-weight: 500;
}

.dl-alert-soft {
  background: var(--surface-warm);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

/* --- PASOS --- */
.dl-steps {
  padding: 36px 24px;
}

.dl-steps h2 {
  margin: 0 0 20px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dl-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.dl-steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  width: fit-content;
  padding: 3px 9px;
  border-radius: 6px;
}

.dl-steps h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
}

.dl-steps p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* --- REQUISITOS Y SMARTSCREEN --- */
.dl-info {
  padding: 12px 24px 72px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

.dl-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.dl-box-warm {
  background: var(--surface-warm);
}

.dl-box h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
}

.dl-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-muted);
  font-size: 0.92rem;
  display: grid;
  gap: 6px;
}

.dl-box p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* --- FOOTER --- */
.footer {
  padding: 28px 24px 44px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

/* --- TOAST DE DESCARGA --- */
.dl-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.88rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  animation: toastIn 0.25s ease;
}

.dl-toast[hidden] {
  display: none;
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7FB095;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- ANIMACIÓN SUAVE AL SCROLL --- */
.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js-motion [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 820px) {
  .dl-steps ol,
  .dl-info {
    grid-template-columns: 1fr;
  }

  .theme-switcher {
    display: none;
  }
}

@media (max-width: 520px) {
  .dl-card-main {
    padding: 24px 20px;
  }

  .dl-facts {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
@media(max-width:560px){.dl-hero{padding-top:48px}.dl-options{grid-template-columns:1fr}.topbar .nav-cta{font-size:11px;padding:9px 12px}}
@media(prefers-reduced-motion:reduce){.dl-card{transition:none}.dl-card:hover{transform:none}}

.dl-single{grid-template-columns:minmax(0,460px)}
