/* Savatim landing. Mobile first; the bot's own palette — Telegram blue, soft
   grey surfaces, round pills — without copying its screens. */
:root {
  --blue: #3390ec;
  --blue-deep: #1f76d6;
  --blue-soft: #e8f2fd;
  --green: #34c759;
  --text: #0f172a;
  --muted: #5b6472;
  --bg: #ffffff;
  --surface: #f4f6f9;
  --card: #ffffff;
  --line: #e5e8ee;
  --shadow: 0 10px 30px rgba(15, 40, 80, .08);
  --radius: 22px;
  --max: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #4ea3f5;
    --blue-soft: #16263a;
    --text: #eef2f7;
    --muted: #9aa4b2;
    --bg: #0e1116;
    --surface: #161b22;
    --card: #1b2129;
    --line: #273040;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 7vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--card); padding: 8px 12px; border-radius: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top nav .link { display: none; color: var(--text); padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
.top nav .link:hover { background: var(--surface); text-decoration: none; }
.lang { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 3px; font-size: .85rem; font-weight: 600; }
.lang a, .lang span { padding: 5px 10px; border-radius: 999px; color: var(--muted); }
.lang span { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.lang a:hover { text-decoration: none; color: var(--text); }
@media (min-width: 860px) { .top nav .link { display: inline-block; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 1.05rem; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px rgba(51, 144, 236, .35); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.top .btn-sm { display: none; }
@media (min-width: 560px) { .top .btn-sm { display: inline-flex; } }

/* Hero */
.hero { position: relative; padding: 36px 0 56px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -20% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 22%, transparent), transparent);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; gap: 40px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px;
  background: var(--blue-soft); color: var(--blue); border-radius: 999px; font-weight: 600; font-size: .9rem; margin-bottom: 18px;
}
.pill i { font-style: normal; background: var(--card); border-radius: 999px; padding: 2px 8px; }
.hero h1 em { font-style: normal; color: var(--blue); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.cta-row .btn { flex: 1 1 auto; }
@media (min-width: 560px) { .cta-row .btn { flex: 0 0 auto; } }
.facts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.facts li { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: .92rem; font-weight: 600; }

.phones { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 420px; }
.phone {
  width: min(62vw, 270px); border-radius: 38px; padding: 9px; background: #10161f;
  box-shadow: 0 30px 60px rgba(15, 40, 80, .25);
}
.phone img { border-radius: 30px; width: 100%; }
.phones .phone:first-child { transform: rotate(-4deg); z-index: 2; }
.phones .phone + .phone { position: absolute; transform: translate(42%, 34px) rotate(5deg); width: min(52vw, 230px); opacity: .98; }
@media (min-width: 900px) {
  .hero { padding: 64px 0 88px; }
  .hero .wrap { grid-template-columns: 1.1fr .9fr; }
  .phones { min-height: 560px; }
  .phones .phone:first-child { transform: translateX(-18%) rotate(-4deg); }
  .phones .phone + .phone { transform: translate(34%, 40px) rotate(5deg); }
}

/* Sections */
section { padding: 56px 0; }
.section-head { max-width: 46em; margin-bottom: 28px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.eyebrow { display: inline-block; color: var(--blue); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.alt { background: var(--surface); }

/* Category chips + cards */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 12px; margin: 0 -16px 8px; }
.chips::-webkit-scrollbar { display: none; }
.chips span { flex: none; background: var(--surface); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.chips span:first-child { background: var(--blue-soft); color: var(--blue); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.alt .card { border-color: transparent; }
.card .icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: var(--blue-soft); margin-bottom: 14px; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.card h3 { margin-bottom: 6px; }
/* A phone lists the aisles as rows: icon left, words right, like the bot's shelves. */
@media (max-width: 559px) {
  .grid, .why { gap: 10px; }
  .card { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; align-items: start; padding: 14px 16px; border-radius: 18px; }
  .card .icon { width: 48px; height: 48px; font-size: 24px; border-radius: 14px; margin: 0; grid-row: span 2; }
  .card h3 { font-size: 1.02rem; margin: 2px 0 2px; }
  .card p { font-size: .92rem; line-height: 1.45; }
  section { padding: 44px 0; }
}

/* Steps */
.steps { display: grid; gap: 18px; counter-reset: step; }
.step { display: grid; gap: 16px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.step .num { counter-increment: step; width: 40px; height: 40px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center; }
.step .num::before { content: counter(step); }
.step p { color: var(--muted); margin: 0; }
.step figure { margin: 0; }
.step figure img { border-radius: 20px; border: 1px solid var(--line); width: 100%; max-width: 280px; margin: 0 auto; }
.swipe-hint { display: none; color: var(--muted); font-size: .9rem; margin: -12px 0 10px; }
/* On a phone the steps swipe sideways, like a story row, instead of four screens of scrolling. */
@media (max-width: 719px) {
  .steps {
    grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 18px; scroll-padding: 0 16px;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step { scroll-snap-align: start; align-content: start; }
  .step figure img { max-width: 220px; }
  .swipe-hint { display: block; }
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { align-content: start; }
}
@media (min-width: 1040px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* Why */
.why { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }
.faq-section .section-head { margin-left: auto; margin-right: auto; text-align: center; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--blue); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* Final CTA */
.final { text-align: center; }
.final .box {
  background: linear-gradient(135deg, #4da6f5, #1f76d6); color: #fff; border-radius: 30px;
  padding: 44px 22px; box-shadow: 0 24px 60px rgba(31, 118, 214, .35); position: relative; overflow: hidden;
}
.final .box::after { content: ""; position: absolute; width: 360px; height: 360px; right: -120px; top: -160px; border-radius: 50%; background: rgba(255,255,255,.12); }
.final h2 { color: #fff; }
.final p { color: rgba(255,255,255,.88); max-width: 34em; margin: 0 auto 24px; }
.final .btn { background: #fff; color: var(--blue-deep); position: relative; z-index: 1; }
.final .handle { display: block; margin-top: 14px; color: rgba(255,255,255,.9); font-weight: 600; position: relative; z-index: 1; }

/* Footer */
footer { padding: 36px 0 120px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
footer .wrap { display: grid; gap: 18px; }
footer .brand { font-size: 1.1rem; }
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
@media (min-width: 720px) { footer { padding-bottom: 36px; } footer .wrap { grid-template-columns: 1fr auto; align-items: center; } }

/* The bot's bottom bar, as a nod: a floating order button on phones. */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 12px 30px rgba(15, 40, 80, .18);
}
.dock > div { min-width: 0; }
.dock strong { display: block; font-size: .95rem; line-height: 1.2; }
.dock small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .btn { margin-left: auto; flex: none; white-space: nowrap; min-height: 46px; padding: 0 20px; font-size: .98rem; }
@media (min-width: 720px) { .dock { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
