/* Tahani website. Same design tokens as the app. Logical properties only, so RTL/LTR share one file. */

@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/assets/fonts/IBMPlexSansArabic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/assets/fonts/IBMPlexSansArabic-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Reem Kufi"; src: url("/assets/fonts/ReemKufi-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --green: #0F3D2E;
  --gold: #C9A227;
  --cream: #FAF6EC;
  --ink: #1C1C1A;

  --bg: #FAF6EC;
  --surface: #FFFDF7;
  --hairline: #E6DFCC;
  --text: #1C1C1A;
  --text-2: #66665F;      /* soft grey darkened to 5.3:1 on cream */
  --primary: #0F3D2E;
  --on-primary: #FAF6EC;
  --link: #0F3D2E;

  --radius-card: 16px;
  --radius-btn: 12px;
  --margin: 20px;
  --max: 1040px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1F18;
    --surface: #12362A;
    --hairline: #22503E;
    --text: #FAF6EC;
    --text-2: #B9B7AB;
    --primary: #FAF6EC;
    --on-primary: #0F3D2E;
    --link: #E9D9A6;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;          /* Arabic body text: 1.6-1.8 */
  letter-spacing: 0;         /* never track Arabic */
  font-synthesis: none;      /* no fake bold/italic */
  -webkit-font-smoothing: antialiased;
}
:lang(en) body, body:lang(en) { line-height: 1.6; }

h1, h2, h3 { text-wrap: balance; font-family: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif; font-weight: 500; line-height: 1.4; margin: 0; letter-spacing: 0; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; font-family: "IBM Plex Sans Arabic", sans-serif; font-weight: 500; }
p { margin: 0 0 16px; text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 3px; }
strong { font-weight: 500; }
small, .caption { font-size: 13px; color: var(--text-2); }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--margin); }

/* Header */
.site-header { padding-block: 16px; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; }
.brand { font-family: "Reem Kufi", sans-serif; font-weight: 500; font-size: 22px; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand svg { width: 28px; height: 28px; }
.site-header nav { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.site-header nav a { color: var(--text-2); text-decoration: none; font-size: 15px; padding: 8px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.site-header nav a:hover { color: var(--text); }

/* Hero */
.hero { padding-block: 48px 32px; text-align: center; }
.hero h1 { font-size: clamp(28px, 6vw, 40px); }
.hero .pitch { font-size: 17px; color: var(--text-2); max-width: 34ch; margin: 8px auto 32px; }
.stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding-inline: 20px; border-radius: var(--radius-btn);
  background: var(--primary); color: var(--on-primary); text-decoration: none; font-weight: 500; font-size: 15px;
}
.store svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.store.secondary { background: transparent; color: var(--text); border: 1px solid var(--hairline); }

/* Example cards (artwork is never mirrored) */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-block: 24px 48px; max-width: 760px; margin-inline: auto; }
.cards img { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: var(--radius-card); display: block; box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
.cards figure { margin: 0; }
.cards figure:nth-child(2) { transform: translateY(-16px); }

/* How it works */
.how { padding-block: 32px 48px; }
.how h2 { text-align: center; margin-bottom: 24px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 24px; counter-increment: step; }
.steps li::before { content: counter(step, arabic-indic); display: block; font-family: "Reem Kufi", sans-serif; font-size: 22px; color: var(--text-2); margin-bottom: 8px; }
:lang(en) .steps li::before { content: counter(step); }
.steps p { margin: 4px 0 0; color: var(--text-2); font-size: 15px; }

/* Legal / text pages */
.doc { padding-block: 32px 64px; max-width: 720px; }
.doc h1 { margin-bottom: 8px; }
.doc h2 { font-size: 20px; margin: 32px 0 8px; }
.doc ul { padding-inline-start: 22px; margin: 0 0 16px; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--text-2); font-size: 15px; margin-bottom: 24px; }
.box { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 20px 24px; margin-block: 16px 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding-block: 24px 40px; font-size: 15px; color: var(--text-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.site-footer a { color: var(--text-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--text); }
.site-footer .lang { margin-inline-start: auto; }

a:focus-visible, .store:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 640px) {
  .hero { padding-block: 32px 16px; }
  .cards { gap: 10px; padding-block: 16px 32px; }
  .cards figure:nth-child(2) { transform: translateY(-10px); }
  .steps { grid-template-columns: 1fr; }
  .site-header nav a.hide-sm { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .cards img { animation: rise .25s ease-out both; }
  .cards figure:nth-child(2) img { animation-delay: .06s; }
  .cards figure:nth-child(3) img { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
}
