/* ============================================================
   CargoGo — официальный сайт
   Палитра и геометрия взяты один в один из дизайн-токенов
   приложения: web/src/app/globals.css и web/tailwind.config.js
   (которые, в свою очередь, повторяют mobile/src/design-system/
   tokens/colors.ts). Ничего не придумано отдельно, чтобы сайт и
   приложение выглядели одним продуктом.
   Языки: ru, en, vi, zh, th — ровно как SUPPORTED_LANGUAGES
   в backend/src/common/constants/app.constants.ts.
   ============================================================ */

:root {
  /* Поверхности */
  --bg: #f7f9fc;
  --card: #ffffff;

  /* Палитра приложения */
  --ink: #0b1b34;
  --muted: #8592ac;
  --border: #e7ecf5;
  --blue50: #eaf1fe;
  --blue500: #3a75f2;
  --blue600: #2a5ce0;
  --blue700: #1b3fae;
  --blue800: #15328c;
  --green: #1ea362;
  --green-bg: #e7f8ee;
  --amber: #d9942f;
  --amber-bg: #fbf1df;
  --red: #e0473e;
  --star: #f3b23a;

  /* Геометрия приложения */
  --r-card: 16px;
  --r-button: 16px;
  --r-input: 12px;
  --r-badge: 999px;

  --maxw: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: Inter, 'Segoe UI', system-ui, -apple-system,
               'Noto Sans', 'Noto Sans Thai', 'Noto Sans SC', sans-serif;
  color: var(--ink);
  background: var(--card);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.logo { font-size: 1.45rem; font-weight: 800; color: var(--blue600); white-space: nowrap; }
.logo span { color: var(--amber); }
.nav-links { display: flex; gap: 24px; font-weight: 500; color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--blue600); }
.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-select {
  border: 1px solid var(--border); border-radius: var(--r-input);
  padding: 9px 11px; font: inherit; font-size: .9rem;
  color: var(--ink); background: var(--card); cursor: pointer;
}
.lang-select:focus { outline: 2px solid var(--blue500); outline-offset: 1px; }

/* ---------- Кнопки (радиус и цвета — как в приложении) ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: var(--r-button);
  font-weight: 600; font-size: 1rem; border: none; cursor: pointer;
  transition: background .18s, color .18s, filter .18s; text-align: center;
}
.btn-primary { background: var(--blue600); color: #fff; }
.btn-primary:hover { background: var(--blue700); }
.btn-outline { border: 2px solid var(--blue600); color: var(--blue600); background: transparent; }
.btn-outline:hover { background: var(--blue600); color: #fff; }
.btn-light { background: #fff; color: var(--blue700); }
.btn-light:hover { filter: brightness(.94); }
.btn-ghost { border: 2px solid rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.14); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--blue800) 0%, var(--blue600) 55%, var(--blue500) 100%);
  color: #fff; padding: 92px 0 100px; text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800;
  max-width: 880px; margin: 0 auto 20px; line-height: 1.18;
}
.hero p { font-size: 1.16rem; max-width: 680px; margin: 0 auto 36px; opacity: .92; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .btn { font-size: 1.05rem; padding: 15px 34px; }
.hero-note { margin-top: 20px; font-size: .9rem; opacity: .78; }

/* ---------- Секции ---------- */
section { padding: 82px 0; }
section.alt { background: var(--bg); }
.section-title { text-align: center; font-size: clamp(1.55rem, 3.2vw, 2rem); font-weight: 800; margin-bottom: 14px; }
.section-sub { text-align: center; color: var(--muted); max-width: 680px; margin: 0 auto 52px; }

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 28px;
}
.card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; }
.ico {
  width: 46px; height: 46px; border-radius: var(--r-input);
  background: var(--blue50); color: var(--blue600);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; margin-bottom: 16px;
}
.ico.green { background: var(--green-bg); color: var(--green); }
.ico.amber { background: var(--amber-bg); color: var(--amber); }

/* ---------- Роли и шаги ---------- */
.roles { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.role-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 32px; }
.role-box h3 { font-size: 1.2rem; margin-bottom: 24px; color: var(--blue600); }
.steps { list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 60px; margin-bottom: 22px; }
.steps li:last-child { margin-bottom: 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: var(--r-badge);
  background: var(--blue600); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.steps strong { display: block; margin-bottom: 2px; }
.steps span { color: var(--muted); font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 830px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 18px 22px; margin-bottom: 14px; background: var(--card);
}
.faq details[open] { border-color: var(--blue500); }
.faq-q { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; color: var(--blue600); font-size: 1.4rem; line-height: 1; }
.faq details[open] .faq-q::after { content: '\2212'; }
.faq details p { color: var(--muted); margin-top: 12px; font-size: .96rem; }

/* ---------- Скачивание ---------- */
.download { background: var(--ink); color: #fff; text-align: center; }
.download .section-title { color: #fff; }
.download .section-sub { color: #fff; opacity: .78; }
.dl-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.dl-soon { font-size: .88rem; opacity: .6; }

/* ---------- Подвал ---------- */
footer { background: #08152b; color: #cbd5e1; padding: 56px 0 28px; font-size: .93rem; }
.foot-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 32px; }
.foot-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.foot-grid a { display: block; margin-bottom: 9px; color: #cbd5e1; }
.foot-grid a:hover { color: #fff; }
.foot-legal { border-top: 1px solid #16233d; padding-top: 22px; color: var(--muted); font-size: .85rem; }
.foot-legal p { margin-bottom: 6px; }

/* ---------- Юридические страницы ---------- */
.legal-head { background: var(--bg); border-bottom: 1px solid var(--border); padding: 52px 0; }
.legal-head h1 { font-size: clamp(1.7rem, 4vw, 2.25rem); font-weight: 800; margin-bottom: 10px; }
.legal-head .updated { color: var(--muted); font-size: .93rem; }
.legal-body { max-width: 830px; margin: 0 auto; padding: 50px 20px 80px; }
.legal-body h2 { font-size: 1.2rem; margin: 34px 0 12px; }
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body p { margin-bottom: 14px; color: #334155; }
.legal-body ul { margin: 0 0 16px; padding-left: 24px; color: #334155; }
.legal-body li { margin-bottom: 8px; }
.legal-note {
  background: var(--amber-bg); border: 1px solid var(--amber);
  border-radius: var(--r-card); padding: 18px 22px; margin-bottom: 30px;
  color: #7a4d10; font-size: .93rem;
}

/* ---------- Мобильные ---------- */
@media (max-width: 820px) {
  .nav-links { display: none; }
  section { padding: 58px 0; }
  .hero { padding: 66px 0 74px; }
}
