/* =========================================================
   Saudi Sale — landing page
   Dark-only, RTL-first, bilingual (Arabic + English)
   ========================================================= */

/* ---------- Fonts: IBM Plex Sans Arabic (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-400-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-500-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-700-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

  --bg: #0f0e11;
  --surface: #1a191d;
  --surface-hover: #262428;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);

  --text: #fafafa;
  --text-2: #c9cbd6;
  --muted: #8b93b8;

  --accent: #d3ff01;      /* brand lime (from logo) */
  --accent-ink: #121212;  /* text on lime */

  --radius: 16px;
  --radius-sm: 12px;
  --gap: 12px;

  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

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

html {
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(60rem 30rem at 50% -12rem, rgba(211, 255, 1, 0.10), transparent 70%),
    radial-gradient(40rem 30rem at 110% 110%, rgba(139, 147, 184, 0.08), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p, dl, dd { margin: 0; }
svg { display: block; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* English chunks inside the RTL page keep Latin shaping but align with the Arabic column */
[lang="en"] { unicode-bidi: isolate; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Layout ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  /* Safe areas: notch / status bar / browser bars are ADDED to the normal spacing. */
  padding:
    calc(40px + env(safe-area-inset-top, 0px))
    calc(16px + env(safe-area-inset-right, 0px))
    24px
    calc(16px + env(safe-area-inset-left, 0px));
}

/* ---------- Bilingual row ----------
   Arabic always hugs the far right, English the far left.
   .bi--stack: on narrow screens the two halves stack (Arabic first),
   each keeping its own side. */
.bi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bi > .ar,
.bi > .en { flex: 1 1 0; min-width: 0; }
.bi > .ar { text-align: right; }
.bi > .en { text-align: left; }

/* ---------- Profile ---------- */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 24px;
}

.logo {
  width: clamp(168px, 46vw, 220px);
  height: auto;
  overflow: visible;
}
.logo__slogan {
  font-family: var(--font);
  font-weight: 500;
  direction: rtl;
  unicode-bidi: plaintext;
}

.profile__name {
  margin-top: 2px;
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

/* Tagline (centered) */
.tagline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.tagline .ar { font-size: 1rem; font-weight: 500; color: var(--text-2); }
.tagline .en { font-size: 0.9375rem; color: var(--muted); }

/* Social icons (icon only, brand colours) */
.social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
/* Phones: spread edge to edge so the row lines up with the cards below */
@media (max-width: 600px) {
  .social { align-self: stretch; justify-content: space-between; gap: 8px; }
}
.social__link {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.social__link svg { width: 26px; height: 26px; }
.social__link:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .8); filter: brightness(1.08); }
.social__link[data-brand="tiktok"],
.social__link[data-brand="x"]         { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.social__link[data-brand="instagram"] { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social__link[data-brand="snapchat"]  { background: #fffc00; color: #fff; }
/* white ghost with the classic thin black outline */
.social__link[data-brand="snapchat"] svg { stroke: #000; stroke-width: 1.1px; paint-order: stroke fill; stroke-linejoin: round; }
.social__link[data-brand="whatsapp"]  { background: #25d366; }

.footer__copy > .ar,
.footer__copy > .en { flex: 1 1 auto; }

/* ---------- Sections ---------- */
.block + .block { margin-top: 28px; }

.block__title {
  margin: 0 4px 12px;
  align-items: baseline;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.block__title .en { font-weight: 500; color: var(--muted); font-size: 0.875rem; }

.stack { display: grid; gap: var(--gap); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}
.card:active { transform: translateY(0) scale(0.99); }

.card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: #000;
  color: #fff;
}
.card__icon svg { width: 24px; height: 24px; }

.card__body { flex: 1; min-width: 0; }
.card__body .en { display: flex; flex-direction: column; }

.card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.card__title-en {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.card__meta {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* Brand tiles */
.card__icon[data-brand="tiktok"]     { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.card__icon[data-brand="instagram"]  { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.card__icon[data-brand="snapchat"]   { background: #fffc00; color: #000; }
.card__icon[data-brand="x"]          { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.card__icon[data-brand="whatsapp"]   { background: #25d366; }
.card__icon[data-brand="apple"]      { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.card__icon[data-brand="googleplay"] { background: #01875f; }
.card__icon[data-brand="phone"],
.card__icon[data-brand="mail"]       { background: #2c2a31; color: var(--accent); }
.card__icon[data-brand="site"]       { background: var(--accent); color: var(--accent-ink); }

/* Main website CTA: browse (primary) + sell (secondary) */
.cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.cta__btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius);
  font-weight: 700;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease;
  background: var(--surface);
  border: 1px solid var(--border-hover);
  color: var(--text);
}
.cta__btn svg { width: 26px; height: 26px; margin-bottom: 6px; }
.cta__btn .ar { text-align: right; font-size: 1.0625rem; }
.cta__btn .en { text-align: left; font-size: 0.875rem; font-weight: 600; opacity: .85; }
.cta__btn:hover { transform: translateY(-2px); background: var(--surface-hover); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); }
.cta__btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cta__btn--primary:hover { background: var(--accent); filter: brightness(1.05); }
.cta__domain { margin-top: 8px; text-align: center; font-size: 0.8125rem; color: var(--muted); }

/* App store tiles (logo only) */
.apps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.app {
  display: grid;
  place-items: center;
  height: 88px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}
.app svg { width: 40px; height: 40px; }
.app:hover { transform: translateY(-2px); background: var(--surface-hover); border-color: var(--border-hover); }

/* Contact (icon + value) */
.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.contact__link svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.contact__link:hover { background: var(--surface-hover); border-color: var(--border-hover); color: var(--text); }

/* VAT logo + payment method badges */
.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 14px;
}
.vat-logo img { display: block; height: 52px; width: auto; }
.pay {
  display: grid;
  place-items: center;
  width: 60px;
  height: 38px;
  border-radius: 8px;
  background: #fff;
}
.pay svg { height: 20px; width: auto; max-width: 48px; }
.pay[data-brand="applepay"] { color: #000; }
.pay[data-brand="applepay"] svg { height: 26px; }
.pay[data-brand="visa"] { color: #1a1f71; }
.pay[data-brand="visa"] svg { height: 15px; }
.pay[data-brand="mada"] svg { height: 16px; }
.pay img { display: block; max-width: 48px; max-height: 24px; }

/* ---------- Footer ---------- */
.footer {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding:
    20px
    calc(16px + env(safe-area-inset-right, 0px))
    calc(32px + env(safe-area-inset-bottom, 0px))
    calc(16px + env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8125rem;
}

.legal { display: grid; gap: 6px; margin-bottom: 14px; }
.legal__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 12px;
}
.legal__row .ar { text-align: right; }
.legal__row .en { text-align: left; }
.legal__value {
  color: var(--text-2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.footer__years { text-align: center; margin-bottom: 4px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.footer__copy { align-items: baseline; }

/* ---------- Responsive tweaks ---------- */
/* Phones: browsers with a bottom address/tab bar (iOS Safari, Chrome "bottom bar")
   can float over the last lines; leave clear space so the footer is never hidden. */
@media (max-width: 600px) {
  .page { padding-top: calc(28px + env(safe-area-inset-top, 0px)); }
  .footer { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 520px) {
  .bi--stack { flex-direction: column; align-items: stretch; gap: 4px; }
  .bi--stack > .ar,
  .bi--stack > .en { flex: none; }
}

@media (max-width: 360px) {
  .card { padding: 12px; gap: 12px; }
  .card__icon { width: 42px; height: 42px; }
  .bi { gap: 10px; }
}

@media (min-width: 768px) {
  .page { padding-top: 64px; }
  .page, .footer { max-width: 680px; }
  .card { padding: 16px 18px; }
}

@media (min-width: 1600px) {
  html { font-size: 17px; }
  .page, .footer { max-width: 720px; }
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .social__link:hover, .app:hover, .cta__btn:hover { transform: none; }
}

@media (hover: none) {
  .card:hover, .social__link:hover, .app:hover, .cta__btn:hover { transform: none; box-shadow: none; }
}

@media print {
  body { background: #fff; color: #000; }
  .social, .apps { display: none; }
  .card { border: 1px solid #ccc; background: #fff; }
}
