/* NIDD download site. Brand: saffron on warm graphite, Readex Pro (Arabic + Latin) */

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url("/fonts/readex-pro-arabic-wght-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url("/fonts/readex-pro-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark light;
  --bg: #0E0D0B;
  --surface: #151412;
  --surface-2: #1B1A17;
  --line: #2A2724;
  --line-strong: #3A3631;
  --text: #F2EDE4;
  --muted: #B4ACA0;
  --faint: #8A8378;
  --accent: #F2A33A;
  --accent-hover: #F7B456;
  --accent-text: #F2A33A;
  --accent-soft: rgba(242, 163, 58, 0.14);
  --on-accent: #1F1404;
  --wordmark: #F2A33A;
  --mark-a: #F2A33A;
  --mark-b: #F6E7C8;
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Readex Pro", system-ui, "Segoe UI", Tahoma, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F2EDE4;
    --surface: #FBF8F3;
    --surface-2: #ECE5D9;
    --line: #E0D8CB;
    --line-strong: #CFC5B5;
    --text: #1B1A17;
    --muted: #4F4940;
    --faint: #6E665B;
    --accent-text: #8A5209;
    --accent-soft: rgba(242, 163, 58, 0.2);
    --wordmark: #B86E10;
    --mark-b: #1B1A17;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* keep section titles clear of the sticky top bar */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.75 var(--font);
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.3;
}

h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
}

h3 {
  font-size: 19px;
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: var(--accent-text);
}

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

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Mark: two identical halves, each the other turned 180° */
.mark-a,
.mark-b {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark-a {
  stroke: var(--mark-a);
}

.mark-b {
  stroke: var(--mark-b);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 600 15px/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--faint);
}

/* Top bar: sign in to the web app */
.btn-login .icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

[dir="rtl"] .btn-login .icon {
  transform: scaleX(-1);
}

.btn-lg {
  min-height: 54px;
  padding: 0 26px;
  border-radius: 14px;
  font-size: 16px;
}

.btn-sub {
  font-weight: 400;
  opacity: 0.8;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand .mark {
  width: 32px;
  height: 32px;
}

.wordmark {
  color: var(--wordmark);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}

.topnav {
  display: flex;
  gap: 24px;
  margin-inline-start: auto;
}

.topnav a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.topnav a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding-block: 72px 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(42px, 6.4vw, 76px);
  font-weight: 700;
  line-height: 1.15;
}

.hero h1 .accent {
  color: var(--accent-text);
}

.lede {
  max-width: 34em;
  margin-top: 22px;
  color: var(--muted);
  font-size: 19px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 15px;
}

.hero-art {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: var(--surface);
  overflow: hidden;
}

.rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rings circle {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 0.4;
  transform-origin: 50px 50px;
  animation: ring 4.5s ease-out infinite;
}

.rings circle:nth-child(2) {
  animation-delay: 1.5s;
}

.rings circle:nth-child(3) {
  animation-delay: 3s;
}

@keyframes ring {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

.hero-mark {
  position: absolute;
  inset: 26%;
  width: 48%;
  height: 48%;
  overflow: visible;
}

.half-a {
  animation: meet-a 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.half-b {
  animation: meet-b 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes meet-a {
  from {
    transform: translate(-14px, -14px);
    opacity: 0;
  }
}

@keyframes meet-b {
  from {
    transform: translate(14px, 14px);
    opacity: 0;
  }
}

/* Ping comparison */
.ping {
  padding-block: 56px;
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.ping-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
}

.ping-copy p {
  margin-top: 12px;
  color: var(--muted);
}

.bars {
  display: grid;
  gap: 18px;
  margin: 0;
}

.bar-row {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr) 5.5rem;
  gap: 16px;
  align-items: center;
}

.bar-label {
  font-size: 15px;
  font-weight: 500;
}

.bar {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bar-riyadh {
  width: 11.8%; /* 10 of 85 ms */
  background: var(--accent);
}

.bar-abroad {
  width: 100%;
  background: var(--faint);
}

.bar-value {
  font-weight: 600;
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.bars-note {
  color: var(--faint);
  font-size: 14px;
}

/* Features */
.features {
  padding-block: 88px 72px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15.5px;
}

.icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature .icon {
  margin-bottom: 14px;
}

/* Name meaning */
.meaning {
  padding-block: 24px 72px;
}

.meaning-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
}

.meaning-mark {
  width: 120px;
  height: 120px;
}

.meaning p {
  max-width: 40em;
  margin-top: 10px;
  color: var(--muted);
  font-size: 18px;
}

/* Downloads */
.download {
  padding-block: 72px;
  border-top: 1px solid var(--line);
}

.section-lede {
  margin-top: 8px;
  color: var(--muted);
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.dl-card.is-yours {
  order: -1;
  border-color: var(--accent);
}

.dl-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  margin-inline-start: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
}

.dl-req {
  color: var(--muted);
  font-size: 15px;
}

.dl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.soon {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--faint);
  font-size: 15px;
  font-weight: 500;
}

.dl-meta {
  color: var(--faint);
  font-size: 13.5px;
}

/* App store buttons before the apps are published */
.store-btn[aria-disabled="true"] {
  border-style: dashed;
  color: var(--faint);
  cursor: default;
}

.dl-note {
  color: var(--muted);
  font-size: 14px;
}

.dl-note a {
  color: var(--accent-text);
}

/* FAQ */
.faq {
  padding-block: 72px 88px;
  border-top: 1px solid var(--line);
}

.faq-wrap {
  max-width: 820px;
}

.faq h2 {
  margin-bottom: 20px;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  font-size: 18px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex-shrink: 0;
  color: var(--accent-text);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding-bottom: 14px;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 16px;
  padding-inline-start: 1.2em;
  color: var(--muted);
}

.faq-list b {
  color: var(--text);
  font-weight: 600;
}

.faq pre {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow-x: auto;
  text-align: left;
}

.faq code {
  font: 14px/1.5 var(--mono);
}

/* Plans and prices */
.plans {
  padding-block: 72px 80px;
  border-top: 1px solid var(--line);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.plan-top {
  border-color: var(--accent);
}

.plan-price {
  color: var(--accent-text);
  font-size: 18px;
  font-weight: 600;
}

.plan-price b {
  font-size: 28px;
  font-weight: 700;
}

.plan-alt {
  color: var(--faint);
  font-size: 14px;
}

.plan-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15.5px;
}

.plan-list li {
  position: relative;
  padding-inline-start: 26px;
}

.plan-list li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent-text);
  font-weight: 700;
}

.plans-note {
  margin-top: 20px;
  color: var(--faint);
  font-size: 14px;
}

/* Policy pages (terms, refund, privacy) */
.legal {
  padding-block: 56px 88px;
}

.legal-wrap {
  max-width: 820px;
}

.legal h1 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
}

.legal-updated {
  margin-top: 8px;
  color: var(--faint);
  font-size: 14px;
}

.legal h2 {
  margin: 36px 0 10px;
  font-size: 22px;
  font-weight: 600;
}

.legal p,
.legal li {
  color: var(--muted);
}

.legal-updated + p {
  margin-top: 24px;
}

.legal p + p,
.legal ul + p,
.legal p + ul {
  margin-top: 10px;
}

.legal ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-inline-start: 1.3em;
}

.legal b {
  color: var(--text);
  font-weight: 600;
}

/* Footer */
.footer {
  padding-block: 32px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.brand-sm .mark {
  width: 24px;
  height: 24px;
}

.brand-sm .wordmark {
  font-size: 22px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-inline-start: auto;
}

.footer-contact {
  flex-basis: 100%;
}

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

/* Layout below tablet width */
@media (max-width: 880px) {
  .hero {
    padding-block: 44px 48px;
  }

  .hero-grid,
  .ping-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-art {
    max-width: 260px;
    border-radius: 32px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .topnav {
    display: none;
  }

  .topbar-inner {
    justify-content: space-between;
  }

  .lede {
    font-size: 17px;
  }

  .cta .btn {
    flex: 1 1 100%;
  }

  .bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
  }

  .bar-label {
    grid-column: 1 / -1;
  }

  .meaning-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px;
  }

  .meaning-mark {
    width: 84px;
    height: 84px;
  }

  .footer-nav {
    margin-inline-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Windows notice: shown when the Windows installer is downloaded (Smart App
   Control blocks unsigned apps until NIDD is code signed) */
.dl-warn {
  margin: 0;
}

.notice {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  overflow-y: auto;
}

.notice::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.notice-body {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.notice-body h2 {
  margin: 0;
  font-size: 21px;
}

.notice-body p {
  margin: 0;
  color: var(--muted);
}

.notice-body b {
  color: var(--text);
  font-weight: 600;
}

.notice-path {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text) !important;
  text-align: left;
  font-size: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.notice-path b {
  color: var(--accent-text) !important;
}

.faq details .notice-path {
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.notice-small {
  font-size: 13px;
}

.notice-body .btn {
  justify-self: start;
  min-width: 120px;
}
