/* ============================================================
   yallagym.fit — shared stylesheet
   Base shell (topbar / typography / cards / forms / footer) is
   used by ALL pages (privacy, terms, support, delete, /j).
   Classes prefixed lp- are landing-page only.
   ============================================================ */

:root {
  --bg: #07070c;
  --bg-elev: #0d0d15;
  --bg-card: #11111b;
  --bg-input: #181824;
  --border: #23232f;
  --border-soft: #1c1c27;
  --text: #f5f5f8;
  --muted: #9c9cac;
  --faint: #6d6d7e;
  --gold: #f5c518;
  --gold-rgb: 245 197 24;
  --gold-2: #ffb020;
  --gold-2-rgb: 255 176 32;
  --gold-dim: #c9a009;
  --danger: #ff5a5a;
  --radius: 18px;
  --max: 760px;
  --max-wide: 1080px;
  --shadow-gold: 0 8px 32px -8px rgb(var(--gold-rgb) / 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }

html, body {
  margin: 0;
  padding: 0;
  /* background lives on html only: an opaque body background would paint over
     the fixed z-index:-1 body::before glow (root stacking context order). */
  color: var(--text);
  font-family: "Heebo", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", "Assistant", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  padding: 0 20px 60px;
  overflow-x: hidden;
}

/* Ambient background glow, shared by every page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(720px 420px at 50% -120px, rgb(var(--gold-rgb) / 0.10), transparent 70%),
    radial-gradient(900px 600px at 85% 25%, rgb(var(--gold-2-rgb) / 0.045), transparent 65%);
}

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

::selection { background: rgb(var(--gold-rgb) / 0.3); }

/* Pre-paint language state: an inline <head> script sets html[lang] from the
   saved preference, and these rules make [data-lang] visibility follow it so
   the correct language paints first (app.js re-applies and wires the toggle). */
html[lang="en"] [data-lang="he"] { display: none !important; }
html[lang="en"] [data-lang="en"] { display: revert !important; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 4px;
  background: rgba(7, 7, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
/* Landing page only — content pages keep the 760px column so the header
   stays aligned with the text. */
.topbar-wide { max-width: var(--max-wide); }
.topbar::after {
  content: "";
  position: absolute;
  inset-inline: 4px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.3px;
  color: var(--text);
  text-decoration: none;
}
.brand .dot { color: var(--gold); }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-card);
  padding: 3px;
  gap: 2px;
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.lang-toggle button:hover { color: var(--text); }
.lang-toggle button.active {
  background: var(--gold);
  color: #15140b;
}

/* ---------- Typography ---------- */
h1 { font-size: 34px; line-height: 1.18; margin: 18px 0 8px; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 23px; margin: 36px 0 10px; font-weight: 700; }
h3 { font-size: 18px; margin: 22px 0 6px; font-weight: 700; }
p, li { color: var(--text); }
a { color: var(--gold); }
.muted { color: var(--muted); }
.updated { color: var(--muted); font-size: 15px; margin-top: -2px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elev));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin: 18px 0;
}

/* ---------- Tables (privacy data table) ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 15px; }
th, td { border: 1px solid var(--border); padding: 10px 12px; text-align: start; vertical-align: top; }
th { background: var(--bg-input); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #15140b;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { box-shadow: 0 10px 40px -6px rgb(var(--gold-rgb) / 0.55); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--faint); transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }

/* Store buttons: two-line badge style */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn-store:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--gold-rgb) / 0.5);
  box-shadow: 0 8px 28px -10px rgb(var(--gold-rgb) / 0.35);
}
.btn-store svg { width: 26px; height: 26px; flex: none; }
.btn-store .store-lines { display: flex; flex-direction: column; line-height: 1.2; text-align: start; }
.btn-store .store-sub { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.02em; }
.btn-store .store-name { font-size: 17px; font-weight: 700; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 15px; margin: 16px 0 6px; }
input, textarea, select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(var(--gold-rgb) / 0.15);
}
textarea { min-height: 100px; resize: vertical; }
.hint { color: var(--muted); font-size: 14px; margin-top: 6px; }

.notice {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 15px;
  border: 1px solid var(--border);
  background: var(--bg-input);
}
.notice-warn { border-color: var(--gold-dim); background: rgb(var(--gold-rgb) / 0.08); }
.notice-ok { border-color: #2e7d5b; background: rgba(46, 125, 91, 0.12); }
.notice-err { border-color: var(--danger); background: rgba(255, 90, 90, 0.10); }
.hidden { display: none !important; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max);
  margin: 60px auto 0;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}
.footer a { color: var(--muted); text-decoration: none; transition: color 0.15s ease; }
.footer a:hover { color: var(--gold); }
.footer .sep { opacity: 0.35; }

/* ---------- Generic hero (used by /j and legal pages) ---------- */
.hero { text-align: center; padding: 40px 0 10px; }
.hero h1 { font-size: 40px; }
.hero p.lead { font-size: 20px; color: var(--muted); max-width: 520px; margin: 12px auto 24px; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* RTL handling: lists need padding flip */
[dir="rtl"] ul, [dir="rtl"] ol { padding-inline-start: 22px; }

/* ============================================================
   Landing page (lp-*)
   ============================================================ */

.lp { max-width: var(--max-wide); margin: 0 auto; }

.lp .section { padding: 72px 0 8px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}
.section-title { font-size: clamp(26px, 4vw, 36px); margin: 10px 0 8px; }
.section-lead { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 0 8px; }

/* ---------- Landing hero ---------- */
.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  padding: 56px 0 24px;
}
.lp-hero-copy { text-align: start; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgb(var(--gold-rgb) / 0.35);
  background: rgb(var(--gold-rgb) / 0.08);
  color: var(--gold);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
}
.pill .pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}
/* Expanding ring animates transform/opacity only (compositor-friendly),
   unlike a box-shadow spread which repaints every frame. */
.pill .pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgb(var(--gold-rgb) / 0.5);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  70%, 100% { transform: scale(3.6); opacity: 0; }
}

.lp-hero h1 {
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 900;
  line-height: 1.08;
  margin: 20px 0 14px;
  letter-spacing: -0.02em;
}
.grad-text {
  background: linear-gradient(100deg, var(--gold) 10%, var(--gold-2) 55%, #ff8a3d 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-hero .lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 460px;
  margin: 0 0 26px;
}
.lp-hero .store-row { justify-content: flex-start; margin-bottom: 18px; }
.lp-trust { color: var(--faint); font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.lp-trust span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Phone mockup ---------- */
.lp-phone-zone { position: relative; display: flex; justify-content: center; }

.phone {
  position: relative;
  width: 300px;
  border-radius: 44px;
  padding: 10px;
  background: linear-gradient(160deg, #2a2a35, #14141c 60%);
  border: 1px solid #33333f;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 90px -30px rgb(var(--gold-rgb) / 0.35);
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.screen {
  border-radius: 35px;
  overflow: hidden;
  background: #0b0b12;
  border: 1px solid #1e1e29;
  direction: rtl; /* app is Hebrew-first — the mock stays RTL in both site languages */
  text-align: right;
}
.notch {
  display: flex;
  justify-content: center;
  padding: 9px 0 5px;
}
.notch::after {
  content: "";
  width: 86px;
  height: 22px;
  border-radius: 999px;
  background: #000;
  border: 1px solid #1c1c27;
}
.app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 10px;
  font-weight: 800;
  font-size: 15px;
}
.app-head .coins {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  background: rgb(var(--gold-rgb) / 0.1);
  border: 1px solid rgb(var(--gold-rgb) / 0.3);
  border-radius: 999px;
  padding: 3px 9px;
}
.feed-card {
  margin: 0 12px 12px;
  background: #13131d;
  border: 1px solid #20202c;
  border-radius: 18px;
  overflow: hidden;
}
.feed-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c2c3a, #1b1b26);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex: none;
}
.feed-name { font-size: 13px; font-weight: 700; line-height: 1.25; }
.feed-time { font-size: 11px; color: var(--faint); line-height: 1.25; }
.feed-streak {
  margin-inline-start: auto;
  font-size: 11.5px;
  font-weight: 700;
  color: #ff9d42;
  background: rgba(255, 138, 61, 0.1);
  border-radius: 999px;
  padding: 3px 8px;
}
.feed-photo {
  height: 138px;
  background:
    radial-gradient(140px 90px at 70% 30%, rgb(var(--gold-rgb) / 0.22), transparent 70%),
    linear-gradient(150deg, #1d1d2b, #101018);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  position: relative;
}
.feed-photo .pts {
  position: absolute;
  bottom: 10px;
  inset-inline-start: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #15140b;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 14px -4px rgb(var(--gold-rgb) / 0.6);
}
.feed-foot {
  display: flex;
  gap: 6px;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--muted);
}
.feed-foot .react {
  background: #1b1b27;
  border: 1px solid #262633;
  border-radius: 999px;
  padding: 3px 9px;
}
.feed-foot .react.on { border-color: rgb(var(--gold-rgb) / 0.45); color: var(--gold); background: rgb(var(--gold-rgb) / 0.08); }
.tabbar {
  display: flex;
  justify-content: space-around;
  padding: 10px 8px 16px;
  border-top: 1px solid #1c1c27;
  font-size: 18px;
}
.tabbar span { opacity: 0.4; }
.tabbar span.on { opacity: 1; }

/* Floating chips around the phone */
.chip-float {
  position: absolute;
  background: rgba(17, 17, 27, 0.96);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  z-index: 2;
}
.chip-float .big { font-size: 16px; }
.chip-a { top: 31%; inset-inline-end: 0; animation: float 6s ease-in-out infinite 0.8s; }
.chip-b { bottom: 18%; inset-inline-start: 0; animation: float 6.5s ease-in-out infinite 1.6s; color: var(--gold); }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 34px 0 10px;
  counter-reset: step;
}
.step {
  position: relative;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elev));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
}
.step-num {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold), #ff8a3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
}
.step h3 { margin: 12px 0 6px; font-size: 19px; }
.step p { color: var(--muted); margin: 0; font-size: 15.5px; }

/* ---------- Feature grid ---------- */
.lp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 34px 0 10px;
}
.lp-feature {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elev));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.lp-feature:hover {
  transform: translateY(-4px);
  border-color: rgb(var(--gold-rgb) / 0.35);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.65);
}
.f-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgb(var(--gold-rgb) / 0.1);
  border: 1px solid rgb(var(--gold-rgb) / 0.22);
  margin-bottom: 14px;
}
.lp-feature h3 { margin: 0 0 6px; font-size: 18px; }
.lp-feature p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- Tracker spotlight ---------- */
.lp-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin-top: 26px;
}
.lp-split-copy ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}
.lp-split-copy li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
  font-size: 16px;
}
.lp-split-copy li::before {
  content: "✓";
  color: var(--gold);
  font-weight: 800;
  flex: none;
}

.set-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elev));
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 20px;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
  direction: rtl;
  text-align: right;
}
.set-card .sc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.set-card .sc-name { font-weight: 800; font-size: 17px; }
.set-card .pr-chip {
  font-size: 12px;
  font-weight: 800;
  color: #15140b;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-radius: 999px;
  padding: 4px 11px;
  box-shadow: 0 4px 16px -4px rgb(var(--gold-rgb) / 0.55);
}
.set-grid {
  display: grid;
  grid-template-columns: 44px 1fr 1fr 1fr 40px;
  gap: 6px;
  font-size: 14px;
}
.set-grid .hd { color: var(--faint); font-size: 12px; font-weight: 700; padding: 4px 6px; }
.set-grid .cell {
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  padding: 7px 6px;
  text-align: center;
  font-weight: 600;
}
.set-grid .cell.ghost { color: var(--faint); font-weight: 500; background: transparent; border-style: dashed; }
.set-grid .cell.done {
  background: rgb(var(--gold-rgb) / 0.12);
  border-color: rgb(var(--gold-rgb) / 0.4);
  color: var(--gold);
  font-weight: 800;
}
.set-grid .idx { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }

/* ---------- Final CTA ---------- */
.lp-cta {
  position: relative;
  margin: 84px 0 20px;
  border-radius: 26px;
  padding: 56px 32px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(480px 240px at 50% -60px, rgb(var(--gold-rgb) / 0.16), transparent 70%),
    linear-gradient(180deg, var(--bg-card), var(--bg-elev));
  border: 1px solid rgb(var(--gold-rgb) / 0.22);
}
.lp-cta h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 10px; font-weight: 900; }
.lp-cta p { color: var(--muted); margin: 0 auto 26px; max-width: 440px; }
.lp-cta .store-row { justify-content: center; }

/* ---------- Reveal on scroll ----------
   Hidden state is gated on html.js (set by the inline head script) so content
   stays visible when JavaScript doesn't run — never hide content in plain CSS. */
.reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal { opacity: 0; transform: translateY(22px); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .lp .section { padding: 56px 0 8px; }
  .lp-hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 36px;
    text-align: center;
  }
  .lp-hero-copy { text-align: center; }
  .lp-hero .lead { margin-inline: auto; }
  .lp-hero .store-row { justify-content: center; }
  .lp-trust { justify-content: center; }
  .lp-split { grid-template-columns: 1fr; gap: 34px; }
  .lp-features { grid-template-columns: 1fr 1fr; }
  .chip-a { inset-inline-end: 2%; }
}
@media (max-width: 620px) {
  .steps, .lp-features { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone, .chip-a, .chip-b, .pill .pulse::after { animation: none; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}
