/**
 * download.css — download hero cascade, platform buttons, pricing cards.
 */

/* §3.1 load cascade: H1 → +100ms sub → +200ms buttons → +300ms requirements.
   Opacity/transform only; buttons remain clickable throughout. */
.dl-hero { text-align: center; padding-top: var(--space-12); }
@media (prefers-reduced-motion: no-preference) {
  .js .dl-cascade {
    opacity: 0;
    transform: translateY(12px);
  }
  .js .dl-in .dl-cascade {
    opacity: 1;
    transform: none;
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  }
  .js .dl-in .dl-cascade:nth-of-type(1) { transition-delay: 0ms; }
  .js .dl-in h1.dl-cascade { transition-delay: 0ms; }
  .js .dl-in .dl-hero__sub { transition-delay: 100ms; }
  .js .dl-in .dl-hero__buttons { transition-delay: 200ms; }
  .js .dl-in .trust-line { transition-delay: 300ms; }
}

.dl-hero__sub { color: var(--text-secondary); font-size: 1.125rem; margin-top: var(--space-4); }
.dl-hero__buttons {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  justify-content: center;
  margin-top: var(--space-8);
}
/* Narrow viewports: platform buttons stack as tidy equal-width rows
   instead of ballooning (ref buttonsize1.png → buttonsize2.png) */
@media (max-width: 30rem) {
  .dl-hero__buttons { flex-direction: column; align-items: stretch; margin-inline: auto; max-width: 22rem; }
}
.dl-hero .trust-line { margin-top: var(--space-6); }

/* OS detection: visitor's platform pre-highlighted (§3.1) — static, no motion */
.dl-btn.is-recommended { box-shadow: 0 0 0 2px var(--primary), 0 6px 16px rgba(var(--primary-rgb), 0.2); position: relative; }
.dl-btn .dl-for-you {
  position: absolute;
  top: calc(-1 * var(--space-3));
  left: 50%; translate: -50% -50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.75rem; font-weight: 550;
  border-radius: var(--radius-full);
  padding: 2px 10px;
  white-space: nowrap;
}

.dl-hero__note, .dl-hero__hint {
  margin-top: var(--space-5);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}
@media (prefers-reduced-motion: no-preference) {
  .dl-hero__hint { opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
  .dl-hero__hint.is-in { opacity: 1; }
}
.dl-hero__hint.is-error { color: var(--danger); }

/* §3.3 pricing cards */
.dl-pricing { padding-top: 0; }
.dl-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 24rem));
  gap: var(--space-6);
  justify-content: center;
  align-items: stretch;
}
@media (max-width: 48rem) { .dl-cards { grid-template-columns: 1fr; } }

.dl-card {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .dl-card:hover { transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
}
/* Emphasis is static design, not motion (§3.3) */
.dl-card--lifetime { border-color: var(--primary); border-width: 2px; }

.dl-badge {
  position: absolute;
  top: 0; right: var(--space-6);
  translate: 0 -50%;
  background: var(--primary);
  color: #1e1e1e; /* bright coral badge needs dark text */
  font-size: 0.75rem; font-weight: 600;
  border-radius: var(--radius-full);
  padding: 4px 12px;
}
/* Badge pop: once, 400ms after card reveal (download.js adds .pop) */
@media (prefers-reduced-motion: no-preference) {
  .js .dl-badge { scale: 0.9; opacity: 0; }
  .js .dl-badge.pop {
    scale: 1; opacity: 1;
    transition: scale 300ms var(--ease-out), opacity 300ms var(--ease-out);
  }
}

.dl-card h3 { margin-bottom: var(--space-4); }
.dl-price { margin-bottom: var(--space-4); color: var(--text-secondary); }
.dl-price__amount { font-size: 2.5rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.dl-list {
  list-style: none; padding: 0;
  display: grid; gap: var(--space-3);
  color: var(--text-secondary);
}
.dl-list li { padding-left: var(--space-6); position: relative; }
.dl-list li::before {
  content: "·";
  position: absolute; left: var(--space-2);
  color: var(--primary);
  font-weight: 700;
}
.dl-card .btn { margin-top: var(--space-6); width: 100%; }

.dl-legal { text-align: center; margin-top: var(--space-8); color: var(--text-secondary); font-size: 0.875rem; }

/* ==================== Prompt sets (add-on product) ====================
   A separate band BELOW the pricing cards, not a third card: the two-card grid
   is fixed at 2×24rem and squeezing a third column in would shrink the lifetime
   card, which is the page's primary conversion target. A distinct band also
   reads correctly — this is an optional extra, not a third plan to compare.

   The refund notice is deliberately part of the card, not fine print at the
   bottom of the page: a .json file loses its value the moment it is opened, so
   "no refunds" has to be visible BEFORE the buy button, not after. */
.dl-addon {
  margin-top: var(--space-10);
  max-width: 49rem;             /* matches the 2-card grid width (2×24rem + gap) */
  margin-inline: auto;
}
.dl-addon__card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
}
.dl-addon__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap;
  margin-bottom: var(--space-2);
}
.dl-addon__card h3 { margin: 0; }
.dl-addon__sub { color: var(--text-secondary); margin-bottom: var(--space-5); }
.dl-addon__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: end;
}
@media (max-width: 40rem) {
  .dl-addon__grid { grid-template-columns: 1fr; align-items: stretch; }
}
.dl-addon__buy { white-space: nowrap; }

/* Non-refundable notice — informational, not an error state. */
.dl-refund {
  display: flex; gap: var(--space-3);
  /* Sits ABOVE the buy button on purpose: a .json file cannot be un-read, so
     "no refunds" has to be read before the decision, not after it. */
  margin-block: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}
.dl-refund svg { flex: none; width: 1.125rem; height: 1.125rem; margin-top: 0.125rem; color: var(--primary); }
.dl-refund strong { color: var(--text-primary); }

/* "Coming soon" state: the checkout backend for a second product does not
   exist yet (the existing checkout Edge Function is hard-wired to one
   product id), so the button is disabled rather than pretending to work. */
.dl-addon__buy[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.dl-addon__soon {
  display: inline-block;
  margin-left: var(--space-2);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}


/* Pre-launch purchase lock (js/config.js PURCHASES_OPEN). The button stays
   clickable so it can explain itself, but looks and reads as unavailable. */
.dl-buy.is-soon,
.dl-buy[aria-disabled="true"],
.dl-btn.is-soon,
.dl-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}
