/* The join page (join.tabeq.app) — ALL its styling, in this one file.
 * Restyle by changing the tokens below; nothing else names a colour, a size
 * or a font. Mobile first; logical properties (inline-start / end) so the
 * same rules read right in Arabic (rtl) and English (ltr). */

:root {
  /* Colours — the app's. */
  --navy: #020286;
  --blue: #090fd7;
  --blue-tint: #f7f7fe;
  --cyan: #08bdea;
  --ink: #0b0b0d;
  --secondary: #4c5158;
  --muted: #7b8087;
  --faint: #a9adb2;
  --inset: #f6f6f6;
  --hairline: #eeeeef;
  --page: #ffffff;
  --on-navy: #ffffff;
  --on-navy-soft: rgba(255, 255, 255, 0.72);
  --danger: #db4a4a;

  /* Type — DM Sans for Latin and digits, Tajawal for Arabic letters (the
   * app's pair: the browser takes each glyph from the first font that has
   * it). */
  --font: "DM Sans", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --title: 800 26px/1.35 var(--font);
  --step-title: 700 16px/1.5 var(--font);
  --body: 500 14px/1.6 var(--font);
  --small: 500 13px/1.5 var(--font);
  --code: 800 20px/1.2 var(--font);

  /* Shape. */
  --gutter: 20px;
  --max-width: 440px;
  --radius-hero: 22px;
  --radius-card: 20px;
  --radius-button: 14px;
  --shadow-hero: 0 18px 36px -22px rgba(2, 2, 134, 0.6);
  --shadow-card: 0 1px 2px rgba(11, 11, 13, 0.04);
  --shadow-button: 0 10px 20px -10px rgba(9, 15, 215, 0.6);
}

/* Fonts: the app's own files, served from here (no third party). */
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url("/fonts/Tajawal-Medium.woff2") format("woff2"); }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url("/fonts/Tajawal-Bold.woff2") format("woff2"); }
@font-face { font-family: "Tajawal"; font-weight: 800; font-display: swap; src: url("/fonts/Tajawal-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url("/fonts/DMSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url("/fonts/DMSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 800; font-display: swap; src: url("/fonts/DMSans-ExtraBold.woff2") format("woff2"); }

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: var(--body);
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px var(--gutter) 32px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

[hidden] { display: none !important; }

/* ── Logo ─────────────────────────────────────────────────────────────── */
.brand { display: flex; justify-content: center; color: var(--ink); }
.brand svg { height: 34px; width: auto; display: block; }

/* ── The invitation (navy) ────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  color: var(--on-navy);
  border-radius: var(--radius-hero);
  padding: 22px 20px 24px;
  box-shadow: var(--shadow-hero);
}
.hero h1 { margin: 0; font: var(--title); overflow-wrap: anywhere; }
.hero .name { color: var(--cyan); }

/* ── The steps ────────────────────────────────────────────────────────── */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.step {
  display: flex;
  gap: 14px;
  padding: 18px 18px 18px;
  align-items: flex-start;
}
.step + .step { border-block-start: 1px solid var(--hairline); }
.step .num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue);
  font: 800 14px/28px var(--font);
  text-align: center;
}
.step .body { flex: 1; min-width: 0; }
.step h2 { margin: 2px 0 0; font: var(--step-title); }

/* Store buttons: one for the visitor's phone, both on a computer. */
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 12px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-button);
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font: 700 15px/1.2 var(--font);
  box-shadow: var(--shadow-button);
}
.store svg { width: 18px; height: 18px; flex: none; }
.store:active { transform: scale(0.98); }

/* The code, and its copy button. */
.code-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-block-start: 10px; }
.code {
  font: var(--code);
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--inset);
  border-radius: 12px;
  padding: 10px 14px;
  direction: ltr;
  unicode-bidi: isolate;
}
.copy {
  appearance: none;
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--blue);
  border-radius: var(--radius-button);
  padding: 10px 14px;
  font: 700 14px/1.2 var(--font);
  cursor: pointer;
}
.copy.done { color: var(--secondary); }

/* ── Not a valid link ─────────────────────────────────────────────────── */
.invalid {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 26px 20px;
  text-align: center;
}
.invalid .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--inset);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
}
.invalid p { margin: 0; font: var(--step-title); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer {
  margin-block-start: auto;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--hairline);
  text-align: center;
  color: var(--faint);
  font: var(--small);
}
.footer a { color: var(--blue); font-weight: 700; text-decoration: none; }
