/* Tawaqqa landing site — theme mirrors the mobile app's design system.
   All colors/radii/shadows come from the tokens below; components must not
   introduce ad-hoc hex values. */

/* ---------- Design tokens (single source of truth) ---------- */
:root {
  /* Colors */
  --brand-blue: #5996FF;
  --brand-purple: #732ECA;
  --brand-green: #48ED8A;   /* logo pop — decorative only on light bg */
  --success: #33B06B;
  --ink: #1A1433;
  --muted: #807E8C;
  --bg: #FFFFFF;
  --card: #FAF9FC;
  --border: #ECE9F1;
  --border-strong: #DAD6E2;
  --chip: #F1EEF6;
  --field-bg: #F6F5F9;
  --on-dark: #FFFFFF;
  --on-dark-muted: #C9BFD6;
  --dark-card: rgba(255, 255, 255, 0.12);
  --dark-border: rgba(255, 255, 255, 0.20);
  --error: #DC4044;
  --warning: #EFBA2B;
  --warning-bg: rgba(239, 186, 43, 0.14);

  /* Gradients & shadows */
  --gradient-brand: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
  --gradient-dark-card: linear-gradient(135deg, #241238, #4A1247);
  --shadow-card: 0 2px 10px rgba(26, 15, 45, 0.04);
  --glow-primary: 0 8px 20px rgba(115, 46, 202, 0.30);

  /* Radii */
  --r-card: 16px;
  --r-btn: 14px;
  --r-input: 12px;
  --r-sheet: 28px;
  --r-pill: 999px;

  /* Fonts — Latin defaults; RTL switches both to Cairo (fonts only, never colors) */
  --font-heading: 'Plus Jakarta Sans', 'Cairo', system-ui, sans-serif;
  --font-body: 'Inter', 'Cairo', system-ui, sans-serif;
}

html[dir="rtl"] {
  --font-heading: 'Cairo', system-ui, sans-serif;
  --font-body: 'Cairo', system-ui, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

a { color: var(--brand-blue); }

:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--r-btn);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.btn-primary {
  background: var(--gradient-brand);
  color: var(--on-dark);
  box-shadow: var(--glow-primary);
}
.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}

/* ---------- Hero band (dark gradient) ---------- */
.hero-band {
  background: var(--gradient-brand);
  color: var(--on-dark);
  padding-bottom: 72px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.wordmark {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.wordmark img {
  display: block;
  height: 56px;
  width: auto;
}

.lang-toggle {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--on-dark);
  border-radius: var(--r-pill);
  padding: 7px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
}

.hero {
  text-align: center;
  padding-block: 56px 8px;
}

.hero-pill {
  display: inline-block;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-pill);
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 0.4em;
}

.tagline {
  color: var(--on-dark-muted);
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto 32px;
}

/* Store badges — deliberate "coming soon" placeholders, not links (§2 of brief) */
.store-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-btn);
  padding: 10px 20px;
  text-align: start;
}
.badge svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.badge-store {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
}
.badge-soon {
  display: block;
  font-size: 0.8rem;
  color: var(--on-dark-muted);
}

.hero .btn-secondary {
  margin-top: 8px;
}

/* ---------- Body panel (rounded sheet over the gradient) ---------- */
.panel {
  position: relative;
  background: var(--bg);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  margin-top: calc(-1 * var(--r-sheet));
}

section {
  padding-block: 56px;
}

section > .container > h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 40px;
}
/* Sections without a .section-sub still need air under the heading */
h2 + .steps, h2 + .features, h2 + .faq { margin-top: 36px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35em;
}
.card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: var(--gradient-brand);
  color: var(--on-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 14px;
}

/* Scoring tiers — flex so partial rows stay centered (the champion tile
   takes its own full-width row via flex-basis) */
.tiers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.tier {
  flex: 1 1 160px;
  max-width: 225px;
  text-align: center;
  padding: 20px 14px;
}
.tier-points {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--success);
  line-height: 1.1;
}
.tier-zero .tier-points { color: var(--muted); }
.tier h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 8px 0 4px;
}
.tier p {
  font-size: 0.85rem;
}

.tier-champion {
  flex: 1 1 100%;
  max-width: none;
  background: var(--gradient-dark-card);
  border: 0;
  color: var(--on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  text-align: center;
  padding: 24px;
}
.tier-champion .tier-points {
  color: var(--brand-green); /* decorative pop on dark — fine on this bg */
  font-size: 2.6rem;
}
.tier-champion h3 {
  color: var(--on-dark);
  font-size: 1.1rem;
  margin: 0;
}
.tier-champion p {
  color: var(--on-dark-muted);
  flex-basis: 100%;
  margin: 0;
}

/* Leagues */
.league-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

/* Feature chips */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.features li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--chip);
  border-radius: var(--r-pill);
  padding: 10px 20px;
  font-weight: 500;
  font-size: 0.95rem;
}
.features li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--gradient-brand);
  flex: none;
}

/* Screenshots strip — the shots are full marketing cards (phone + caption
   baked in), so they render as plain rounded cards, no extra frame */
.shots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.shot {
  width: 235px;
  height: auto;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

/* FAQ */
.faq {
  max-width: 720px;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.faq summary {
  padding: 16px 22px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--r-card);
  list-style-position: outside;
}
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq details p {
  padding: 14px 22px 18px;
  margin: 0;
  color: var(--muted);
}

/* ---------- Legal pages ---------- */
.legal {
  max-width: 760px;
  padding-block: 48px 64px;
}
.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
}
.legal h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2em;
}
.legal p { line-height: 1.75; }

.draft-banner {
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: var(--r-card);
  padding: 12px 18px;
  margin-block: 20px 28px;
  font-weight: 500;
}

/* Legal header sits on the gradient like the landing page */
.legal-band {
  background: var(--gradient-brand);
  color: var(--on-dark);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 36px;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.disclaimer {
  flex-basis: 100%;
  font-size: 0.8rem;
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .hero { padding-block: 40px 4px; }
  section { padding-block: 40px; }
  .tier-champion { padding: 20px 16px; }
  .wordmark img { height: 46px; }
  .shot { width: min(300px, 100%); }
}
