
/* The COMING SOON sticker's two colours, defined ONCE for the page: the download buttons' ribbon and the plan card's
   (index.html's .px-soon) both read them, and the card is not inside .downloads. */
:root {
  --dl-accent: #f2c14e;
  --dl-accent-ink: #2a1d02;
}
.downloads {
  --dl-bg: #ffffff;
  --dl-ink: #1f1f1f;
  --dl-ink-2: #5e5e5e;
  --dl-line: rgba(0, 0, 0, 0.12);
  --dl-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 6px 18px -8px rgba(0, 0, 0, 0.25);
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  padding: 14px 4px 0;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .downloads {
    --dl-bg: #1a1d26;
    --dl-ink: #ececf0;
    --dl-ink-2: #a3a3ad;
    --dl-line: rgba(255, 255, 255, 0.12);
    --dl-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 22px -10px rgba(0, 0, 0, 0.8);
  }
}
html[data-theme="dark"] .downloads {
  --dl-bg: #1a1d26;
  --dl-ink: #ececf0;
  --dl-ink-2: #a3a3ad;
  --dl-line: rgba(255, 255, 255, 0.12);
  --dl-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 22px -10px rgba(0, 0, 0, 0.8);
}

.downloads__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.dl {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 196px;
  padding: 10px 18px 10px 14px;
  padding-inline: 14px 18px;
  border: 1px solid var(--dl-line);
  border-radius: 14px;
  background: var(--dl-bg);
  color: var(--dl-ink);
  box-shadow: var(--dl-shadow);
  font: inherit;
  text-align: start;
  cursor: pointer;
  filter: saturate(0.85);
  opacity: 0.88;
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.18s;
}
.dl:hover { transform: translateY(-2px) rotate(-0.6deg); opacity: 1; }
.dl:focus-visible { outline: 2px solid var(--dl-accent); outline-offset: 3px; }
.dl__glyph { width: 30px; height: 30px; flex: none; color: var(--dl-ink); }
.dl__text { display: flex; flex-direction: column; line-height: 1.15; }
.dl__small { font-size: 11px; color: var(--dl-ink-2); letter-spacing: 0.02em; }
.dl__big { font-size: 17px; font-weight: 600; }

.dl__ribbon {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%) rotate(-5deg);
  padding: 4px 16px;
  border-radius: 999px;
  background: var(--dl-accent);
  color: var(--dl-accent-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.dl__ribbon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: dl-shine 3.6s ease-in-out 1.2s infinite;
}
@keyframes dl-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.dl.dl--nope { animation: dl-nope 0.42s ease-in-out; }
@keyframes dl-nope {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px) rotate(-1.5deg); }
  45% { transform: translateX(4px) rotate(1deg); }
  70% { transform: translateX(-2px); }
}

.dl__status { margin: 10px 0 0; min-height: 1.3em; font-size: 13px; color: var(--dl-ink-2); text-align: center; }

@media (max-width: 480px) {
  .dl { min-width: 0; flex: 1 1 140px; }
  /* On a phone the buttons shrink, and the centred sticker reached over "Download for Mac". Here it sits
     above the row instead, its lowest corner just touching the buttons' top edge, clear of their words. */
  .downloads { padding-top: 30px; }
  .dl__ribbon { top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .dl, .dl:hover { transition: none; transform: none; }
  .dl.dl--nope { animation: none; }
  .dl__ribbon::after { animation: none; }
}

/* The Mac and Windows logos, each the same space from its words. Each logo's viewBox is cropped to its own
   ink (index.html), so its box holds no empty side; both inks are the same height, shown 26.25 px tall, and each
   width follows its ink. The gap from the ink to the words is 16 px in both boxes and both directions (Arabic too).
   These four rules override the 12-px gap and the 30-px glyph box above. */
.dl { gap: 16px; }
.dl__glyph { height: 26.25px; }
.dl__glyph--apple { width: 22.06px; }   /* 376.40 / 447.92 x 26.25 */
.dl__glyph--win { width: 26.25px; }     /* 448 / 448 x 26.25 */
