/* The site of Chance (Phase 5, T2). The colours are the app's tokens (mobile/src/theme/tokens.ts): the night set,
   navy surfaces, green only for the primary action, orange for the mark. Rubik for display, Heebo for text, both
   served from here (no third-party font host). Logical properties, so one sheet serves Hebrew (rtl) and English. */

@font-face { font-family: 'Heebo'; font-weight: 400; font-display: swap; src: url('/assets/fonts/Heebo_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'Heebo'; font-weight: 700; font-display: swap; src: url('/assets/fonts/Heebo_700Bold.ttf') format('truetype'); }
@font-face { font-family: 'Rubik'; font-weight: 800; font-display: swap; src: url('/assets/fonts/Rubik_800ExtraBold.ttf') format('truetype'); }

:root {
  --brand: #2ED47F;
  --brand-strong: #5EE3A0;
  --brand-wash: rgba(46, 212, 127, 0.14);
  --ink: #F2F6FA;
  --ink-muted: #9DB0C8;
  --ink-faint: #5F7592;
  --surface: #0B1D33;
  --surface-raised: #1B3758;
  --card: #132B47;
  --header: #081629;
  --line: rgba(255, 255, 255, 0.06);
  --live: #FF7A3D;
  --live-strong: #FFA372;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand-strong); text-underline-offset: 3px; }
a:hover { color: var(--brand); }

.wrap { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: 20px; }

/* The top bar: the mark and the wordmark, the language switch at the far end. */
.top { background: var(--header); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font-family: 'Rubik', 'Heebo', sans-serif; font-weight: 800; font-size: 22px; letter-spacing: 0.2px; }
.lang { color: var(--ink-muted); font-size: 14px; text-decoration: none; padding: 10px 4px; }
.lang:hover { color: var(--ink); }

main { flex: 1; padding-block: 40px 56px; }

h1, h2 { font-family: 'Rubik', 'Heebo', sans-serif; font-weight: 800; line-height: 1.25; }
h1 { font-size: 32px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 36px 0 8px; }
h3 { font-size: 16px; margin: 20px 0 4px; }
p, li { color: var(--ink); }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; }
ul, ol { padding-inline-start: 22px; }
li { margin-block: 4px; }

.card { background: var(--card); border-radius: 18px; padding: 22px 22px; margin-block: 18px; }

/* The home page's hero. */
.hero { text-align: center; padding-block: 24px 8px; }
.hero img { width: 104px; height: 104px; }
.hero h1 { font-size: 44px; margin-top: 18px; }
.hero .lead { font-size: 19px; color: var(--ink-muted); max-width: 520px; margin: 0 auto; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-block: 36px; }
.features .card { margin: 0; }
.features h3 { margin-top: 0; font-size: 17px; }
.features p { margin: 0; color: var(--ink-muted); font-size: 15px; }
.accent { color: var(--live-strong); }

/* The store buttons: green with navy text (the app's primary action), never white text on green. */
.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-block: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px;
  border-radius: 14px; font-weight: 700; font-size: 16px; text-decoration: none;
  background: var(--surface-raised); color: var(--ink);
}
.btn:hover { color: var(--ink); filter: brightness(1.12); }
.btn.primary { background: var(--brand); color: var(--surface); }
.btn.primary:hover { color: var(--surface); }

/* The invite page: the code in a raised box, left to right in both languages. */
.code {
  display: inline-block; direction: ltr; unicode-bidi: isolate; font-family: 'Rubik', 'Heebo', sans-serif;
  font-weight: 800; font-size: 34px; letter-spacing: 6px; padding: 10px 20px 10px 26px; border-radius: 14px;
  background: var(--surface-raised); color: var(--ink); margin-block: 8px;
}
.center { text-align: center; }
.steps { text-align: start; max-width: 460px; margin-inline: auto; }

.legal h2 { border-top: 1px solid var(--line); padding-top: 24px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal th, .legal td { text-align: start; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.legal th { color: var(--ink-muted); font-weight: 700; }

footer { background: var(--header); color: var(--ink-muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-block: 22px; align-items: center; }
footer a { color: var(--ink-muted); text-decoration: none; padding-block: 6px; }
footer a:hover { color: var(--ink); }
footer .copy { margin-inline-start: auto; color: var(--ink-faint); }

@media (max-width: 520px) {
  h1 { font-size: 28px; }
  .hero h1 { font-size: 38px; }
  main { padding-block: 28px 40px; }
  .card { padding: 18px; }
  footer .copy { margin-inline-start: 0; width: 100%; }
}
