/* ============================================================================
   GOOMKW.COM — shared design system (WEB 05, frozen)
   Dark-only MVP · mobile-first · logical CSS (RTL-ready) · system stack
   ============================================================================ */

:root {
  /* color tokens */
  --bg: #0d1117;
  --surface: #161d27;
  --surface-2: #1c2533;
  --text: #e6edf3;
  --muted: #8b98a9;
  --line: #2a3646;
  --accent: #3fb950;      /* actions */
  --accent-2: #2ea043;
  --cyan: #22d3ee;        /* energy */
  --gold: #d29922;        /* rewards only, max 2/page */
  --danger: #f85149;

  /* type scale */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Noto Sans", sans-serif;
  --font-ar: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Kufi Arabic",
             "Helvetica Neue", Arial, sans-serif;

  /* spacing (4px scale) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;
  --s-9: 48px; --s-10: 64px; --s-11: 80px; --s-12: 96px;

  /* radii + elevation */
  --r-card: 14px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35);
  --shadow-glow: 0 0 60px -12px rgba(63,185,80,.5);

  /* layout */
  --col-text: 760px;
  --col-grid: 1120px;
  --header-h: 56px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Arabic: real font + no letter-spacing (RTL routes set lang=ar dir=rtl) */
[lang="ar"] body, [dir="rtl"] body { font-family: var(--font-ar); letter-spacing: 0; }
[lang="ar"] { letter-spacing: 0 !important; }
[dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

h1, h2, h3, h4 { margin: 0 0 var(--s-3); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 var(--s-4); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- layout */
.wrap-text { width: min(100% - 2 * var(--s-5), var(--col-text)); margin-inline: auto; }
.wrap-grid { width: min(100% - 2 * var(--s-5), var(--col-grid)); margin-inline: auto; }

section { padding-block: var(--s-9); }
@media (min-width: 768px) { section { padding-block: var(--s-12); } }
section[id] { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s-3);
}
[lang="ar"] .eyebrow { letter-spacing: .04em; }
.section-head { max-width: 640px; margin-block-end: var(--s-7); }
.section-head h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.header-inner {
  width: min(100% - 2 * var(--s-5), var(--col-grid));
  margin-inline: auto;
  display: flex; align-items: center; gap: var(--s-4);
  justify-content: space-between;
}
.wordmark {
  font-size: 22px; font-weight: 800; letter-spacing: .18em;
  background: linear-gradient(90deg, #56d364, #2ea043, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
[lang="ar"] .wordmark { letter-spacing: .02em; }
.nav-links { display: none; align-items: center; gap: var(--s-6); }
.nav-links a { font-size: 14px; color: var(--muted); font-weight: 600; }
.nav-links a:hover { color: var(--text); }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  /* keep the header CTA on desktop too — there is no sticky bottom bar there */
  .header-cta { display: inline-flex; }
}
.header-tools { display: flex; align-items: center; gap: var(--s-3); }

/* language toggle */
.lang-toggle {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 3px; background: var(--surface);
}
.lang-toggle a {
  font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 5px 10px; border-radius: var(--r-pill); line-height: 1;
}
.lang-toggle a[aria-current="true"] { background: var(--accent); color: #06130a; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 11px var(--s-5);
  border-radius: 12px; font-weight: 700; font-size: 15px; line-height: 1;
  border: 1px solid transparent; cursor: pointer; text-align: center;
  transition: background .15s ease, transform .05s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #06130a; }
.btn-primary:hover { background: var(--accent-2); color: #06130a; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { min-height: 38px; padding: 8px var(--s-4); font-size: 13px; border-radius: 10px; }
.btn-block { display: flex; width: 100%; }
.header-cta { display: inline-flex; }

/* skip link */
.skip-link {
  position: absolute; inset-inline-start: var(--s-4); top: -60px; z-index: 100;
  background: var(--accent); color: #06130a; font-weight: 700;
  padding: 10px 16px; border-radius: 10px; transition: top .15s ease;
}
.skip-link:focus { top: var(--s-2); }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; overflow: hidden;
  padding-block: calc(var(--s-10) + 8px) var(--s-9);
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(34,211,238,.14), transparent 55%),
    radial-gradient(120% 80% at 50% 0%, rgba(63,185,80,.18), transparent 60%),
    var(--bg);
}
@media (min-width: 768px) { .hero { padding-block: var(--s-12); } }
.hero::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,.5), transparent);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 7px 16px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  color: var(--gold); font-size: 12px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: var(--s-5);
}
[lang="ar"] .hero-badge { letter-spacing: .05em; }
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.hero-title {
  font-size: clamp(2.75rem, 12vw, 5rem);
  font-weight: 800; letter-spacing: -.02em; line-height: .98; margin: 0;
  background: linear-gradient(100deg, #e6edf3 20%, #56d364 55%, #22d3ee 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[lang="ar"] .hero-title { font-size: clamp(2.5rem, 11vw, 4.25rem); letter-spacing: 0; }
.hero-tagline {
  font-size: clamp(1.15rem, 3.6vw, 1.5rem); font-weight: 600;
  color: var(--text); margin: var(--s-5) auto 0; max-width: 30ch;
}
.hero-sub {
  color: var(--muted); font-size: clamp(1rem, 2.6vw, 1.125rem);
  margin: var(--s-4) auto 0; max-width: 52ch;
}
.hero-ctas {
  display: flex; flex-direction: column; gap: var(--s-3);
  margin-top: var(--s-7); max-width: 420px; margin-inline: auto;
}
@media (min-width: 520px) { .hero-ctas { flex-direction: row; justify-content: center; } }
.hero-ctas .btn { flex: 1; }
.hero-meta {
  margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  justify-content: center; color: var(--muted); font-size: 13px; font-weight: 600;
}
.hero-meta span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-meta svg { color: var(--accent); }

/* ----------------------------------------------------------- value cards */
.grid-3 { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: var(--s-6);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent); margin-bottom: var(--s-4);
}
.card .icon.cyan { background: color-mix(in srgb, var(--cyan) 14%, transparent); border-color: color-mix(in srgb, var(--cyan) 30%, transparent); color: var(--cyan); }
.card .icon.gold { background: color-mix(in srgb, var(--gold) 14%, transparent); border-color: color-mix(in srgb, var(--gold) 30%, transparent); color: var(--gold); }
.card h3 { font-size: 1.08rem; margin-bottom: var(--s-2); }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* -------------------------------------------------------------- loop */
.loop { display: grid; gap: var(--s-3); grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 640px) { .loop { grid-template-columns: repeat(3, 1fr); gap: var(--s-4); } }
.loop-step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: var(--s-5);
}
.loop-step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #06130a; font-weight: 800; font-size: 14px; margin-bottom: var(--s-3);
}
.loop-step h3 { font-size: 1rem; margin-bottom: var(--s-1); }
.loop-step p { color: var(--muted); font-size: .9rem; margin: 0; }
.loop-arrow { display: none; }

/* --------------------------------------------------------- challenge */
.challenge {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(210,153,34,.12), transparent 55%),
    var(--surface);
  border: 1px solid var(--line); border-radius: 20px; padding: var(--s-7);
}
.challenge::after {
  content: ""; position: absolute; inset-inline-end: -40px; top: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(210,153,34,.25), transparent 70%);
}
.challenge .live {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: var(--s-4);
}
[lang="ar"] .challenge .live { letter-spacing: .04em; }
.challenge h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin-bottom: var(--s-3); }
.challenge .stat-row { display: flex; flex-wrap: wrap; gap: var(--s-4); margin: var(--s-5) 0; }
.challenge .stat { flex: 1 1 140px; }
.challenge .stat .big { font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 800; color: var(--gold); line-height: 1; }
.challenge .stat .lbl { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: var(--s-1); }
.challenge .coming { color: var(--muted); font-size: 14px; margin-top: var(--s-4); }
.challenge .coming .pill { color: var(--muted); }

/* -------------------------------------------------------------- plate */
.plate-flex { display: grid; gap: var(--s-6); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 768px) { .plate-flex { grid-template-columns: 1fr 1fr; gap: var(--s-8); } }
.plate-visual { display: flex; align-items: center; justify-content: center; }
.plate {
  width: min(78%, 300px); aspect-ratio: 1; border-radius: 50%;
  position: relative; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #3a4553, #1a212b 70%);
  border: 6px solid #2a3646;
  box-shadow: inset 0 0 40px rgba(0,0,0,.5), var(--shadow-1);
}
.plate .ring { position: absolute; inset: 14%; border-radius: 50%; border: 2px dashed rgba(210,153,34,.4); }
.plate .num { font-size: clamp(2.5rem, 9vw, 3.6rem); font-weight: 800; color: var(--gold); letter-spacing: .02em; }
.plate .cap { position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.plate-copy ul { list-style: none; padding: 0; margin: var(--s-4) 0; display: grid; gap: var(--s-3); }
.plate-copy li { display: flex; gap: var(--s-3); color: var(--muted); font-size: .95rem; }
.plate-copy li svg { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.plate-copy li b { color: var(--text); font-weight: 700; }
.fulfil {
  margin-top: var(--s-4); font-size: 13.5px; color: var(--muted);
  border-inline-start: 2px solid var(--line); padding-inline-start: var(--s-3);
}

/* --------------------------------------------------------------- pills */
.pill {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill);
}
.pill.live { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.pill.soon { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill.now { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
[lang="ar"] .pill { letter-spacing: .02em; }

/* --------------------------------------------------------------- food */
.feature-list { display: grid; gap: var(--s-4); }
.feature {
  display: flex; gap: var(--s-4); align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: var(--s-5);
}
.feature .icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan) 28%, transparent); }
.feature h3 { font-size: 1rem; margin-bottom: var(--s-1); }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.feature .tag { margin-top: var(--s-2); }

/* ------------------------------------------------------------- community */
.community { text-align: center; max-width: 620px; margin-inline: auto; }
.community .lead { font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 800; margin-bottom: var(--s-3); }
.community p { color: var(--muted); }

/* ------------------------------------------------------------ alpha CTA */
.alpha {
  position: relative; overflow: hidden; text-align: center;
  background:
    radial-gradient(100% 130% at 50% 0%, rgba(63,185,80,.16), transparent 60%),
    var(--surface);
  border-block: 1px solid var(--line);
}
.alpha .badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s-4);
}
[lang="ar"] .alpha .badge { letter-spacing: .04em; }
.alpha h2 { font-size: clamp(1.7rem, 5.5vw, 2.5rem); margin-bottom: var(--s-3); }
.alpha .fact {
  display: inline-flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); justify-content: center;
  color: var(--muted); font-size: 13.5px; font-weight: 600; margin-bottom: var(--s-6);
}
.alpha .fact b { color: var(--text); }
.alpha .cta-row { display: flex; flex-direction: column; gap: var(--s-3); max-width: 420px; margin: 0 auto var(--s-5); }
@media (min-width: 520px) { .alpha .cta-row { flex-direction: row; } .alpha .cta-row .btn { flex: 1; } }
.alpha .limit { color: var(--muted); font-size: 13px; max-width: 52ch; margin: 0 auto; }
.alpha .ios { margin-top: var(--s-4); font-size: 13px; color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------ partners */
.partner-flex { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 768px) { .partner-flex { grid-template-columns: 1.2fr .8fr; align-items: center; gap: var(--s-8); } }
.partner-card {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: 20px; padding: var(--s-7);
}
.partner-card h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
.partner-card ul { list-style: none; padding: 0; margin: var(--s-4) 0 var(--s-5); display: grid; gap: var(--s-3); }
.partner-card li { display: flex; gap: var(--s-3); color: var(--muted); font-size: .95rem; }
.partner-card li svg { color: var(--cyan); flex-shrink: 0; margin-top: 2px; }

/* --------------------------------------------------------------- aurora */
.aurora {
  text-align: center; border-block: 1px solid var(--line);
  background: radial-gradient(80% 160% at 50% 50%, rgba(34,211,238,.07), transparent 70%);
}
.aurora .line {
  font-size: clamp(1.05rem, 3vw, 1.3rem); font-weight: 600; color: var(--text);
  max-width: 40ch; margin: 0 auto var(--s-3);
}
.aurora .line b { color: var(--cyan); font-weight: 700; }
.aurora .sub { color: var(--muted); font-size: 14px; margin: 0; }
.aurora .sep { color: var(--line); }

/* ------------------------------------------------------------------ faq */
.faq { display: grid; gap: var(--s-3); max-width: var(--col-text); margin-inline: auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: var(--s-4) var(--s-5); overflow: hidden;
}
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); font-weight: 700; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { color: var(--muted); transition: transform .2s ease; flex-shrink: 0; }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .a { color: var(--muted); font-size: .95rem; margin: var(--s-3) 0 0; }

/* --------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s-8) var(--s-6); background: var(--surface); }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand .wordmark { font-size: 24px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin: var(--s-3) 0 0; max-width: 34ch; }
.footer-col h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-3); }
.footer-col a { display: block; color: var(--muted); font-size: 14px; padding-block: 5px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 13px;
}
.footer-bottom .legal { display: flex; gap: var(--s-4); }

/* --------------------------------------------- sticky mobile CTA bar */
.mobile-cta {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .25s ease;
}
.mobile-cta.show { transform: translateY(0); }
.mobile-cta .btn { width: 100%; }
@media (min-width: 900px) { .mobile-cta { display: none; } }
body.has-mobile-cta { padding-bottom: 72px; }

/* ------------------------------------------------------------- misc */
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
