/* Shared look for the plain pages (install, privacy). */

:root {
  --ink: #2d2a32;
  --muted: #5a5660;
  --accent: #ca602f;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  background: #f6f1e6;
  overscroll-behavior-y: none;
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
}

html,
body {
  margin: 0;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Fraunces", "Markazi Text", Georgia, serif;
  font-weight: 500;
}

[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3 {
  letter-spacing: 0;
  line-height: 1.3;
}

/* one language shows at a time */
html[lang="en"] [data-l="ar"],
html[lang="ar"] [data-l="en"] {
  display: none;
}

/* top bar */

.nav {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 10;
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1040px;
  height: 60px;
  margin: 0 auto;
  padding: 0 10px 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 8px 24px -12px rgba(45, 42, 50, 0.18);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e1c24;
  font-family: "Outfit", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 6px -2px rgba(45, 42, 50, 0.3);
  transition: transform 0.15s ease, background-color 0.3s ease, box-shadow 0.35s ease;
}

.button:hover {
  background: #45414b;
  box-shadow: 0 0 22px 4px rgba(255, 170, 90, 0.5), 0 0 46px 10px rgba(255, 205, 120, 0.3);
}

.button:active {
  transform: scale(0.97);
}

.button svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.button.icon {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.button.icon:hover {
  background: rgba(45, 42, 50, 0.06);
  box-shadow: none;
}

.button.icon svg {
  width: 24px;
  height: 24px;
}

.button svg.stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.button.big {
  height: 52px;
  padding: 0 24px;
  font-size: 16px;
}

.button.big svg {
  width: 20px;
  height: 20px;
}

/* page head with the same moving color as the home page */

.head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 150px 24px 64px;
  text-align: center;
}

.head canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.head h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.head p {
  max-width: 34em;
  margin: 18px auto 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

/* page body */

.body {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.card {
  margin: 0 0 24px;
  padding: 32px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 12px 32px -18px rgba(45, 42, 50, 0.2);
}

.card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.01em;
}

.card h2 svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.card h3 {
  margin: 28px 0 8px;
  font-size: 22px;
}

.card p,
.card li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

[lang="ar"] .card p,
[lang="ar"] .card li {
  line-height: 1.9;
}

.card p {
  margin: 8px 0;
}

.card ul,
.card ol {
  margin: 8px 0;
  padding-inline-start: 22px;
}

.card li {
  margin: 6px 0;
}

.card b {
  color: var(--ink);
}

.card a {
  color: var(--accent);
  font-weight: 700;
}

.card .button {
  margin: 12px 0 4px;
  color: #fff;
}

.note {
  margin-top: 16px !important;
  padding: 14px 18px;
  border-radius: 16px;
  background: #fff0e6;
  color: #7a3d1c !important;
  font-size: 15px !important;
}

.updated {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  padding: 16px 16px 48px;
}

.footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--ink);
}

.footer svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (max-width: 640px) {
  .card {
    padding: 24px 20px;
  }

  .head {
    padding-top: 120px;
  }
}

/* the same tight nav as the home page on small phones */
@media (max-width: 720px) {
  .links .button {
    padding: 0 14px;
  }
}

/* small phones: the download button keeps only its icon */
@media (max-width: 480px) {
  .links .button:not(.icon) {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .links .button:not(.icon) span {
    display: none;
  }
}

@media (max-width: 420px) {
  .nav {
    padding-inline-start: 12px;
  }

  .brand {
    gap: 8px;
    font-size: 21px;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .links {
    gap: 2px;
  }

  .links .button.icon {
    width: 38px;
    height: 38px;
  }

  .links .button.icon svg {
    width: 21px;
    height: 21px;
  }
}

.card li ul {
  list-style-type: "-  ";
}

/* download buttons: arrow drops in, the button fills as it downloads, then a check */
.dl {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.dl-fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #e6e0d6;
  opacity: 0;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  transition: opacity 0.35s ease;
}

[dir="rtl"] .dl-fill {
  transform-origin: right;
}

.dl-glyph {
  display: none;
  fill: none !important;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.dl[data-phase] {
  justify-content: center;
}

.dl[data-phase] .dl-platform {
  display: none;
}

.dl[data-phase] .dl-glyph {
  display: block;
}

.dl[data-phase="loading"],
.dl[data-phase="loading"]:hover {
  background: #f3efe8;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(45, 42, 50, 0.08);
}

.dl[data-phase="loading"] .dl-fill {
  opacity: 1;
  transition: transform 0.25s ease;
}

.dl[data-phase="loading"] .dl-arrow {
  animation: drop 0.9s ease-in infinite;
}

.dl-check {
  stroke: #16a34a;
  stroke-dasharray: 12;
  stroke-dashoffset: 12;
  opacity: 0;
}

.dl[data-phase="done"],
.dl[data-phase="done"]:hover {
  background: #e3f2e7;
  color: #16a34a;
  box-shadow: none;
}

.dl[data-phase="done"] .dl-arrow {
  opacity: 0;
}

.dl[data-phase="done"] .dl-check {
  opacity: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s var(--ease) 0.08s, opacity 0.05s 0.08s;
}

.dl-text {
  display: inline-block;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

.dl-text > span {
  display: block;
}

.dl-text > span.swap {
  animation: swap 0.28s var(--ease);
}

@keyframes drop {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }
  25%,
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(1.5px);
  }
}

@keyframes swap {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(100%);
  }
}


@media (prefers-reduced-motion: reduce) {
  .dl-arrow,
  .dl-text > span.swap {
    animation: none !important;
  }
}

[data-theme="dark"] .moon,
:root:not([data-theme="dark"]) .sun {
  display: none;
}

/* dark mode */

:root[data-theme="dark"] {
  --ink: #f1ece4;
  --muted: #aaa4b0;
  --accent: #f08a5d;
  color-scheme: dark;
}

html[data-theme="dark"] {
  background: #17151b;
}

[data-theme="dark"] .nav {
  background: rgba(32, 29, 37, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .brand {
  color: var(--ink);
}

[data-theme="dark"] .button,
[data-theme="dark"] .card .button {
  color: #17151b;
}

[data-theme="dark"] .button:hover {
  background: #fff;
}

[data-theme="dark"] .button.icon {
  color: var(--ink);
}

[data-theme="dark"] .button.icon:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .card {
  background: rgba(40, 37, 45, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px -18px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .note {
  background: #3a2820;
  color: #f3c3a6 !important;
}

[data-theme="dark"] .dl-fill {
  background: #3a3640;
}

[data-theme="dark"] .dl[data-phase="loading"],
[data-theme="dark"] .dl[data-phase="loading"]:hover {
  background: #2a2730;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .dl[data-phase="done"],
[data-theme="dark"] .dl[data-phase="done"]:hover {
  background: #1d3325;
  color: #4ade80;
}

[data-theme="dark"] .dl-check {
  stroke: #4ade80;
}
