/* Tafasti website. Layout concept: the page is a route. Sections are stops on one teal line
   that runs down the inline-start side, each heading marked with the sand stop from the logo. */
@font-face {
  font-family: "Rubik";
  src: url("fonts/rubik.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --teal: #0B5D5E;
  --sand: #F3D3A0;
  --deep: #08403F;
  --foam: #EEF6F4;
  --go: #3FD98A;
  --warn: #FFD23F;
  --stop: #FF5A5F;
  --late: #FF9F43;

  --bg: #F7FBFA;
  --surface: #FFFFFF;
  --fg: #0E2322;
  --muted: #4E6967;
  --line: #D3E3E1;
  --route: #0B5D5E;
  --accent: #0B5D5E;
  --accent-fg: #FFFFFF;
  --tint: #E4F1EE;
  --focus: #0B5D5E;

  --font: "Rubik", "Arial Hebrew", "Noto Sans Hebrew", system-ui, sans-serif;
  --measure: 66ch;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-end: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1515;
    --surface: #112020;
    --fg: #E5F1EF;
    --muted: #93B0AD;
    --line: #23393A;
    --route: #7FD6CF;
    --accent: #7FD6CF;
    --accent-fg: #062B2A;
    --tint: #142A2A;
    --focus: #7FD6CF;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 500; }
p { margin: 0; }
.muted { color: var(--muted); }

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 20;
  background: var(--accent); color: var(--accent-fg); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- header and footer ---------- */
.bar {
  max-width: 1120px; margin: 0 auto;
  padding-left: var(--gutter); padding-right: var(--gutter-end);
  display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap;
}
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 11; background: var(--bg); }
.site-header .bar { padding-block: 12px; }
.brand { display: block; line-height: 0; margin-inline-end: auto; }
.brand img { height: 34px; width: auto; }
.site-header ul, .site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-header nav a, .lang { color: var(--fg); text-decoration: none; font-weight: 500; font-size: .98rem; }
.site-header nav a:hover, .lang:hover { color: var(--accent); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
@media (max-width: 640px) {
  .site-header nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .site-header nav ul { flex-wrap: nowrap; }
  .site-header nav a { white-space: nowrap; }
}
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--tint); }
.site-footer .bar { padding-block: 32px 40px; align-items: flex-start; }
.site-footer a { color: var(--fg); }
.site-footer p { flex-basis: 100%; color: var(--muted); font-size: .92rem; }

/* ---------- page frame: the route ---------- */
.page { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-end); }
.route { position: relative; padding-inline-start: 40px; display: grid; gap: 96px; }
.route::before {
  content: ""; position: absolute; inset-block: 12px 0; inset-inline-start: 9px; width: 6px; border-radius: 6px;
  background: linear-gradient(to bottom, var(--route), color-mix(in srgb, var(--route) 15%, transparent));
}
.stop { position: relative; display: grid; gap: 22px; }
.stop > h2::before, .stop > div > h2:first-child::before {
  content: ""; position: absolute; inset-inline-start: -40px; margin-top: .22em; width: 24px; height: 24px; border-radius: 50%;
  background: var(--sand); box-shadow: 0 0 0 5px var(--bg);
}
.stop > .lede { font-size: 1.15rem; color: var(--muted); max-width: var(--measure); }
@media (max-width: 560px) {
  .route { padding-inline-start: 28px; gap: 72px; }
  .route::before { inset-inline-start: 5px; width: 5px; }
  .stop > h2::before, .stop > div > h2:first-child::before { inset-inline-start: -29px; width: 20px; height: 20px; }
}

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px 56px; align-items: center; padding-block: 56px 24px; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); padding-block: 36px 8px; } }
.hero-copy { display: grid; gap: 22px; }
.hero-copy p { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 34ch; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; flex-direction: column; padding: 10px 18px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); line-height: 1.25;
}
.store small { font-size: .78rem; color: var(--muted); }
.store b { font-weight: 500; }

/* ---------- the animated phone ---------- */
.demo { display: grid; justify-items: center; gap: 20px; }
.phone {
  width: min(330px, 86vw); aspect-ratio: 9 / 17; border-radius: 46px; padding: 12px;
  background: #0A0F0F; box-shadow: 0 30px 70px rgba(8, 64, 63, .28), inset 0 0 0 2px #2A3434;
}
.screen {
  position: relative; height: 100%; border-radius: 36px; overflow: hidden; padding: 14px 14px 18px;
  background: linear-gradient(170deg, #5E8C8A 0%, #2F5F63 45%, #1C3B44 100%);
  display: grid; grid-template-rows: auto auto 1fr; gap: 14px; color: #fff;
}
.island {
  justify-self: center; height: 30px; min-width: 104px; border-radius: 999px; background: #000;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px;
  transition: min-width .5s cubic-bezier(.2, .8, .2, 1);
}
.island .i-mark, .island .i-time { opacity: 0; transition: opacity .3s; }
.island .i-mark { width: 18px; height: 18px; }
.island .i-time { font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--go); }
.demo[data-island="on"] .island { min-width: 210px; }
.demo[data-island="on"] .i-mark, .demo[data-island="on"] .i-time { opacity: 1; }
.lock { text-align: center; display: grid; line-height: 1.1; }
.lock small { font-size: .85rem; font-weight: 500; opacity: .9; }
.lock b { font-size: 3.6rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.card {
  align-self: end; background: var(--deep); border-radius: 22px; padding: 14px 15px; display: grid; gap: 11px;
  transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1);
}
.demo[data-card="off"] .card { opacity: 0; transform: translateY(24px) scale(.97); }
.card-top { display: flex; align-items: center; gap: 10px; }
.card-top img { width: 30px; height: 30px; border-radius: 22.5%; }
.card-top .trip { flex: 1; font-weight: 500; font-size: .95rem; }
.count { display: grid; justify-items: end; line-height: 1; }
.count small { font-size: .72rem; color: #B5DCD8; }
.count b { font-size: 1.85rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--go); transition: color .3s; }
.count b[data-color="yellow"] { color: var(--warn); }
.count b[data-color="red"] { color: var(--stop); }
.count b[data-color="none"] { color: #fff; }
.track { position: relative; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .18); margin-inline: 9px; }
.track .fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: 6px; background: var(--sand); }
.track .rider {
  position: absolute; top: 50%; inset-inline-start: 0; width: 22px; height: 22px; margin-inline-start: -11px; margin-top: -11px;
  border-radius: 50%; background: var(--deep); border: 2px solid var(--sand); display: grid; place-items: center;
}
.track .rider svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rows { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; align-items: end; min-height: 36px; }
.rows small { display: block; font-size: .7rem; line-height: 1.25; color: #B5DCD8; }
.rows b { font-size: .98rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.rows .end { justify-self: end; align-self: center; font-size: .78rem; font-weight: 500; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .14); }

.demo-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: min(420px, 100%); counter-reset: s; }
.demo-steps li { counter-increment: s; display: flex; gap: 10px; align-items: baseline; color: var(--muted); transition: color .3s; }
.demo-steps li::before {
  content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; background: var(--tint); color: var(--muted); transition: background .3s, color .3s;
}
.demo-steps li[aria-current="step"] { color: var(--fg); }
.demo-steps li[aria-current="step"]::before { background: var(--sand); color: var(--deep); }
.demo-toggle {
  font: inherit; font-size: .9rem; font-weight: 500; color: var(--fg); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}

/* ---------- content blocks ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: grid; gap: 10px; align-content: start; }
.tile .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--tint); display: grid; place-items: center; }
.tile .icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile p { color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; counter-reset: step; max-width: 760px; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 16px; }
.steps > li::before {
  content: counter(step); grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 700; font-size: 1.2rem; background: var(--accent); color: var(--accent-fg);
}
.steps p { color: var(--muted); max-width: var(--measure); }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 820px; }
@media (max-width: 640px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { border-radius: 22px; padding: 26px; display: grid; gap: 12px; align-content: start; border: 1px solid var(--line); background: var(--surface); }
.plan.premium { background: var(--deep); color: #fff; border-color: var(--deep); }
.plan.premium .muted, .plan.premium li { color: #CFE6E3; }
.plan .price { font-size: 1.9rem; font-weight: 700; }
.plan ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }

.promise { display: flex; flex-wrap: wrap; gap: 10px; }
.promise span { padding: 8px 14px; border-radius: 999px; background: var(--tint); font-weight: 500; }

.note { border-inline-start: 4px solid var(--sand); padding: 6px 0; padding-inline-start: 16px; color: var(--muted); max-width: var(--measure); }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 1.05rem; list-style-position: outside; }
.faq details[open] summary { margin-bottom: 8px; }
.faq details p { color: var(--muted); max-width: var(--measure); }

/* ---------- long-form pages ---------- */
.doc { max-width: 760px; padding-block: 48px 0; display: grid; gap: 18px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.45rem; margin-top: 18px; }
.doc p, .doc li { max-width: var(--measure); }
.doc ul, .doc ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.doc .updated { color: var(--muted); font-size: .95rem; }
.table-wrap { overflow-x: auto; }
.doc table { border-collapse: collapse; width: 100%; font-size: .98rem; }
.doc th, .doc td { text-align: start; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 500; }
.draft { background: var(--tint); border-radius: 14px; padding: 12px 16px; font-weight: 500; }
.copyable { font-weight: 500; user-select: all; direction: ltr; unicode-bidi: isolate; }

/* ---------- setup guide ---------- */
.guide { display: grid; gap: 56px; padding-block: 48px 0; }
.guide-step { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px 40px; align-items: center; }
@media (max-width: 760px) { .guide-step { grid-template-columns: minmax(0, 1fr); } }
.guide-step p, .guide-step li { color: var(--muted); max-width: var(--measure); }
.guide-step ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.mini {
  justify-self: center; width: 240px; border-radius: 34px; padding: 10px; background: #0A0F0F;
  box-shadow: 0 18px 40px rgba(8, 64, 63, .2);
}
.mini .mscreen { border-radius: 26px; background: var(--foam); color: #0E2322; padding: 18px 14px; display: grid; gap: 10px; min-height: 300px; align-content: start; }
.mini .mtitle { font-weight: 700; font-size: 1.05rem; }
.mini .opt { border-radius: 14px; background: #fff; border: 1.5px solid #D3E3E1; padding: 10px 12px; font-size: .92rem; display: flex; justify-content: space-between; gap: 8px; }
.mini .opt.on { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(11, 93, 94, .15); }
.mini .field { border-radius: 12px; background: #fff; border: 1.5px solid var(--teal); padding: 9px 12px; font-size: 1rem; font-weight: 500; direction: ltr; text-align: start; }
.mini .btn { border-radius: 999px; background: var(--teal); color: #fff; text-align: center; padding: 10px; font-weight: 500; font-size: .95rem; }
.mini .hint { font-size: .8rem; color: #4E6967; }
@media (prefers-reduced-motion: no-preference) {
  .mini .opt.on { animation: pick 2.8s ease-in-out infinite; }
  @keyframes pick { 0%, 60%, 100% { box-shadow: 0 0 0 2px rgba(11, 93, 94, .15); } 30% { box-shadow: 0 0 0 6px rgba(11, 93, 94, .22); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
