/* Home page. Tokens and scheme variables come from base/10-tokens.css (--bg --fg --mute --line). One idea per section,
   headings in one weight (no bold/light mix), photos in their own frames — text never sits on a busy picture. */

/* ---------- section head: title, optional lead, one action ---------- */
.fp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: end; margin-bottom: var(--va-head-gap); }
.fp-head > h2 { grid-column: 1; margin: 0; max-width: 18ch; }
.fp-head__lead { grid-column: 1; margin: 0; max-width: 52ch; }
.fp-head > .va-btn { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
@media (max-width: 767px) { .fp-head { grid-template-columns: minmax(0, 1fr); } .fp-head > .va-btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; } }

/* ---------- Hero: text + quick pick on a clean field, the photo in its own frame ---------- */
.fp-hero { padding-top: calc(var(--va-header-h) + clamp(20px, 4vw, 56px)); padding-bottom: clamp(32px, 4vw, 56px); }
.fp-hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--va-col-gap); align-items: center; min-height: calc(100svh - var(--va-header-h) - var(--va-bar-space)); }
.fp-hero__text { grid-column: 1 / span 5; display: grid; gap: clamp(20px, 2.2vw, 32px); justify-items: start; }
.fp-hero__title { margin: 0; font: 500 clamp(40px, 5.6vw, 96px)/.95 var(--va-font-display); letter-spacing: -.01em; text-transform: uppercase; }
.fp-hero__title > span { display: block; }
.fp-hero__lead { margin: 0; max-width: 40ch; color: var(--mute); }
.fp-hero__media { grid-column: 6 / -1; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--va-radius); background: var(--surface); }
.fp-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 60%; }
@media (max-width: 899px) {
	.fp-hero__grid { min-height: 0; }
	.fp-hero__text, .fp-hero__media { grid-column: 1 / -1; }
	.fp-hero__title { font-size: clamp(40px, 12.4vw, 76px); }
	.fp-hero__media { aspect-ratio: 16 / 10; }
}

/* quick pick: three quiet fields and one button */
.fp-pick { display: grid; gap: 24px; width: 100%; margin-top: 8px; }
.fp-pick__fields { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px var(--va-col-gap); }
.fp-pick__select { padding-right: 22px; cursor: pointer; text-overflow: ellipsis;
	background: linear-gradient(45deg, transparent 50%, currentColor 50%) calc(100% - 6px) 55% / 6px 6px no-repeat, linear-gradient(135deg, currentColor 50%, transparent 50%) 100% 55% / 6px 6px no-repeat; }
.fp-pick__select option { color: var(--va-ink); background-color: var(--va-paper); }
.fp-pick__select:disabled { opacity: .4; cursor: default; }
.fp-pick__submit { justify-self: start; min-width: min(100%, 280px); }
.fp-pick__submit[aria-disabled="true"] { opacity: .5; pointer-events: none; }
@media (max-width: 559px) {
	.fp-pick__fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.fp-pick__field:first-child { grid-column: 1 / -1; }
	.fp-pick__submit { justify-self: stretch; }
}

/* ---------- Facts: a calm line under the first screen ---------- */
.fp-facts { padding-block: 0 clamp(56px, 7vw, 112px); }
.fp-facts__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--va-col-gap); margin-block: 0; }
.fp-facts__item { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); }
.fp-facts__value { font: 400 var(--va-fs-h3)/1 var(--va-font-display); font-variant-numeric: tabular-nums; }
.fp-facts__note { margin: 0; font-size: var(--va-fs-small); color: var(--mute); }
@media (max-width: 767px) { .fp-facts__list { grid-template-columns: minmax(0, 1fr); } .fp-facts__item { padding-block: 14px; } }

/* ---------- Route scene ---------- */
.fp-route { overflow: clip; }
.fp-route__head { display: grid; gap: 14px; }
.fp-route__title { margin: 0; max-width: 12ch; }
.fp-route__switch { display: none; flex-wrap: wrap; gap: 6px; }
.fp-route.is-enhanced .fp-route__switch { display: flex; }
.fp-route__country { font: inherit; font-size: var(--va-fs-small); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; transition: background var(--va-dur-fast) var(--va-ease-out), color var(--va-dur-fast); }
.fp-route__country[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.fp-route__country:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.fp-route__meta { margin: 0; font-size: var(--va-fs-small); color: var(--mute); }
.fp-route__map { margin-block: 24px; }
.fp-route__svg { display: block; width: 100%; height: auto; overflow: hidden; }
.fp-route__land { color: var(--fg); opacity: .5; }
.fp-route__land-layer { display: none; }
.fp-route__edge { fill: var(--bg); }
.fp-route__edges stop { stop-color: var(--bg); }
.fp-route__route { opacity: .22; transition: opacity var(--va-dur) var(--va-ease-out); }
.fp-route__line { fill: none; stroke: var(--fg); stroke-opacity: .5; stroke-width: 1.5; stroke-dasharray: 5 6; vector-effect: non-scaling-stroke; }
.fp-route__trail { fill: none; stroke: var(--fg); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fp-route__node { fill: var(--bg); stroke: var(--fg); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fp-route__label { font-family: var(--va-font-text); font-size: 15px; font-weight: 500; fill: var(--fg); paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; display: none; }
.fp-route__label--end { font-family: var(--va-font-display); font-weight: 600; font-size: 26px; text-transform: uppercase; }
.fp-route__car { display: none; }
.fp-route__shadow { fill: var(--va-ink); opacity: .22; }
.fp-route__rail { display: none; }
.fp-route__panel { display: none; }
ol.fp-route__stages { list-style: none; margin: 0; padding: 0 var(--va-gutter); /* ol: beats the base ol[class] reset */ display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; max-width: 1680px; margin-inline: auto; }
.fp-route__stage { border-top: 1px solid var(--line); padding-top: 14px; }
.fp-route__num { font-size: var(--va-fs-h3); line-height: 1; }
.fp-route__stage-title { margin: 8px 0 6px; }
.fp-route__text, .fp-route__local { margin: 0 0 6px; font-size: var(--va-fs-small); max-width: 42ch; }
.fp-route__local { color: var(--mute); display: none; }
.fp-route[data-country="kr"] .fp-route__route[data-route="kr"],
.fp-route[data-country="cn"] .fp-route__route[data-route="cn"],
.fp-route[data-country="jp"] .fp-route__route[data-route="jp"],
.fp-route[data-country="eu"] .fp-route__route[data-route="eu"],
.fp-route[data-country="ae"] .fp-route__route[data-route="ae"] { opacity: 1; }
.fp-route[data-country="kr"] .fp-route__route[data-route="kr"] .fp-route__label,
.fp-route[data-country="cn"] .fp-route__route[data-route="cn"] .fp-route__label,
.fp-route[data-country="jp"] .fp-route__route[data-route="jp"] .fp-route__label,
.fp-route[data-country="eu"] .fp-route__route[data-route="eu"] .fp-route__label,
.fp-route[data-country="ae"] .fp-route__route[data-route="ae"] .fp-route__label { display: inline; }
.fp-route[data-country="kr"] .fp-route__local[data-for="kr"],
.fp-route[data-country="cn"] .fp-route__local[data-for="cn"],
.fp-route[data-country="jp"] .fp-route__local[data-for="jp"],
.fp-route[data-country="eu"] .fp-route__local[data-for="eu"],
.fp-route[data-country="ae"] .fp-route__local[data-for="ae"] { display: block; }
.fp-route:not([data-country]) .fp-route__route { opacity: 1; }

/* Live (JS + motion): pinned full-screen scene, one stage at a time. */
.fp-route.is-live { padding-block: 0; }
.fp-route.is-live .fp-route__pin { position: relative; height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; padding-top: calc(var(--va-header-h, 72px) + 8px); padding-bottom: calc(var(--va-bar-space, 88px)); }
.fp-route.is-live .fp-route__map { position: absolute; inset: 0; margin: 0; z-index: 0; }
.fp-route.is-live .fp-route__svg { position: relative; width: 100%; height: 100%; }
/* live: the land moves as one composited layer (transform only), the svg above keeps routes, labels and the car */
.fp-route.is-live .fp-route__map { overflow: hidden; contain: strict; }
.fp-route.is-live .fp-route__land { display: none; }
.fp-route.is-live .fp-route__land-layer { display: block; opacity: .5; position: absolute; left: 0; top: 0; max-width: none; overflow: visible; color: var(--fg); transform-origin: 0 0; will-change: transform; pointer-events: none; }
.fp-route.is-live .fp-route__head { position: relative; z-index: 1; pointer-events: none; }
.fp-route.is-live .fp-route__head > * { pointer-events: auto; }
.fp-route.is-live .fp-route__car { display: inline; }
.fp-route.is-live .fp-route__route { opacity: 0; } /* only the chosen route is drawn — the others are noise */
.fp-route.is-live .fp-route__label { display: none; }
.fp-route.is-live .fp-route__route .fp-route__label.is-on { display: inline; }
.fp-route.is-live .fp-route__stages { grid-row: 3; position: relative; z-index: 1; display: block; width: 100%; min-height: 0; padding: 0; }
.fp-route.is-live .fp-route__stage { position: absolute; left: var(--va-gutter); bottom: 0; width: min(440px, calc(100% - 2 * var(--va-gutter))); padding: 18px 20px; border-radius: var(--va-radius);
	background: var(--bg); border-top: 1px solid var(--line); border-radius: 0; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .35s var(--va-ease-out), transform .45s var(--va-ease-out), visibility 0s .45s; }
.fp-route.is-live .fp-route__stage.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.fp-route.is-live .fp-route__num { font-size: var(--va-fs-h2); }
.fp-route.is-live .fp-route__rail { display: block; position: absolute; left: var(--va-gutter); right: var(--va-gutter); bottom: calc(var(--va-bar-space, 88px) - 18px); height: 2px; background: var(--line); z-index: 1; }
.fp-route__rail-fill { position: absolute; inset: 0; background: var(--fg); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
@media (min-width: 768px) {
	.fp-route { --fp-panel: clamp(260px, 34vw, 480px); }
	.fp-route.is-live .fp-route__panel { display: block; position: absolute; left: 0; top: 0; bottom: 0; z-index: 1; width: calc(var(--va-gutter) + var(--fp-panel) + 24px); background: var(--bg); border-right: 1px solid var(--line); }
	.fp-route.is-live .fp-route__head { width: var(--fp-panel); margin-inline: var(--va-gutter) 0; gap: 20px; }
	.fp-route.is-live .fp-route__stage { width: var(--fp-panel); padding: 0; border-top: 0; background: none; }
	.fp-route.is-live .fp-route__rail { right: auto; width: var(--fp-panel); bottom: calc(var(--va-bar-space, 88px) - 18px); }
	.fp-route.is-live .fp-route__stages { margin-bottom: 32px; }
}
@media (max-width: 767px) {
	.fp-route__title { max-width: none; }
	.fp-route.is-live .fp-route__head { gap: 10px; }
	.fp-route.is-live .fp-route__meta { display: none; }
	.fp-route.is-live .fp-route__switch { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--va-gutter)); padding-inline: var(--va-gutter); }
	.fp-route.is-live .fp-route__country { flex: 0 0 auto; padding: 7px 12px; }
	.fp-route.is-live .fp-route__stages { min-height: 0; }
	.fp-route.is-live .fp-route__stage { left: 0; width: 100%; padding: 28px var(--va-gutter) 6px; background: linear-gradient(180deg, transparent, var(--bg) 26px); backdrop-filter: none; }
	.fp-route.is-live .fp-route__num { font-size: var(--va-fs-h3); }
	.fp-route.is-live .fp-route__stage-title { margin: 4px 0; }
}

/* ---------- Fresh cars ---------- */
.fp-fresh__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--va-card-gap); }
.fp-fresh__empty { max-width: 56ch; }
@media (max-width: 1100px) { .fp-fresh__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .fp-fresh__grid { grid-template-columns: minmax(0, 1fr); } .fp-fresh__grid > :nth-child(n+3) { display: none; } }

/* ---------- Directions: large photo tiles, two over three ---------- */
.fp-dirs__bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: clamp(280px, 30vw, 480px) clamp(220px, 20vw, 340px); gap: var(--va-tile-gap); }
.fp-dirs__tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: clamp(18px, 2vw, 32px); border-radius: var(--va-radius); color: var(--va-paper); text-decoration: none; grid-column: span 2; background: var(--va-ink); }
.fp-dirs__tile--kr, .fp-dirs__tile--cn { grid-column: span 3; }
.fp-dirs__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform var(--va-dur-slow) var(--va-ease-out); }
.fp-dirs__tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(var(--va-ink-c) / .78)); z-index: 0; }
.fp-dirs__tile > :not(img) { position: relative; z-index: 1; }
.fp-dirs__tile:hover .fp-dirs__img { transform: scale(1.04); }
.fp-dirs__tile:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.fp-dirs__label { font: 500 var(--va-fs-h2)/.95 var(--va-font-display); text-transform: uppercase; }
.fp-dirs__meta { font-size: var(--va-fs-small); }
@media (max-width: 767px) { .fp-dirs__bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 210px; } .fp-dirs__tile, .fp-dirs__tile--cn { grid-column: span 1; } .fp-dirs__tile--kr { grid-column: span 2; } .fp-dirs__tile { padding: 14px; } }

/* ---------- In stock: horizontal strip ---------- */
.fp-stock__track { display: flex; gap: var(--va-col-gap); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--va-gutter) 12px; scrollbar-width: thin; overscroll-behavior-x: contain; scroll-padding-inline: var(--va-gutter); }
.fp-stock__item { flex: 0 0 min(80vw, 420px); display: flex; scroll-snap-align: start; }
.fp-stock__item > .car-card { flex: 1; }
.fp-stock__track:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; }

/* ---------- Terms in short ---------- */
.fp-terms__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--va-col-gap); }
.fp-terms__head { grid-column: 1 / span 4; display: grid; align-content: start; justify-items: start; gap: 24px; }
.fp-terms__head h2 { margin: 0; }
.fp-terms__list { grid-column: 6 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--va-col-gap); }
.fp-terms__item { display: grid; gap: 6px; align-content: start; padding: 22px 0 26px; border-top: 1px solid var(--line); }
.fp-terms__k { font: 500 var(--va-fs-h3)/1.05 var(--va-font-display); text-transform: uppercase; }
.fp-terms__v { color: var(--mute); max-width: 36ch; }
@media (max-width: 899px) { .fp-terms__head, .fp-terms__list { grid-column: 1 / -1; } .fp-terms__head { margin-bottom: calc(var(--va-head-gap) - var(--va-col-gap)); } }
@media (max-width: 559px) { .fp-terms__list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Upgrade: Velart projects, each opens its page on vel-art.ru (2 large + 3; tablet 1 + 2×2; phone swipe lane) ---------- */
.fp-upgrade__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(32px, 3vw, 48px) var(--va-tile-gap); }
.fp-proj { grid-column: span 2; min-width: 0; }
.fp-proj:nth-child(-n+2) { grid-column: span 3; }
.fp-proj__link { position: relative; display: grid; gap: 16px; color: inherit; text-decoration: none; } /* positioned: keeps the sr-only note inside the phone lane (no page overflow) */
.fp-proj__link:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: var(--va-radius); }
.fp-proj__media { position: relative; overflow: hidden; border-radius: var(--va-radius); background: var(--surface); aspect-ratio: 4 / 3; }
.fp-proj:nth-child(-n+2) .fp-proj__media { aspect-ratio: 16 / 10; }
.fp-proj__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--va-dur-slow) var(--va-ease-out); }
.fp-proj__text { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.fp-proj__words { display: grid; gap: 6px; min-width: 0; }
.fp-proj__title { margin: 0; font: 500 var(--va-fs-h3)/1.05 var(--va-font-display); text-transform: uppercase; text-wrap: balance; }
.fp-proj__line { margin: 0; font-size: var(--va-fs-small); color: var(--mute); }
.fp-proj__arrow { flex: none; width: 16px; height: 16px; margin-top: 4px; opacity: .5; transition: transform var(--va-dur) var(--va-ease-out), opacity var(--va-dur-fast); }
@media (hover: hover) {
	.fp-proj__link:hover img { transform: scale(1.04); }
	.fp-proj__link:hover .fp-proj__arrow, .fp-upgrade__all:hover .fp-proj__arrow { opacity: 1; transform: translate(2px, -2px); }
}
.fp-upgrade__more { display: flex; justify-content: flex-end; margin: clamp(24px, 3vw, 44px) 0 0; }
.fp-upgrade__all { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; font: 600 var(--va-fs-small)/1 var(--va-font-text); letter-spacing: .14em; text-transform: uppercase; }
.fp-upgrade__all .fp-proj__arrow { margin-top: 0; }
@media (max-width: 1023px) {
	.fp-upgrade__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fp-proj, .fp-proj:nth-child(-n+2) { grid-column: span 1; }
	.fp-proj:first-child { grid-column: 1 / -1; }
	.fp-proj:first-child .fp-proj__media { aspect-ratio: 16 / 9; }
	.fp-proj:nth-child(2) .fp-proj__media { aspect-ratio: 4 / 3; }
}
@media (max-width: 767px) {
	.fp-upgrade .fp-upgrade__grid { /* beats the ul[class] reset in 20-base.css */
		display: flex; gap: var(--va-tile-gap); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
		margin-inline: calc(-1 * var(--va-gutter)); padding: 0 var(--va-gutter) 4px; scroll-padding-inline: var(--va-gutter); scrollbar-width: none;
	}
	.fp-upgrade__grid::-webkit-scrollbar { display: none; }
	.fp-proj, .fp-proj:nth-child(-n+2), .fp-proj:first-child { flex: 0 0 84%; scroll-snap-align: start; }
	.fp-proj .fp-proj__media, .fp-proj:nth-child(-n+2) .fp-proj__media, .fp-proj:first-child .fp-proj__media { aspect-ratio: 4 / 3; }
	.fp-upgrade__more { justify-content: flex-start; }
}
