/* ==============================================================
   MotorPower SGS — V2 LAYER (focused, premium)
   - Hero badges (subtle pulse)
   - Dyno chart (animated SVG)
   - Process timeline (5 steps)
   - CTA banner
   - Brand quick-picker for car pages
   ============================================================== */

/* ---------- Eyebrow utility ---------- */
.eyebrow {
    font-size: 12px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 10px;
}

/* ---------- DYNO chart section ---------- */
.section-dyno {
    position: relative;
    padding-block: 80px;
    overflow: hidden;
}

.dyno-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.dyno-text h2 {
    font-size: clamp(26px, 2.6vw, 38px);
    margin: 0 0 14px;
    letter-spacing: -.018em;
}

.dyno-text h2 b {
    color: var(--accent);
}

.dyno-text p {
    color: #c0c7db;
    font-size: 16px;
    line-height: 1.65;
    max-width: 540px;
    margin: 0;
}

.dyno-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 22px;
    max-width: 480px;
}

.dyno-stat {
    background: rgba(15, 20, 33, .55);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 16px;
    transition: border-color .25s;
}

.dyno-stat:hover {
    border-color: rgba(238, 30, 35, .35);
}

.dyno-stat .badge {
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #97a0b8;
    font-weight: 700;
    margin-bottom: 6px;
}

.dyno-stat .num {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    letter-spacing: -.02em;
}

.dyno-stat .num span {
    font-size: 16px;
    color: var(--accent);
    font-weight: 700;
}

.dyno-stat .lbl {
    color: #9aa2b3;
    font-size: 12.5px;
    margin-top: 6px;
}

.dyno-text p.dyno-disclaimer {
    margin: 36px 0 0 0;
    padding: 16px 18px 16px 56px;
    border-left: 3px solid rgba(238, 30, 35, .55);
    background: linear-gradient(90deg, rgba(238, 30, 35, .07), transparent 80%);
    border-radius: 0 10px 10px 0;
    font-size: 13.5px;
    color: #b8c0d4;
    line-height: 1.65;
    max-width: 540px;
    position: relative;
}

.dyno-disclaimer::before {
    content: "ⓘ";
    position: absolute;
    top: 16px;
    left: 18px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(238, 30, 35, .4);
}

.dyno-disclaimer strong {
    color: #fff;
    font-weight: 700;
}

.dyno-disclaimer em {
    font-style: normal;
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 600px) {
    .dyno-text p.dyno-disclaimer {
        font-size: 12.5px;
        padding: 14px 16px 14px 50px;
        margin: 28px 0 0 0;
    }

    .dyno-disclaimer::before {
        top: 14px;
        left: 16px;
        width: 22px;
        height: 22px;
        font-size: 12px;
    }
}

.dyno-chart {
    position: relative;
    aspect-ratio: 4/3;
    background: linear-gradient(180deg, #11151f, #0a0d13);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    padding: 22px 22px 24px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .45);
    overflow: hidden;
}

.dyno-chart::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 40px 30px;
    background-position: 22px 22px;
    pointer-events: none;
    mask-image: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
}

.dyno-chart svg {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.dyno-axis {
    stroke: rgba(255, 255, 255, .12);
    stroke-width: 1;
}

.dyno-line {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dyno-line.before {
    stroke: #6b7da3;
    stroke-dasharray: 6 6;
}

.dyno-line.after {
    stroke: var(--accent);
}

.dyno-area {
    fill: url(#dynoFill);
    opacity: 0;
}

.dyno-line[data-anim] {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 2.2s var(--ease-out, cubic-bezier(.22, 1, .36, 1));
}

.dyno-chart.is-in .dyno-line[data-anim] {
    stroke-dashoffset: 0;
}

.dyno-area[data-anim] {
    transition: opacity .9s ease 1.4s;
}

.dyno-chart.is-in .dyno-area[data-anim] {
    opacity: .35;
}

.dyno-legend {
    position: absolute;
    top: 14px;
    right: 18px;
    display: flex;
    gap: 16px;
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #97a0b8;
    font-weight: 700;
}

.dyno-legend i {
    display: inline-block;
    width: 18px;
    height: 2.5px;
    margin-right: 6px;
    border-radius: 2px;
    vertical-align: middle;
}

.dyno-legend .leg-before i {
    background: #6b7da3;
}

.dyno-legend .leg-after i {
    background: var(--accent);
}

.dyno-chart-title {
    position: absolute;
    bottom: 12px;
    left: 22px;
    font-size: 10.5px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #6f7a96;
    font-weight: 700;
}

@media (max-width: 920px) {
    .dyno-wrap {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ---------- PROCESS timeline ---------- */
.section-process {
    padding-block: 70px;
}

.process-head {
    text-align: center;
    margin-bottom: 50px;
}

.process-head h2 {
    font-size: clamp(26px, 2.6vw, 38px);
    margin: 0;
    letter-spacing: -.018em;
}

.process-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.process-track::before {
    content: "";
    position: absolute;
    top: 32px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: rgba(255, 255, 255, .08);
    z-index: 0;
}

.process-track::after {
    content: "";
    position: absolute;
    top: 31px;
    left: 8%;
    width: 0;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
    transition: width 1.8s var(--ease-out, cubic-bezier(.22, 1, .36, 1));
}

.process-track.is-in::after {
    width: 84%;
}

.process-step {
    position: relative;
    text-align: center;
    z-index: 1;
}

.process-step .dot {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    background: #11151f;
    border: 2px solid rgba(255, 255, 255, .12);
    color: var(--accent);
    transition: transform .35s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)), border-color .3s, box-shadow .3s;
}

.process-step .dot svg {
    width: 24px;
    height: 24px;
}

.process-step.is-active .dot,
.process-step:hover .dot {
    border-color: var(--accent);
    box-shadow: 0 0 0 6px rgba(238, 30, 35, .1);
    transform: translateY(-2px);
}

.process-step h3 {
    font-size: 15px;
    margin: 0 0 4px;
    letter-spacing: -.005em;
    color: #fff;
}

.process-step p {
    color: #9aa2b3;
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
    padding: 0 6px;
}

@media (max-width: 920px) {
    /* Vertical track */
    .process-track {
        display: block !important;
        position: relative;
        max-width: 520px;
        margin: 0 auto;
    }

    /* Steps stack vertically with consistent spacing */
    .process-step {
        display: grid;
        grid-template-columns: 52px 1fr;
        column-gap: 18px;
        align-items: start;
        text-align: left;
        position: relative;
        z-index: 1;
        margin-bottom: 28px;
        min-height: 52px;
    }

    .process-step:last-child {
        margin-bottom: 0;
    }

    .process-step .dot {
        position: relative;
        z-index: 2;
        margin: 0;
        width: 52px;
        height: 52px;
        flex-shrink: 0;
        background: linear-gradient(135deg, #1a2030, #0d1119);
        box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
    }

    .process-step .dot span {
        font-size: 22px !important;
    }

    .process-step__body {
        padding-top: 6px;
        min-width: 0;
    }

    .process-step__body h3 {
        margin: 0 0 4px;
        font-size: 16px;
    }

    .process-step__body p {
        margin: 0;
        padding: 0;
        font-size: 13.5px;
        line-height: 1.55;
        color: #aab3cc;
    }

    /* === Connecting line (background, grey) === */
    .process-track::before {
        content: "";
        position: absolute;
        top: 26px;
        bottom: 26px;
        left: 25px;
        right: auto;
        width: 2px;
        height: auto;
        background: rgba(255, 255, 255, .1);
        border-radius: 2px;
    }

    /* === Animated red line — same range as ::before, scales from top === */
    .process-track::after {
        content: "";
        position: absolute;
        top: 26px;
        bottom: 26px;
        left: 24px;
        right: auto;
        width: 4px;
        height: auto;
        background: linear-gradient(180deg, var(--accent), #ff5a4e);
        border-radius: 4px;
        box-shadow: 0 0 12px rgba(238, 30, 35, .35);
        transform: scaleY(0);
        transform-origin: top center;
        transition: transform 1.8s var(--ease-out, cubic-bezier(.22, 1, .36, 1));
    }

    /* Override desktop is-in rule (width: 84%) and animate scaleY instead */
    .process-track.is-in::after {
        width: 4px;
        height: auto;
        transform: scaleY(1);
    }
}

/* ---------- CTA banner ---------- */
.cta-banner {
    position: relative;
    padding: 44px 36px;
    border-radius: 18px;
    background: linear-gradient(135deg, #181018 0%, #0c1018 60%, #0c111c 100%);
    border: 1px solid rgba(238, 30, 35, .25);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.5fr auto;
    gap: 24px;
    align-items: center;
}

.cta-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 50%, rgba(238, 30, 35, .22), transparent 55%);
    pointer-events: none;
}

.cta-banner h3 {
    font-size: clamp(22px, 2.2vw, 30px);
    margin: 0;
    letter-spacing: -.015em;
    position: relative;
}

.cta-banner h3 b {
    color: var(--accent);
}

.cta-banner p {
    color: #cbd3ea;
    margin: 8px 0 0;
    font-size: 15px;
    position: relative;
}

.cta-banner .cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    position: relative;
}

@media (max-width: 720px) {
    .cta-banner {
        grid-template-columns: 1fr;
        padding: 28px 22px;
        text-align: left;
    }

    .cta-banner .cta-actions {
        justify-content: stretch;
    }

    .cta-banner .cta-actions .btn {
        flex: 1;
    }
}

/* ============================================================
   BRAND QUICK-PICKER for car pages
   Sticky compact toolbar, search input, instant filter,
   "go to brand pricelist" buttons.
   ============================================================ */

.brand-picker {
    position: sticky;
    top: var(--header-h, 92px);
    z-index: 30;
    background: rgba(10, 13, 19, .92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    padding: 14px 0;
}

.brand-picker__row {
    display: flex;
    gap: 14px;
    align-items: center;
    max-width: var(--container, 1320px);
    margin: 0 auto;
    padding: 0 clamp(14px, 3.2vw, 36px);
}

.brand-picker__title {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #fff;
    white-space: nowrap;
}

.brand-picker__title small {
    display: block;
    font-size: 11px;
    color: #97a0b8;
    font-weight: 500;
    letter-spacing: 0;
    margin-top: 2px;
}

.brand-picker__search {
    flex: 1;
    position: relative;
    max-width: 320px;
}

.brand-picker__search input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: #0f1421;
    color: #e9edff;
    font: inherit;
    font-size: 14px;
    transition: border-color .2s, background .2s;
    outline: 0;
}

.brand-picker__search input:focus {
    border-color: var(--accent);
    background: #131a2a;
}

.brand-picker__search::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a0b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>") no-repeat center / contain;
    pointer-events: none;
}

.brand-picker__chips {
    flex: 1;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
    padding: 4px 0;
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.brand-picker__chips::-webkit-scrollbar {
    display: none;
}

.brand-picker__chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 10px;
    border-radius: 100px;
    background: #11151f;
    border: 1px solid rgba(255, 255, 255, .08);
    color: #cbd3ea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    scroll-snap-align: start;
    white-space: nowrap;
}

.brand-picker__chip img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4));
}

.brand-picker__chip:hover {
    background: rgba(238, 30, 35, .1);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

.brand-picker__chip.is-current {
    background: rgba(238, 30, 35, .15);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 1px var(--accent);
}

.brand-picker__chip.is-hidden {
    display: none;
}

.brand-picker__empty {
    color: #97a0b8;
    font-size: 13px;
    padding: 8px 12px;
    display: none;
}

.brand-picker__chips.is-empty .brand-picker__empty {
    display: block;
}

@media (max-width: 920px) {
    .brand-picker {
        position: relative;
        top: 0;
    }

    .brand-picker__row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .brand-picker__search {
        max-width: 100%;
    }

    .brand-picker__title {
        text-align: left;
    }
}

/* ============================================================
   RESPONSIVE — V2 sections tuning
   ============================================================ */

/* ---------- Dyno chart on tablets ---------- */
@media (max-width: 920px) {
    .section-dyno {
        padding-block: 56px;
    }

    .dyno-text h2 {
        font-size: 26px;
    }

    .dyno-text p {
        font-size: 15px;
    }

    .dyno-stats {
        max-width: 100%;
    }

    .dyno-chart {
        aspect-ratio: 5/4;
        padding: 18px 16px 22px;
    }
}

@media (max-width: 600px) {
    .section-dyno {
        padding-block: 44px;
    }

    .dyno-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 18px;
    }

    .dyno-stat {
        padding: 14px 12px;
    }

    .dyno-stat .num {
        font-size: 26px;
    }

    .dyno-stat .lbl {
        font-size: 12px;
    }

    .dyno-chart {
        aspect-ratio: 4/3;
        padding: 14px 12px 20px;
    }

    .dyno-legend {
        top: 10px;
        right: 12px;
        gap: 12px;
        font-size: 9.5px;
    }

    .dyno-chart-title {
        bottom: 10px;
        left: 14px;
        font-size: 9.5px;
    }
}

/* ---------- Process timeline on phones ---------- */
@media (max-width: 600px) {
    .section-process {
        padding-block: 44px;
    }

    .process-head {
        margin-bottom: 32px;
    }

    .process-step {
        grid-template-columns: 46px 1fr;
        column-gap: 14px;
        margin-bottom: 24px;
        min-height: 46px;
    }

    .process-step .dot {
        width: 46px;
        height: 46px;
        border-width: 1.5px;
    }

    .process-step .dot span {
        font-size: 20px !important;
    }

    .process-step__body {
        padding-top: 4px;
    }

    .process-step__body h3 {
        font-size: 15px;
    }

    .process-step__body p {
        font-size: 13px;
    }

    /* Re-anchor lines to smaller dot size */
    .process-track::before {
        top: 23px;
        bottom: 23px;
        left: 22px;
    }

    .process-track::after {
        top: 23px;
        bottom: 23px;
        left: 21px;
    }
}

/* ---------- CTA banner ---------- */
@media (max-width: 600px) {
    .cta-banner {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .cta-banner h3 {
        font-size: 20px;
    }

    .cta-banner p {
        font-size: 14px;
    }

    .cta-banner .cta-actions {
        flex-direction: column;
        gap: 10px;
    }

    .cta-banner .cta-actions .btn {
        width: 100%;
        min-height: 50px;
    }
}

/* ---------- Brand quick-picker — phone polish ---------- */
@media (max-width: 920px) {
    .brand-picker {
        padding: 12px 0;
    }

    .brand-picker__title {
        font-size: 13px;
    }

    .brand-picker__title small {
        font-size: 11px;
    }

    .brand-picker__search input {
        height: 44px;
        font-size: 15px;
    }

    .brand-picker__chip {
        padding: 9px 14px 9px 11px;
        font-size: 13.5px;
    }

    .brand-picker__chips {
        margin: 0 -18px;
        padding: 4px 18px;
    }
}

@media (max-width: 600px) {
    .brand-picker__row {
        gap: 8px;
    }

    .brand-picker__chip {
        padding: 8px 12px 8px 10px;
        font-size: 13px;
    }

    .brand-picker__chip img {
        width: 16px;
        height: 16px;
    }
}

/* ---------- Car page hero polish on mobile ---------- */
@media (max-width: 920px) {
    .hero-model {
        padding-top: 70px;
        padding-bottom: 14px;
    }

    .brand-logo-hero {
        width: 76px;
        height: 76px;
        margin-bottom: 18px;
    }

    .brand-logo-hero img {
        width: 44px;
    }

    .seo-models-wrapper {
        margin-bottom: 50px;
        padding-bottom: 36px;
    }
}

@media (max-width: 600px) {
    .hero-model {
        padding-top: 56px;
    }

    .brand-logo-hero {
        width: 64px;
        height: 64px;
    }

    .brand-logo-hero img {
        width: 36px;
    }

    .hero-model h1 {
        font-size: clamp(26px, 7vw, 36px) !important;
    }

    .seo-models-wrapper {
        padding-bottom: 28px;
        margin-bottom: 36px;
    }

    .model-tag {
        padding: 7px 13px;
        font-size: 13px;
    }

    .price-wrapper {
        padding-bottom: 30px;
    }

    .price-card {
        border-radius: 14px;
    }

    .price-header {
        padding: 18px 16px;
    }

    .price-header h2 {
        font-size: 20px;
    }

    .price-section-title {
        padding: 10px 16px;
        font-size: 12px;
    }

    .list-row {
        padding: 16px;
    }

    .srv-name {
        font-size: 15px;
    }

    .srv-desc {
        font-size: 13.5px;
    }

    .price-main {
        font-size: 20px;
    }

    .card-footer {
        padding: 22px 16px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

    .dyno-line[data-anim],
    .dyno-area[data-anim],
    .process-track::after {
        transition: none !important;
    }
}
