@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("./assets/fonts/regular-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("./assets/fonts/semibold-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --primary: #00298e;
  --accent: #008eb6;
  --heading: #333333;
  --body: #666666;
  --muted: #808080;
  --border: #e2e6ed;
  --action-light: #e9f4ff;
  --page: #e9f4ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--page);
}

body {
  position: relative;
  color: var(--heading);
  font-family:
    "IBM Plex Sans Arabic",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image: url("./assets/route-pattern.svg");
  background-position: calc(50% - 83px) 50%;
  background-repeat: repeat;
  background-size: 851px auto;
  content: "";
  opacity: 0.18;
  pointer-events: none;
}

a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 3px solid rgba(0, 142, 182, 0.35);
  outline-offset: 5px;
}

.download-page {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(36px, env(safe-area-inset-top)) clamp(20px, 5vw, 72px)
    max(36px, env(safe-area-inset-bottom));
}

.download-section {
  width: min(100%, 760px);
  text-align: center;
}

.brand-link {
  display: inline-block;
  border-radius: 8px;
}

.brand-link img {
  display: block;
  width: auto;
  height: clamp(48px, 5vw, 58px);
}

.eyebrow {
  margin: clamp(34px, 5vh, 48px) 0 0;
  color: var(--accent);
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 600;
  line-height: 1.4;
}

h1 {
  margin: 12px 0 0;
  color: var(--heading);
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.description {
  max-width: 620px;
  margin: clamp(18px, 2.5vh, 24px) auto 0;
  color: var(--body);
  font-size: clamp(16px, 1.65vw, 19px);
  line-height: 1.55;
  text-wrap: balance;
}

.store-links {
  margin-top: clamp(28px, 4vh, 38px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 14px;
}

.store-link {
  display: block;
  border-radius: 8px;
  transition: opacity 150ms ease;
}

.store-link:hover {
  opacity: 0.8;
}

.store-link img {
  display: block;
  width: auto;
  height: clamp(48px, 5vw, 54px);
}

#app-store-link img {
  width: auto;
}

#google-play-link img {
  width: auto;
}

.noscript-note {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 600px) {
  body::before {
    background-position: calc(50% - 70px) 50%;
    background-repeat: no-repeat;
    background-size: 720px auto;
    opacity: 0.2;
  }

  .download-page {
    padding-inline: max(20px, env(safe-area-inset-left))
      max(20px, env(safe-area-inset-right));
  }

  .brand-link img {
    height: 44px;
  }

  .eyebrow {
    margin-top: clamp(30px, 6vh, 40px);
  }

  h1 {
    font-size: clamp(40px, 12vw, 54px);
  }

  .description {
    font-size: 16px;
    line-height: 1.5;
  }
}

@media (max-width: 350px) {
  .store-links {
    flex-direction: column;
  }
}

@media (max-height: 680px) and (min-width: 351px) {
  .download-page {
    padding-block: max(24px, env(safe-area-inset-top))
      max(24px, env(safe-area-inset-bottom));
  }

  .eyebrow {
    margin-top: 24px;
  }

  .description {
    margin-top: 14px;
  }

  .store-links {
    margin-top: 22px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .download-section {
    max-width: 860px;
  }

  .brand-link img {
    height: 38px;
  }

  .eyebrow {
    margin-top: 16px;
    font-size: 13px;
  }

  h1 {
    margin-top: 6px;
    font-size: clamp(34px, 8vh, 44px);
  }

  .description {
    max-width: 680px;
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.4;
  }

  .store-links {
    margin-top: 16px;
  }

  .store-link img {
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
