/* Clash Esports: the app download page (download/, js/download.js). Opened from a WhatsApp link, mostly on a phone:
   the whole logo (2:3, never cropped), a title, one line, then two big glass buttons (iPhone, Android). The button of
   the visitor's own phone is the white one; colour only as a small edge (blue, red: the two team colours). Calm: only
   a 0.6 s fade on hover / press. Works from 320 px up; logical properties for Arabic. */

.dl-page {
  --dl-glass: rgba(255, 255, 255, 0.045);
  --dl-line: rgba(255, 255, 255, 0.09);
  --dl-line-2: rgba(255, 255, 255, 0.16);
  --dl-faint: #7c7c85;
  --dl-t: 0.6s;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(70rem 30rem at 50% -12rem, rgba(31, 107, 255, 0.07), transparent 70%),
    radial-gradient(50rem 26rem at 50% 115%, rgba(229, 35, 47, 0.05), transparent 70%),
    var(--bg);
}

/* ---------- header: the word (the whole logo is on the card), the language switch ---------- */
.dl-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + var(--safe-top)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  max-width: 560px; width: 100%; margin: 0 auto;
}
.dl-brand { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.04em; line-height: 1; }
.dl-lang { border: 1px solid var(--dl-line); border-radius: 12px; min-width: 48px; min-height: 44px; }

/* ---------- the card ---------- */
.dl-main { flex: 1 0 auto; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 32px; display: flex; flex-direction: column; justify-content: center; }
.dl-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--dl-glass);
  border: 1px solid var(--dl-line);
  border-radius: 22px;
  padding: clamp(24px, 6vw, 44px) clamp(18px, 5vw, 40px);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -30px rgba(0, 0, 0, 0.8);
}
/* the whole logo, horns to wordmark, at its real 2:3 */
.dl-logo { width: 112px; height: 168px; object-fit: contain; flex: none; }
.dl-title { margin-top: 20px; font-weight: 800; font-size: clamp(1.625rem, 1.25rem + 1.8vw, 2.125rem); line-height: 1.25; text-wrap: balance; }
html[lang="en"] .dl-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 1.5rem + 2.4vw, 2.625rem); line-height: 1.1; letter-spacing: 0.005em; }
.dl-lead { margin-top: 8px; color: var(--muted); font-size: 1.0625rem; line-height: 1.6; }

/* ---------- the two store buttons ---------- */
.dl-stores { display: grid; gap: 12px; width: 100%; margin-top: 28px; }
.dl-store {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 76px; padding: 12px 18px; text-align: start; text-decoration: none;
  background: rgba(255, 255, 255, 0.05); color: var(--ink);
  border: 1px solid var(--dl-line-2); border-radius: 18px;
  transition: background-color var(--dl-t) ease, border-color var(--dl-t) ease, color var(--dl-t) ease, opacity var(--dl-t) ease;
}
/* the small colour edge on the start side */
.dl-store::before { content: ""; position: absolute; inset-block: 18px; inset-inline-start: -1px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue-strong); }
html[dir="rtl"] .dl-store::before { border-radius: 3px 0 0 3px; }
.dl-store.is-android::before { background: var(--red-strong); }
.dl-glyph { flex: none; width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dl-glyph circle { fill: currentColor; stroke: none; }
.dl-words { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; flex: 1 1 auto; }
.dl-what { flex: 0 0 100%; font-weight: 800; font-size: 1.125rem; line-height: 1.3; }
.dl-where { font-size: 0.875rem; line-height: 1.3; color: var(--muted); transition: color var(--dl-t) ease; }
.dl-go { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
html[dir="rtl"] .dl-go { transform: scaleX(-1); }
.dl-soon { flex: none; margin-block: 2px; padding: 2px 10px; border: 1px solid var(--dl-line-2); border-radius: 999px; font-size: 0.8125rem; font-weight: 600; line-height: 1.4; color: var(--muted); white-space: nowrap; }

/* the white primary button: the visitor's own phone */
.dl-store.is-main { background: var(--ink); color: #0b0b0d; border-color: var(--ink); }
.dl-store.is-main::before { content: none; }
.dl-store.is-main .dl-where { color: #4a4a52; }
.dl-store.is-main .dl-go { opacity: 0.7; }

/* not in the store yet: calm, not a link */
.dl-store.is-soon { cursor: default; background: rgba(255, 255, 255, 0.025); border-color: var(--dl-line); color: var(--muted); }
.dl-store.is-soon::before { opacity: 0.45; }
.dl-store.is-soon .dl-where { color: var(--dl-faint); }
.dl-store.is-soon .dl-go { display: none; }

.dl-store:not(.is-soon):active { opacity: 0.8; }
@media (hover: hover) and (pointer: fine) {
  .dl-store:not(.is-soon):not(.is-main):hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.4); }
  .dl-store.is-main:hover { background: #ffffff; }
}

/* ---------- under the buttons ---------- */
.dl-member { margin-top: 24px; max-width: 34ch; color: var(--muted); font-size: 0.9375rem; line-height: 1.65; text-wrap: balance; }
.dl-home { margin-top: 8px; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-size: 0.9375rem; font-weight: 600; text-underline-offset: 4px; transition: color var(--dl-t) ease; }
@media (hover: hover) and (pointer: fine) { .dl-home:hover { color: var(--ink); } }

/* ---------- footer ---------- */
.dl-foot { max-width: 560px; width: 100%; margin: 0 auto; padding: 8px 16px calc(24px + var(--safe-bottom)); text-align: center; color: var(--muted); font-size: 0.8125rem; line-height: 1.7; }
.dl-foot a { color: inherit; text-underline-offset: 3px; }
.dl-legal { opacity: 0.75; }

@media (max-width: 359px) {
  .dl-store { gap: 10px; padding: 12px 14px; }
  .dl-glyph { width: 30px; height: 30px; }
  .dl-what { font-size: 1rem; }
}
