/*
  Stylesheet for the ten standing pages — privacy, terms, affiliate disclosure, about and contact,
  one file per language. They are hand-written HTML in public/ rather than React routes because
  they exist so an affiliate reviewer or a crawler can READ them, and neither runs JavaScript.
  nginx serves surory.com with `try_files $uri $uri/ /index.html`, so a real directory wins before
  the SPA fallback and no server change is needed.

  This is a TRANSCRIPTION of the app's design system (src/theme/theme.css), not an approximation:
  the same tokens, the same E-1 glass panel over the same photo backdrop, the same two families.
  It is copied rather than imported for the reason SuroryAff gives — a page whose job is to keep
  working must not depend on the app's build output or its hashed asset names.

  The fonts are the app's own @fontsource files, copied into public/fonts/ under stable names.
  The SPA imports them through JS, which hashes them; these pages cannot reference a hash that
  changes every build, so they carry their own copies. Keep them in step with the imports in
  src/main.tsx if those versions ever move.
*/

/* ---- fonts ------------------------------------------------------------------------------ */

/* Tajawal — body (--font-sans). 400 and 700 only; the app also loads 500, which nothing here
   uses. Split by unicode-range so an English page never downloads the Arabic file. */
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/tajawal-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/tajawal-arabic-400.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF,
    U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/tajawal-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/tajawal-arabic-700.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF,
    U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

/* Baloo Bhaijaan 2 — headings (--font-display), always at 600, as every heading in the app. */
@font-face {
  font-family: 'Baloo Bhaijaan 2';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/baloo-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: 'Baloo Bhaijaan 2';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/baloo-arabic-600.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF,
    U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: 'Baloo Bhaijaan 2';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/baloo-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: 'Baloo Bhaijaan 2';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/baloo-arabic-700.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF,
    U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

/* ---- tokens (theme.css §2–§4) ----------------------------------------------------------- */

:root {
  --paper: #fffffc;
  --card: #ffffff;
  --sunk: #f7f8f5;
  --hair: #ecede8;
  --border: #dfe1db;
  --ink: #23262b;
  --ink-2: #5c6470;
  --ink-3: #99a1ab;

  --vi-50: #f1edfd;
  --vi-100: #e2dafb;
  --vi-500: #7c5ce8;
  --vi-600: #6a4adb;
  --vi-700: #5f41c4;

  --font-display: 'Baloo Bhaijaan 2', 'Tajawal', system-ui, sans-serif;
  --font-sans: 'Tajawal', system-ui, sans-serif;

  --radius-field: 12px;
  --radius-card: 14px;
  --radius-card-lg: 20px;
  --radius-sheet: 26px;

  --shadow-e1: 0 1px 3px rgba(35, 38, 43, 0.08);
  --shadow-e2: 0 8px 22px rgba(35, 38, 43, 0.11);
}

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

html {
  -webkit-text-size-adjust: 100%;
  font-family: var(--font-sans);
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* Page backdrop — a fixed pseudo-element rather than background-attachment: fixed, which iOS
   Safari does not support. --paper stays the load-time fallback. Same as theme.css @layer base. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--paper) url('background.jpeg') center / cover no-repeat;
}

/* ---- the E-1 panel ---------------------------------------------------------------------- */

/* Full-bleed on a phone, a floating glass card from sm up — the same shell every screen in the
   app sits in (src/components/PageShell.tsx), at the 'wide' width since this is reading matter. */
.shell {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
  min-height: 100dvh;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

@media (min-width: 640px) {
  .shell {
    max-width: 42rem;
    min-height: calc(100dvh - 160px);
    margin-block: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-sheet);
    box-shadow: var(--shadow-e2);
    overflow: hidden;
  }
}

.wrap {
  padding-inline: 20px;
}

/* ---- header ----------------------------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px 14px;
  border-bottom: 1px solid var(--hair);
}

.lockup img {
  display: block;
  height: 34px;
  width: auto;
}

/* The EN / ع pill, transcribed from src/components/LangToggle.tsx. Here each option is a link to
   the same page in the other language rather than a button that re-renders in place. */
.langs {
  display: inline-flex;
  flex-shrink: 0;
  padding: 2px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-e1);
}

.langs a,
.langs span {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 38px;
  padding-inline: 10px;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
  color: var(--ink-2);
}

.langs .on {
  background: var(--vi-500);
  color: #fff;
  font-weight: 700;
}

/* ---- document --------------------------------------------------------------------------- */

main {
  padding-block: 28px 8px;
}

h1 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.35;
}

h2 {
  margin: 30px 0 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
}

p,
ul {
  margin: 12px 0 0;
}

ul {
  padding-inline-start: 20px;
}

li {
  margin-top: 9px;
}

li::marker {
  color: var(--vi-500);
}

a {
  color: var(--vi-700);
  text-underline-offset: 2px;
}

strong {
  font-weight: 700;
}

.updated {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
}

.lede {
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 17px;
}

/* The contact block — a sunk card, the same treatment the app gives grouped read-only facts. */
.facts {
  margin: 22px 0 0;
  padding: 6px 18px;
  background: var(--sunk);
  border: 1px solid var(--border);
  border-radius: var(--radius-card-lg);
}

.facts div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 14px;
  padding-block: 12px;
}

.facts div + div {
  border-top: 1px solid var(--hair);
}

.facts dt {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}

.facts dd {
  margin: 0;
  font-weight: 700;
}

/* A number, an address or an email must not be re-ordered by the RTL algorithm. */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

/* ---- footer ----------------------------------------------------------------------------- */

.bottom {
  margin-top: 40px;
  padding-block: 22px 30px;
  border-top: 1px solid var(--hair);
}

.bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.bottom nav a {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.bottom nav a:hover {
  text-decoration: underline;
}

.bottom .meta {
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 13px;
}

/* Operator attribution. NOT a flex container: the bare text either side of the link would each
   become an anonymous flex item and pick up the gap, spacing the words as though unrelated. */
.bottom .powered {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.bottom .powered a {
  text-decoration: none;
}

.bottom .powered a:hover {
  text-decoration: underline;
}

/* Sized by height so a wide wordmark or a square mark drops in without cropping. */
.powered-logo {
  display: inline-block;
  height: 18px;
  width: auto;
  margin-inline-end: 8px;
  vertical-align: middle;
}

/* The Ministry of Commerce mark beside the commercial registration number. */
.seal {
  display: inline-block;
  height: 26px;
  width: auto;
  margin-inline-end: 8px;
  vertical-align: middle;
}

/* ---- print ------------------------------------------------------------------------------ */

@media print {
  body::before,
  .langs,
  .bottom nav {
    display: none;
  }

  .shell {
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    backdrop-filter: none;
  }

  body {
    font-size: 11pt;
  }
}
