@font-face {
  font-family: "Cairo";
  src: url("assets/fonts/Cairo-Variable.ttf") format("truetype-variations");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #121212;
  --panel: #191817;
  --line: #2d2b28;
  --line-soft: #242220;
  --text: #e9e4dc;
  --muted: #a29b8c;
  --faint: #706a5e;
  --accent: #f04e0e;
  --shell: 1120px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.shell {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10;
  padding: 7px 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.micro {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.micro.accent {
  color: var(--accent);
}

.faint {
  color: var(--faint);
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  border-radius: 5px;
}

.hero {
  padding: 68px 0 72px;
}

.hero-copy {
  width: min(720px, 100%);
  margin-inline: auto;
  text-align: center;
}

.hero h1 {
  max-width: 12em;
  margin: 14px auto 18px;
  font-size: clamp(34px, 3.5vw, 46px);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.why-choose {
  max-width: 620px;
  margin: 28px auto 0;
  text-align: left;
}

.why-choose h2 {
  margin-bottom: 9px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.why-choose ul {
  list-style: none;
}

.why-choose li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: baseline;
  gap: 9px;
  color: var(--muted);
  font-size: 15px;
}

.why-choose li + li {
  margin-top: 6px;
}

.why-choose li::before {
  content: "";
  width: 10px;
  height: 2px;
  background: var(--accent);
  translate: 0 -3px;
}

.download-panel {
  margin-top: 30px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: left;
}

.download-panel > h2 {
  margin-bottom: 12px;
}

.download-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 67px;
  border: 1px solid var(--line);
}

.download-row + .download-row {
  border-top: 0;
}

.artifact {
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.artifact-label,
.artifact-meta,
.checksum {
  font-family: var(--mono);
  text-transform: uppercase;
}

.artifact-label {
  overflow: hidden;
  color: var(--text);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-meta {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.artifact-meta b {
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
}

.checksum {
  min-height: 52px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.checksum:hover {
  color: var(--accent);
}

.download-row:focus-within {
  box-shadow: inset 2px 0 0 var(--accent);
}

.download-row:focus-within .artifact {
  background: #1e1c1a;
}

.download-row:focus-within .artifact-label {
  color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .download-row:hover {
    box-shadow: inset 2px 0 0 var(--accent);
  }

  .download-row:hover .artifact {
    background: #1e1c1a;
  }

  .download-row:hover .artifact-label {
    color: var(--accent);
  }
}

.screenshots,
.details {
  padding: 64px 0 76px;
  border-top: 1px solid var(--line-soft);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.section-head > span {
  height: 1px;
  flex: 1;
  background: var(--line-soft);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--panel);
}

.screenshot-grid figure {
  min-width: 0;
  padding: 14px;
}

.screenshot-grid figure + figure {
  border-left: 1px solid var(--line);
}

.screenshot-grid figcaption {
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.screenshot-grid figcaption span {
  margin-right: 8px;
  color: var(--accent);
}

.screenshot-button {
  position: relative;
  width: 100%;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #0c0c0c;
  border: 1px solid var(--line);
  color: inherit;
  cursor: zoom-in;
}

.screenshot-button:hover,
.screenshot-button:focus-visible {
  border-color: var(--accent);
}

.screenshot-button img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.84 / 1;
  object-fit: cover;
}

.loupe-icon {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 30px;
  height: 30px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.loupe-icon::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--text);
  border-radius: 50%;
}

.loupe-icon::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 17px;
  width: 7px;
  height: 1px;
  background: var(--text);
  rotate: 45deg;
  transform-origin: left center;
}

.loupe {
  width: min(1500px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100% - 32px);
  padding: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
}

.loupe::backdrop {
  background: rgb(0 0 0 / 82%);
}

.loupe-toolbar {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.loupe-close,
.loupe-nav {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
}

.loupe-close:hover,
.loupe-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.loupe-close {
  min-height: 28px;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.loupe-stage {
  min-height: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #0b0b0b;
}

.loupe-stage img {
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
}

.loupe-nav {
  width: 42px;
  height: 64px;
  font-size: 20px;
}

.loupe-hint {
  min-height: 30px;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-list {
  border: 1px solid var(--line);
  background: var(--panel);
}

.detail-list > div {
  min-height: 62px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 24px;
}

.detail-list > div + div {
  border-top: 1px solid var(--line);
}

.detail-list dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-list dd {
  color: var(--text);
  font-size: 14px;
}

.detail-list [lang="ur"] {
  color: var(--accent);
  font-family: "Noto Nastaliq Urdu", serif;
  font-weight: 650;
  line-height: 1.9;
}

footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  border-top: 1px solid var(--line-soft);
}

.footer-brand {
  opacity: 0.7;
}

@media (max-width: 940px) {
  .hero-copy {
    max-width: 760px;
  }
}

@media (max-width: 700px) {
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .screenshot-grid figure + figure {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(var(--shell), calc(100% - 32px));
  }

  .topbar {
    min-height: 62px;
  }

  .hero {
    padding: 54px 0;
  }

  .hero h1 {
    font-size: 35px;
  }

  .artifact {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 2px;
  }

  .detail-list > div {
    grid-template-columns: 86px 1fr;
    gap: 14px;
  }

  .loupe-stage {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 6px;
    padding: 8px;
  }

  .loupe-nav {
    width: 32px;
    height: 54px;
  }
}
