@font-face {
  font-family: "Plex Arabic";
  src: url("/fonts/plex-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Arabic";
  src: url("/fonts/plex-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("/fonts/amiri-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* The app's own tokens: global.css and the native splash colour in app.json. */
:root {
  color-scheme: light;
  --door: #192c1f;
  --door-deep: #111f16;
  --door-text: #f7f1e6;
  --door-muted: #c3cabd;
  --gold-on-door: #d9bc85;
  --background: hsl(37 57% 97%);
  --foreground: hsl(60 6% 10%);
  --muted: hsl(132 4% 27%);
  --card: hsl(0 0% 100%);
  --border: hsl(38 29% 89%);
  --primary: hsl(145 30% 22.4%);
  --gold: hsl(38 52% 36%);
  --tint: hsl(37 31% 95%);
  --gutter: clamp(16px, 5vw, 56px);
  --measure: 680px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Plex Arabic", "Geeza Pro", "Noto Naskh Arabic", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.9;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

a {
  color: var(--primary);
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  font-family: "Amiri", "Geeza Pro", serif;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.latin {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -80px;
  padding: 8px 16px;
  background: var(--background);
  color: var(--foreground);
  z-index: 2;
}

.skip:focus {
  top: 16px;
}

/* The door: the app's icon and splash, opened to the width of the page. */
.door {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--door);
  color: var(--door-text);
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(72px, 10vw, 128px);
  text-align: center;
}

.door::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline: 0;
  top: 8%;
  height: 560px;
  background: radial-gradient(
    closest-side,
    rgb(233 178 104 / 0.2),
    rgb(233 178 104 / 0)
  );
  animation: dawn 2.4s ease-out both;
}

.arches {
  position: absolute;
  z-index: -1;
  width: min(1500px, 240vw);
  aspect-ratio: 1;
  top: -6%;
  left: 50%;
  transform: translateX(-50%);
  fill: none;
  stroke: var(--gold-on-door);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0.28;
  mask-image: linear-gradient(#000 45%, transparent 85%);
}

.arches path {
  stroke-dasharray: 1;
  animation: draw 2.2s cubic-bezier(0.5, 0, 0.1, 1) both;
}

.arches path:nth-child(2) {
  animation-delay: 0.15s;
}

.arches path:nth-child(3) {
  animation-delay: 0.3s;
}

.door-logo {
  width: min(380px, 82vw);
  margin: 0 auto;
  animation: rise 1.1s 0.2s ease-out both;
}

.door h1 {
  max-width: 18ch;
  margin: 12px auto 0;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  animation: rise 1s 0.45s ease-out both;
}

.door-lead {
  max-width: 48ch;
  margin: 20px auto 0;
  color: var(--door-muted);
  font-size: 1.15rem;
  animation: rise 1s 0.6s ease-out both;
}

.soon {
  display: inline-block;
  margin-top: 32px;
  padding: 6px 22px;
  border: 1px solid var(--gold-on-door);
  border-radius: 999px;
  color: var(--gold-on-door);
  font-size: 0.95rem;
  animation: rise 1s 0.75s ease-out both;
}

/* The logo's ornament, a thin line through a small diamond. */
.ornament {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(420px, 100%);
  margin-inline: auto;
  color: var(--gold);
}

.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.ornament span {
  width: 11px;
  height: 11px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.section {
  padding: clamp(64px, 9vw, 112px) var(--gutter);
}

.section-inner {
  max-width: 1040px;
  margin-inline: auto;
}

.kicker {
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--primary);
}

.section-lead {
  max-width: 54ch;
  margin-top: 12px;
  color: var(--muted);
}

/* What the app holds: each feature in a small door from the logo, with its icon from the app's tab bar. */
.niches {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  gap: 40px 56px;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

.niche {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
}

.niche svg {
  width: 56px;
  height: 72px;
}

.niche .arch {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
}

.niche .glyph {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.niche h3 {
  font-size: 1.4rem;
}

.niche p {
  margin-top: 4px;
  color: var(--muted);
}

.refusals {
  background: var(--tint);
  border-block: 1px solid var(--border);
}

.refusal-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

.refusal-list li {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 8px 40px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.refusal-list strong {
  font-family: "Amiri", "Geeza Pro", serif;
  font-size: 1.35rem;
  line-height: 1.5;
}

.refusal-list span {
  color: var(--muted);
}

.keep {
  background: var(--door);
  color: var(--door-text);
}

.keep .section-inner {
  max-width: 720px;
  text-align: center;
}

.keep h2 {
  margin-top: 28px;
  color: var(--door-text);
}

.keep-page {
  min-height: 100vh;
}

.keep p {
  margin-top: 16px;
  color: var(--door-muted);
}

.keep a {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 30px;
  border-radius: 999px;
  background: var(--gold-on-door);
  color: var(--door-deep);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.keep a:hover {
  background: var(--door-text);
}

.keep a:focus-visible {
  outline-color: var(--door-text);
}

.foot {
  padding: 32px var(--gutter);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.foot-inner {
  max-width: 1040px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* The privacy policy: a reading page under a small door. */
.lintel {
  background: var(--door);
  color: var(--door-text);
  padding: 12px var(--gutter);
}

.lintel-inner {
  max-width: var(--measure);
  margin-inline: auto;
}

.lintel a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--door-text);
  text-decoration: none;
  font-weight: 600;
}

.lintel img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.lintel a:focus-visible {
  outline-color: var(--gold-on-door);
}

.policy {
  max-width: var(--measure);
  margin-inline: auto;
  padding: clamp(32px, 6vw, 64px) var(--gutter) 88px;
  box-sizing: content-box;
  font-size: 1.125rem;
  line-height: 2;
}

.policy p {
  margin-top: 14px;
  text-wrap: pretty;
}

.policy h1 {
  font-size: clamp(2.2rem, 6vw, 3rem);
  color: var(--primary);
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
}

.policy .summary {
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: 14px;
  background: var(--door);
  color: var(--door-text);
  font-size: 1.2rem;
  line-height: 1.95;
}

.summary strong {
  color: var(--gold-on-door);
}

.toc-title {
  font-weight: 600;
}

.toc ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  columns: 2 240px;
  column-gap: 32px;
}

.toc li {
  margin: 0;
  break-inside: avoid;
}

.toc a {
  display: block;
  padding: 3px 0;
  font-size: 1rem;
}

.policy h2 {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: clamp(1.75rem, 4.5vw, 2.1rem);
  color: var(--primary);
  scroll-margin-top: 16px;
}

/* Every section of the policy is this one card: an optional title, then named rows. */
.card {
  margin-top: 20px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.card dl {
  margin: 0;
}

.card dt {
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.6;
}

.card dd {
  margin: 0;
}

.card dd + dt {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes dawn {
  from {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .refusal-list li {
    grid-template-columns: minmax(0, 1fr);
  }

  .card,
  .policy .summary {
    padding-inline: 18px;
  }
}

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

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