/* site.css — оформление в стиле nxtcargo.ru (НЕКСТ) */
@import url('colors_and_type.css');

/* ---- Токены референса ---- */
:root {
  --fg:         #0F1A24;
  --fg-soft:    #37485A;
  --muted:      #6B7A8A;
  --line:       #E5ECF1;
  --surface:    #FFFFFF;
  --surface-2:  #F3F6F8;
  --grad:       linear-gradient(90deg, #8CC63F 0%, #00A99D 50%, #29ABE2 100%);
  --grad-btn:   linear-gradient(90deg, #8CC63F 0%, #00A99D 25%, #29ABE2 50%, #00A99D 75%, #8CC63F 100%);
  --grad-chip:  linear-gradient(135deg, #EAF6DC 0%, #D7F2EF 50%, #DBEEFC 100%);
  --shadow-cta: 0 6px 20px -6px rgba(0,169,157,.55);
  --shadow-img: 0 40px 60px -30px rgba(15,26,36,.4);
  --r-card: 20px;
  --r-lg2:  28px;
}

* { box-sizing: border-box; }
html {
  background: linear-gradient(#F7FBF3 0%, #FFFFFF 600px);
  scroll-behavior: smooth;
}
body {
  margin: 0; padding: 0; background: transparent;
  color: var(--fg); font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Якоря меню: отступ под липкую шапку (73px), иначе верх блока уходит под неё */
#cars, #requirements, #apply, #pay, #contacts { scroll-margin-top: 92px; }

/* ---- Раскладка ---- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; position: relative; }
.section--white  { background: var(--surface); }
.section--alt    { background: var(--surface-2); }
.section--tight  { padding: 64px 0; }
@media (max-width: 900px) { .section { padding: 68px 0; } }

/* Надзаголовок-пилюля */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--fg-soft);
}
.eyebrow__dot { width: 8px; height: 8px; border-radius: 999px; background: var(--grad); }

.section-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -0.02em;
  color: var(--fg); margin: 16px 0 0; max-width: 760px;
}
.section-sub { margin-top: 14px; color: var(--fg-soft); font-size: 17px; line-height: 1.6; max-width: 660px; }

/* ---- Шапка ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 24px; height: 73px; }
.site-header__logo img { height: 26px; width: auto; }
.site-header__nav { display: flex; gap: 28px; margin-left: auto; }
.site-header__nav a { font-size: 15px; font-weight: 600; color: var(--fg); transition: color 160ms; }
.site-header__nav a:hover { color: var(--nekst-teal); }
.site-header .btn { margin-left: auto; }
.site-header__nav + .btn { margin-left: 0; }
@media (max-width: 860px) { .site-header__nav { display: none; } }

/* ---- Кнопки ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px; line-height: 1; border: none;
  padding: 14px 24px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: transform 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms, background-position 500ms;
}
.btn--primary {
  background: var(--grad-btn); background-size: 200% 100%; background-position: 0% 50%;
  color: #fff; box-shadow: var(--shadow-cta);
}
.btn--primary:hover { background-position: 100% 50%; transform: translateY(-1px); }
.btn--primary:active { transform: scale(.985); }
.btn--outline {
  background: rgba(255,255,255,.3); color: var(--fg); border: 1.5px solid var(--line);
}
.btn--outline:hover { border-color: var(--nekst-teal); color: var(--nekst-teal); }
.btn--lg { padding: 16px 28px; font-size: 16px; }

/* ---- Декор: орбы и точечная сетка ---- */
.hero { position: relative; padding: 80px 0 72px; overflow: hidden; }
.orb { position: absolute; border-radius: 999px; filter: blur(50px); pointer-events: none; }
.orb--cyan  { width: 700px; height: 700px; top: -180px; right: -180px; background: radial-gradient(circle, rgba(41,171,226,.35), rgba(0,0,0,0) 62%); }
.orb--green { width: 760px; height: 760px; bottom: -260px; left: -220px; background: radial-gradient(circle, rgba(140,198,63,.38), rgba(0,0,0,0) 62%); }
.hero-dots {
  position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image: radial-gradient(rgba(15,26,36,.08) 1px, rgba(0,0,0,0) 1.2px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(at 33% 54%, #000 0%, rgba(0,0,0,0) 55%);
          mask-image: radial-gradient(at 33% 54%, #000 0%, rgba(0,0,0,0) 55%);
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
/* Мобильные: колонка «растворяется», картинка встаёт между текстом и кнопками.
   Десктопные правила выше при этом не затрагиваются. */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .hero__col { display: contents; }
  .hero__col > .status-pill { order: 1; justify-self: start; }
  .hero__col > h1          { order: 2; margin: 0; }
  .hero__col > p           { order: 3; }
  .hero__visual            { order: 4; }
  .hero__col > .hero__ctas { order: 5; margin-top: 0; }
  .hero__col > .format-chips { order: 6; margin-top: 0; }
}

.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-weight: 600; font-size: 13px; color: var(--fg-soft);
}
.status-pill__dot { width: 8px; height: 8px; border-radius: 999px; background: var(--nekst-green); box-shadow: 0 0 0 3px rgba(140,198,63,.25); }

.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(36px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -0.02em;
  color: var(--fg); margin: 22px 0 18px;
}
/* Инлайновый градиент — «нарезается» по строкам, как на референсе */
.brand-text {
  background-image: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero p { color: var(--fg-soft); font-size: 18px; line-height: 1.6; max-width: 520px; margin: 0; }
.hero__ctas { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

.hero__visual {
  position: relative; aspect-ratio: 1.08/1; border-radius: var(--r-lg2);
  overflow: hidden; box-shadow: var(--shadow-img); background: #E8F1EA center/cover no-repeat;
}
.hero__visual img { width: 100%; height: 100%; object-fit: cover; }
.hero__visual-tag {
  position: absolute; left: 18px; bottom: 18px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  padding: 12px 16px; border-radius: 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 20px rgba(15,23,42,.12);
}
.hero__visual-tag__icon { width: 38px; height: 38px; border-radius: 10px; background: var(--grad); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.hero__visual-tag__text strong { display: block; font-size: 14px; color: var(--fg); }
.hero__visual-tag__text span { font-size: 12px; color: var(--fg-soft); }

/* ---- Чипы ---- */
.format-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.format-chip {
  font-size: 13px; font-weight: 600; color: var(--fg-soft);
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}

/* ---- Бегущая строка ---- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: #fff; overflow: hidden; padding: 16px 0;
}
.marquee__track { display: flex; gap: 0; width: max-content; animation: marquee 32s linear infinite; }
.marquee__group { display: flex; align-items: center; flex-shrink: 0; }
.marquee__group span {
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-soft); padding: 0 22px; position: relative;
}
.marquee__group span::after {
  content: '·'; position: absolute; right: -4px; color: var(--nekst-teal); font-size: 16px;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---- Карточки преимуществ ---- */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
@media (max-width: 900px) { .why { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .why { grid-template-columns: 1fr; } }
.why-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 28px; transition: transform 200ms, box-shadow 200ms;
}
.why-card:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -20px rgba(15,26,36,.28); }
.why-card__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--fg); margin: 18px 0 8px; }
.why-card__body { font-size: 14px; line-height: 1.6; color: var(--fg-soft); }

/* ---- Тёмный блок заявки ---- */
.cta-form {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px;
  background: linear-gradient(160deg, #0F1A24, #123341);
  color: #fff; border-radius: var(--r-lg2); padding: 64px 60px;
  position: relative; overflow: hidden;
  margin-top: 48px;
}
@media (max-width: 900px) {
  .cta-form { grid-template-columns: 1fr; padding: 36px 28px; gap: 32px; }
  /* без этого колонки грид-сетки не могут сжаться уже своего min-content */
  .cta-form > * { min-width: 0; }
}
/* Мобильные: кнопка с длинной подписью запрещала перенос и распирала форму */
@media (max-width: 600px) {
  .cta-form { padding: 28px 20px; gap: 26px; }
  .cta-form .form { padding: 20px; }
  /* блок вместо flex — иначе «— 7 дней» отрывается от текста при переносе */
  #apply-submit { display: block; text-align: center; white-space: normal; line-height: 1.35; }
}
.cta-form::after {
  content: ''; position: absolute; inset: auto -140px -160px auto;
  width: 420px; height: 420px; border-radius: 999px;
  background: radial-gradient(circle, rgba(140,198,63,.5), rgba(0,0,0,0) 62%);
  filter: blur(60px); pointer-events: none;
}
.cta-form > * { position: relative; z-index: 1; }
.cta-form .eyebrow { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.cta-form h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -0.02em; margin: 18px 0 14px;
}
.cta-form p { color: rgba(255,255,255,.75); font-size: 16px; line-height: 1.6; margin: 0; }
.cta-form__list { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 12px; }
.cta-form__list li { font-size: 14px; color: rgba(255,255,255,.85); display: flex; gap: 10px; align-items: center; }
.cta-form__list li::before { content: ''; width: 18px; height: 18px; border-radius: 999px; background: var(--grad); flex-shrink: 0; }

.form {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-card); padding: 28px; backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.7); }
.field input {
  font-family: inherit; font-size: 15px; padding: 13px 15px; border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff; outline: none;
}
.field input:focus { border-color: var(--nekst-cyan); box-shadow: 0 0 0 3px rgba(41,171,226,.25); }
.field input::placeholder { color: rgba(255,255,255,.4); }
/* Примечание под кнопкой — мельче основного текста блока (там 14px) */
.cta-form .legal { font-size: 12px; color: rgba(255,255,255,.5); line-height: 1.5; margin: 0; }
.success {
  display: flex; gap: 10px; align-items: center;
  background: rgba(31,174,108,.16); color: #5BD9A0; padding: 13px 15px; border-radius: 12px;
  border: 1px solid rgba(31,174,108,.3); font-size: 14px; font-weight: 600;
}

/* Сегменты срока */
.seg-label { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.7); margin-bottom: 10px; }
.segments { display: flex; gap: 6px; background: rgba(255,255,255,.08); padding: 4px; border-radius: 14px; }
.seg {
  flex: 1; padding: 11px 0; border-radius: 10px; text-align: center;
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,.65);
  background: transparent; border: none; transition: all 180ms;
}
.seg.is-active { background: #fff; color: var(--fg); box-shadow: 0 2px 6px rgba(0,0,0,.18); }

/* ---- Футер (светлый, как на референсе) ---- */
.site-footer { background: #fff; border-top: 1px solid var(--line); color: var(--fg); padding: 60px 0 40px; }
.site-footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 36px; }
@media (max-width: 900px) { .site-footer__top { grid-template-columns: 1fr; gap: 32px; } }
.site-footer__logo { height: 30px; width: auto; }
.site-footer__about { max-width: 320px; margin-top: 16px; font-size: 14px; line-height: 1.6; color: var(--fg-soft); }
.footer-cap {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg); margin: 0 0 16px;
}
.site-footer__about + .footer-cap { margin-top: 28px; }
.footer-note { font-size: 14px; line-height: 1.6; color: var(--fg-soft); margin: 0 0 14px; max-width: 300px; }
.f-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.f-row, .f-link {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500; color: var(--fg-soft);
}
.f-row { margin-bottom: 10px; }
.f-row:last-child { margin-bottom: 0; }
/* Интерактивные ссылки футера */
.f-link {
  text-decoration: none; opacity: .8;
  transition: color 150ms, opacity 150ms;
}
.f-link:hover, .f-link:focus-visible { opacity: 1; color: var(--nekst-teal); }
.f-link:focus-visible { outline: 2px solid var(--nekst-cyan); outline-offset: 3px; border-radius: 8px; }

.f-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-chip); color: var(--nekst-teal);
  transition: transform 150ms cubic-bezier(.2,.8,.2,1), box-shadow 150ms, filter 150ms;
}
.f-link:hover .f-ico { transform: translateY(-2px); box-shadow: 0 6px 14px -6px rgba(0,169,157,.5); }
.f-ico svg { width: 18px; height: 18px; display: block; }
.f-ico--vk svg { width: 21px; height: 21px; }
.f-ico--yt { background: #FF0000; color: #fff; }
.f-ico--rt { background: #14142B; color: #fff; }
.f-ico--vk { background: #0077FF; color: #fff; }
.f-ico--tt { background: #010101; color: #fff; }
/* У брендовых плашек подсветка в их же цвете */
.f-link:hover .f-ico--yt { box-shadow: 0 6px 14px -6px rgba(255,0,0,.6); filter: brightness(1.08); }
.f-link:hover .f-ico--rt { box-shadow: 0 6px 14px -6px rgba(20,20,43,.6); filter: brightness(1.35); }
.f-link:hover .f-ico--vk { box-shadow: 0 6px 14px -6px rgba(0,119,255,.6); filter: brightness(1.08); }
.f-link:hover .f-ico--tt { box-shadow: 0 6px 14px -6px rgba(1,1,1,.55); filter: brightness(1.6); }
/* Соцсети: подпись темнеет, а не уходит в бирюзу */
.f-link--soc:hover, .f-link--soc:focus-visible { color: var(--fg); }
@media (prefers-reduced-motion: reduce) {
  .f-ico, .f-link { transition: none; }
  .f-link:hover .f-ico { transform: none; }
}

/* Низ футера — два разделителя, как на референсе */
.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 24px;
  font-size: 13px; color: var(--muted);
}
.site-footer__legal {
  display: flex; gap: 8px 18px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
}
.site-footer__legal a {
  font-size: 11px; color: var(--muted); text-decoration: none;
  opacity: .6; cursor: pointer; transition: opacity 150ms;
}
.site-footer__legal a:hover, .site-footer__legal a:focus-visible { opacity: 1; text-decoration: underline; }

/* ---- Утилиты ---- */
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
