/* Plymo's shared-title page: the app's own title page on the web, in its
   colours (the icon's near-black, cream and green; no purple). */
@font-face {
  font-family: 'Tajawal';
  src: url('fonts/Tajawal-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('fonts/Tajawal-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --page: #101214;
  --card: #1d2023;
  --card-high: #26292d;
  --line: rgba(247, 243, 234, .08);
  --text: #f7f3ea;
  --muted: #a9aeb1;
  --green: #22c77a;
  --on-green: #06281a;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--page);
  color: var(--text);
  font-family: 'Tajawal', -apple-system, 'SF Pro Text', system-ui, sans-serif;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.backdrop {
  position: absolute;
  inset: 0 0 auto 0;
  height: 300px;
  background: center / cover no-repeat;
  opacity: 0;
  transition: opacity .5s ease;
}
.backdrop.shown { opacity: 1; }
.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(16, 18, 20, .45) 0%,
    rgba(16, 18, 20, 0) 30%,
    rgba(16, 18, 20, .15) 55%,
    var(--page) 100%
  );
}

.shell {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(16px, env(safe-area-inset-top)) 0 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .2px;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  /* The poster climbs 44 points into the picture, as in the app, and the
     name starts on the picture's solid foot. */
  margin-top: 206px;
}

.poster {
  flex: 0 0 124px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: var(--card) center / cover no-repeat;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
}

.words { flex: 1; min-width: 0; padding-top: 34px; }

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.facts {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
  height: 30px;
  margin-top: 14px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--card-high);
  font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
}
.score img { height: 13.5px; }

.synopsis {
  margin: 22px 0 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.75;
  white-space: pre-line;
}

.actions { display: grid; gap: 10px; margin-top: 22px; }

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  border-radius: 16px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}
.button.primary { background: var(--green); color: var(--on-green); }
.button.primary:active { filter: brightness(.92); }
/* Apple's badge as Apple draws it, at the buttons' height, with room
   around it. */
.store { display: flex; justify-content: center; padding: 6px 0; }
.store img { display: block; height: 54px; width: auto; }
.button svg { width: 20px; height: 20px; }

.pitch {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
  color: #6f7478;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
footer img { height: 11px; flex: none; }

/* While the title is read, grey shapes stand where it will be. */
.loading .poster,
.loading h1,
.loading .facts,
.loading .synopsis {
  background: var(--card);
  color: transparent;
  animation: breathe 1.4s ease-in-out infinite;
}
.loading h1 { width: 70%; height: 30px; border-radius: 8px; }
.loading .facts { width: 90%; height: 18px; border-radius: 6px; }
.loading .synopsis { height: 132px; }
@keyframes breathe { 50% { opacity: .55; } }

.problem { margin-top: 200px; text-align: center; }
.problem p { color: var(--muted); font-size: 16px; line-height: 1.7; }
.problem button {
  margin-top: 12px;
  padding: 0 22px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: var(--card-high);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .backdrop { transition: none; }
  .loading * { animation: none !important; }
}

/* The site's front page: the icon, the name and what the app does. */
.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}
.home-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.home h1 { margin-top: 18px; font-size: 30px; }
.home .pitch { max-width: 360px; margin-top: 12px; }
.home .actions { width: 100%; max-width: 360px; margin-top: 26px; }

/* The privacy, terms and support pages: a readable document in Arabic,
   then the same in English below it. */
.doc { max-width: 720px; }
.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 4px;
}
.doc-nav a {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.doc-nav a[aria-current="page"] { background: var(--green); color: var(--on-green); font-weight: 700; }
.doc article { padding: 4px 0 28px; }
.doc article + article { border-top: 1px solid var(--line); padding-top: 24px; }
.doc h1 { font-size: 28px; margin: 18px 0 4px; }
.doc h2 { font-size: 19px; margin: 28px 0 8px; }
.doc p, .doc li { font-size: 16px; line-height: 1.9; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-inline-start: 22px; }
.doc li { margin: 4px 0; }
.doc a { color: var(--green); }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.doc .contact { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
