/* ==========================================================================
   Download page (site/download/index.html)
   Uses the shared tokens, base, components and animations stylesheets.
   ========================================================================== */

/* ---------- Header ---------- */
.dl-hdr { grid-template-columns: 1fr auto; }
.back {
  position: relative;
  text-decoration: none;
  opacity: .7;
  transition: opacity var(--dur-fast);
}
.back::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease);
}
.back:hover { opacity: 1; }
.back:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero ---------- */
.dl-hero {
  min-height: clamp(620px, 92vh, 900px);
  display: flex;
  align-items: center;
  padding: calc(var(--hdr-h) + var(--xl3)) 0 var(--xl3);
}
.dl-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--xl3);
  align-items: center;
}
.dl-copy { display: grid; gap: var(--md); justify-items: start; }
.eyebrow { font: 500 .75rem var(--mono); letter-spacing: 0; color: var(--mute); }
.dl-hero h1 {
  font-size: clamp(2.75rem, 6.4vw, 6rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  max-width: 11ch;
}
.dl-hero .sub {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.4;
  color: var(--mute);
  max-width: 38ch;
}

/* ---------- Download button ---------- */
.dl-action { display: grid; gap: var(--sm); justify-items: start; margin-top: var(--xs); }
.dl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 20px 30px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-size: 1.125rem;
  letter-spacing: -.03em;
  overflow: hidden;
  isolation: isolate;
  transition: transform .4s var(--ease-spring), box-shadow .4s var(--ease);
}
/* Light sweep on hover */
.dl-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .9s var(--ease);
  z-index: -1;
}
.dl-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5); }
.dl-btn:hover::before { transform: translateX(100%); }
.dl-btn:active { transform: scale(.97); transition-duration: .1s; }
.dl-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .5s var(--ease-spring);
}
.dl-btn:hover svg { transform: translateY(2px); }
.dl-btn.started svg { animation: dlBounce 1s var(--ease-in-out) 2; }
@keyframes dlBounce { 50% { transform: translateY(5px); } }

.meta { font: 500 .75rem var(--mono); letter-spacing: 0; color: var(--mute); }
.notice {
  max-width: 40ch;
  font-size: .875rem;
  line-height: 1.4;
  padding: 10px 14px;
  border-left: 2px solid var(--ink);
  background: var(--paper);
}

/* ---------- Installer preview ---------- */
.installer {
  --i-bg: #181818;
  --i-surf: #242424;
  --i-ink: #f2f2f2;
  --i-mut: #8a8a8a;
  --i-line: #343434;
  background: var(--i-bg);
  color: var(--i-ink);
  border: 1px solid var(--i-line);
  box-shadow: 0 50px 80px -40px rgba(0, 0, 0, .45);
  font-size: 13px;
  letter-spacing: 0;
}
.inst-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--i-surf);
  border-bottom: 1px solid var(--i-line);
  font: 500 12px var(--sans);
  color: var(--i-mut);
}
.inst-bar .mark { width: 24px; height: 14px; stroke-width: 3.4; color: var(--i-ink); }
.inst-body { padding: clamp(24px, 4vw, 44px); display: grid; gap: 22px; }

.inst-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.inst-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -.04em;
  color: var(--i-mut);
  opacity: .45;
  transition: opacity .5s var(--ease), color .5s var(--ease), transform .6s var(--ease-out);
}
.inst-steps li i {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  flex: none;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}
.inst-steps li.active { opacity: 1; color: var(--i-ink); transform: translateX(6px); }
.inst-steps li.active i { animation: instPulse 1s var(--ease-in-out) infinite; }
.inst-steps li.done { opacity: .9; color: var(--i-ink); }
.inst-steps li.done i { background: var(--i-ink); border-color: var(--i-ink); }
@keyframes instPulse { 50% { transform: scale(.7); } }

.inst-track { height: 3px; background: var(--i-surf); overflow: hidden; }
.inst-fill {
  height: 100%;
  background: var(--i-ink);
  transform-origin: left;
  transform: scaleX(0);
}
.inst-status { font: 500 11px var(--mono); color: var(--i-mut); min-height: 1.3em; }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--xl);
}
.steps li { border-top: 1px solid var(--rule); padding-top: var(--md); display: grid; gap: var(--sm); align-content: start; }
.steps .num { font: 500 .75rem var(--mono); letter-spacing: 0; color: var(--mute); }
.steps h3 { font-size: clamp(1.5rem, 2.4vw, 2.125rem); letter-spacing: -.045em; line-height: 1.1; }
.steps p { color: var(--mute); max-width: 32ch; line-height: 1.4; }
.steps code, .smartscreen code { font: 500 .8125rem var(--mono); letter-spacing: 0; color: var(--ink); }

.smartscreen {
  margin-top: var(--xl3);
  padding: var(--md);
  background: var(--paper);
  display: grid;
  gap: var(--xs);
  max-width: 720px;
}
.smartscreen h4 { font-size: 1rem; letter-spacing: -.02em; }
.smartscreen p { color: var(--mute); line-height: 1.45; }
.smartscreen strong { color: var(--ink); font-weight: 600; }

/* ---------- Footer ---------- */
.dl-foot { border-top: 1px solid var(--rule); padding: var(--md) 0 var(--xl); color: var(--mute); font-size: .75rem; }
.dl-foot .wrap { display: flex; justify-content: space-between; gap: var(--md); flex-wrap: wrap; }
.dl-foot a { text-decoration: none; }
.dl-foot a:hover { color: var(--ink); }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .dl-grid { grid-template-columns: 1fr; gap: var(--xl2); }
  .steps { grid-template-columns: 1fr; }
  .dl-btn { width: 100%; justify-content: center; }
  .dl-action { justify-items: stretch; width: 100%; }
}
