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

:root {
  --bg: #07101c;
  --bg2: #0b1625;
  --card: #101c2c;
  --blue: #1687ff;
  --blue2: #55b5ff;
  --text: #f5f8fc;
  --muted: #8f9caf;
  --line: rgba(255,255,255,.1);
  --white: #ffffff;
  --dark-text: #111827;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* HEADER */

.header {
  position: relative;
  z-index: 20;
  background: rgba(5,12,22,.96);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 36px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--blue);
  font-size: 24px;
  font-weight: 900;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text strong {
  font-size: 20px;
  letter-spacing: -.5px;
}

.logo-text small {
  color: #77879b;
  font-size: 8px;
  letter-spacing: 1.4px;
  margin-top: 5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 25px;
  color: #b8c2d0;
  font-size: 13px;
}

.nav a:hover {
  color: white;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.login-btn,
.primary-btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 700;
}

.login-btn {
  background: transparent;
  color: #dce5ef;
}

.primary-btn {
  background: var(--blue);
  color: white;
}

.primary-btn:hover,
.find-btn:hover {
  filter: brightness(1.08);
}

/* HERO */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(17,116,230,.18), transparent 38%),
    linear-gradient(180deg, #091321 0%, #07101c 100%);
  padding: 82px 0 75px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, black, transparent);
}

.hero-overlay {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: rgba(0,120,255,.07);
  filter: blur(100px);
  left: 50%;
  top: -350px;
  transform: translateX(-50%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-heading {
  text-align: center;
  max-width: 850px;
  margin: 0 auto 55px;
}

.hero-heading h1 {
  font-size: clamp(44px, 6vw, 74px);
  line-height: .98;
  letter-spacing: -3.5px;
  font-weight: 850;
}

.hero-heading h1 span {
  color: var(--blue);
}

.hero-lead {
  margin-top: 27px;
  font-size: 20px;
  font-weight: 650;
}

.hero-description {
  max-width: 650px;
  margin: 12px auto 0;
  color: #94a2b5;
  font-size: 15px;
}

/* EXCHANGE */

.exchange {
  display: grid;
  grid-template-columns: minmax(0,1fr) 150px minmax(0,1fr);
  align-items: center;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
}

.exchange-card {
  overflow: hidden;
  border-radius: 16px;
  background: rgba(15,28,45,.96);
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 25px 80px rgba(0,0,0,.28);
}

.card-label {
  position: absolute;
  z-index: 3;
  margin: 16px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(10,18,30,.85);
  border: 1px solid rgba(255,255,255,.14);
  color: #b7c5d6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.card-label.want {
  background: rgba(10,86,160,.85);
  color: white;
}

.card-image {
  height: 240px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(10,18,30,.8));
}

.car-image {
  background-image:
    linear-gradient(135deg, rgba(20,35,50,.08), rgba(5,10,18,.12)),
    url("/assets/x5/01-exterior.png");
  background-color: #172538;
  background-size: cover;
  background-position: center;
}

.machine-image {
  background-image:
    linear-gradient(135deg, rgba(20,35,50,.08), rgba(5,10,18,.12)),
    url("/assets/cnc/01-exterior.png");
  background-color: #172538;
  background-size: cover;
  background-position: center;
}
.card-body {
  padding: 22px;
}

.card-body h2 {
  font-size: 24px;
  letter-spacing: -.6px;
}

.item-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: #8493a7;
  font-size: 12px;
}

.item-meta span + span::before {
  content: "•";
  margin-right: 12px;
}

.valuation {
  margin-top: 21px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.valuation small {
  color: #66778c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.valuation strong {
  margin-top: 5px;
  color: #fff;
  font-size: 24px;
}

.valuation span {
  margin-top: 3px;
  color: #6f8299;
  font-size: 11px;
}

.exchange-ai {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.swap-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  border: 7px solid #0a1727;
  box-shadow: 0 0 50px rgba(22,135,255,.4);
  font-size: 36px;
  font-weight: 900;
}

.ai-badge {
  margin-top: 15px;
  background: rgba(22,135,255,.13);
  border: 1px solid rgba(22,135,255,.35);
  color: #63b7ff;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
}

.exchange-ai strong {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.4;
  color: #9dacbf;
}

.ai-line {
  width: 1px;
  height: 40px;
  margin-top: 12px;
  background: linear-gradient(var(--blue), transparent);
}

.hero-action {
  text-align: center;
  margin-top: 45px;
}

.find-btn {
  border: 0;
  border-radius: 9px;
  padding: 16px 27px;
  background: var(--blue);
  color: white;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 35px rgba(22,135,255,.22);
}

.find-btn span {
  margin-left: 20px;
}

.hero-action p {
  color: #607087;
  font-size: 11px;
  margin-top: 12px;
}

/* SECTIONS */

.how {
  padding: 100px 0;
  background: #f6f8fb;
  color: var(--dark-text);
}

.section-heading span,
.eyebrow {
  color: var(--blue);
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 900;
}

.section-heading h2 {
  margin-top: 12px;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: -1.7px;
}

.centered {
  text-align: center;
}

.steps {
  margin-top: 55px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
}

.step {
  padding: 28px;
  background: white;
  border: 1px solid #e4e8ee;
  border-radius: 14px;
}

.step-number {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.step h3 {
  margin-top: 28px;
  font-size: 18px;
}

.step p {
  margin-top: 10px;
  color: #778294;
  font-size: 13px;
}

/* ADVANTAGES */

.advantages {
  background: #08111e;
  padding: 30px 0;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.advantage {
  min-height: 210px;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
}

.advantage:last-child {
  border-right: 0;
}

.adv-icon {
  color: #50aeff;
  font-size: 25px;
}

.advantage h3 {
  margin-top: 25px;
  font-size: 14px;
}

.advantage p {
  margin-top: 9px;
  color: #6f8095;
  font-size: 11px;
  line-height: 1.6;
}

/* COMPARISON */

.comparison {
  padding: 100px 0;
  background: white;
  color: var(--dark-text);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 55px;
}

.comparison-block {
  border-radius: 16px;
  padding: 30px;
}

.traditional {
  background: #f3f5f8;
  border: 1px solid #e4e8ee;
}

.youbarter-flow {
  color: white;
  background: #0c1725;
}

.comparison-title {
  font-weight: 800;
  font-size: 14px;
}

.flow,
.direct-flow {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.flow-item,
.direct-item {
  text-align: center;
  display: flex;
  flex-direction: column;
}

.flow-item strong,
.direct-item strong {
  font-size: 13px;
}

.flow-item span {
  color: #9099a7;
  font-size: 11px;
}

.flow-arrow {
  color: #b5bdc8;
}

.direct-item {
  min-width: 110px;
}

.mini-car,
.mini-machine {
  font-size: 34px;
  margin-bottom: 10px;
}

.direct-swap {
  color: var(--blue2);
  font-size: 35px;
  text-align: center;
}

.direct-swap span {
  display: block;
  color: #7c8da1;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* CATEGORIES */

.categories {
  padding: 24px 0;
  background: #f5f7fa;
  border-top: 1px solid #e8ebef;
  border-bottom: 1px solid #e8ebef;
  color: #273345;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(7,1fr);
}

.category {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-right: 1px solid #e1e5eb;
  font-size: 11px;
  font-weight: 700;
}

.category:last-child {
  border-right: 0;
}

.category span {
  font-size: 23px;
}

/* REGIONAL */

.regional {
  background: #07101c;
  padding: 100px 0;
}

.regional-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 80px;
  align-items: center;
}

.map-placeholder {
  height: 410px;
  border: 1px solid rgba(65,155,255,.2);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(22,135,255,.2), transparent 25%),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(255,255,255,.025) 36px),
    repeating-linear-gradient(90deg, transparent 0 35px, rgba(255,255,255,.025) 36px);
}

.map-placeholder::before {
  content: "РОССИЯ";
  position: absolute;
  font-size: 90px;
  font-weight: 900;
  letter-spacing: 10px;
  color: rgba(255,255,255,.025);
}

.map-pulse {
  width: 18px;
  height: 18px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow:
    0 0 0 15px rgba(22,135,255,.08),
    0 0 0 35px rgba(22,135,255,.04),
    0 0 50px rgba(22,135,255,.7);
  margin-bottom: 25px;
}

.map-placeholder strong {
  font-size: 25px;
}

.map-placeholder span {
  margin-top: 5px;
  color: #72849a;
  font-size: 11px;
}

.region-copy h2 {
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 15px 0 28px;
}

.region-copy p {
  color: #8392a5;
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 18px;
}

.region-note {
  display: block;
  border-left: 2px solid var(--blue);
  padding: 5px 0 5px 18px;
  margin-top: 30px;
  color: #c3ceda;
  font-size: 12px;
  line-height: 1.6;
}

/* FAQ */

.faq {
  padding: 100px 0;
  background: white;
  color: var(--dark-text);
}

.faq-container {
  max-width: 850px;
}

.faq details {
  border-bottom: 1px solid #e4e8ed;
  padding: 22px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 750;
  font-size: 16px;
}

.faq details p {
  padding: 15px 25px 0 0;
  color: #727e8f;
  font-size: 13px;
  line-height: 1.7;
}

/* FINAL CTA */

.final-cta {
  padding: 90px 0;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(22,135,255,.18), transparent 40%),
    #081321;
}

.final-cta > .container > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
}

.final-cta h2 {
  margin: 17px 0 30px;
  font-size: 43px;
  line-height: 1.1;
  letter-spacing: -1.5px;
}

.primary-btn.large {
  padding: 15px 26px;
}

/* FOOTER */

.footer {
  background: #050b13;
  border-top: 1px solid var(--line);
  padding: 30px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  display: flex;
  flex-direction: column;
}

.footer-logo strong {
  font-size: 16px;
}

.footer-logo span,
.footer-copy {
  color: #5e6c7e;
  font-size: 10px;
}

/* MOBILE */

@media (max-width: 950px) {

  .nav {
    display: none;
  }

  .exchange {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .exchange-ai {
    padding: 5px 0;
  }

  .ai-line {
    display: none;
  }

  .swap-circle {
    transform: rotate(90deg);
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .advantages-grid {
    grid-template-columns: 1fr 1fr;
  }

  .advantage {
    border-bottom: 1px solid var(--line);
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(4,1fr);
  }

  .regional-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {

  .container {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    height: 68px;
  }

  .logo-text small {
    display: none;
  }

  .header-actions .login-btn {
    display: none;
  }

  .header-actions .primary-btn {
    padding: 9px 11px;
    font-size: 11px;
  }

  .hero {
    padding-top: 55px;
  }

  .hero-heading h1 {
    font-size: 43px;
    letter-spacing: -2.3px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .card-image {
    height: 210px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .advantages-grid {
    grid-template-columns: 1fr;
  }

  .advantage {
    min-height: auto;
  }

  .category-grid {
    grid-template-columns: repeat(2,1fr);
  }

  .category {
    border-bottom: 1px solid #e1e5eb;
  }

  .flow {
    gap: 5px;
  }

  .comparison-block {
    padding: 22px 15px;
  }

  .region-copy h2,
  .section-heading h2,
  .final-cta h2 {
    font-size: 34px;
  }

  .map-placeholder {
    height: 300px;
  }

  .map-placeholder::before {
    font-size: 45px;
  }

  .footer-inner {
    gap: 20px;
  }
}

/* X5 GALLERY */

.car-gallery {
  width: 100%;
  background: #0b1625;
}

.gallery-main {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #111d2c;
}

.gallery-main > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.gallery-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);

  width: 36px;
  height: 48px;

  border: 0;
  border-radius: 8px;

  background: rgba(4, 12, 22, .65);
  color: white;

  font-size: 30px;
  line-height: 1;

  opacity: 0;
  transition: opacity .2s, background .2s;
}

.gallery-main:hover .gallery-arrow {
  opacity: 1;
}

.gallery-arrow:hover {
  background: rgba(22, 135, 255, .9);
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.gallery-counter {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: 10px;

  padding: 5px 9px;
  border-radius: 6px;

  background: rgba(3, 10, 18, .75);
  color: white;

  font-size: 10px;
  font-weight: 700;
}

/* PREVIEWS */

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;

  padding: 5px;

  background: #081321;
}

.gallery-thumb {
  position: relative;
  height: 48px;

  padding: 0;
  overflow: hidden;

  border: 2px solid transparent;
  border-radius: 5px;

  background: #111d2c;
  opacity: .55;

  transition: opacity .2s, border-color .2s;
}

.gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb:hover {
  opacity: .9;
}

.gallery-thumb.active {
  opacity: 1;
  border-color: #1687ff;
}

/* BARTER INTENT */

.barter-intent {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid rgba(22, 135, 255, .22);
  border-radius: 9px;
  background: rgba(22, 135, 255, .06);
}

.barter-intent-label {
  margin-bottom: 10px;
  color: #6284a8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.3px;
}

.barter-intent-value {
  display: flex;
  align-items: center;
  gap: 11px;
}

.barter-arrow {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1687ff;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.barter-intent-value > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.barter-intent-value strong {
  font-size: 12px;
  line-height: 1.35;
}

.barter-intent-value small {
  margin-top: 3px;
  color: #708399;
  font-size: 10px;
}

/* DETAILS */

.listing-details {
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.details-toggle {
  width: 100%;
  padding: 15px 0 3px;
  border: 0;
  background: transparent;
  color: #aab8c9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 11px;
  font-weight: 750;
}

.details-toggle:hover {
  color: #fff;
}

.details-chevron {
  color: #1687ff;
  font-size: 19px;
  transition: transform .25s ease;
}

/* CLOSED BY DEFAULT */

.details-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height .4s ease,
    opacity .25s ease,
    padding .4s ease;

  padding-top: 0;
}

/* OPEN */

.listing-details.open .details-content {
  max-height: 700px;
  opacity: 1;
  padding-top: 16px;
}

.listing-details.open .details-chevron {
  transform: rotate(180deg);
}

/* SPECS */

.specifications {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
}

.spec-row {
  padding: 10px;
  background: #0c1827;
  display: flex;
  flex-direction: column;
}

.spec-row span {
  color: #65778d;
  font-size: 9px;
}

.spec-row strong {
  margin-top: 2px;
  color: #eaf1f8;
  font-size: 11px;
}

/* DESCRIPTION */

.listing-description {
  margin-top: 18px;
  padding-bottom: 5px;
}

.listing-description > span {
  color: #65778d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.listing-description p {
  margin-top: 9px;
  color: #8495a9;
  font-size: 11px;
  line-height: 1.65;
}
