/* ==========================================================================
   Home — the storefront

   The one page a visitor may reach before anything else, so it is built like
   a consumer website rather than like a dashboard: a real hero, then three
   sets of things to look at, each in the layout its own content asks for.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero

   A headline column and a showcase, side by side once there is room and
   stacked before that. The showcase is a fixed-ratio frame, so slides can
   cross-fade inside it without the page moving.
   -------------------------------------------------------------------------- */
.hero {
    display: grid;
    gap: var(--sp-5);
    align-items: center;
}

@media (min-width: 960px) {
    .hero {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        gap: var(--sp-10);
        padding-block: var(--sp-4) var(--sp-6);
    }
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    margin-bottom: var(--sp-4);
    border-radius: var(--r-pill);
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: var(--t-2xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero__title {
    margin: 0 0 var(--sp-3);
    font-size: var(--t-display);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.04em;
}

/* One word carries the brand colour, so the headline has a focal point
   without a second typeface or a gradient. */
.hero__title em { font-style: normal; color: var(--primary); }

.hero__text {
    margin: 0;
    max-width: 46ch;
    color: var(--text-2);
    font-size: 0.95rem;
    line-height: 1.6;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-5);
}

/* Two long labels will not sit side by side on a phone, and two pills of
   different widths stacked look like a mistake — so they go full width. */
@media (max-width: 559.98px) {
    .hero__actions { flex-direction: column; align-items: stretch; }
}

/* --- The showcase -------------------------------------------------------- */
.hero-slider {
    position: relative;
    /* Swiper's own rule sets `margin-inline: auto`, and an auto inline margin
       on a grid item cancels the stretch — the frame collapsed to its
       shrink-to-fit width, which with everything inside it absolutely
       positioned is nothing at all. */
    width: 100%;
    margin-inline: 0;
    border-radius: var(--r-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 3;
}

@media (min-width: 560px) {
    .hero-slider { aspect-ratio: 16 / 9; }
}

@media (min-width: 960px) {
    .hero-slider { aspect-ratio: 16 / 11; }
}

.hero-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-slide__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* A slow drift, so a still photograph does not read as a dead frame. */
    animation: hero-drift 14s ease-in-out infinite alternate;
}

@keyframes hero-drift {
    from { transform: scale(1.02); }
    to { transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide__bg { animation: none; }
}

/* The scrim is what makes white text legible on an unknown photograph. */
.hero-slide__body {
    position: absolute;
    inset: auto 0 0 0;
    /* The bottom padding leaves the pagination its own line — the dots sit
       under the copy rather than across the end of it. */
    padding: var(--sp-8) var(--sp-5) var(--sp-8);
    background: linear-gradient(to top, rgba(6, 6, 14, 0.9) 12%, rgba(6, 6, 14, 0.55) 55%, transparent);
    color: #fff;
}

@media (min-width: 768px) {
    .hero-slide__body { padding: var(--sp-10) var(--sp-6) var(--sp-8); }
}

.hero-slide__title {
    margin: var(--sp-2) 0 6px;
    color: #fff;
    font-size: clamp(1.1rem, 3vw, 1.45rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-slide__text {
    margin: 0;
    max-width: 52ch;
    color: rgba(255, 255, 255, 0.82);
    font-size: var(--t-sm);
    line-height: 1.55;
}

/* Pagination sits inside the frame, on the scrim. */
.hero-slider .swiper-pagination {
    bottom: var(--sp-3);
    text-align: right;
    padding-inline: var(--sp-5);
}

@media (min-width: 768px) {
    .hero-slider .swiper-pagination { padding-inline: var(--sp-6); }
}

.hero-slider .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: width var(--dur) var(--ease), background var(--dur) var(--ease);
}

.hero-slider .swiper-pagination-bullet-active {
    width: 22px;
    border-radius: var(--r-pill);
    background: #fff;
}

/* --------------------------------------------------------------------------
   2. Browse by type

   A row of small targets. It scrolls sideways on a phone — the mobile way of
   showing a set that will not fit — and settles into a row of equal columns
   once it will.
   -------------------------------------------------------------------------- */
.type-row { padding-block: 2px; }

@media (min-width: 700px) {
    .type-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.type-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    width: 104px;
    padding: var(--sp-4) var(--sp-2);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-panel);
    color: var(--text);
    font-size: var(--t-sm);
    font-weight: 700;
    text-align: center;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
        background var(--dur) var(--ease);
}

@media (min-width: 700px) {
    .type-chip { width: auto; }
}

.type-chip img {
    width: 40px;
    height: 30px;
    object-fit: contain;
    transition: transform var(--dur) var(--ease);
}

.type-chip:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-raised);
    color: var(--primary);
}

.type-chip:hover img { transform: scale(1.08); }

/* --------------------------------------------------------------------------
   3. Vehicle cards
   -------------------------------------------------------------------------- */
.car-row { padding-block: 2px; }

@media (min-width: 700px) {
    .car-row { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

.car-card {
    display: flex;
    flex-direction: column;
    width: 236px;
    border-radius: var(--r-xl);
    background: var(--surface);
    box-shadow: var(--shadow-panel);
    overflow: hidden;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

@media (min-width: 700px) {
    .car-card { width: auto; }
}

.car-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-raised);
}

.car-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--surface-3);
    overflow: hidden;
}

.car-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.car-card:hover .car-card__media img { transform: scale(1.06); }

.car-card__year {
    position: absolute;
    top: var(--sp-2);
    left: var(--sp-2);
    padding: 3px 9px;
    border-radius: var(--r-pill);
    background: rgba(8, 8, 14, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: var(--t-2xs);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.car-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: var(--sp-4);
}

.car-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-2);
}

.car-card__title {
    margin: 0;
    font-size: var(--t-body);
    font-weight: 700;
    letter-spacing: -0.02em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.car-card__price {
    margin: 0;
    flex: 0 0 auto;
    color: var(--primary);
    font-size: var(--t-sm);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.car-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.car-card__specs li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    box-shadow: var(--ring);
    color: var(--text-2);
    font-size: var(--t-2xs);
    font-weight: 600;
}

.car-card__specs i { font-size: 0.7rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   4. Review cards

   Editorial, so the picture is the lead and the byline closes it.
   -------------------------------------------------------------------------- */
.review-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--r-xl);
    background: var(--surface);
    box-shadow: var(--shadow-panel);
    overflow: hidden;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-raised);
}

.review-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--surface-3);
    overflow: hidden;
}

.review-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.review-card:hover .review-card__media img { transform: scale(1.05); }

/* The score, as a solid mark over the corner of the picture. */
.review-card__score {
    position: absolute;
    right: var(--sp-3);
    bottom: var(--sp-3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: var(--r-pill);
    background: var(--gold);
    color: #40290a;
    font-size: var(--t-xs);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.review-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding: var(--sp-4);
}

.review-card__title {
    margin: 0;
    font-size: var(--t-h3);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.review-card__quote {
    margin: 0;
    color: var(--text-2);
    font-size: var(--t-sm);
    line-height: 1.55;
}

.review-card__author {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
    padding-top: var(--sp-3);
    box-shadow: inset 0 1px 0 var(--border);
    min-width: 0;
}

.review-card__author img {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
}

.review-card__author-name { font-size: var(--t-sm); font-weight: 700; }
.review-card__author-role { font-size: var(--t-2xs); color: var(--text-muted); }
