/* Сайт PermitRouting (permitrouting.com): светлый деловой SaaS — белый, индиго и
   бирюза, макет кабинета. Сам кабинет — /fleet на прод-приложении. */
:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg-soft: #f8fafc;
  --indigo: #4338ca;
  --indigo-2: #6366f1;
  --indigo-soft: #eef2ff;
  --teal: #14b8a6;
  --teal-soft: #ccfbf1;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--indigo); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 750; }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: 18px; letter-spacing: -.01em; }

.wrap { width: min(1160px, 100% - 40px); margin: 0 auto; }
.narrow { width: min(720px, 100% - 40px); }
.center { text-align: center; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand span b { color: var(--indigo); font-weight: 800; }
.menu { display: flex; gap: 26px; margin-left: auto; }
.menu a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.brand, .top-cta { flex-shrink: 0; }
.top-cta .btn { white-space: nowrap; }
.menu a:hover { color: var(--indigo); }
.top-cta { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  background: var(--indigo); color: #fff; font-weight: 650; text-decoration: none; font-size: 15px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .1);
  transition: background .15s, box-shadow .15s;
}
.btn:hover { background: #3730a3; box-shadow: 0 6px 18px rgba(67, 56, 202, .3); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--bg-soft); box-shadow: inset 0 0 0 1px #cbd5e1; }
.btn-small { padding: 8px 16px; font-size: 14px; white-space: nowrap; }
.btn-big { padding: 15px 28px; font-size: 16px; }

/* Первый экран */
.hero {
  padding: 84px 0 0; overflow: hidden;
  background:
    radial-gradient(800px 380px at 50% 0%, var(--indigo-soft), transparent 70%),
    #fff;
}
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px 5px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); font-weight: 500; }
.pill b { padding: 2px 8px; border-radius: 999px; background: var(--teal-soft); color: #0f766e; font-size: 12px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); max-width: 15ch; margin: 22px auto 18px; letter-spacing: -.035em; }
.hero h1 span { background: linear-gradient(90deg, var(--indigo), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 620px; margin: 0 auto; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.small-note { color: var(--muted); font-size: 14px; margin-top: 14px; }
.nft-note { display: flex; align-items: center; justify-content: center; gap: 12px; }
.nft-note img { display: block; height: 60px; width: auto; }

/* Макет кабинета */
.app-shot {
  margin: 60px auto 0; max-width: 1040px;
  border-radius: 16px 16px 0 0; border: 1px solid var(--line); border-bottom: 0;
  background: #fff; box-shadow: 0 -10px 60px rgba(67, 56, 202, .14);
  overflow: hidden; text-align: left;
}
.app-bar { display: flex; gap: 6px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.app-bar i { width: 11px; height: 11px; border-radius: 50%; background: #e2e8f0; }
.app-bar .url { margin-left: 14px; padding: 4px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.app-body { display: grid; grid-template-columns: 180px 1fr 300px; min-height: 360px; }
.app-side { border-right: 1px solid var(--line); padding: 16px 12px; font-size: 13px; color: var(--ink-2); }
.app-side div { padding: 8px 10px; border-radius: 8px; margin-bottom: 2px; }
.app-side .on { background: var(--indigo-soft); color: var(--indigo); font-weight: 650; }
.app-main { padding: 18px 20px; }
.app-main h4 { margin: 0 0 12px; font-size: 15px; }
.loads { width: 100%; border-collapse: collapse; font-size: 13px; }
.loads th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.loads td { padding: 11px 6px; border-bottom: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.loads td:first-child { font-weight: 650; color: var(--ink); }
.st { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; }
.st.ok { background: #dcfce7; color: #15803d; }
.st.go { background: var(--indigo-soft); color: var(--indigo); }
.st.warn { background: #fef3c7; color: #b45309; }
.app-map {
  border-left: 1px solid var(--line); position: relative;
  background:
    linear-gradient(#eef2f7 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, #eef2f7 1px, transparent 1px) 0 0 / 22px 22px,
    #f8fafc;
}
.app-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-card { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12px; box-shadow: 0 4px 14px rgba(15, 23, 42, .08); }
.map-card b { display: block; font-size: 13px; }

/* Логотипы штатов / доверие */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); padding: 22px 0; }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 10px 34px; justify-content: center; color: var(--muted); font-size: 14px; font-weight: 550; }
.strip b { color: var(--ink); }

/* Разделы */
.section { padding: 96px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--indigo); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.section-lead { font-size: 18px; color: var(--ink-2); max-width: 640px; }
.center .section-lead { margin-left: auto; margin-right: auto; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.card { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.card .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 16px; background: var(--indigo-soft); color: var(--indigo); }
.card .ico svg { width: 22px; height: 22px; }
.card .nft-ico { display: block; height: 44px; width: auto; margin-bottom: 12px; }
.card:nth-child(3n+2) .ico { background: var(--teal-soft); color: #0f766e; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* Ролик: hidden держит раздел скрытым, пока нет файла (scripts/site_video.py) */
.video[hidden] { display: none !important; }
.video-frame {
  max-width: 960px; margin: 40px auto 0; background: #0f172a;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
}
.video-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* Как это работает: дорожка из шагов */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 46px; counter-reset: f; }
.flow div { position: relative; padding: 22px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.flow div::before { counter-increment: f; content: counter(f); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--indigo); color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.flow p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* Для кого */
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.who-card { padding: 32px; border-radius: 16px; border: 1px solid var(--line); }
.who-card.a { background: linear-gradient(160deg, var(--indigo-soft), #fff 60%); }
.who-card.b { background: linear-gradient(160deg, #f0fdfa, #fff 60%); }
.who-card ul { margin: 14px 0 0; padding-left: 1.2em; color: var(--ink-2); }
.who-card li { margin: 6px 0; }

/* Призыв */
.band { border-radius: 20px; padding: 56px 40px; text-align: center; color: #fff; background: linear-gradient(120deg, #312e81, var(--indigo) 50%, #0f766e); }
.band h2 { color: #fff; }
.band p { color: #e0e7ff; font-size: 18px; margin: 0 auto; max-width: 560px; }
.band .btn { background: #fff; color: var(--indigo); }
.band .btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }

/* Контактная форма */
.cform { display: grid; gap: 16px; margin: 34px auto 0; max-width: 640px; text-align: left; padding: 30px; border-radius: 16px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 40px rgba(15, 23, 42, .06); }
.cform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cform label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.cform .opt { font-weight: 400; color: var(--muted); }
.cform input, .cform select, .cform textarea { width: 100%; padding: 11px 13px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; }
.cform textarea { resize: vertical; min-height: 120px; }
.cform input:focus, .cform select:focus, .cform textarea:focus { outline: none; border-color: var(--indigo-2); box-shadow: 0 0 0 3px rgba(99, 102, 241, .2); }
.cform button { border: 0; cursor: pointer; font: inherit; font-weight: 650; }
.cform button:disabled { opacity: .6; cursor: wait; }
.cform .hp { position: absolute !important; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.cform-status { margin: 0; font-size: 15px; text-align: center; }
.cform-status:empty { display: none; }
.cform-status.ok { color: #15803d; }
.cform-status.err { color: #b91c1c; }

/* Подвал */
.foot { border-top: 1px solid var(--line); padding: 34px 0; font-size: 14px; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot-links a { color: var(--indigo); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(79,70,229,.3); text-underline-offset: 3px; }
.foot-links a:hover { text-decoration-color: currentColor; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.legal { margin: 20px 0 0; line-height: 1.7; }

/* Вопросы и ответы (те же тексты — в JSON-LD FAQPage в <head>) */
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative; font-weight: 650; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 24px; color: var(--indigo); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); }

/* меню в строку не влезает: сначала теснее, потом прячем (07.11, на телефоне пункты ломались на две строки) */
@media (max-width: 1180px) {
  .top-row { gap: 20px; }
  .menu { gap: 18px; }
  .menu a { font-size: 14px; }
}
@media (max-width: 1060px) {
  .menu { display: none; }
  .top-cta { margin-left: auto; }
}
@media (max-width: 960px) {
  .app-body { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .app-map { min-height: 220px; border-left: 0; border-top: 1px solid var(--line); }
  .loads .hide-m { display: none; }
  .grid3, .who, .cform-row { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .section { padding: 70px 0; }
}
@media (max-width: 560px) {
  .top-cta .btn-ghost { display: none; }
  .top-row { gap: 12px; }
  .hero { padding-top: 56px; }
  .flow { grid-template-columns: 1fr; }
  .band { padding: 40px 22px; }
  .cform { padding: 22px 18px; }
}
@media (max-width: 400px) {
  .brand { font-size: 17px; gap: 8px; }
  .brand img { width: 26px; height: 26px; }
  .top-cta .btn-small { padding-left: 12px; padding-right: 12px; }
}
