/* download.altherbit.com (B9-5). Studio palette, the launcher's. Contrast checked (WCAG AA): text 17:1, muted 8:1, links 8:1,
   white on the button 5:1 (6.4:1 on hover). Nothing is loaded from other sites. */

@font-face {
    font-family: 'Poppins';
    src: url('Poppins-Medium.ttf') format('truetype');
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --bg: #100c0f;
    --surface: #1a1419;
    --surface-2: #221a20;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f5eff4;
    --muted: #b7abb4;
    --accent: #bf2ab5;
    --accent-hover: #a61f9d;
    --link: #ee8fe6;
    --focus: #f7b6f1;
    --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --gutter: 48px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
    color-scheme: dark;
    background: var(--bg);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font: 400 16px/1.6 'Poppins', system-ui, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
}

main { flex: 1; }

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

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 6px;
}

h1, h2, h3 { font-weight: 600; line-height: 1.2; }

code { font-family: var(--mono); font-size: 0.92em; }

.wrap {
    width: min(1200px, 100% - var(--gutter));
    margin-inline: auto;
}

.skip {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 10;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
}
.skip:focus { top: 12px; }

/* ---------- Top bar ---------- */

.top { position: relative; z-index: 2; }
.top .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.top-logo { display: block; border-radius: 6px; }
.top-logo img { height: 40px; width: auto; }

.lang {
    display: none;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(16, 12, 15, 0.55);
}
.js .lang { display: inline-flex; }
.lang button {
    min-width: 44px;
    min-height: 32px;
    padding: 4px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    letter-spacing: 0.04em;
    cursor: pointer;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.lang button:focus-visible { border-radius: 999px; }

/* ---------- Download block ---------- */

.lead { color: var(--muted); font-size: 18px; margin: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 12px 32px -12px rgba(191, 42, 181, 0.7);
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { border-radius: 14px; }
.btn svg { width: 22px; height: 22px; flex: none; }

.meta { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.meta .mi { white-space: nowrap; }
.sep { margin: 0 8px; opacity: 0.55; }

.hash { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.hash-label { margin-right: 4px; }
.hash code { color: var(--text); opacity: 0.8; word-break: break-all; }
.hash-links { margin: 2px 0 0; font-size: 13px; }
.hash-links a { white-space: nowrap; }

/* After "Descargar": the button gives way to the next steps (download.js). */
[data-state="done"] .get { display: none; }

.done {
    padding: 24px 28px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(26, 20, 25, 0.88);
    text-align: left;
    animation: rise 0.25s ease-out;
}
.done-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 21px;
}
.done-title:focus { outline: none; }
.done-title:focus-visible { outline: 2px solid var(--focus); }
.done-title svg { width: 28px; height: 28px; flex: none; color: var(--link); }
.done-retry { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.done-next {
    margin: 20px 0 8px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.done ol { margin: 0; padding-left: 22px; color: var(--muted); font-size: 15px; }
.done strong { color: var(--text); font-weight: 600; }
.done a { white-space: nowrap; }
.done li { padding-left: 4px; }
.done li + li { margin-top: 8px; }
.done li::marker { color: var(--link); }

@keyframes rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ---------- How it works ---------- */

.section { padding: 72px 0 0; }
.section-title { margin: 0 0 24px; font-size: 24px; }

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.step {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}
.step-n {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 16px;
    border-radius: 9px;
    background: rgba(191, 42, 181, 0.16);
    color: var(--link);
    font-weight: 600;
}
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Windows notice ---------- */

.notice {
    margin: 20px 0 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}
.notice > summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 14px;
    cursor: pointer;
    list-style: none;
}
.notice > summary::-webkit-details-marker { display: none; }
.notice > summary:hover .notice-title { text-decoration: underline; text-underline-offset: 3px; }
.notice-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--link);
}
.notice-icon svg { width: 22px; height: 22px; }
.notice-head { flex: 1; min-width: 0; }
.notice-title { display: block; font-weight: 600; }
.notice-sub { display: block; color: var(--muted); font-size: 14px; }
.chev { width: 20px; height: 20px; flex: none; color: var(--muted); transition: transform 0.2s ease; }
.notice[open] .chev { transform: rotate(180deg); }

.notice-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 48px;
    padding: 24px;
    border-top: 1px solid var(--line);
}
.notice-col { display: grid; gap: 28px; align-content: start; }
.notice-body h3 { margin: 0 0 8px; font-size: 16px; }
.notice-body p { margin: 0; color: var(--muted); font-size: 15px; }
.notice-body p + p,
.notice-body p + .cmd,
.notice-body .cmd + p { margin-top: 10px; }
.notice-body ol { margin: 0; padding-left: 22px; color: var(--muted); font-size: 15px; }
.notice-body li + li { margin-top: 6px; }
.notice-body li::marker { color: var(--link); }
.notice-body strong { color: var(--text); font-weight: 600; }

.cmd {
    display: block;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0b080a;
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.5;
    word-break: break-all;
}

/* "Qué hace el instalador": a check mark per line, so it reads as reassurance, not as steps. */
.does { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.does li { position: relative; padding-left: 26px; }
.does li + li { margin-top: 8px; }
.does li::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 0.42em;
    width: 11px;
    height: 6px;
    border-left: 2px solid var(--link);
    border-bottom: 2px solid var(--link);
    transform: rotate(-45deg);
}

/* "¿Cómo sé que es el nuestro?": drop the file and the browser checks it (download.js). Without JS or without
   crypto.subtle the box stays hidden and only the PowerShell way is left. */
.drop { display: none; position: relative; margin-top: 12px; }
.can-check .drop { display: block; }
.drop-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip-path: inset(50%);
}
.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 22px 20px;
    border: 1.5px dashed rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-size: 15px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.drop-zone svg { width: 28px; height: 28px; color: var(--link); }
.drop-zone strong { color: var(--text); font-weight: 600; }
.drop-pick { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.drop-note { font-size: 13px; }
.drop-zone:hover,
.drop.is-over .drop-zone { border-color: rgba(191, 42, 181, 0.75); background: rgba(191, 42, 181, 0.08); }
.drop-input:focus-visible + .drop-zone { outline: 2px solid var(--focus); outline-offset: 3px; }

.drop-result { margin: 10px 0 0; }
.drop-result > span { display: none; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 15px; }
.drop-result svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.drop[data-state="checking"] .r-checking,
.drop[data-state="ok"] .r-ok,
.drop[data-state="bad"] .r-bad,
.drop[data-state="error"] .r-error { display: flex; }
.r-checking { color: var(--muted); }
.r-ok { background: rgba(70, 200, 130, 0.12); color: #8ae6b0; }
.r-bad,
.r-error { background: rgba(240, 90, 90, 0.12); color: #ffaaaa; }
.drop-result strong { color: inherit; }

/* The PowerShell way, folded away for whoever wants it. */
.adv { margin-top: 14px; }
.adv > summary {
    position: relative;
    padding-left: 16px;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    list-style: none;
}
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary::before {
    content: '';
    position: absolute;
    left: 1px;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}
.adv[open] > summary::before { transform: rotate(45deg); }
.adv > summary:hover { color: var(--text); }
.notice-body .check { margin-top: 10px; }
.notice-body .check li + li { margin-top: 10px; }
.cmd-row { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.cmd-row .cmd { flex: 1; min-width: 0; }
.copy {
    display: none;
    flex: none;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.js .copy { display: inline-block; }
.copy:hover { background: rgba(255, 255, 255, 0.1); }
.copy:focus-visible { border-radius: 8px; }
.copy-ok,
.copy.is-copied .copy-idle { display: none; }
.copy.is-copied .copy-ok { display: inline; color: var(--link); }

/* ---------- Footer ---------- */

/* The logo and two matching link chips on one row; the copyright below, under a thin line. */
.foot {
    margin-top: 96px;
    padding: 36px 0 32px;
    border-top: 1px solid var(--line);
    background: linear-gradient(to bottom, rgba(26, 20, 25, 0.6), transparent 70%);
    color: var(--muted);
    font-size: 14px;
}
.foot-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}
.foot-logo { height: 30px; width: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 16px 8px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.chip svg { width: 18px; height: 18px; flex: none; color: var(--link); }
.chip:hover { border-color: rgba(191, 42, 181, 0.6); background: rgba(191, 42, 181, 0.12); }
.chip:focus-visible { border-radius: 999px; }
.foot-legal { margin: 20px 0 0; font-size: 13px; }

/* =====================================================================================================
   Layout A: centered, the art across the whole first screen.
   ===================================================================================================== */

.layout-a .top { position: absolute; inset: 0 0 auto; }

/* No min-height: the first screen is the hero plus the start of "Cómo funciona", never an empty band. */
.a-hero {
    position: relative;
    isolation: isolate;
    padding: 152px 0 64px;
    text-align: center;
    overflow: hidden;
}
.a-hero::before,
.a-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
}
.a-hero::before { background: url('fondo.png') center / cover no-repeat; opacity: 0.5; }
.a-hero::after {
    background:
        radial-gradient(60% 55% at 50% 38%, rgba(191, 42, 181, 0.22), transparent 70%),
        linear-gradient(to bottom, rgba(16, 12, 15, 0.3), rgba(16, 12, 15, 0.15) 45%, var(--bg));
}
.a-hero .wrap { display: flex; flex-direction: column; align-items: center; }
.a-mark { width: 104px; }
.a-hero h1 { margin: 24px 0 12px; font-size: clamp(36px, 4.6vw, 60px); letter-spacing: -0.01em; }
.a-hero .lead { max-width: 560px; }
.a-hero .get { margin-top: 36px; }
.a-hero .done { width: min(560px, 100%); margin-top: 32px; }
.a-hero .hash { max-width: 560px; }

.a-hero + .section { padding-top: 24px; }

/* ---------- Narrow screens ---------- */

@media (max-width: 960px) {
    .notice-body { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
    .steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .step { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; padding: 18px; }
    .step-n { grid-row: span 2; margin: 0; }
}

@media (max-width: 560px) {
    :root { --gutter: 32px; }
    .top .wrap { height: 64px; }
    .top-logo img { height: 28px; }
    .a-hero { min-height: 0; padding: 104px 0 48px; }
    .a-mark { width: 80px; }
    .lead { font-size: 16px; }
    .get { width: 100%; }
    .btn { width: 100%; padding: 16px 20px; }
    .done { padding: 20px; }
    .section { padding-top: 56px; }
    .section-title { font-size: 21px; }
    .notice > summary { padding: 16px; gap: 12px; }
    .notice-body { padding: 20px 16px; }
    .cmd-row { flex-direction: column; }
    .foot { margin-top: 64px; padding-top: 28px; }
    .foot-logo { height: 26px; }
}

/* Less movement when the system asks for it. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
