/* AMS Labs — site styles.
   Every colour is a custom property. Applying a real visual identity later
   means editing the two :root blocks below and nothing else. */

:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #17181a;
  --muted: #6b6e73;
  --border: #e5e4e0;
  --accent: #1f6f63;
  --accent-contrast: #ffffff;

  /* Overridden per App Page with that app's own colour. */
  --app-accent: var(--accent);

  --measure: 34rem;
  --gap: 1.5rem;
  --radius: 10px;

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Segoe UI", "Noto Naskh Arabic",
    "Geeza Pro", "Droid Arabic Naskh", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --surface: #1a1c20;
    --text: #edeef0;
    --muted: #9aa0a6;
    --border: #2a2d33;
    --accent: #7fcfc0;
    --accent-contrast: #10221f;
  }
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/fonts/ibm-plex-sans-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/fonts/ibm-plex-sans-arabic-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-arabic);
  font-size: 1.0625rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

[lang="en"] { font-family: var(--font-sans); }

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5rem;
}

/* Language blocks -------------------------------------------------------- */

.lang {
  padding-block: 2.5rem;
}
.lang + .lang {
  border-top: 1px solid var(--border);
}

/* Typography ------------------------------------------------------------- */

h1, h2, h3 {
  line-height: 1.3;
  font-weight: 600;
  margin: 0 0 0.75rem;
}
h1 { font-size: 1.9rem; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin-top: 2.25rem; }
h3 { font-size: 1.05rem; margin-top: 1.75rem; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

ul { padding-inline-start: 1.25rem; margin: 0 0 1.1rem; }
li { margin-bottom: 0.4rem; }

.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

/* Header and footer ------------------------------------------------------ */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.wordmark {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}
.wordmark::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--accent);
  margin-inline-end: 0.5rem;
}

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--muted);
}
.site-footer a { color: inherit; }

/* App list and App Page -------------------------------------------------- */

.app-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1rem;
}
.app-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}
.app-card:hover { border-color: var(--app-accent, var(--accent)); }
.app-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  flex: none;
  background: var(--bg);
}
.app-card__name { font-weight: 600; display: block; }
.app-card__tagline { color: var(--muted); font-size: 0.9375rem; }

.app-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.app-header__icon {
  width: 84px;
  height: 84px;
  border-radius: 19px;
  flex: none;
}
.app-header h1 { margin-bottom: 0.25rem; }

.store-link {
  display: inline-block;
  background: var(--app-accent);
  color: var(--accent-contrast);
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.screenshots {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin: 1.5rem 0;
}
.screenshots img {
  height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

@media (max-width: 30rem) {
  .page { padding-top: 2.5rem; }
  h1 { font-size: 1.6rem; }
  .app-header { gap: 1rem; }
  .app-header__icon { width: 64px; height: 64px; border-radius: 15px; }
}
