/* Khzenti "Block" look for the website (DESIGN.md). Values mirror the tokens in
   app/src/theme/index.ts. Light only. Fonts are served from this site, never
   from a third party. */
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(fonts/Figtree_400Regular.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(fonts/Figtree_700Bold.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap; src: url(fonts/BricolageGrotesque_800ExtraBold.woff2) format("woff2"); }
@font-face { font-family: Alexandria; font-weight: 400; font-display: swap; src: url(fonts/Alexandria_400Regular.woff2) format("woff2"); }
@font-face { font-family: Alexandria; font-weight: 700; font-display: swap; src: url(fonts/Alexandria_700Bold.woff2) format("woff2"); }
@font-face { font-family: Alexandria; font-weight: 800; font-display: swap; src: url(fonts/Alexandria_800ExtraBold.woff2) format("woff2"); }

:root {
  --base: #EEE9FF;
  --surface: #FFFFFF;
  --surface-alt: #F6F3FF;
  --border: #DDD5F5;
  --ink: #15122B;
  --ink-muted: #5A5472;
  --accent: #F2FF4A;
  --violet: #4B2ED6;
  --on-violet: #FFFFFF;
  --on-violet-muted: #E2DBFF;
  --on-violet-edge: rgba(255, 255, 255, 0.4);
  --on-ink-muted: #C9C3D9;
  --peach: #FFC9B3;
  --mint: #C9F3D9;
  --coral-soft: #FFECE8;
  --text: Figtree, Alexandria, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --head: "Bricolage Grotesque", Alexandria, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--base); color: var(--ink); font: 400 16px/24px var(--text); }
body[dir="rtl"] { --text: Alexandria, Figtree, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; --head: Alexandria, Figtree, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; }
[hidden] { display: none !important; }
.wrap { max-width: 680px; margin: 0 auto; }

/* Violet header, edge to edge */
.top, .hero { background: var(--violet); color: var(--on-violet); padding-inline: 16px; }
.top { padding-block: 20px 8px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: block; line-height: 0; }
.brand .logo { height: 32px; width: auto; filter: brightness(0) invert(1); }
.brand .logo-ar { display: none; }
body[dir="rtl"] .brand .logo-en { display: none; }
body[dir="rtl"] .brand .logo-ar { display: inline; }
.langs { display: flex; gap: 8px; }
.langs button {
  min-height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: 700 13px/16px var(--text);
  background: transparent; color: var(--on-violet); border: 1px solid var(--on-violet-edge);
}
.langs button[data-lang="en"] { font-family: Figtree, sans-serif; }
.langs button[data-lang="ar"] { font-family: Alexandria, sans-serif; }
.langs button[aria-pressed="true"] { background: var(--surface); color: var(--violet); border-color: var(--surface); }
.hero { padding-block: 24px 60px; }
h1 { margin: 0 0 12px; font: 800 48px/48px var(--head); letter-spacing: -1.5px; }
/* Arabic marks sit outside the Latin line box, so its headings need more room. */
body[dir="rtl"] h1 { line-height: 60px; margin-bottom: 20px; }
body[dir="rtl"] h2 { line-height: 38px; }
.lede { margin: 0 0 16px; font-size: 17px; line-height: 26px; }
.hero .lede { margin-bottom: 24px; color: var(--on-violet-muted); }
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  border-radius: 999px; background: var(--accent); color: var(--ink);
  font: 700 15px/18px var(--text); text-decoration: none;
}

/* Lilac sheet rising over the header */
.sheet { margin-top: -28px; padding: 16px 16px 32px; background: var(--base); border-radius: 28px 28px 0 0; }
.card { margin-bottom: 12px; padding: 24px; border-radius: 30px; background: var(--surface); }
.card.peach { background: var(--peach); }
.tile { margin-top: 20px; padding: 16px; border-radius: 22px; background: var(--surface-alt); }
.tile p:last-child, .card > :last-child { margin-bottom: 0; }
h2 { margin: 0 0 12px; font: 800 26px/30px var(--head); letter-spacing: -0.5px; }
p, li { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-inline-start: 20px; }
li::marker { color: var(--violet); }
a { color: var(--violet); text-underline-offset: 2px; }
strong { font-weight: 700; }
code { font-family: inherit; font-weight: 700; }
body[dir="rtl"] h1, body[dir="rtl"] h2 { letter-spacing: 0; }

/* Numbered steps */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; min-height: 32px; padding-inline-start: 44px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--violet); color: var(--on-violet);
  display: flex; align-items: center; justify-content: center; font: 800 15px/1 var(--head);
}
body[dir="rtl"] .steps li::before { content: counter(step, arabic-indic); }

.stamp, footer p { margin: 0; font-size: 12px; line-height: 16px; color: var(--ink-muted); text-align: center; }
.stamp { margin-top: 20px; }
footer { padding: 0 16px 40px; }
a:focus-visible, button:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }

/* Legal pages: long text on white cards */
.hero .stamp { margin: 0; text-align: start; color: var(--on-violet-muted); }
h2:not(:first-child) { margin-top: 32px; }
h3 { margin: 20px 0 6px; font: 700 17px/24px var(--text); }
.muted { color: var(--ink-muted); font-size: 14px; line-height: 22px; }
.note, .flag { margin: 16px 0; padding: 16px; border-radius: 22px; background: var(--surface-alt); }
.flag { background: var(--peach); }
.note > :last-child, .flag > :last-child { margin-bottom: 0; }
.toc ol { margin: 0; padding-inline-start: 20px; }
.toc li { margin-bottom: 4px; }
table { display: block; overflow-x: auto; width: 100%; margin: 0 0 12px; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th, td { padding: 10px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
th { font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
footer a { color: var(--ink-muted); }

/* Plus: buttons, fields, states. Button variants match the app: primary is
   accent, the strong one is violet, the quiet one is surfaceAlt. No outlines. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 20px;
  border: 0; border-radius: 999px; background: var(--violet); color: var(--on-violet);
  font: 700 15px/18px var(--text); text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--ink); }
.btn.ink { background: var(--ink); color: var(--on-violet); }
.btn.ghost { background: var(--surface-alt); color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn + .btn { margin-top: 10px; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.row .btn { width: auto; min-height: 38px; padding: 0 14px; font-size: 13px; line-height: 16px; }
.field { display: grid; gap: 6px; margin: 0 0 12px; }
.field span { color: var(--ink-muted); font-size: 13px; line-height: 18px; font-weight: 700; }
.field input { width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--surface-alt); color: var(--ink); font: 400 16px/24px var(--text); }
input:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.turnstile { min-height: 65px; margin: 0 0 12px; }
.or { margin: 14px 0; color: var(--ink-muted); font-size: 13px; line-height: 18px; text-align: center; }
.meta { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.status { margin: 12px 0; padding: 12px 16px; border-radius: 16px; background: var(--surface-alt); font-size: 14px; line-height: 20px; }
.status.ok { background: var(--mint); }
.status.err { background: var(--coral-soft); }
.plans { display: grid; gap: 12px; margin: 16px 0; }
.plan { padding: 18px; border-radius: 22px; background: var(--surface-alt); }
.plan h3 { margin: 0 0 4px; }
.plan .price { margin: 4px 0 2px; font: 800 26px/30px var(--head); letter-spacing: -0.5px; }
body[dir="rtl"] .plan .price { letter-spacing: 0; }
.plan .per { margin: 0 0 12px; color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.card > .note:first-child, .card > .status:first-child { margin-top: 0; }

/* Invite page: the code on the dark tag, as in the emails */
.codeTag { padding: 20px; border-radius: 22px; background: var(--ink); color: var(--on-violet); text-align: center; }
.codeTag span { display: block; color: var(--on-ink-muted); font-size: 13px; line-height: 18px; }
.codeTag strong { display: block; margin-top: 4px; padding-inline-start: 8px; font: 800 34px/42px var(--head); letter-spacing: 8px; }
body[dir="rtl"] .codeTag strong { font-family: "Bricolage Grotesque", Figtree, sans-serif; letter-spacing: 8px; }
.invite-reward { margin: 14px 0; }
.invite-get { margin-top: 12px; }
.invite-get .note { margin-top: 0; }
.invite-get .meta { margin: 8px 0 12px; text-align: center; }

@media (min-width: 560px) { .plans { grid-template-columns: 1fr 1fr; } }
@media (min-width: 600px) { .hero { padding-bottom: 72px; } .card { padding: 32px; } }
