@import url("../tokens.css");

.home-page .hero{
  min-height: min(88vh, 820px);
  display:flex;
  align-items:flex-end;
  background-size:cover;
  background-position:center;
  position:relative;
  border-bottom:1px solid var(--color-border);
}
.home-page .hero--find{
  min-height: min(60vh, 560px);
  align-items:center;
}
.hero__overlay{
  position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(var(--color-overlay-inverse-rgb),.66), rgba(var(--color-overlay-inverse-rgb),.90));
}
.hero__overlay--dark{
  background:linear-gradient(180deg, rgba(var(--color-overlay-inverse-rgb),.56), rgba(var(--color-overlay-inverse-rgb),.84));
}
.hero__inner{
  position:relative;
  width:min(1100px, calc(100% - 32px));
  margin-inline:auto;
  padding:76px 0;
}
.home-page .hero__inner{
  display:grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "eyebrow meta"
    "title meta"
    "btn meta";
  align-items:end;
  column-gap:clamp(14px, 2vw, 28px);
  row-gap:10px;
}
.home-page .hero__eyebrow{grid-area:eyebrow}
.home-page .hero__title{grid-area:title}
.home-page .hero__btn{grid-area:btn; justify-self:start}
.home-page .hero__scroll{grid-area:meta; align-self:end; justify-self:end; margin-top:0}
@media (max-width: 720px){
  .home-page .hero__inner{
    grid-template-columns:1fr;
    grid-template-areas:
      "eyebrow"
      "title"
      "btn"
      "meta";
  }
  .home-page .hero__scroll{justify-self:start; margin-top:22px}
}
.hero__inner--left{margin-inline:auto auto; padding-left:16px; padding-right:16px; width:min(900px, calc(100% - 32px));}
.hero__eyebrow{
  margin:0 0 10px;
  font-size:13px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--color-muted);
}
.hero__eyebrow--small{font-size:12px}
.hero__title{
  margin:0 0 18px;
  text-transform:uppercase;
  letter-spacing:-.02em;
  color:var(--color-ink);
  -webkit-text-stroke:var(--text-outline-width) var(--text-outline-color);
  paint-order:stroke fill;
  text-shadow:var(--text-outline-shadow),0 10px 30px rgba(var(--color-overlay-rgb),.22);
}
.hero__title--medium{font-size:clamp(24px,3vw,40px)}
.hero__btn{margin-top:6px}

.hero__scroll{
  display:flex;
  align-items:center;
  gap:14px;
  margin-top:34px;
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--color-muted);
}
.hero__scroll-line{
  height:1px;
  width:84px;
  background:var(--color-border-2);
}

.section-image img{
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:1px solid var(--color-border);
}

.home-featured__header,
.home-brands__header{
  margin:0 0 22px;
}
.home-featured__grid{
  display:grid;
  grid-template-columns:repeat(12, minmax(0, 1fr));
  grid-auto-flow:dense;
  gap:18px;
}
.home-featured__card{grid-column:span 4}
.home-featured__card:nth-child(1){
  grid-column:1 / span 7;
  grid-row:1 / span 2;
}
.home-featured__card:nth-child(2),
.home-featured__card:nth-child(3){
  grid-column:8 / span 5;
}
@media (max-width: 1020px){
  .home-featured__grid{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .home-featured__card{grid-column:auto; grid-row:auto}
}
@media (max-width: 640px){
  .home-featured__grid{
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:84%;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scroll-padding:16px;
    padding-bottom:6px;
  }
  .home-featured__card{
    grid-column:auto;
    grid-row:auto;
    scroll-snap-align:start;
  }
}

.home-featured__card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:16px;
  border:1px solid var(--color-border);
  background:var(--color-surface);
  box-shadow:var(--shadow-soft);
  text-decoration:none;
  min-height:100%;
}
.home-featured__media{
  aspect-ratio: 16/10;
  background:var(--color-surface-2);
  overflow:hidden;
}
.home-featured__media img{
  width:100%;height:100%;
  object-fit:cover;
  transition:transform .25s ease;
}
.home-featured__card:hover .home-featured__media img{transform:scale(1.03)}
.home-featured__info{padding:14px 14px 16px}
.home-featured__title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.home-featured__title{
  margin:0;
  font-size:18px;
  letter-spacing:-.01em;
}
.home-featured__meta{color:var(--muted);font-size:14px;margin-top:6px}
.home-featured__price{margin-top:10px;font-weight:850}
.home-featured__price-was{color:var(--color-muted);text-decoration:line-through;margin-right:8px;font-weight:650}
.home-featured__price-now{color:var(--color-primary)}
.home-featured__badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--color-border);
  background:var(--color-surface-2);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
}
.home-featured__badge--discount{border-color:rgba(var(--color-success-rgb),.45);background:rgba(var(--color-success-rgb),.16)}
.home-featured__price-sold{color:var(--color-muted)}
.home-featured__price-ask{color:var(--muted)}

.home-brands__grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
  gap:12px;
  margin-top:18px;
}
.home-brands__item:nth-child(odd){transform:translateY(2px)}
@media (max-width: 560px){
  .home-brands__grid{
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:minmax(160px, 1fr);
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scroll-padding:16px;
    padding-bottom:6px;
  }
  .home-brands__item{
    scroll-snap-align:start;
    white-space:nowrap;
  }
}
.home-brands__item{
  padding:12px 12px;
  border-radius:999px;
  border:1px solid var(--color-border);
  background:var(--color-surface-2);
  text-align:center;
  font-weight:750;
  text-decoration:none;
  color:var(--color-text);
}
.home-brands__item:hover{border-color:var(--color-border-2);background:var(--color-surface)}
.home-brands__actions{margin-top:18px}

.home-news{
  position:relative;
  background-size:cover;
  background-position:center;
  padding:72px 0;
  border-top:1px solid var(--color-border);
  border-bottom:1px solid var(--color-border);
}
.home-news__overlay{
  position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(var(--color-overlay-rgb),.60), rgba(var(--color-overlay-rgb),.80));
}
.home-news__inner{
  position:relative;
  width:min(900px, calc(100% - 32px));
  margin-inline:auto;
  text-align:center;
  color:var(--color-paper);
}
.home-news__eyebrow{
  margin:0;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(var(--color-overlay-inverse-rgb),.72);
  font-weight:800;
  font-size:12px;
}
.home-news__title{
  margin:10px 0 8px;
  font-size:clamp(40px,6vw,72px);
  letter-spacing:-.04em;
  text-transform:uppercase;
}
.home-news__text{max-width:62ch;margin:0 auto 18px;color:rgba(var(--color-overlay-inverse-rgb),.78)}
.home-news__form{
  display:flex;
  gap:10px;
  justify-content:center;
  align-items:stretch;
  flex-wrap:wrap;
}
.home-news__input{
  width:min(440px, 100%);
}
.home-news__btn{min-width:140px}

.home-contact{
  padding:70px 16px;
}
.home-contact__inner{
  width:min(980px, 100%);
  margin-inline:auto;
  border-radius:18px;
  border:1px solid var(--color-border);
  background:var(--color-surface-2);
  box-shadow:var(--shadow-soft);
  padding:22px;
}
.home-contact__header{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:14px;
  margin-bottom:16px;
}
.home-contact__title{
  margin:0;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-size:20px;
}
.home-contact__note{margin:0;color:var(--color-muted);font-size:13px}

.home-contact__row{
  display:grid;
  grid-template-columns:repeat(12, minmax(0, 1fr));
  gap:14px;
  margin-bottom:14px;
}
.home-contact__row > *{grid-column:span 4}
.home-contact__row > *:nth-child(1){grid-column:span 6}
.home-contact__row > *:nth-child(2),
.home-contact__row > *:nth-child(3){grid-column:span 3}
@media (max-width: 900px){
  .home-contact__row{grid-template-columns:1fr}
  .home-contact__row > *{grid-column:auto}
}
.home-contact__field label{font-size:13px;color:var(--color-muted)}
.char-counter{opacity:.75}
.fx-reveal{animation: fxFade .55s ease both}
@keyframes fxFade{
  from{opacity:0; transform:translateY(10px)}
  to{opacity:1; transform:translateY(0)}
}

.front-page main, .home main{padding-block:clamp(18px, 3vw, 42px)}
.front-page :where(h1, .hero-title), .home :where(h1, .hero-title){
  font-size:clamp(2.0rem, 1.2rem + 3.0vw, 3.4rem);
  line-height:1.1;
  letter-spacing:-.03em;
}
.front-page :where(section, .dag-section){scroll-margin-top:96px}

.home-page .home-section{
  padding-block: clamp(28px, 4vw, 56px);
}

.home-page .home-featured__card{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-page .home-featured__card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--color-border-2);
}
.home-page .home-featured__card:focus-within{
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

@media (max-width: 720px){
  .home-page .home-hero{ padding: 44px 0 18px; }
  .home-page .home-section{ padding-block: 28px; }
}

.home-deals__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:0 0 22px;
}
@media (max-width: 640px){
  .home-deals__header{flex-direction:column; align-items:flex-start}
  .home-deals__viewall{width:100%; text-align:center}
}

.home-deals__grid{
  display:grid;
  grid-template-columns:repeat(12, minmax(0, 1fr));
  grid-auto-flow:dense;
  gap:18px;
}
.home-deals__card{grid-column:span 4}
.home-deals__card:nth-child(1){grid-column:1 / span 7}
.home-deals__card:nth-child(2){grid-column:8 / span 5}
.home-deals__card:nth-child(3){grid-column:1 / span 5}
.home-deals__card:nth-child(4){grid-column:6 / span 7}
@media (max-width: 1020px){
  .home-deals__grid{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .home-deals__card{grid-column:auto; grid-row:auto}
}
@media (max-width: 640px){
  .home-deals__grid{
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:86%;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scroll-padding:16px;
    padding-bottom:6px;
  }
  .home-deals__card{
    grid-column:auto;
    grid-row:auto;
    scroll-snap-align:start;
  }
}

.home-deals__card{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:18px;
  border:1px solid var(--color-border);
  background:var(--color-surface-2);
  box-shadow:var(--shadow-soft);
  text-decoration:none;
  min-height:100%;
}
.home-deals__media{
  aspect-ratio: 16/10;
  background:var(--color-surface-2);
}
.home-deals__media img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transition:transform .25s ease;
}
.home-deals__overlay{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:16px 16px 14px;
  background:linear-gradient(180deg, rgba(var(--color-overlay-rgb),0) 0%, rgba(var(--color-overlay-rgb),.72) 55%, rgba(var(--color-overlay-rgb),.84) 100%);
  color:var(--color-paper);
}
.home-deals__title{
  margin:0;
  font-size:20px;
  line-height:1.15;
  letter-spacing:-.01em;
  text-shadow:0 10px 26px rgba(var(--color-overlay-rgb),.55);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.home-deals__price{
  margin-top:10px;
  font-weight:850;
  font-size:18px;
}
.home-deals__meta{
  margin-top:8px;
  font-size:13px;
  color:var(--color-paper);
}
.home-deals__details{
  display:inline-block;
  margin-top:10px;
  font-weight:800;
  color:var(--color-paper);
}
.home-deals__card:hover .home-deals__media img{transform:scale(1.03)}
.home-deals__card:hover{transform:translateY(-2px)}
.home-deals__card:focus-within{
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}
/* ─────────────────────────────────────────
   T5 — Home page polish
   ───────────────────────────────────────── */

/* Hero — better overlay + responsive image-set */
.home-page .hero {
	min-height: 70vh;
	max-height: 720px;
	background-position: center center;
	background-size: cover;
	position: relative;
	display: flex;
	align-items: center;
	overflow: hidden;
}
.home-page .hero--main {
	background-image:
		image-set(
			url("../../img/hero-main-1920.webp") 1x type("image/webp"),
			url("../../img/hero-main-1920.jpg") 1x type("image/jpeg")
		),
		url("../../img/hero-main.jpg");
	background-size: cover;
	background-position: center center;
}
.home-page .hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg,
		rgba(15, 23, 42, 0.5) 0%,
		rgba(15, 23, 42, 0.65) 50%,
		rgba(15, 23, 42, 0.85) 100%);
	z-index: 1;
}
.home-page .hero__overlay--dark {
	background: linear-gradient(135deg,
		rgba(15, 23, 42, 0.85) 0%,
		rgba(30, 64, 175, 0.55) 100%);
}
.home-page .hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 24px;
	color: #fff;
}
.home-page .hero__eyebrow {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 3px;
	color: #fbbf24;
	margin: 0 0 16px 0;
	display: inline-block;
	padding-bottom: 6px;
	border-bottom: 2px solid #fbbf24;
}
.home-page .hero__title {
	font-size: clamp(32px, 5vw, 64px);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -1px;
	margin: 0 0 28px 0;
	max-width: 800px;
	color: #fff;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}
.home-page .hero__btn {
	display: inline-block;
	padding: 16px 36px;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	border-radius: 6px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
	transition: transform 0.18s, box-shadow 0.18s;
}
.home-page .hero__btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}
.home-page .hero__scroll {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #fff;
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	opacity: 0.7;
}
.home-page .hero__scroll-line {
	display: inline-block;
	width: 60px;
	height: 1px;
	background: #fff;
	opacity: 0.6;
}

/* Section spacing rhythm */
.home-page .section {
	padding: 64px 24px;
}
.home-page .section-padding {
	padding-block: clamp(48px, 7vw, 96px);
}
.home-page .section-dark-alt {
	background: #0f172a;
	color: #cbd5e1;
}
.home-page .section-mist {
	background: #f8fafc;
}

/* About block (dark) */
.home-page .home-about {
	position: relative;
}
.home-page .home-about .hero__eyebrow {
	color: #fbbf24;
	border-bottom-color: #fbbf24;
}
.home-page .home-about h2,
.home-page .home-about .hero__title {
	color: #fff;
	font-size: clamp(28px, 4vw, 44px);
	margin-bottom: 18px;
}
.home-page .home-about p {
	color: #cbd5e1;
	font-size: 16px;
	line-height: 1.7;
	max-width: 720px;
}

/* Deals block — featured cars */
.home-page .home-deals__header {
	text-align: center;
	margin-bottom: 40px;
}
.home-page .home-deals__header .hero__eyebrow {
	color: #1e40af;
	border-bottom-color: #1e40af;
}
.home-page .home-deals__header h2,
.home-page .home-deals__header .hero__title {
	color: #0f172a;
	font-size: clamp(28px, 4vw, 44px);
	margin: 8px 0 0;
	font-weight: 800;
}
.home-page .home-deals__card {
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: transform 0.2s, box-shadow 0.2s;
	position: relative;
}
.home-page .home-deals__card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
.home-page .home-deals__media {
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: #f1f5f9;
}
.home-page .home-deals__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease-out;
}
.home-page .home-deals__overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 20px;
	background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.85) 100%);
	color: #fff;
}
.home-page .home-deals__title {
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 6px 0;
	line-height: 1.3;
}
.home-page .home-deals__price {
	font-size: 22px;
	font-weight: 800;
	color: #fbbf24;
}
.home-page .home-deals__viewall {
	margin-top: 32px;
	display: block;
	text-align: center;
}

/* Brands */
.home-page .home-brands__header {
	text-align: center;
	margin-bottom: 32px;
}
.home-page .home-brands__grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
	max-width: 1100px;
	margin: 0 auto;
}
.home-page .home-brands__item {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px 12px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	color: #475569;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.15s;
	min-height: 64px;
	text-align: center;
}
.home-page .home-brands__item:hover {
	border-color: #1e40af;
	color: #1e40af;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
	transform: translateY(-2px);
}

/* News block */
.home-page .home-news {
	min-height: 360px;
	padding: 60px 24px;
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
	color: #fff;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
}
.home-page .home-news::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 64, 175, 0.6) 100%);
}
.home-page .home-news > * {
	position: relative;
	z-index: 2;
}
.home-page .home-news__btn {
	margin-top: 20px;
	padding: 14px 32px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* Contact block */
.home-page .home-contact {
	background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
	padding: 64px 24px;
}
.home-page .home-contact__inner {
	max-width: 900px;
	margin: 0 auto;
}
.home-page .home-contact__header {
	text-align: center;
	margin-bottom: 32px;
}
.home-page .home-contact__header h2 {
	color: #0f172a;
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 800;
	margin: 8px 0 0;
}
.home-page .home-contact__form.dag-form {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 32px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.home-page .home-contact__field {
	margin-bottom: 16px;
}
.home-page .home-contact__field label {
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	margin-bottom: 6px;
	display: block;
}
.home-page .home-contact__submit {
	width: 100%;
	padding: 16px 32px;
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	border-radius: 8px;
}

/* Mobile responsive */
@media (max-width: 980px) {
	.home-page .hero {
		min-height: 56vh;
		max-height: 560px;
	}
	.home-page .hero--main {
		background-image:
			image-set(
				url("../../img/hero-main-1280.webp") 1x type("image/webp"),
				url("../../img/hero-main-1280.jpg") 1x type("image/jpeg")
			),
			url("../../img/hero-main.jpg");
	}
	.home-page .home-news {
		background-attachment: scroll;
	}
	.home-page .home-brands__grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.home-page .home-deals__grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 16px;
	}
	.home-page .home-deals__card {
		grid-column: span 1 !important;
	}
}

@media (max-width: 640px) {
	.home-page .hero {
		min-height: 50vh;
		max-height: 480px;
	}
	.home-page .hero--main {
		background-image:
			image-set(
				url("../../img/hero-main-768.webp") 1x type("image/webp"),
				url("../../img/hero-main-768.jpg") 1x type("image/jpeg")
			),
			url("../../img/hero-main.jpg");
	}
	.home-page .hero__inner {
		padding: 36px 18px;
	}
	.home-page .hero__title {
		font-size: 28px;
		line-height: 1.1;
	}
	.home-page .hero__btn {
		display: block;
		text-align: center;
		padding: 14px 24px;
	}
	.home-page .section {
		padding: 36px 18px;
	}
	.home-page .home-brands__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.home-page .home-brands__item {
		font-size: 12px;
		min-height: 52px;
		padding: 12px 8px;
	}
	.home-page .home-deals__grid {
		grid-template-columns: 1fr;
	}
	.home-page .home-contact__form.dag-form {
		padding: 20px;
	}
}
