/* =========================================================
   TripScan · trip81 — многостраничный лендинг (макет v4)
   Палитра auth-register: #D1E4F5 · #76ADE5 · #297FD5
   ========================================================= */

:root {
  --blue: #76ade5;
  --blue-hover: #63a0de;
  --blue-light: #d1e4f5;
  --blue-light-hover: #c1daf3;
  --link: #297fd5;
  --navy: #0f2e4f;
  --navy-2: #17456f;
  --ink: #16233b;
  --muted: #5d6d87;
  --line: #e3edf9;
  --soft: #f4f9ff;
  --white: #ffffff;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 20px 48px rgba(15, 46, 79, .16);
  --shadow-soft: 0 8px 26px rgba(41, 127, 213, .12);

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Кнопки (стиль auth-register) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  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--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);
}
.btn--lg { padding: 15px 32px; font-size: 17px; border-radius: 14px; }

/* ---------- Верхняя строка с ключами ---------- */
.topbar {
  background: var(--navy);
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}
.topbar b { color: var(--blue-light); font-weight: 600; }

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.header.is-scrolled { box-shadow: 0 8px 26px rgba(15, 46, 79, .10); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
}
.logo img { height: 34px; width: auto; }

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 20px; 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); }

/* ---------- Лента разделов (сабнав) ---------- */
.subnav {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}
.subnav__inner {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.subnav a {
  flex: 0 0 auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.subnav a:hover {
  background: var(--blue-light);
  color: var(--link);
  border-color: var(--blue-light);
}
.subnav a.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ---------- Хлебные крошки ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  padding: 22px 0 0;
}
.crumbs a { color: var(--link); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--blue); }

/* ---------- Заголовок секции ---------- */
.section { padding: 74px 0; }
.section--soft { background: var(--soft); }

.section__head { margin-bottom: 38px; }
.section__head--center { text-align: center; }
.section__eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 10px;
}
.section__title {
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -.5px;
  line-height: 1.2;
  position: relative;
  padding-bottom: 14px;
}
.section__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 64px; height: 4px;
  border-radius: 4px;
  background: var(--blue);
}
.section__head--center .section__title::after { left: 50%; transform: translateX(-50%); }
.section__note {
  color: var(--muted);
  font-size: 17px;
  margin-top: 14px;
}

/* ---------- Герой главной ---------- */
.hero {
  background:
    radial-gradient(700px 420px at 100% 10%, rgba(118, 173, 229, .3), transparent 60%),
    linear-gradient(180deg, var(--white), var(--soft));
  padding: 58px 0 62px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.hero__label {
  display: inline-block;
  background: var(--blue-light);
  color: var(--link);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero__title {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.hero__title em {
  font-style: normal;
  color: var(--link);
  background-image: linear-gradient(transparent 72%, var(--blue-light) 72%);
}
.hero__lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 28px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__figure { position: relative; }
.hero__frame {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 14px;
  overflow: hidden;
}
.hero__frame img { border-radius: 12px; width: 100%; }
.hero__stickers {
  position: absolute;
  left: -14px;
  bottom: -16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sticker {
  background: var(--navy);
  color: var(--blue-light);
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 12px 26px rgba(15, 46, 79, .3);
}

/* ---------- Пилюли ключей ---------- */
.keypills {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.keypill {
  display: block;
  text-align: center;
  background: var(--blue-light);
  color: var(--link);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 8px;
  border-radius: 12px;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.keypill:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-3px);
}

/* ---------- Карточки статей ---------- */
.posts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.post {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.post:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.post__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post:hover .post__media img { transform: scale(1.06); }
.post__cat {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255, 255, 255, .94);
  color: var(--link);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 12px;
}
.post__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post__title {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  transition: color .2s ease;
}
.post:hover .post__title { color: var(--link); }
.post__excerpt { font-size: 14.5px; color: var(--muted); flex: 1; }
.post__more {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--link);
}
.post__more::after { content: " →"; }

/* ---------- Маркеты ---------- */
.markets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.market-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.market-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--blue-light);
}
.market-card__logo {
  flex: 0 0 84px;
  height: 64px;
  display: grid;
  place-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  overflow: hidden;
}
.market-card__logo img {
  max-height: 48px;
  max-width: 100%;
  object-fit: contain;
}
.market-card__name { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.market-card__note { font-size: 13.5px; color: var(--muted); }
.market-card__go { margin-left: auto; color: var(--blue); font-weight: 700; font-size: 18px; }

/* ---------- Шаги ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
.step__num {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--white);
  background: var(--blue);
  border-radius: 8px;
  padding: 5px 11px;
  margin-bottom: 16px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15.5px; }

/* ---------- Промо ---------- */
.promo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(118, 173, 229, .4), transparent 62%),
    linear-gradient(150deg, var(--navy-2), var(--navy));
  border-radius: 26px;
  color: var(--white);
  padding: 42px;
  overflow: hidden;
}
.promo__figure {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  padding: 14px;
}
.promo__figure img { border-radius: 12px; width: 100%; }
.promo__title {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.5px;
  margin-bottom: 12px;
}
.promo__text { color: rgba(255, 255, 255, .78); font-size: 16.5px; margin-bottom: 22px; }

/* ---------- CTA ---------- */
.cta {
  background:
    radial-gradient(700px 340px at 12% 0%, rgba(118, 173, 229, .4), transparent 62%),
    linear-gradient(150deg, var(--navy-2), var(--navy));
  color: var(--white);
  padding: 58px 0;
}
.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.cta__text { max-width: 560px; }
.cta__text h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.5px;
  margin-bottom: 8px;
}
.cta__text p { color: rgba(255, 255, 255, .75); font-size: 16.5px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Страница статьи ---------- */
.pagehead { padding: 34px 0 10px; }
.pagehead__cat {
  display: inline-block;
  background: var(--blue-light);
  color: var(--link);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 15px;
  margin-bottom: 16px;
}
.pagehead h1 {
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.14;
  letter-spacing: -.8px;
  margin-bottom: 16px;
  max-width: 900px;
}
.pagehead__lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 780px;
}
.pagehead__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 13.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 16px;
}

.article {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 44px;
  align-items: start;
  padding: 30px 0 74px;
}
.article__body h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -.4px;
  margin: 34px 0 14px;
  padding-left: 16px;
  border-left: 5px solid var(--blue);
}
.article__body h2:first-child { margin-top: 0; }
.article__body h3 {
  font-size: 19px;
  margin: 26px 0 10px;
}
.article__body p {
  font-size: 17px;
  color: #33415c;
  margin-bottom: 16px;
}
.article__body ul,
.article__body ol {
  margin: 0 0 18px 22px;
  color: #33415c;
  font-size: 17px;
}
.article__body li { margin-bottom: 8px; }
.article__body strong { color: var(--ink); }

.article__aside {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 18px;
}
.aside-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.aside-card h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--link);
  margin-bottom: 14px;
}
.aside-card ul { list-style: none; display: grid; gap: 10px; }
.aside-card a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  transition: color .2s ease;
}
.aside-card a:hover { color: var(--link); }
.aside-keys { display: flex; flex-wrap: wrap; gap: 8px; }
.aside-keys a {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--link);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13.5px;
}

/* ---------- Страница маркета ---------- */
.mkhero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: center;
  background:
    radial-gradient(600px 320px at 100% 0%, rgba(118, 173, 229, .3), transparent 60%),
    linear-gradient(180deg, var(--white), var(--soft));
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 36px;
  margin-top: 24px;
}
.mkhero__logo {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
  display: grid;
  place-items: center;
  min-height: 160px;
}
.mkhero__logo img { max-height: 110px; max-width: 100%; object-fit: contain; }
.mkhero h1 {
  font-size: clamp(28px, 3.6vw, 42px);
  letter-spacing: -.8px;
  line-height: 1.15;
  margin-bottom: 14px;
}
.mkhero__lead { font-size: 18px; color: var(--muted); margin-bottom: 22px; }

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
}
.feature h3 { font-size: 17.5px; margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--muted); }

/* ---------- Читайте также ---------- */
.related { padding: 0 0 74px; }

/* ---------- Футер ---------- */
.footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 48px 0 26px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 28px;
}
.footer__brand img { height: 30px; margin-bottom: 12px; }
.footer__brand p { color: var(--muted); font-size: 15px; margin-bottom: 16px; }

.footer__col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 14px;
}
.footer__col a,
.footer__col span {
  display: block;
  font-size: 14.5px;
  color: var(--muted);
  padding: 4px 0;
}
.footer__col a { color: var(--link); font-weight: 600; }
.footer__col a:hover { text-decoration: underline; }

.footer__keys {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 18px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  line-height: 1.9;
  margin-bottom: 22px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Появление ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  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; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .posts { grid-template-columns: repeat(3, 1fr); }
  .keypills { grid-template-columns: repeat(4, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .article { grid-template-columns: 1fr; }
  .article__aside { position: static; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero__grid,
  .promo,
  .mkhero { grid-template-columns: 1fr; }
  .markets { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .posts { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 56px 0; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .topbar__inner span:last-child { display: none; }
  .burger { display: flex; }

  .actions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(15, 46, 79, .12);
    padding: 16px 20px 22px;
    display: none;
  }
  .actions.is-open { display: flex; }
  .actions .btn { width: 100%; padding: 14px 20px; font-size: 16px; }
  .header__inner { position: relative; }

  .cta__inner { flex-direction: column; align-items: flex-start; }
  .cta__actions { width: 100%; }
  .promo { padding: 28px 22px; }
  .mkhero { padding: 24px; }
}

@media (max-width: 560px) {
  .container { width: min(1180px, 100% - 28px); }
  .hero { padding: 40px 0 46px; }
  .hero__title { font-size: 30px; }
  .hero__actions .btn,
  .cta__actions .btn { flex: 1 1 100%; }
  .posts { grid-template-columns: 1fr; }
  .markets { grid-template-columns: 1fr; }
  .keypills { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .article__aside { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__stickers { left: 0; bottom: -12px; }
}
