/* MyRest public site. Palette follows the app (warm paper, ink, coral, honey); logical properties
   throughout so the same sheet serves the Hebrew (RTL) and English (LTR) pages. */
:root {
  color-scheme: light dark;
  --ink: #1c1917;
  --ink2: #57534e;
  --muted: #78716c;
  --bg: #faf8f5;
  --surface: #ffffff;
  --cream: #f2eadd;
  --line: #e7e5e4;
  --brand: #f2633d;
  --link: #c8421f;
  --honey: #fb911b;
  --peach: #fad5c6;
  --btn: #1c1917;
  --btn-text: #ffffff;
  --btn-hover: #2e2a27;
  --float: 0 8px 28px rgba(28, 25, 23, 0.14), 0 1px 3px rgba(28, 25, 23, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f0ea;
    --ink2: #c9c1b8;
    --muted: #9c948b;
    --bg: #171412;
    --surface: #1f1b18;
    --cream: #211c18;
    --line: #33302c;
    --link: #f58361;
    --peach: rgba(242, 99, 61, 0.2);
    --btn: #f5f0ea;
    --btn-text: #171412;
    --btn-hover: #e4ddd2;
    --float: 0 8px 28px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }

/* header */
.top { display: flex; align-items: center; gap: 24px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 21px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; display: block; }
.top nav { display: flex; align-items: center; gap: 24px; margin-inline-start: auto; }
.top nav a { color: var(--ink2); text-decoration: none; font-size: 15.5px; }
.top nav a:hover { color: var(--ink); }
.top nav a.lang {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px;
  color: var(--ink); background: var(--surface); font-weight: 500;
}

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; padding-block: 48px 88px; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 700; margin: 0 0 18px; }
.hero h1 em { font-style: normal; color: var(--link); white-space: nowrap; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink2); max-width: 34em; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px;
  border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none;
}
.btn.primary { background: var(--btn); color: var(--btn-text); }
.btn.primary:hover { background: var(--btn-hover); }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.btn.ghost:hover { border-color: var(--muted); }

/* hero illustration: invented figures, drawn in CSS */
.demo {
  background: radial-gradient(120% 90% at 85% 0%, var(--peach), transparent 62%), var(--cream);
  border-radius: 28px; padding: 28px;
}
.chat, .tile { background: var(--surface); border-radius: 20px; box-shadow: var(--float); }
.chat { padding: 16px; display: grid; gap: 10px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; line-height: 1.3; }
.chat-head img { width: 32px; height: 32px; }
.chat-head small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.msg.me { justify-self: end; background: var(--peach); border-end-end-radius: 4px; }
.msg.bot { justify-self: start; background: var(--bg); border: 1px solid var(--line); border-end-start-radius: 4px; }
.tile { margin-top: 14px; padding: 16px 18px; }
.tile-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tile-top b { font-size: 22px; }
.tile-top span { color: var(--muted); font-size: 13.5px; }
.bars, .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.bars { align-items: end; height: 92px; margin-top: 12px; }
.bars i { display: block; height: var(--h); background: var(--brand); border-radius: 6px 6px 2px 2px; }
.bars i.hi { background: var(--honey); }
.days { text-align: center; color: var(--muted); font-size: 12px; margin-top: 6px; }
.note { color: var(--muted); font-size: 12.5px; margin: 14px 0 0; text-align: center; }

/* sections */
.sec { padding-block: 76px; }
.band { background: var(--cream); }
.sec h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 0 0 10px; }
.sub { color: var(--ink2); margin: 0 0 36px; max-width: 40em; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.ico { width: 48px; height: 48px; border-radius: 14px; background: var(--peach); color: var(--link); display: grid; place-items: center; margin-bottom: 14px; }
.ico svg, .facts svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--ink2); font-size: 15.5px; line-height: 1.55; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: #1c1917; font-weight: 700; font-size: 20px; margin-bottom: 14px;
}
.steps h3 { margin: 0 0 6px; font-size: 20px; }
.steps p { margin: 0; color: var(--ink2); font-size: 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 32px; list-style: none; padding: 28px 0 0; margin: 40px 0 0; border-top: 1px solid var(--line); }
.facts li { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15.5px; }
.facts svg { width: 20px; height: 20px; color: var(--link); stroke-width: 2.4; flex: none; }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact .sub { margin-bottom: 24px; }
.contact dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; }
.contact dt { color: var(--muted); font-size: 14.5px; padding-top: 2px; }
.contact dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* footer */
footer { border-top: 1px solid var(--line); padding-block: 32px 48px; color: var(--ink2); font-size: 14.5px; }
footer p { margin: 0 0 8px; max-width: 62em; }
footer .links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 16px; }

/* text pages (privacy) */
.doc { max-width: 760px; padding-block: 24px 64px; }
.doc h1 { font-size: 30px; margin: 0 0 4px; }
.doc h2 { font-size: 19px; margin: 28px 0 6px; }
.doc p, .doc li { margin: 6px 0; }
.doc .muted { color: var(--muted); font-size: 14.5px; }
.doc section + section { border-top: 1px solid var(--line); margin-top: 44px; padding-top: 28px; }
.doc [lang="en"] { direction: ltr; text-align: left; }
.doc [lang="he"] { direction: rtl; text-align: right; }

@media (max-width: 1000px) {
  .grid4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-block: 24px 56px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .contact { grid-template-columns: 1fr; gap: 28px; }
  .sec { padding-block: 56px; }
}
@media (max-width: 640px) {
  .top nav a.hop { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .grid4 { grid-template-columns: 1fr; }
  .demo { padding: 16px; border-radius: 22px; }
  .contact .card { padding: 18px; }
}

/* motion layer (motion.js). Everything here is inert without it. */
.m .hero h1, .m .lede, .m .cta, .m .demo { opacity: 0; }
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.chat { position: relative; }
.typing {
  position: absolute; inset-inline-start: 16px; display: flex; gap: 5px; padding: 15px 16px;
  border-radius: 16px; border-end-start-radius: 4px; background: var(--bg); border: 1px solid var(--line);
}
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite both; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 80%, 100% { opacity: 0.25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.bars i { transform-origin: bottom; }
.tile-top b { font-variant-numeric: tabular-nums; }
.steps { position: relative; }
.steps li::before { position: relative; z-index: 1; }
.rail { position: absolute; top: 21px; inset-inline: 22px calc((100% - 64px) / 3 - 22px); height: 2px; background: var(--line); }
.rail i { display: block; height: 100%; background: var(--brand); }
.btn { transition: transform 0.12s ease-out, background-color 0.15s, border-color 0.15s; }
.btn:active { transform: scale(0.97); }
@media (hover: hover) {
  .grid4 .card.in { transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; }
  .grid4 .card.in:hover { transform: translateY(-4px); box-shadow: var(--float); }
}
