/* Khadra website. Tokens follow docs/DESIGN.md. Thmanyah is app-only (licence),
   so the site uses Noto Naskh Arabic (headings), Noto Sans Arabic (text) and Poppins.
   Radius rule (same as the app): 12 small plates, 16 controls and frames, 24 large blocks, pill for chips.
   No scripts: all motion is CSS and switches off with reduced motion. */

@font-face { font-family: "Khadra Naskh"; src: url("fonts/noto-naskh-arabic-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Khadra Sans"; src: url("fonts/noto-sans-arabic-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+060C; }
@font-face { font-family: "Khadra Sans"; src: url("fonts/noto-sans-arabic-arabic-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+060C; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --brand: #7A1F1F;
  --on-brand: #F7EFE3;
  --accent: #D4A24C;
  --accent-ink: #7A5214;
  --surface: #F7EFE3;
  --surface-alt: #EADBC4;
  --amber-soft: #EFD8AA;
  --card: #FFFFFF;
  --art-plate: #FFFFFF;
  --ink: #2B1A16;
  --muted: #6B574C;
  --heading: #7A1F1F;
  --hairline: #E3D2B8;
  --link: #7A5214;
  --steep-stops: #A9DCF0 0%, #E6E0C6 7%, #D4A24C 25%, #CC7A3C 50%, #B8452F 75%, #7A1F1F 100%;
  --steep-dir: 90deg;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --text-font: "Poppins", "Khadra Sans", system-ui, sans-serif;
  --head-font: "Khadra Naskh", "Poppins", serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #18171A;
    --surface-alt: #2C2A2E;
    --amber-soft: #3A3128;
    --card: #29272B;
    --art-plate: #E9E3DB;
    --ink: #F2EEE9;
    --muted: #B7B0AA;
    --heading: #E2B870;
    --hairline: #36333A;
    --link: #E2B870;
  }
}
html[dir="rtl"] { --steep-dir: 270deg; }
html[lang="en"] { --head-font: "Poppins", system-ui, sans-serif; }

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--surface);
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--text-font);
  font-size: 17px;
  line-height: 1.8;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
html[lang="en"] body { line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, .tagline { text-wrap: balance; }
p { text-wrap: pretty; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] .tagline { letter-spacing: -0.015em; } /* never on Arabic: it breaks the joins */
::selection { background: var(--accent); color: #2B1A16; }

a {
  color: var(--link);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  touch-action: manipulation;
  transition: text-decoration-thickness 150ms ease, color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 2px; }
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }

.wrap {
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding-inline: max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: 760px; }

/* Header */
.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.home-link { display: inline-flex; }
.home-link img { height: 34px; width: auto; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { .logo-light { display: none !important; } .logo-dark { display: block !important; } }
.lang {
  font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 6px 16px; line-height: 1.4;
  user-select: none; -webkit-user-select: none;
  transition: background-color 150ms ease, transform 120ms var(--ease-out);
}
.lang:active { transform: scale(0.97); background: var(--surface-alt); }
@media (hover: hover) and (pointer: fine) {
  .lang:hover { background: var(--surface-alt); }
}

/* Hero */
.hero { background: var(--brand); color: var(--on-brand); position: relative; }
.hero::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 8px; background: linear-gradient(var(--steep-dir), var(--steep-stops)); }
.hero .wrap { padding-top: 64px; padding-bottom: 80px; display: grid; gap: 48px; align-items: center; grid-template-columns: 1.25fr 1fr; }
.hero h1 { margin: 0; }
.hero-logo { width: min(280px, 70vw); margin-bottom: 20px; }
.tagline { font-family: var(--head-font); font-weight: 700; font-size: clamp(28px, 4.2vw, 42px); line-height: 1.5; margin: 0 0 16px; }
html[lang="en"] .tagline { line-height: 1.2; }
.lead { font-size: 19px; margin: 0 0 28px; max-width: 34em; opacity: .94; }
.soon {
  display: inline-block; background: var(--accent); color: #2B1A16; font-weight: 600;
  border-radius: 999px; padding: 10px 22px; font-size: 16px; line-height: 1.5; margin: 0;
}
.phone {
  justify-self: center; width: min(290px, 72vw); padding: 9px; border-radius: 44px; background: #0E0D0F;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), 0 28px 64px rgba(30, 6, 6, .45);
}
.phone img { width: 100%; border-radius: 35px; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 56px; gap: 36px; }
  .phone { width: min(250px, 66vw); }
}

/* Steep: the signature moment, five real frames from the brand drawings */
.steep { padding: 80px 0 64px; }
.steep h2, .row h2, .cell h2 { font-family: var(--head-font); color: var(--heading); line-height: 1.45; margin: 0 0 10px; }
html[lang="en"] .steep h2, html[lang="en"] .row h2, html[lang="en"] .cell h2 { line-height: 1.2; margin-bottom: 12px; }
.steep h2 { font-size: clamp(30px, 4.4vw, 44px); }
.steep > .wrap > p { color: var(--muted); font-size: 18px; max-width: 34em; margin: 0; }
.frames { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.frames li { background: var(--art-plate); border-radius: 16px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--hairline); }
@media (prefers-color-scheme: dark) { .frames li { border-color: transparent; } }
.frames img { width: 86%; height: auto; }
.steep-bar { height: 10px; border-radius: 999px; margin-top: 20px; background: linear-gradient(var(--steep-dir), var(--steep-stops)); }
@media (max-width: 600px) {
  .steep { padding: 56px 0 40px; }
  .frames { gap: 8px; margin-top: 28px; }
  .frames li { border-radius: 12px; }
  .frames img { width: 94%; }
  .steep-bar { height: 8px; margin-top: 14px; }
}

/* Two feature rows, mirrored (max two in a row, by design) */
.rows { padding: 16px 0 24px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 32px 0; }
.row .art { background: var(--surface-alt); border-radius: 24px; aspect-ratio: 4 / 3; display: grid; place-items: center; }
@media (prefers-color-scheme: dark) { .row .art { background: var(--art-plate); } }
.row .art img { width: 46%; }
.row.flip .art { order: 2; }
.row h2 { font-size: clamp(26px, 3.4vw, 34px); }
.row p { color: var(--muted); font-size: 18px; max-width: 30em; margin: 0; }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; gap: 24px; padding: 24px 0; }
  .row.flip .art { order: 0; }
  .row .art { aspect-ratio: 16 / 10; }
  .row .art img { width: 38%; }
}

/* Bento: three cells, three different surfaces */
.bento-wrap { padding: 32px 0 96px; }
.bento { display: grid; gap: 20px; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; }
.cell { border-radius: 24px; padding: 32px 32px 0; overflow: hidden; display: flex; flex-direction: column; gap: 28px; }
.cell h2 { font-size: 26px; }
.cell p { margin: 0; font-size: 17px; }
.cell-majlis {
  grid-row: span 2; background: var(--brand); color: var(--on-brand);
}
.cell-majlis h2 { color: var(--on-brand); font-size: clamp(30px, 3.6vw, 38px); }
.cell-majlis p { opacity: .92; max-width: 26em; font-size: 18px; }
.cell-shops { background: var(--amber-soft); }
.cell-shops p { color: var(--ink); }
.shot {
  margin-top: auto; border-radius: 16px 16px 0 0; overflow: hidden; background: #18171A;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 -8px 28px rgba(43, 26, 22, .16);
}
.shot img { width: 100%; }
.shot.short { height: 210px; }
.shot.short img { height: 100%; object-fit: cover; object-position: top; }
.cell-account { background: var(--surface-alt); }
.cell-account p { color: var(--muted); }
@media (max-width: 760px) {
  .bento { grid-template-columns: 1fr; }
  .cell { padding: 24px 24px 0; gap: 22px; }
  .cell-majlis { grid-row: auto; }
  .shot.short { height: 180px; }
  .bento-wrap { padding-bottom: 64px; }
}
@media (max-width: 480px) {
  .soon { border-radius: 16px; }
}

/* Motion: one short entrance on first load (seen once). Content is never hidden waiting for scroll. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .phone { animation: rise 520ms var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 60ms; }
  .hero-copy > :nth-child(3) { animation-delay: 120ms; }
  .hero-copy > :nth-child(4) { animation-delay: 180ms; }
  .phone { animation-delay: 140ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Document pages (privacy, terms, support, delete account) */
.doc { padding: 48px 0 72px; }
.doc h1 { font-family: var(--head-font); color: var(--heading); font-size: clamp(30px, 5vw, 38px); line-height: 1.45; margin: 0 0 8px; }
html[lang="en"] .doc h1 { line-height: 1.2; margin-bottom: 12px; }
.doc .meta { color: var(--muted); font-size: 15px; margin: 0 0 32px; }
.doc h2 { font-family: var(--head-font); color: var(--heading); font-size: 24px; line-height: 1.5; margin: 40px 0 8px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.doc h3 { font-size: 18px; font-weight: 700; margin: 24px 0 4px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-inline-start: 24px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--accent-ink); }
@media (prefers-color-scheme: dark) { .doc li::marker { color: var(--heading); } }
.doc .callout { background: var(--surface-alt); border-radius: 16px; padding: 20px 24px; margin: 0 0 24px; }
.doc .callout p:last-child { margin-bottom: 0; }
.doc .mail { font-family: "Poppins", sans-serif; font-weight: 600; direction: ltr; unicode-bidi: isolate; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 28px 0 calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 15px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; }
.site-footer a { color: var(--muted); }
.site-footer a[aria-current="page"] { color: var(--ink); text-decoration: none; font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .site-footer a:hover { color: var(--ink); }
}
.site-footer p { margin: 0; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
  .lead { font-size: 17px; }
  .doc h2 { font-size: 21px; }
}

/* Legal pages get printed and saved as PDF by reviewers: clean print */
@media print {
  .site-header, .site-footer, .skip { display: none; }
  html, body { background: #fff; color: #000; }
  .doc { padding: 0; }
  .doc h1, .doc h2 { color: #000; }
  .doc h2 { break-after: avoid; }
  a { color: inherit; }
}
