/* ============================================
   Aurora — Download Page Styles
   ============================================ */

.download-hero {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.download-hero__title {
  font-size: var(--text-hero-desktop);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: var(--space-6);
  letter-spacing: 0;
}

.download-hero__subtitle {
  font-size: var(--text-hero-body-desktop);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

.download-hero__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.download-hero__help {
  margin: var(--space-3) 0 0;
  font-size: var(--text-small);
  color: var(--text-muted);
}

.download-hero__help a {
  color: var(--accent-green);
  font-weight: 600;
  text-decoration: none;
}

.download-hero__help a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.download-sysreq {
  max-width: 600px;
  margin: var(--space-12) auto 0;
  background: var(--surface-dark);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: var(--space-8);
}

.download-sysreq__title {
  font-family: var(--font-heading);
  font-size: var(--text-card-title);
  font-weight: 600;
  margin-bottom: var(--space-5);
}

.download-sysreq__row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: var(--text-small);
}

.download-sysreq__row:last-child {
  border-bottom: none;
}

.download-sysreq__label {
  color: var(--text-muted);
}

.download-sysreq__value {
  color: var(--text-secondary);
  font-weight: 500;
}

.download-sysreq__value--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.download-compat {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: var(--fill-glass);
  overflow: hidden;
}

.download-compat__row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(120px, 0.6fr) minmax(260px, 1.7fr);
  gap: var(--space-4);
  align-items: center;
  padding: 15px var(--space-5);
  border-top: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: var(--text-small);
  line-height: 1.45;
}

.download-compat__row:first-child {
  border-top: 0;
}

.download-compat__row > span:first-child {
  color: var(--text-primary);
  font-weight: 600;
}

.download-compat__row--head {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.download-compat__row--head > span:first-child {
  color: var(--text-muted);
}

.download-compat__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.22);
  color: var(--accent-green);
  font-size: 12px;
  line-height: 1;
}

.download-compat__badge--pro {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
}

[data-theme="light"] .download-compat__row--head {
  background: rgba(255, 255, 255, 0.5);
}

.download-steps {
  max-width: 700px;
  margin: 0 auto;
  counter-reset: step-counter;
}

.download-step {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border-soft);
  counter-increment: step-counter;
  /* Install-step initial state: invisible, slightly lifted */
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease-out, ease-out),
              transform 0.65s cubic-bezier(.22,.8,.3,1);
}

.download-step.is-active {
  opacity: 1;
  transform: translateY(0);
}

.download-step:last-child {
  border-bottom: none;
}

.download-step__number {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fill-glass-strong);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--accent-green);
  overflow: visible;
}

.download-step__digit {
  position: relative;
  z-index: 2;
  transition: transform 0.45s cubic-bezier(.22,.8,.3,1);
}

.download-step.is-active .download-step__digit {
  animation: install-digit-pop 0.55s cubic-bezier(.22,.8,.3,1) both;
}

@keyframes install-digit-pop {
  0%   { transform: scale(0.7); opacity: 0; }
  55%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

/* Gradient ring that strokes in as the step activates */
.download-step__ring {
  position: absolute;
  inset: -3px;
  z-index: 1;
  pointer-events: none;
  display: block;
}

.download-step__ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.download-step__ring circle {
  fill: none;
  stroke: url(#aurora-install-gradient, var(--accent-green));
  stroke: var(--accent-green);
  stroke-width: 2;
  stroke-linecap: round;
  /* Circumference for r=18: ~113.1 */
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.35));
  transition: stroke-dashoffset 1s cubic-bezier(.22,.8,.3,1);
}

.download-step.is-active .download-step__ring circle {
  stroke-dashoffset: 0;
}

.download-step__text {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.5;
  padding-top: var(--space-2);
}

.download-install-help {
  scroll-margin-top: 96px;
  max-width: 760px;
  margin: var(--space-8) auto 0;
  padding: var(--space-6);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: var(--radius-card-sm);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(56, 189, 248, 0.05)),
    var(--fill-glass);
  text-align: left;
}

.download-install-help__title {
  font-family: var(--font-heading);
  font-size: var(--text-card-title);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.download-install-help__body {
  color: var(--text-secondary);
  font-size: var(--text-small);
  line-height: 1.6;
  margin: 0;
}

.download-install-help__checks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.download-install-help__checks span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.2;
}

.download-install-help__link {
  display: inline-flex;
  margin-top: var(--space-4);
  color: var(--accent-green);
  font-size: var(--text-small);
  font-weight: 700;
  text-decoration: none;
}

.download-install-help__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .download-step {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .download-step__ring circle {
    stroke-dashoffset: 0;
    transition: none;
  }
  .download-step.is-active .download-step__digit {
    animation: none;
  }
}

.download-permissions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.download-perm {
  background: var(--surface-dark);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: var(--space-6);
}

.download-perm__mock {
  position: relative;
  min-height: 118px;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-card-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(8, 12, 18, 0.42);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.download-perm__mock-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}

.download-perm__mock-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.download-perm__mock-path {
  padding: 12px 12px 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.download-perm__mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 12px 12px;
  padding: 10px 10px;
  border-radius: var(--radius-button-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
}

.download-perm__toggle {
  position: relative;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent-green);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.28);
}

.download-perm__toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #06110d;
}

[data-theme="light"] .download-perm__mock {
  background: rgba(255, 255, 255, 0.72);
}

[data-theme="light"] .download-perm__mock-row {
  background: rgba(10, 12, 18, 0.05);
}

.download-perm__title {
  font-family: var(--font-heading);
  font-size: var(--text-card-title);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.download-perm__body {
  font-size: var(--text-small);
  color: var(--text-secondary);
  line-height: 1.55;
}

@media (min-width: 1024px) {
  .download-guidance {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    gap: var(--space-5);
  }
}
@media (max-width: 1023px) {
.download-guidance {
  margin: 0 auto;
}
}


.download-guidance__card {
  background: var(--fill-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card-sm);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}

.download-guidance__title {
  font-family: var(--font-heading);
  font-size: var(--text-card-title);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.download-guidance__body {
  font-size: var(--text-small);
  color: var(--text-secondary);
  line-height: 1.55;
}

@media (max-width: 1024px) {
  .download-hero__title {
    font-size: var(--text-hero-tablet);
  }

  .download-permissions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .download-hero__title {
    font-size: var(--text-hero-mobile);
  }

  .download-hero__subtitle {
    font-size: var(--text-hero-body-mobile);
  }

  .download-permissions {
    grid-template-columns: 1fr;
  }

  .download-compat__row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: var(--space-4);
  }

  .download-compat__row--head {
    display: none;
  }

  /* .download-hero__actions mobile layout is handled by the
     shared .dual-cta component — no page-specific override needed */
}
