/* Hallmark · macrostructure: link-in-bio column (bespoke, brand-locked) · tone: warm, local, quietly crafted · anchor hue: Dahab sea 208
 * theme: custom from the Yalla Sinai brand book (sea #087F8C · coral #EF795E · deep ink #17282B · pale sand #E8D5B7 · coastal white #FAF8F3)
 * type: Manrope (Latin, Cyrillic) + Tajawal (Arabic) · signature: Bedouin weave band, a rule drawn from its tick-and-coral row, cross-stitch field beside the column
 * pre-emit critique: P5 H4 E4 S5 R4 V4
 */

/* ---------- Fonts (local, subset) ---------- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-201F, U+2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-cyrillic.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/tajawal-ar-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/tajawal-ar-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/tajawal-ar-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* Brand primitives (brand book, section 06) */
  --sea: #087f8c;
  --sea-deep: #066c77;
  --sea-text: #0a6670;
  --coral: #ef795e;
  --sand: #e8d5b7;
  --paper: #faf8f3;
  --ink: #17282b;

  /* Semantic colours, light */
  --color-field: #efe5d3;
  --color-surface: #f7f3ea;
  --color-raised: #fdfbf6;
  --color-text: var(--ink);
  --color-muted: #55666a;
  --color-line: rgba(23, 40, 43, 0.11);
  --color-line-strong: rgba(23, 40, 43, 0.28);
  --color-mast: var(--sea);
  --color-mast-title: var(--sand);
  --color-mast-text: #fffdf9;
  --color-mast-line: rgba(255, 253, 249, 0.42);
  --color-chip: var(--sand);
  --color-on-chip: var(--ink);
  --color-primary: var(--ink);
  --color-on-primary: var(--paper);
  --color-on-primary-soft: var(--sand);
  --color-glyph-bg: #e1eeed;
  --color-glyph: var(--sea-text);
  --color-accent: var(--coral);
  --color-on-accent: var(--ink);
  --color-stitch: #cdb994;
  --color-focus: var(--sea-text);
  --color-focus-on-mast: var(--paper);
  --color-menu: #fffdf9;
  --field-image: url("../img/patterns/field-light.svg");
  --shadow-card: 0 1px 2px rgba(23, 40, 43, 0.06), 0 28px 64px -28px rgba(23, 40, 43, 0.32);
  --shadow-lift: 0 14px 28px -16px rgba(23, 40, 43, 0.38);
  --shadow-menu: 0 18px 40px -12px rgba(23, 40, 43, 0.35), 0 0 0 1px rgba(23, 40, 43, 0.08);

  /* Type */
  --font-latin: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-arabic: "Tajawal", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: var(--font-latin);
  --text-xs: 0.8125rem;
  --text-sm: 0.86rem;
  --text-md: 1rem;
  --text-lg: 1.06rem;
  --text-tagline: clamp(1.8rem, 1.25rem + 2.6vw, 2.2rem);
  --text-legal-title: clamp(1.6rem, 1.3rem + 1.4vw, 1.9rem);

  /* Space (4 pt) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Shape */
  --radius-card: 28px;
  --radius-link: 18px;
  --radius-glyph: 13px;
  --radius-badge: 14px;
  --radius-cat: 11px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-press: 90ms;
  --dur-hover: 220ms;
  --dur-rise: 680ms;

  /* Woven band: the tile is 80 x 72 */
  --weave-h: 44px;
  --weave-w: calc(var(--weave-h) * 80 / 72);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-field: #101d20;
    --color-surface: var(--ink);
    --color-raised: #1f3438;
    --color-text: #f4efe6;
    --color-muted: #a7b5b2;
    --color-line: rgba(250, 248, 243, 0.1);
    --color-line-strong: rgba(250, 248, 243, 0.3);
    --color-mast: var(--sea-deep);
    --color-primary: var(--sand);
    --color-on-primary: var(--ink);
    --color-on-primary-soft: #3d4f52;
    --color-glyph-bg: rgba(8, 127, 140, 0.3);
    --color-glyph: #9ad8da;
    --color-stitch: #3c5559;
    --color-focus: var(--sand);
    --color-menu: #22393d;
    --field-image: url("../img/patterns/field-dark.svg");
    --shadow-card: 0 0 0 1px rgba(250, 248, 243, 0.06), 0 30px 80px -30px rgba(0, 0, 0, 0.7);
    --shadow-lift: 0 14px 30px -16px rgba(0, 0, 0, 0.7);
    --shadow-menu: 0 18px 40px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(250, 248, 243, 0.1);
  }
}

/* Tajawal has a small x-height: Arabic small text steps up so captions stay at or above the book's 13 px. */
:root:lang(ar) {
  --font-body: var(--font-arabic);
  --text-xs: 0.86rem;
  --text-sm: 0.92rem;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  background: var(--color-field);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
  background: var(--color-field);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
:lang(ar) body,
body:lang(ar) {
  line-height: 1.7;
}
img,
svg {
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
p,
ul {
  margin: 0;
}
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}
main:focus {
  outline: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  inset-inline-start: var(--space-3);
  top: var(--space-3);
  z-index: 50;
  padding: var(--space-3) var(--space-4);
  border-radius: 12px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  /* It appears over the sea masthead, where the default sea ring would vanish. */
  --color-focus: var(--color-focus-on-mast);
}
.skip:focus-visible {
  transform: none;
}

/* ---------- The field: brand cross-stitch, quiet, fading toward the column ---------- */
.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--field-image) 0 0 / 72px 72px repeat;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 45%, transparent 28%, #000 78%);
  mask-image: radial-gradient(ellipse 70% 90% at 50% 45%, transparent 28%, #000 78%);
}

/* ---------- Column ---------- */
.shell {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--color-surface);
}
@media (min-width: 560px) {
  .shell {
    padding: var(--space-12) var(--space-6) 64px;
  }
  .card {
    min-height: 0;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: clip;
  }
}

/* ---------- Masthead: the logo sits on a calm, solid sea field ---------- */
.mast {
  position: relative;
  z-index: 3;
  padding: calc(var(--space-4) + env(safe-area-inset-top)) var(--space-5) var(--space-8);
  background: var(--color-mast);
  color: var(--color-mast-text);
  --color-focus: var(--color-focus-on-mast);
}
.mast-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 44px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 32px;
  padding: 0 var(--space-3) 0 10px;
  border-radius: 999px;
  background: var(--color-chip);
  color: var(--color-on-chip);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.status-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0;
}
.brand {
  --logo-w: 236px;
  display: grid;
  justify-items: start;
  margin-top: var(--space-8);
  line-height: 0;
}
@supports (width: 1cqi) {
  /* The logo width follows the h1 on narrow phones (cqi = share of the h1). */
  .brand {
    --logo-w: min(236px, 72cqi);
    container-type: inline-size;
  }
}
.brand-en {
  width: var(--logo-w);
  height: auto;
}
/* Bilingual lockup (brand book, bilingual horizontal export), shown for Arabic: the symbol, then the
   English wordmark over the Arabic name, both left-aligned, the two-line block centred on the symbol.
   Built from the real files: symbol-on-dark, and the wordmark cropped out of horizontal-on-dark
   (wordmark box in that 720 x 231 file: x 296 to 720, y 73 to 151). dir="ltr", so it never mirrors. */
.lockup {
  --sym-w: calc(var(--logo-w) * 0.45);
  --wm-img: calc(var(--logo-w) * 0.8406);
  display: none;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: start;
  column-gap: calc(var(--logo-w) * 0.12);
}
:root:lang(ar) .brand-en {
  display: none;
}
:root:lang(ar) .lockup {
  display: grid;
}
.lockup-symbol {
  width: var(--sym-w);
  height: auto;
}
.lockup-words {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.lockup-wordmark {
  display: block;
  width: calc(var(--wm-img) * 424 / 720);
  height: calc(var(--wm-img) * 78 / 720);
  overflow: hidden;
}
.lockup-wordmark img {
  width: var(--wm-img);
  max-width: none;
  height: auto;
  margin-top: calc(var(--wm-img) * -73 / 720);
  margin-left: calc(var(--wm-img) * -296 / 720);
}
.lockup-name {
  margin-top: calc(var(--logo-w) * 0.022);
  color: var(--color-mast-title);
  font-family: var(--font-arabic);
  font-size: calc(var(--logo-w) * 0.1017);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.tagline {
  margin-top: var(--space-7);
  color: var(--color-mast-title);
  font-size: var(--text-tagline);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.tagline:lang(ar) {
  line-height: 1.3;
  letter-spacing: 0;
}
.lede {
  max-width: 36ch;
  margin-top: var(--space-3);
  color: var(--color-mast-text);
  font-size: 0.97rem;
  line-height: 1.6;
  text-wrap: pretty;
}

/* Language switch */
.lang {
  position: relative;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-mast-line);
  border-radius: 999px;
  background: transparent;
  color: var(--color-mast-text);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-hover) var(--ease-out);
}
.lang-toggle svg {
  width: 18px;
  height: 18px;
}
.lang-toggle .chev {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-hover) var(--ease-out);
}
.lang[data-open] .chev {
  transform: rotate(180deg);
}
.lang-toggle:active {
  transform: scale(0.96);
  transition-duration: var(--dur-press);
}
@media (hover: hover) and (pointer: fine) {
  .lang-toggle:hover {
    border-color: var(--color-mast-text);
  }
}
.lang-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + var(--space-2));
  z-index: 20;
  min-width: 196px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 16px;
  background: var(--color-menu);
  color: var(--color-text);
  box-shadow: var(--shadow-menu);
  /* display:none while closed, so its Arabic and Cyrillic names never fetch those fonts on other visits. */
  display: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), display 160ms allow-discrete;
  --color-focus: var(--sea-text);
}
:root[dir="rtl"] .lang-menu {
  transform-origin: top left;
}
.lang[data-open] .lang-menu {
  display: block;
  opacity: 1;
  transform: none;
}
@starting-style {
  .lang[data-open] .lang-menu {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.lang-menu a:lang(ar) {
  font-family: var(--font-arabic);
  font-weight: 700;
}
.lang-menu a svg {
  width: 18px;
  height: 18px;
  opacity: 0;
}
.lang-menu a[aria-current="true"] {
  background: var(--color-glyph-bg);
  color: var(--color-glyph);
  font-weight: 800;
}
.lang-menu a[aria-current="true"] svg {
  opacity: 1;
}
@media (hover: hover) and (pointer: fine) {
  .lang-menu a:not([aria-current="true"]):hover {
    background: var(--color-line);
  }
}
@media (prefers-color-scheme: dark) {
  .lang-menu {
    --color-focus: var(--sand);
  }
}

/* ---------- Woven band: Bedouin cushion weave, a border between sea and shore ---------- */
.weave {
  position: relative;
  z-index: 2;
  height: var(--weave-h);
  overflow: hidden;
  background: var(--ink);
}
.weave-glide {
  position: absolute;
  inset: 0;
}
.weave-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--weave-w) * -6);
  width: calc(100% + var(--weave-w) * 12);
  background: url("../img/patterns/weave-band.svg") 0 0 / var(--weave-w) var(--weave-h) repeat-x;
  will-change: transform;
}

/* ---------- Links ---------- */
.links {
  padding: var(--space-6) var(--space-4) 0;
}
.link-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}
.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 68px;
  padding: var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-link);
  background: var(--color-raised);
  color: var(--color-text);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-hover) var(--ease-out);
}
.link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-hover) var(--ease-out);
}
.link:active {
  transform: scale(0.982);
  transition-duration: var(--dur-press);
}
@media (hover: hover) and (pointer: fine) {
  .link:hover {
    transform: translateY(-2px);
    border-color: var(--color-line-strong);
  }
  .link:hover::after {
    opacity: 1;
  }
  .link:hover .link-go {
    transform: translate(2px, -2px);
  }
  :root[dir="rtl"] .link:hover .link-go {
    transform: scaleX(-1) translate(2px, -2px);
  }
  .link:active {
    transform: translateY(0) scale(0.982);
  }
}
.link-glyph {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-glyph);
  background: var(--color-glyph-bg);
  color: var(--color-glyph);
}
.link-glyph svg,
.link-go {
  width: 22px;
  height: 22px;
}
.link-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.link-title {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.3;
}
.link-detail {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.4;
}
.link-detail:lang(ar) {
  line-height: 1.55;
}
.link-go {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--color-muted);
  transition: transform var(--dur-hover) var(--ease-out);
}
:root[dir="rtl"] .link-go {
  transform: scaleX(-1);
}
.link--primary {
  min-height: 76px;
  border-color: transparent;
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.link--primary .link-title {
  font-size: var(--text-lg);
}
.link--primary .link-detail,
.link--primary .link-go {
  color: var(--color-on-primary-soft);
}
.link--primary .link-glyph {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.num {
  unicode-bidi: isolate;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

/* ---------- App ---------- */
.app {
  padding: var(--space-7) var(--space-4) 0;
}
.app-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.app-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 11px;
}
.section-title {
  font-size: var(--text-lg);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.section-title:lang(ar) {
  letter-spacing: 0;
}
.app-detail {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}
.badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: var(--space-4);
}
.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: var(--space-2) var(--space-3);
  border: 1.5px dashed var(--color-line-strong);
  border-radius: var(--radius-badge);
  color: var(--color-muted);
  text-decoration: none;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.badge svg {
  flex: none;
  width: 24px;
  height: 24px;
}
.badge-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.badge-pre {
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-pre:lang(ar) {
  font-size: 0.86rem;
}
.badge-name {
  overflow: hidden;
  font-size: var(--text-md);
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.badge.is-live {
  border: 1.5px solid transparent;
  background: var(--color-primary);
  color: var(--color-on-primary);
  cursor: pointer;
  transition: transform var(--dur-hover) var(--ease-out);
}
.badge.is-live:active {
  transform: scale(0.97);
  transition-duration: var(--dur-press);
}
@media (hover: hover) and (pointer: fine) {
  .badge.is-live:hover {
    transform: translateY(-2px);
  }
}
/* A live store with its official badge artwork in assets/img/badges/ shows that artwork as is. */
.badge.has-official {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}
.badge.has-official > svg,
.badge.has-official .badge-text {
  display: none;
}
.badge-official {
  width: auto;
  max-width: 100%;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}
:root[dir="rtl"] .badge-official {
  object-position: right center;
}

/* ---------- Weave rule: the band's tick-and-coral row, the top border of "What's coming" ---------- */
/* Same 4 x 6 sand ticks every 8 px as weave-band.svg (y 54 to 60), then its coral stripe, so the card
   keeps one pattern (brand book 08: one pattern per surface; the weave only as a band or border). */
.weave-rule {
  height: 9px;
  margin: var(--space-7) var(--space-4) 0;
  background:
    repeating-linear-gradient(90deg, var(--color-stitch) 0 4px, transparent 4px 8px) 0 0 / 100% 6px no-repeat,
    linear-gradient(var(--color-accent), var(--color-accent)) 0 100% / 100% 2px no-repeat;
}

/* ---------- What is coming: one line glyph per category, in the link glyphs' family ---------- */
.coming {
  padding: var(--space-6) var(--space-4) 0;
}
.cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-3);
  margin-top: var(--space-4);
  padding: 0;
  list-style: none;
}
.cat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.cat-glyph {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-cat);
  background: var(--color-glyph-bg);
  color: var(--color-glyph);
}
.cat-glyph svg {
  width: 22px;
  height: 22px;
}
.cat-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 1px;
}
.cat-name {
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.cat-detail {
  color: var(--color-muted);
  font-size: var(--text-xs);
  line-height: 1.4;
}
.cat-detail:lang(ar) {
  line-height: 1.55;
}

/* ---------- Social ---------- */
.social {
  padding: var(--space-6) var(--space-4) 0;
}
.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: 0;
  list-style: none;
}
.social-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-raised);
  color: var(--color-text);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-hover) var(--ease-out);
}
.social-link svg {
  width: 20px;
  height: 20px;
}
.social-link:active {
  transform: scale(0.94);
  transition-duration: var(--dur-press);
}
@media (hover: hover) and (pointer: fine) {
  .social-link:hover {
    transform: translateY(-2px);
    border-color: var(--color-line-strong);
  }
}

/* ---------- Footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-4);
  margin-top: auto;
  padding: var(--space-8) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-4);
  width: 100%;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-line);
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  margin-inline-start: calc(var(--space-2) * -1);
  padding: 0;
  list-style: none;
}
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-2);
  color: var(--color-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .foot-links a:hover {
    text-decoration-color: currentColor;
  }
}
.foot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-3);
  min-height: 44px;
}
.made {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.made::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ---------- Legal pages ---------- */
.mast--compact {
  padding-top: calc(var(--space-5) + env(safe-area-inset-top));
  padding-bottom: var(--space-5);
}
.brand-link {
  --logo-w: 156px;
  display: inline-block;
  padding: var(--space-1) 0;
  border-radius: 8px;
  line-height: 0;
  text-decoration: none;
}
.legal {
  padding: var(--space-8) var(--space-5) 0;
}
.legal-title {
  font-size: var(--text-legal-title);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.legal-title:lang(ar) {
  line-height: 1.35;
  letter-spacing: 0;
}
.legal-updated {
  margin-top: var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.legal-intro {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  line-height: 1.6;
}
.legal-section {
  margin-top: var(--space-7);
}
.legal-section h2 {
  font-size: var(--text-md);
  font-weight: 800;
  line-height: 1.35;
}
.legal-section p {
  margin-top: var(--space-2);
  color: var(--color-text);
  font-size: 0.96rem;
  line-height: 1.7;
}
.legal-contact {
  padding: var(--space-8) var(--space-4) 0;
}
.legal-contact p {
  margin: 0 var(--space-1) var(--space-3);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.legal-contact .link + .link {
  margin-top: 10px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin: var(--space-5) var(--space-4) 0;
  padding: 0 var(--space-1);
  color: var(--color-text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--color-line-strong);
  text-underline-offset: 4px;
}
.back svg {
  width: 18px;
  height: 18px;
}
:root[dir="rtl"] .back svg {
  transform: scaleX(-1);
}

/* ---------- Motion: one orchestrated entrance, then the page settles ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* The entrance glide travels the same way as the scroll drift in site.js (left in LTR, right in RTL). */
@keyframes weave-glide {
  from {
    transform: translate3d(calc(var(--weave-w) * 4.5), 0, 0);
  }
  to {
    transform: none;
  }
}
@keyframes weave-glide-rtl {
  from {
    transform: translate3d(calc(var(--weave-w) * -4.5), 0, 0);
  }
  to {
    transform: none;
  }
}
@keyframes pulse {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise var(--dur-rise) var(--ease-out) both;
  }
  .r1 { animation-delay: 60ms; }
  .r2 { animation-delay: 120ms; }
  .r3 { animation-delay: 180ms; }
  .r4 { animation-delay: 240ms; }
  .r5 { animation-delay: 300ms; }
  .r6 { animation-delay: 360ms; }
  .r7 { animation-delay: 420ms; }
  .r8 { animation-delay: 480ms; }
  .r9 { animation-delay: 540ms; }
  .r10 { animation-delay: 600ms; }
  .r11 { animation-delay: 660ms; }
  .r12 { animation-delay: 720ms; }
  .weave-glide {
    animation: weave-glide 3.6s var(--ease-out) 120ms both;
  }
  :root[dir="rtl"] .weave-glide {
    animation-name: weave-glide-rtl;
  }
  /* Three soft pulses on arrival, then still (motion stops inside five seconds). */
  .status-dot::after {
    animation: pulse 1.4s var(--ease-out) 700ms 3;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rise {
    animation: fade 140ms linear both;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* No transition at all, so the menu is shown before focus moves into it. */
  .lang-menu {
    transition: none !important;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 379px) {
  .cats {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }
  .cat {
    align-items: center;
  }
}
@media (max-width: 359px) {
  .badges {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 339px) {
  .mast {
    padding-inline: var(--space-4);
  }
}

@media print {
  .field,
  .weave,
  .lang,
  .skip {
    display: none;
  }
  .card {
    box-shadow: none;
  }
}
