/* Desktop app download page (download.html, /download). Uses the tokens from landing.css; everything here is prefixed dl2-
   so it cannot touch other pages (the older .dl* rules in landing.css are still used by cli.html). Motion: blocks fade up as
   they scroll into view (download.js adds .in), the two lanes in the hero picture move; with prefers-reduced-motion, or no JS,
   everything simply shows. */

.dl2-page { display: block; padding-bottom: 0; }
.dl2 { width: 100%; margin: 0 auto; padding-bottom: 10px; }

/* ---------- reveal on scroll ---------- */
.dl2-js .dl2-r { opacity: 0; transform: translateY(16px); transition: opacity .7s ease var(--d, 0s), transform .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0s); }
.dl2-js .dl2-r.in { opacity: 1; transform: none; }
.dl2-js .dl2-steps .dl2-r:nth-child(2), .dl2-js .dl2-modes .dl2-r:nth-child(2), .dl2-js .dl2-feats .dl2-r:nth-child(3n + 2) { --d: .08s; }
.dl2-js .dl2-steps .dl2-r:nth-child(3), .dl2-js .dl2-modes .dl2-r:nth-child(3), .dl2-js .dl2-feats .dl2-r:nth-child(3n) { --d: .16s; }

/* ---------- shared bits ---------- */
.dl2-kicker { margin: 0 0 8px; font: 500 12.5px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.dl2 h2 { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 3.6vw, 38px); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.dl2 h3 { margin: 0; font-family: var(--font-display); font-size: 18px; line-height: 1.25; letter-spacing: -.02em; font-weight: 800; }
.dl2 em { font-style: normal; font-weight: 600; color: var(--text); }
.dl2-sec { padding-top: clamp(56px, 8vw, 92px); }
.dl2-head { max-width: 40em; margin-bottom: clamp(20px, 3vw, 28px); }
.dl2-head > p:not(.dl2-kicker) { margin: 10px 0 0; color: var(--muted); font-size: 16.5px; line-height: 1.6; }

/* ---------- hero: title, the download, the picture ---------- */
.dl2-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 60px); align-items: center; padding: clamp(28px, 6vh, 64px) 0 clamp(22px, 3vh, 30px); }
.dl2-crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 18px; font: 500 13px var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.dl2-crumb a:hover { color: var(--text); }
.dl2-crumb > span { opacity: .5; }
.dl2-hero h1 { margin: 0; font-family: var(--font-display); font-size: clamp(40px, 6vw, 68px); line-height: 1; letter-spacing: -.04em; font-weight: 800; }
.dl2-hero h1::after { content: ""; display: block; width: 72px; height: 7px; margin-top: clamp(16px, 2.4vw, 22px); border-radius: 4px; background: var(--accent); }
.dl2-lead { margin: clamp(16px, 2.4vw, 22px) 0 0; max-width: 30em; color: var(--muted); font-size: clamp(16.5px, 1.7vw, 18.5px); line-height: 1.6; }

.dl2-get { margin-top: clamp(24px, 3.4vw, 32px); }
.dl2-btn { height: 54px; padding: 0 26px 0 22px; gap: 11px; border-radius: 13px; font-size: 16.5px; }
.dl2-btn svg { width: 20px; height: 20px; stroke-width: 2.2; }
.dl2-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; font: 400 12px/1.5 var(--font-mono); color: var(--muted); }
.dl2-meta > * { padding: 2px 9px; border: 1.5px solid var(--border); border-radius: 99px; white-space: nowrap; }
.dl2-meta b { font-weight: 500; color: var(--text); border-color: color-mix(in srgb, var(--text) 30%, var(--border)); }
.dl2-alt { margin: 12px 0 0; font-size: 14.5px; color: var(--muted); }
.dl2-alt a { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.dl2-alt a:hover { text-decoration-thickness: 2px; }
.dl2-alt .dl2-nw { white-space: nowrap; }
.dl2-alt .dl2-nw span { font: 400 12.5px var(--font-mono); }
.dl2-arm { margin: 12px 0 0; padding: 8px 12px; display: inline-block; border-radius: 9px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); font-size: 13.5px; }
.dl2-arm[hidden] { display: none; }

/* the picture: a small window with the folder, the two lanes and the drive */
.dl2-art { margin: 0; background: var(--surface); border: 1.5px solid var(--text); border-radius: 16px; box-shadow: 6px 6px 0 var(--border); overflow: hidden; }
.dl2-art-head { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1.5px solid var(--border); font: 500 12px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dl2-art-head i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.dl2-art-head span { margin-left: auto; }
.dl2-art-head b { font-weight: 500; color: var(--accent-text); }
.dl2-gfx { display: block; width: 100%; height: auto; padding: 14px 14px 4px; }
.dl2-gfx * { stroke: none; }
.dl2-gfx .g-folder-back { fill: var(--border); }
.dl2-gfx .g-folder { fill: var(--surface-2); stroke: var(--border); stroke-width: 2; }
.dl2-gfx .g-row { fill: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.dl2-gfx .g-line { fill: var(--text); opacity: .8; }
.dl2-gfx .g-line.soft { fill: var(--muted); opacity: .55; }
.dl2-gfx .g-track { fill: none; stroke: var(--border); stroke-width: 12; stroke-linecap: round; }
.dl2-gfx .g-up, .dl2-gfx .g-down { fill: none; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 10 24; }
.dl2-gfx .g-up { stroke: var(--accent); animation: dl2-flow 1.6s linear infinite; }
.dl2-gfx .g-down { stroke: var(--muted); opacity: .75; stroke-dashoffset: 17; animation: dl2-flow 2.2s linear infinite; animation-delay: -.5s; }
@keyframes dl2-flow { from { stroke-dashoffset: 34; } to { stroke-dashoffset: 0; } }
.dl2-gfx .g-lock-bg { fill: var(--surface); stroke: var(--text); stroke-width: 2; }
.dl2-gfx .g-lock-body { fill: var(--text); }
.dl2-gfx .g-lock-shackle { fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.dl2-gfx .g-lock-hole { fill: var(--surface); }
.dl2-gfx .g-tile { fill: #16191f; }
[data-theme="dark"] .dl2-gfx .g-tile { fill: #222734; stroke: #3a4150; stroke-width: 2; }
.dl2-gfx .g-mark-base { fill: #eef0f4; }
.dl2-gfx .g-mark-lift { fill: #e8907c; }
.dl2-art-cap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 2px 14px 14px; font: 500 11.5px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dl2-art-cap span { text-align: center; }
.dl2-art-cap span:first-child { text-align: left; padding-left: 6%; }
.dl2-art-cap span:last-child { text-align: right; padding-right: 2%; }
.dl2-art-cap .mid { color: var(--accent-text); }

/* ---------- SmartScreen note ---------- */
.dl2-warn { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; max-width: 760px; margin: clamp(8px, 2vw, 18px) 0 0; padding: 16px 20px; border: 1.5px solid var(--border); border-left: 5px solid var(--accent); border-radius: 14px; background: var(--surface); }
.dl2-warn-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); }
.dl2-warn-ico svg { width: 20px; height: 20px; }
.dl2-warn p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.dl2-warn strong { color: var(--text); }

/* ---------- three steps ---------- */
.dl2-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: none; }
.dl2-step { position: relative; padding: 22px 22px 24px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); }
.dl2-num { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px; border-radius: 10px; background: var(--text); color: var(--bg); font: 500 15px/1 var(--font-mono); }
.dl2-step:first-child .dl2-num { background: var(--accent); color: var(--accent-fg); }
.dl2-step p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.58; }
/* a dashed link between the steps on wide screens */
.dl2-step + .dl2-step::before { content: ""; position: absolute; top: 38px; left: -15px; width: 16px; border-top: 2px dashed var(--border); }

/* ---------- three modes ---------- */
.dl2-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dl2-mode { padding: 22px 22px 24px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.dl2-mode:hover { border-color: var(--accent); box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 35%, transparent); }
.dl2-mode h3 span { margin-left: 6px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); font: 400 12px/1.5 var(--font-mono); letter-spacing: 0; color: var(--muted); vertical-align: 2px; }
.dl2-mode p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.58; }
.dl2-flow { display: block; width: 132px; height: 44px; margin-bottom: 18px; overflow: visible; }
.dl2-flow .f-pc { fill: none; stroke: var(--text); stroke-width: 2.2; }
.dl2-flow .f-arrow { fill: none; stroke-width: 2.4; }
.dl2-flow .f-arrow.on { stroke: var(--accent-text); }
.dl2-flow .f-arrow.off { stroke: var(--border); stroke-dasharray: 3 5; }
.dl2-flow .f-tile { fill: var(--text); stroke: none; }
.dl2-flow .f-lift { fill: var(--accent); stroke: none; }

/* ---------- built in ---------- */
.dl2-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; }
.dl2-feats li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; align-items: start; }
.dl2-ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--accent-text); }
.dl2-ico svg { width: 21px; height: 21px; }
.dl2-feats h3 { margin-top: 2px; font-size: 16.5px; }
.dl2-feats p { margin: 5px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* ---------- encryption ---------- */
.dl2-enc { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: clamp(56px, 8vw, 92px); padding: clamp(24px, 4vw, 36px); border: 1.5px solid var(--text); border-radius: 18px; background: var(--surface); box-shadow: 6px 6px 0 var(--border); }
.dl2-enc-ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); color: var(--accent-fg); }
.dl2-enc-ico svg { width: 24px; height: 24px; stroke-width: 2.2; }
.dl2-enc h2 { font-size: clamp(24px, 3vw, 32px); }
.dl2-enc p:not(.dl2-kicker) { margin: 12px 0 0; max-width: 44em; color: var(--muted); font-size: 15.5px; line-height: 1.62; }
.dl2-enc .dl2-enc-main { color: var(--text); }

/* ---------- questions (reuses .faq from landing.css) ---------- */
.dl2-faq { max-width: 800px; margin-top: 0; }
.dl2-faq summary { font-size: 16px; }
.dl2-faq details p { font-size: 15px; line-height: 1.6; }

/* ---------- closing ---------- */
.dl2-final { margin: clamp(56px, 8vw, 92px) 0 30px; padding: clamp(30px, 6vw, 54px) 24px; text-align: center; border: 1.5px solid var(--border); border-radius: 22px; background: var(--surface); }
.dl2-final h2 { margin-bottom: 10px; }
.dl2-final > p { margin: 0 auto; max-width: 32em; color: var(--muted); font-size: 16.5px; line-height: 1.6; }
.dl2-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; margin-top: 24px; }
.dl2-final .dl2-small { margin-top: 18px; font-size: 13.5px; }
.dl2-small a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .dl2-hero { grid-template-columns: minmax(0, 1fr); }
  .dl2-art { max-width: 560px; }
  .dl2-steps, .dl2-modes { grid-template-columns: minmax(0, 1fr); }
  .dl2-step + .dl2-step::before { top: -15px; left: 38px; width: 0; height: 16px; border-top: 0; border-left: 2px dashed var(--border); }
  .dl2-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl2-js .dl2-r { --d: 0s !important; }
}
@media (max-width: 560px) {
  .dl2-btn { width: 100%; }
  .dl2-feats { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .dl2-warn { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px; }
  .dl2-enc { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 22px; }
  .dl2-art-cap { font-size: 10px; letter-spacing: .03em; }
  .dl2-cta .btn { flex: 1 1 auto; }
}

/* ---------- reduced motion: everything just shows ---------- */
@media (prefers-reduced-motion: reduce) {
  .dl2-js .dl2-r { opacity: 1; transform: none; transition: none; }
  .dl2-gfx .g-up, .dl2-gfx .g-down { animation: none; }
}
