/* =========================================================
   TripScan | ТрипСкан Вход — trip75…trip85
   Макет v8 «Bento 2026» — светлая палитра auth-register:
   #D1E4F5 · #76ADE5 · #297FD5
   ========================================================= */

:root {
  --blue: #76ade5;
  --blue-hover: #63a0de;
  --blue-light: #d1e4f5;
  --blue-light-hover: #c1daf3;
  --link: #297fd5;
  --ink: #16233b;
  --muted: #5d6d87;
  --line: #e3edf9;
  --tint: #f6faff;
  --white: #ffffff;

  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --shadow-soft: 0 8px 26px rgba(41, 127, 213, .10);
  --shadow: 0 22px 50px rgba(15, 46, 79, .13);
  --shadow-lg: 0 34px 80px rgba(15, 46, 79, .20);

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Consolas", "SF Mono", "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: var(--font);
  background-color: var(--white);
  background-image:
    radial-gradient(1000px 460px at 100% 0%, rgba(118, 173, 229, .14), transparent 60%),
    radial-gradient(800px 420px at 0% 100%, rgba(209, 228, 245, .4), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 104px;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

.container { width: min(1200px, 100% - 48px); margin-inline: auto; }

/* ---------- Прогресс чтения ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--link));
  box-shadow: 0 0 12px rgba(41, 127, 213, .55);
  z-index: 99;
  transition: width .1s linear;
}

/* ---------- Кнопки: пилюли auth-register ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.btn--light { background: var(--blue-light); color: var(--link); }
.btn--light:hover {
  background: var(--blue-light-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.btn--soft { background: var(--white); color: var(--link); border-color: var(--blue-light); }
.btn--soft:hover { background: var(--blue-light); transform: translateY(-2px); }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover {
  background: var(--blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(41, 127, 213, .4);
}
.btnrow { display: flex; flex-wrap: wrap; gap: 12px; }

.pill {
  display: inline-block;
  background: var(--blue-light);
  color: var(--link);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--link);
  background: var(--blue-light);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 20px;
}
.badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--link);
  box-shadow: 0 0 8px rgba(41, 127, 213, .7);
}

/* ---------- Верхняя панель ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.topbar.is-scrolled { box-shadow: 0 12px 34px rgba(15, 46, 79, .10); }
.topbar__in {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 34px; width: auto; }
.brand__tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--link);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}
.mainnav { display: flex; gap: 6px; }
.mainnav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 17px;
  transition: all .18s ease;
}
.mainnav a:hover { background: var(--tint); color: var(--link); }
.mainnav a.is-active { background: var(--blue-light); color: var(--link); }
.topbar__actions { margin-left: auto; display: flex; gap: 10px; }

.burger {
  margin-left: auto;
  width: 46px; height: 44px;
  display: none;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--link);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Оверлей-меню ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s ease;
}
.menu.is-open { visibility: visible; opacity: 1; }
.menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 36, 64, .45);
  backdrop-filter: blur(4px);
}
.menu__panel {
  position: relative;
  width: min(980px, 100% - 40px);
  margin: 84px auto 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 28px 28px;
  transform: translateY(-14px);
  transition: transform .25s ease;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.menu.is-open .menu__panel { transform: none; }
.menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.menu__head b { font-size: 18px; letter-spacing: -.3px; }
.menu__close {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--tint);
  color: var(--link);
  font-size: 16px;
  cursor: pointer;
  transition: all .18s ease;
}
.menu__close:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.menu__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.menu__col h4 {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 12px;
}
.menu__col a {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 10px;
  transition: all .16s ease;
}
.menu__col a:hover { background: var(--tint); color: var(--link); transform: translateX(3px); }
.menu__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ---------- Плавающий док ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px;
  box-shadow: var(--shadow);
}
.dock__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: all .18s ease;
}
.dock__ico { display: inline-flex; width: 18px; height: 18px; }
.dock__ico svg { width: 100%; height: 100%; }
.dock__item:hover { background: var(--tint); color: var(--link); transform: translateY(-2px); }
.dock__item.is-active { background: var(--blue-light); color: var(--link); }
.dock__item--light { background: var(--blue-light); color: var(--link); }
.dock__item--light:hover { background: var(--blue-light-hover); }
.dock__item--primary { background: var(--blue); color: #fff; }
.dock__item--primary:hover { background: var(--blue-hover); color: #fff; }

/* ---------- Оболочка ---------- */
.shell { min-height: 62vh; }

/* ---------- Секции ---------- */
.section { padding: 72px 0; }
.section--tint {
  background:
    radial-gradient(760px 320px at 0% 0%, rgba(118, 173, 229, .13), transparent 62%),
    var(--tint);
  border-block: 1px solid var(--line);
}
.section__head { margin-bottom: 38px; }
.section__head--center { text-align: center; }
.section__head--center .seclabel { justify-content: center; }
.section__head--center .seclabel::after { display: none; }
.seclabel {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.seclabel::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--blue-light), transparent);
}
.section__title { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.18; letter-spacing: -.7px; }
.section__note { color: var(--muted); font-size: 16.5px; margin-top: 12px; }

/* ---------- Bento-герой ---------- */
.hero {
  padding: 46px 0 64px;
  border-bottom: 1px solid var(--line);
}
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.cell {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}
.cell--lead {
  grid-column: span 7;
  grid-row: span 2;
  padding: 36px 34px;
  display: flex;
  flex-direction: column;
}
.cell--lead h1 {
  font-size: clamp(30px, 3.9vw, 48px);
  line-height: 1.08;
  letter-spacing: -1.3px;
  margin-bottom: 16px;
}
.cell--lead h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--link), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cell__lead {
  font-size: 17.5px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 22px;
}
.ticklist { list-style: none; display: grid; gap: 9px; margin-top: auto; padding-top: 22px; }
.ticklist li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--ink);
}
.ticklist li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--link);
  font-weight: 800;
}

.cell--visual {
  grid-column: span 5;
  position: relative;
  padding: 20px;
  background: linear-gradient(150deg, var(--tint), var(--blue-light));
  display: flex;
  align-items: center;
}
.screen {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 12px;
  transform: rotate(-1deg);
}
.screen__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 6px 10px;
}
.screen__bar b { color: var(--link); }
.screen img { border-radius: var(--r-sm); border: 1px solid var(--line); }
.float {
  position: absolute;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--white);
  border: 1px solid var(--blue-light);
  color: var(--link);
  border-radius: 999px;
  padding: 9px 17px;
  box-shadow: var(--shadow);
  animation: bob 4.5s ease-in-out infinite;
}
.float--1 { top: -14px; right: 18px; }
.float--2 { bottom: -14px; left: 18px; animation-delay: 1.6s; background: var(--blue); color: #fff; border-color: transparent; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-11px); }
}

.cell--stats {
  grid-column: span 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  padding: 8px 6px;
}
.stat { padding: 14px 16px; text-align: left; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.8px;
  color: var(--link);
  line-height: 1.2;
}
.stat span { font-size: 12.5px; color: var(--muted); }

/* ---------- Ключевой центр ---------- */
.keys-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px;
}
.keys-card__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--muted);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all .18s ease;
}
.tab:hover { background: var(--blue-light); color: var(--link); border-color: var(--blue-light); }
.tab.is-active { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: var(--shadow-soft); }
.keys-search {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  min-width: 220px;
  transition: border-color .18s ease;
}
.keys-search:focus { outline: none; border-color: var(--blue); background: var(--white); }
.keys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
}
.kchip {
  display: block;
  text-align: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--link);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 8px;
  transition: all .18s ease;
}
.kchip:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}
.kchip.is-hidden { display: none; }
.keys-card__foot {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}
.keys-card__foot b { color: var(--link); }

/* ---------- Квесты ---------- */
.quests { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.quests--3 { grid-template-columns: repeat(3, 1fr); }
.quest {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.quest:hover {
  transform: translateY(-7px);
  border-color: var(--blue);
  box-shadow: var(--shadow);
}
.quest__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: block; }
.quest__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.quest:hover .quest__media img { transform: scale(1.07); }
.quest__id {
  position: absolute;
  top: 10px; left: 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  color: var(--link);
  border-radius: 999px;
  padding: 4px 11px;
}
.quest__body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.quest__type {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--link);
}
.quest__title { font-size: 16.5px; line-height: 1.35; font-weight: 700; transition: color .2s ease; }
.quest:hover .quest__title { color: var(--link); }
.quest__text { font-size: 14px; color: var(--muted); flex: 1; }
.quest__bar { height: 6px; background: var(--blue-light); border-radius: 999px; overflow: hidden; }
.quest__bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--link), var(--blue));
}
.quest__go {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--link);
  background: var(--blue-light);
  border-radius: 999px;
  padding: 8px 16px;
  transition: all .18s ease;
}
.quest__go:hover { background: var(--blue); color: #fff; }
.quest__go::after { content: " →"; }

/* ---------- Локации ---------- */
.locations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.loc {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  transition: all .2s ease;
}
.loc:hover { border-color: var(--blue); transform: translateY(-5px); box-shadow: var(--shadow); }
.loc__logo {
  flex: 0 0 80px;
  height: 60px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--tint), var(--blue-light));
  border-radius: var(--r-sm);
  padding: 8px;
  overflow: hidden;
}
.loc__logo img { max-height: 44px; max-width: 100%; object-fit: contain; }
.loc__info { display: flex; flex-direction: column; }
.loc__name { font-size: 16.5px; font-weight: 700; }
.loc__note { font-size: 13px; color: var(--muted); }
.loc__go {
  margin-left: auto;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--link);
  background: var(--blue-light);
  border-radius: 50%;
  transition: all .2s ease;
}
.loc:hover .loc__go { background: var(--blue); color: #fff; }

/* ---------- Таймлайн ---------- */
.timeline {
  list-style: none;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--blue-light) 0 10px, transparent 10px 22px);
}
.tl {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tl:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.tl__n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--link);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
}
.tl h3 { font-size: 19px; margin-bottom: 8px; }
.tl p { font-size: 15px; color: var(--muted); }

/* ---------- Промо ---------- */
.promo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  background:
    radial-gradient(460px 260px at 100% 0%, rgba(118, 173, 229, .38), transparent 65%),
    linear-gradient(140deg, var(--tint), var(--blue-light));
  border: 1px solid var(--blue-light);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 36px;
}
.promo__media {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
  padding: 12px;
}
.promo__media img { width: 100%; border-radius: var(--r-sm); }
.promo__body h2 { font-size: clamp(23px, 2.8vw, 32px); letter-spacing: -.6px; margin: 14px 0 12px; }
.promo__body p { color: var(--muted); font-size: 16.5px; margin-bottom: 20px; }

/* ---------- CTA ---------- */
.cta-wrap { padding: 26px 0 78px; }
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  background:
    radial-gradient(460px 240px at 88% 10%, rgba(118, 173, 229, .4), transparent 65%),
    var(--white);
  border: 1px solid var(--blue-light);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 42px 40px;
}
.cta__text { max-width: 560px; }
.cta__text h2 { font-size: clamp(23px, 3vw, 34px); letter-spacing: -.7px; margin: 12px 0 8px; }
.cta__text p { color: var(--muted); font-size: 16.5px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Крошки ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  padding: 26px 0 0;
}
.crumbs a {
  color: var(--link);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
}
.crumbs a:hover { background: var(--blue-light); }
.crumbs span { color: var(--blue); }

/* ---------- Шапка статьи ---------- */
.art-hero {
  margin-top: 24px;
  background: linear-gradient(135deg, var(--white), var(--tint));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  padding: 34px;
}
.art-hero h1 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.12;
  letter-spacing: -1px;
  margin: 6px 0 16px;
  max-width: 940px;
}
.art-hero__lead { font-size: 19px; color: var(--muted); max-width: 780px; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.meta span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .8px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
}

/* ---------- Статья ---------- */
.art-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
  padding: 34px 0 74px;
}
.art-body { counter-reset: h2; max-width: 780px; margin-inline: auto; }
.art-body--wide { max-width: 880px; }
.art-body h2 {
  counter-increment: h2;
  position: relative;
  font-size: clamp(21px, 2.5vw, 30px);
  letter-spacing: -.5px;
  margin: 34px 0 14px;
  padding-left: 62px;
}
.art-body h2::before {
  content: counter(h2, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 4px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--link);
  background: var(--blue-light);
  border-radius: 10px;
  padding: 6px 9px;
}
.art-body h3 { font-size: 18.5px; margin: 24px 0 10px; color: var(--link); }
.art-body p { font-size: 17px; color: #33415c; margin-bottom: 16px; }
.art-body ul, .art-body ol { margin: 0 0 18px 22px; color: #33415c; font-size: 17px; }
.art-body li { margin-bottom: 8px; }
.art-body strong { color: var(--ink); }

.art-side { position: sticky; top: 96px; display: grid; gap: 16px; }
.side-card {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
}
.side-card h3 {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 14px;
}
.toc { list-style: none; counter-reset: t; display: grid; gap: 4px; }
.toc li { counter-increment: t; border-bottom: 1px dashed var(--line); }
.toc li:last-child { border-bottom: none; }
.toc a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 8px 0;
  transition: color .16s ease, transform .16s ease;
}
.toc a::before { content: counter(t, decimal-leading-zero) " · "; color: var(--link); font-family: var(--mono); font-size: 12.5px; }
.toc a:hover { color: var(--link); transform: translateX(3px); }
.side-keys { display: flex; flex-wrap: wrap; gap: 7px; }
.side-keys .kchip { padding: 6px 11px; font-size: 12.5px; border-radius: 999px; }
.side-card__more {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--link);
}
.side-card__more:hover { text-decoration: underline; }

/* ---------- Локация (маркет) ---------- */
.mk-hero { margin-top: 26px; }
.mk-hero__logo {
  grid-column: span 4;
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 28px;
  background: linear-gradient(150deg, var(--tint), var(--blue-light));
}
.mk-hero__logo img { max-height: 130px; max-width: 100%; object-fit: contain; }
.mk-hero__text { grid-column: span 8; padding: 34px; }
.mk-hero__text h1 {
  font-size: clamp(27px, 3.4vw, 42px);
  letter-spacing: -1px;
  line-height: 1.14;
  margin-bottom: 14px;
}

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  padding: 24px 22px;
  box-shadow: var(--shadow-soft);
  transition: all .2s ease;
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.feature__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--link);
  display: block;
  margin-bottom: 10px;
}
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { font-size: 14.5px; color: var(--muted); }

/* ---------- Футер ---------- */
.footer {
  background: var(--tint);
  border-top: 1px solid var(--line);
  padding: 46px 0 26px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr .9fr;
  gap: 30px;
  padding-bottom: 26px;
}
.footer__brand img { height: 30px; width: auto; margin-bottom: 14px; }
.footer__brand p { font-size: 14.5px; color: var(--muted); max-width: 340px; margin-bottom: 16px; }
.footer__col h4 {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 14px;
}
.footer__col a {
  display: block;
  font-size: 14.5px;
  color: var(--muted);
  padding: 5px 0;
  transition: color .18s ease, transform .18s ease;
}
.footer__col a:hover { color: var(--link); transform: translateX(4px); }
.footer__keys {
  background: var(--white);
  border: 1px dashed var(--blue-light);
  border-radius: var(--r-sm);
  padding: 14px 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
  line-height: 1.9;
  margin-bottom: 20px;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .6px;
}

/* ---------- Появление ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float { animation: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1120px) {
  .quests { grid-template-columns: repeat(3, 1fr); }
  .quests--3 { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .art-grid { grid-template-columns: 1fr; }
  .art-side { position: static; grid-template-columns: repeat(2, 1fr); }
  .art-body { max-width: none; }
}

@media (max-width: 980px) {
  .mainnav { display: none; }
  .burger { display: flex; }
  .cell--lead, .cell--visual, .cell--stats,
  .mk-hero__logo, .mk-hero__text { grid-column: 1 / -1; grid-row: auto; }
  .quests, .quests--3, .locations { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { display: none; }
  .promo { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 54px 0; }
  .menu__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .topbar__actions { display: none; }
  .brand__tag { display: none; }
  .art-side { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .container { width: min(1200px, 100% - 30px); }
  .quests, .quests--3, .locations, .features { grid-template-columns: 1fr; }
  .cell--stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--line); }
  .btnrow .btn, .cta__actions .btn { flex: 1 1 100%; }
  .footer__top { grid-template-columns: 1fr; }
  .menu__cols { grid-template-columns: 1fr; }
  .keys-search { min-width: 0; width: 100%; }
  .keys-card__bar { flex-direction: column; align-items: stretch; }
  .promo, .art-hero, .cta { padding: 26px 20px; }
  .dock { gap: 2px; padding: 6px; bottom: 10px; width: calc(100% - 20px); justify-content: space-between; }
  .dock__item { padding: 8px 9px; font-size: 11px; gap: 4px; flex-direction: column; }
  .dock__ico { width: 17px; height: 17px; }
}
