/* Tamrur — one stylesheet for the whole site.
   Same tokens as the app (mobile/src/theme/tokens.ts), so the site and the app are one thing.

   Direction: nothing in here mirrors by hand. Every inline axis uses a logical property
   (margin-inline, padding-inline, border-inline, inset-inline, text-align: start/end), so a
   `dir="rtl"` element flips because the browser flips it, not because a rule guessed. */

/* ---------- tokens ---------- */
:root {
  --bg: #f7f8fa;
  --card: #fff;
  --text: #0f141b;
  --muted: #5d6b7c;
  --line: #e6eaf0;
  --line-strong: #cbd4e1;
  --primary: #1e5aa8;
  --accent: #f2b705;
  --accent-soft: #fdf1cc;

  /* the asphalt — identical in both themes, because the hero is always night */
  --ink: #0b0f14;
  --ink-mid: #1b2a3d;
  --ink-soft: #151b23;
  --on-ink: #f4f7fb;
  --on-ink-muted: #9fb0c4;
  --ink-line: transparent;

  /* focus ring: yellow is ~1.8:1 on white, so it is never the ring on paper */
  --focus: #1e5aa8;
  --shadow-soft: 0 2px 8px rgba(11, 18, 32, 0.08);
  --shadow-lift: 0 10px 24px rgba(11, 18, 32, 0.14);
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14;
    --card: #151b23;
    --text: #f2f5f9;
    --muted: #93a1b2;
    --line: #232c38;
    --line-strong: #36404e;
    --primary: #5e9be0;
    --accent-soft: #3a2f0e;

    --ink: #05080b;
    --ink-mid: #162332;
    --ink-soft: #101720;
    /* a shadow on black reads as nothing, so the hero takes a hairline instead */
    --ink-line: #232c38;

    --focus: #f2b705;
    --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.04);
    --shadow-lift: 0 10px 24px rgba(0, 0, 0, 0.5);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Hebrew",
    "Arial Hebrew", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-align: start;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary); }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: #0b0f14; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 8px; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.2px; }
h2 { font-size: 22px; font-weight: 700; margin: 32px 0 8px; }
h3 { font-size: 19px; font-weight: 600; }

p, li { color: var(--text); }

.muted { color: var(--muted); font-size: 14px; }

hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

/* Parked above the viewport rather than at inset-inline-start: -9999px — in RTL that negative
   inset is a negative `right`, which pushes the document sideways and gives the page a horizontal
   scrollbar. Moving it up cannot overflow anything. */
.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: 12px;
  transform: translateY(-250%);
  background: var(--card);
  color: var(--text);
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  z-index: 10;
}
.skip:focus { transform: none; }

/* ---------- shared chrome (landing, terms, privacy) ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding-inline: 20px; }

/* The language link carries its own `dir` (it is the other language's word), and a logical
   property resolves against the ELEMENT's direction — so `margin-inline-start: auto` on it would
   resolve backwards and strand it mid-header. `justify-content` resolves against the CONTAINER's
   direction, which is the page's, so the pill lands on the end edge in both directions. */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  max-width: 760px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
}

.lang {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--primary);
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

main { max-width: 760px; margin: 0 auto; padding: 24px 20px 64px; }

/* the landing page manages its own width, section by section */
main.landing { max-width: none; padding: 0 0 64px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  box-shadow: var(--shadow-soft);
}

footer {
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 20px;
}

main.landing > footer { max-width: 760px; margin-inline: auto; padding-inline: 20px; }

footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- the hero: the road at night ---------- */
.night {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(30, 90, 168, 0.28), transparent 60%),
    linear-gradient(170deg, var(--ink) 0%, var(--ink-mid) 55%, var(--ink-soft) 100%);
  color: var(--on-ink);
  border-bottom: 1px solid var(--ink-line);
  padding-bottom: 44px;
}

.night a { color: #8cb8ee; }
/* the link colour above out-specifies .btn-accent / .btn-ghost, so restate them inside the hero */
.night .btn-accent { color: #0b0f14; }
.night .btn-ghost { color: var(--on-ink); }
.night .brand { color: var(--on-ink); }
.night .lang { color: var(--on-ink); border-color: rgba(244, 247, 251, 0.35); }
.night :focus-visible { outline-color: var(--accent); }

.hero { max-width: 760px; margin: 0 auto; padding: 14px 20px 0; }

.plate {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  display: block;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lift);
}

.hero h1 {
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
  color: var(--on-ink);
}

.hero .lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--on-ink);
  margin: 0 0 10px;
  max-width: 34em;
}

.hero .sub {
  color: var(--on-ink-muted);
  font-size: 15px;
  margin: 0 0 24px;
  max-width: 34em;
}

.hero strong { color: var(--accent); font-weight: 600; }

/* the stat row — number over label, tabular figures, like the app's Stat */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stats li {
  background: rgba(244, 247, 251, 0.06);
  border: 1px solid rgba(244, 247, 251, 0.14);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--on-ink);
}

.stats b {
  display: block;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stats span {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: var(--on-ink-muted);
  margin-top: 2px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 120ms ease;
}

.btn:active { transform: scale(0.97); }

/* yellow is a background for dark type, never light type on white */
.btn-accent { background: var(--accent); color: #0b0f14; border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--on-ink); border-color: rgba(244, 247, 251, 0.4); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #0b0f14;
  background: var(--accent);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 18px;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.cta .btn { flex: 1 1 260px; text-align: center; }

@media (min-width: 560px) {
  .cta .btn { flex: 0 0 auto; }
}

/* ---------- paper sections ---------- */
section.band { max-width: 760px; margin: 0 auto; padding: 40px 20px 0; }

/* the brand diamond before a section heading */
.dia > h2 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 0;
}

.dia > h2::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 2px;
  margin-top: 0.5em;
}

/* the one loud card on paper: the price */
.price {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.price .amount {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  display: block;
}

.price .once {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}

/* diamond bullets, the app's list marker */
ul.dots { list-style: none; padding: 0; margin: 12px 0 0; }

ul.dots li {
  position: relative;
  padding-inline-start: 22px;
  margin-bottom: 12px;
}

ul.dots li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 2px;
}

ul.dots li b { font-weight: 600; }

/* feature cards */
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 16px;
}

@media (min-width: 620px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.grid .item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.grid .item h3 { margin: 0 0 4px; font-size: 17px; }
.grid .item p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; }

/* the 2011 date — the thing every competitor leaves out */
.dated {
  border: 1px solid var(--line-strong);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--card);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
}

.dated .stamp {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 4px;
}

.note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* the English half of the page */
.flip { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 8px; }

.en-title {
  font-size: clamp(24px, 6vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.2px;
  margin: 24px 0 12px;
}

.mini { font-size: 15px; font-weight: 600; color: var(--muted); margin-top: 0; }
