/* ================================================================
   1. Stack hero shell
   This file belongs only to the 15% accumulating hero variant.
   ================================================================ */

.service-hero.service-stack {
    --stack-duration: 1.15s;
    --stack-ease: cubic-bezier(0.76, 0, 0.18, 1);
    position: relative;
    display: flex;
    align-items: stretch;
    height: 80svh;
    min-height: 650px;
    padding-top: var(--header-height);
    overflow: hidden;
    background: #0b0d0e;
    isolation: isolate;
}

/* ================================================================
   2. Service panels
   ================================================================ */

.service-stack__panels {
    display: flex;
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
    transition: flex-basis var(--stack-duration) var(--stack-ease);
}

.stack-panel {
    position: relative;
    display: flex;
    flex: 0 0 0;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
    padding: clamp(24px, 3vw, 52px) clamp(16px, 2.2vw, 38px);
    overflow: hidden;
    color: var(--white);
    background: #111 center / cover no-repeat;
    isolation: isolate;
    transition:
        flex-basis var(--stack-duration) var(--stack-ease),
        filter 0.35s ease;
}

.stack-panel::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    content: "";
    background-image: var(--panel-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    transition: transform 2.2s ease;
}

.stack-panel::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background:
        linear-gradient(180deg, rgba(8, 10, 11, 0.08) 20%, rgba(8, 10, 11, 0.82) 100%),
        linear-gradient(90deg, rgba(8, 10, 11, 0.16), transparent 55%);
    border-right: 1px solid rgba(255, 255, 255, 0.35);
}

.stack-panel.is-current::before {
    transform: scale(1);
}

/* ================================================================
   3. Panel typography
   ================================================================ */

.stack-panel__title,
.stack-panel__detail {
    position: relative;
    display: block;
    white-space: nowrap;
}


.stack-panel__title {
    font-size: clamp(1.5rem, 4.8vw, 5.8rem);
    font-weight: 800;
    line-height: 0.88;
    letter-spacing: -0.07em;
    transition: font-size var(--stack-duration) var(--stack-ease);
    color: var(--gold);
}

.stack-panel__detail {
    max-height: 3rem;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.74);
    font: 500 clamp(0.58rem, 0.8vw, 0.78rem) / 1.4 "Manrope", sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 1;
    transition: opacity 0.35s ease, max-height 0.35s ease, margin 0.35s ease;
}
/* ================================================================
   4. Vaste hero-opbouw zonder automatische afspeelfase
   ================================================================ */

/*
 * De diensten nemen samen 60% in.
 * Elk paneel gebruikt 25% van die container:
 * 25% van 60% = 15% van de volledige hero.
 */
.service-stack__panels {
    flex-basis: 60%;
}

.service-stack__panels .stack-panel {
    flex-basis: 25%;
}

/* De oude voortgangsbalk is niet meer nodig. */
.stack-progress {
    display: none !important;
}

/*
 * Hoververdeling:
 * actief paneel       = 60%
 * overige drie panelen = elk 13,333%
 * introductiepaneel    = 0%
 */
@media (min-width: 851px) and
       (hover: hover) and
       (pointer: fine) {

    .service-stack.has-hovered-panel
    .service-stack__panels {
        flex-basis: 100%;
    }

    .service-stack.has-hovered-panel
    .service-stack__intro {
        flex-basis: 0;
        min-width: 0;
        padding-right: 0;
        padding-left: 0;
        opacity: 0;
        pointer-events: none;
    }

    .service-stack.has-hovered-panel
    .service-stack__panels
    .stack-panel {
        flex-basis: 15%;
    }

    .service-stack.has-hovered-panel
    .service-stack__panels
    .stack-panel.is-hovered {
        flex-basis: 55%;
        filter: brightness(1.08);
    }

    .service-stack.has-hovered-panel
    .stack-panel.is-hovered
    .stack-panel__title {
        font-size: clamp(
            2.4rem,
            5vw,
            5.8rem
        );
    }

    .service-stack.has-hovered-panel
    .stack-panel.is-hovered
    .stack-panel__detail {
        max-height: 3rem;
        margin-top: 1rem;
        opacity: 1;
    }
}


/* ================================================================
   Stack finale — detailing studio intro
   ================================================================ */

.service-stack__intro {
    position: relative;
    flex: 0 0 40%;
    min-width: 0;
    min-height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding:
        clamp(32px, 5vh, 64px)
        clamp(26px, 3.5vw, 64px)
        clamp(28px, 4vh, 52px);

    color: var(--white);

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.055) 0,
            transparent 32%
        ),
        linear-gradient(
            160deg,
            #191c1e 0%,
            #090b0c 55%,
            #050607 100%
        );

    border-left: 1px solid rgba(255, 255, 255, 0.14);
    overflow: hidden;
    isolation: isolate;
}

/* Technische rasterstructuur */
.service-stack__intro::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        );

    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

/* Detaillicht */
.service-stack__intro::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -100px;
    bottom: 4%;
    width: 280px;
    aspect-ratio: 1;

    background: var(--gold);
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.13;
    pointer-events: none;
}

/* Bovenste regel */
.stack-intro__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.stack-intro__index {
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.stack-intro__top .eyebrow {
    margin: 0;
    color: rgba(255, 255, 255, 0.52);
    text-align: right;
}

/* Hoofdinhoud */
.stack-intro__content {
    margin-block: auto;
    padding-block: clamp(28px, 5vh, 64px);
}

.stack-intro__kicker {
    margin: 0 0 18px;

    color: var(--gold);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.service-stack__intro h2 {
    margin: 0;

    color: var(--white);
    font-size: clamp(3rem, 4.3vw, 5.4rem);
    font-weight: 750;
    line-height: 0.88;
    letter-spacing: -0.055em;
    text-transform: uppercase;
}


.stack-intro__lead {
    max-width: 510px;
    margin: clamp(26px, 4vh, 44px) 0 0;

    color: rgba(255, 255, 255, 0.67);
    font-size: clamp(0.88rem, 1.05vw, 1rem);
    font-weight: 500;
    line-height: 1.75;
}

/* Dienstenlijst */
.stack-intro__services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;

    margin: 30px 0;
    padding: 0;

    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.stack-intro__services li {
    display: flex;
    align-items: center;
    gap: 10px;

    padding-block: 12px;

    color: rgba(255, 255, 255, 0.72);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;

    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stack-intro__services li span:not(.service-arrow) {
    color: var(--gold);
    font-size: 0.56rem;
}
/* Klikbare diensten */
.stack-intro__services li {
    position: relative;
    overflow: hidden;
}

.stack-intro__services li a {
    position: relative;
    z-index: 1;

    display: block;
    flex: 1;
    padding-block: 12px;

    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;

    transition:
        color 0.3s ease,
        transform 0.3s ease;
}

/* Gouden shimmer */
.stack-intro__services li::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;

    background: linear-gradient(
        110deg,
        transparent 0%,
        transparent 35%,
        rgba(212, 175, 55, 0.08) 43%,
        rgba(255, 225, 125, 0.34) 50%,
        rgba(212, 175, 55, 0.08) 57%,
        transparent 65%,
        transparent 100%
    );

    transform: translateX(-130%);
    pointer-events: none;
}

/* Hover-effect */
.stack-intro__services li:hover::after,
.stack-intro__services li:focus-within::after {
    animation: service-gold-shimmer 0.85s ease-out;
}

.stack-intro__services li:hover a,
.stack-intro__services li:focus-within a {
    color: #f4d878;
    transform: translateX(4px);
}

/* Pijl reageert mee */
.stack-intro__services li:hover .service-arrow,
.stack-intro__services li:focus-within .service-arrow {
    color: #d4af37;
    transform: translateX(4px);
}

.stack-intro__services .service-arrow {
    transition:
        color 0.3s ease,
        transform 0.3s ease;
}

@keyframes service-gold-shimmer {
    from {
        transform: translateX(-130%);
    }

    to {
        transform: translateX(130%);
    }
}

/* Geen animatie wanneer de gebruiker dit uitschakelt */
@media (prefers-reduced-motion: reduce) {
    .stack-intro__services li:hover::after,
    .stack-intro__services li:focus-within::after {
        animation: none;
    }

    .stack-intro__services li a,
    .stack-intro__services .service-arrow {
        transition: none;
    }
}

/* Automotive CTA */
.stack-intro__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;

    width: fit-content;
    min-width: min(100%, 300px);
    min-height: 56px;
    padding: 0 10px 0 24px;

    color: #090b0c;
    background: var(--gold);
    border: 1px solid var(--gold);

    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0.11em;
    text-decoration: none;
    text-transform: uppercase;

    clip-path: polygon(
        12px 0,
        100% 0,
        calc(100% - 12px) 100%,
        0 100%
    );

    overflow: hidden;

    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

/* Pijl zonder afzonderlijk zwart vak */
.stack-intro__cta i {
    display: grid;
    place-items: center;
    flex: 0 0 42px;

    width: 42px;
    height: 38px;

    color: currentColor;
    background: transparent;
    border-left: 1px solid rgba(9, 11, 12, 0.25);

    font-size: 1.05rem;
    font-style: normal;

    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

/* Donkere premium hover — geen witte knop meer */
.stack-intro__cta:hover,
.stack-intro__cta:focus-visible {
    color: var(--gold);
    background: #090b0c;
    border-color: var(--gold);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.32),
        0 0 22px color-mix(in srgb, var(--gold) 18%, transparent);

    transform: translateY(-3px);
}

.stack-intro__cta:hover i,
.stack-intro__cta:focus-visible i {
    border-left-color: color-mix(
        in srgb,
        var(--gold) 45%,
        transparent
    );

    transform: translateX(3px);
}

.stack-intro__cta:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .stack-intro__cta,
    .stack-intro__cta i {
        transition: none;
    }
}

/* Onderschrift */
.stack-intro__signature {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.38em;
    text-transform: uppercase;
}

.service-arrow {
    position: relative;
    flex: 0 0 28px;

    width: 28px;
    height: 14px;
}

/* Horizontale lijn */
.service-arrow::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;

    width: 24px;
    height: 1px;

    background: linear-gradient(
        90deg,
        rgba(216, 255, 54, 0.2),
        var(--gold)
    );

    box-shadow: 0 0 8px color-mix(
        in srgb,
        var(--gold) 45%,
        transparent
    );
}

/* Schuine pijlpunt */
.service-arrow::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 2px;

    width: 7px;
    height: 7px;

    border-top: 1px solid var(--gold);
    border-right: 1px solid var(--gold);

    transform: rotate(45deg);
}

.service-stack__intro h2 .hero-outline {
    display: inline-block;

    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.025em;

    color: rgba(255, 255, 255, 0.08) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.08) !important;
    -webkit-text-stroke: 0.8px rgba(255, 255, 255, 0.68);

    text-shadow: none !important;
    filter: none !important;
}
/* ================================================================
   6. Progress and interactive finale
   ================================================================ */

.stack-progress {
    position: absolute;
    z-index: 30;
    right: clamp(22px, 4vw, 72px);
    bottom: 28px;
    left: clamp(22px, 4vw, 72px);
    height: 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.24);
    transition: opacity 0.4s ease;
}

.stack-progress i {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--gold);
    transform-origin: left;
    animation: stack-progress 8.4s linear forwards;
}

.service-stack.is-complete .stack-progress {
    opacity: 0;
}

.service-stack.is-complete .stack-panel:hover,
.service-stack.is-complete .stack-panel:focus-visible,
.stack-panel.is-hovered {
    filter: brightness(1.5);
    outline: 0;
}

@keyframes stack-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ================================================================
   7. Mobile stack hero
   ================================================================ */

@media (max-width: 850px) {
    .service-hero.service-stack {
        display: block;
        height: auto;
        min-height: 100svh;
        padding-top: var(--header-height);
    }

    .service-stack__panels {
        flex-direction: column;
        width: 100%;
        height: calc(100svh - var(--header-height));
        transition: height var(--stack-duration) var(--stack-ease);
    }

    .stack-panel {
        flex-basis: 0;
        width: 100%;
        min-height: 0;
        padding: 18px 22px;
        transition:
            flex-basis var(--stack-duration) var(--stack-ease),
            filter 0.35s ease;
    }

    .service-stack.is-complete .service-stack__panels {
        height: 60svh;
    }

    .service-stack.is-complete .service-stack__panels .stack-panel {
        flex-basis: 25%;
    }

    .stack-panel__title,
    .service-stack[data-step] .stack-panel:not(.is-current) .stack-panel__title,
    .service-stack.is-complete .stack-panel__title {
        font-size: clamp(1.05rem, 5vw, 1.8rem);
    }

    .stack-panel__number { margin-bottom: 0.3rem; }
    .stack-panel__detail { display: none; }

    .service-stack__intro {
        width: 100%;
        height: 0;
        min-height: 0;
        padding: 0 24px;
        opacity: 0;
        transition:
            height var(--stack-duration) var(--stack-ease),
            min-height var(--stack-duration) var(--stack-ease),
            padding var(--stack-duration) var(--stack-ease),
            opacity 0.5s ease 0.55s;
    }

    .service-stack.is-complete .service-stack__intro {
        width: 100%;
        height: auto;
        min-height: 40svh;
        padding: 42px 24px 58px;
        opacity: 1;
    }

    .service-stack__intro h2 {
        font-size: clamp(2.8rem, 14vw, 5rem);
    }
}

@media (max-width: 520px) {
    .service-hero.service-stack {
        min-height: 580px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stack-progress {
        display: none;
    }
}
/* Hero-outline op tablets gelijk aan gsm en desktop */
@media (min-width: 521px) and (max-width: 1180px) {
    .service-hero.service-stack
    .service-stack__intro
    .stack-intro__content
    h2
    .hero-outline {
    display: inline-block;

    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.025em;

    color: rgba(255, 255, 255, 0.08) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.08) !important;
    -webkit-text-stroke: 0.8px rgba(255, 255, 255, 0.68);

    text-shadow: none !important;
    filter: none !important;
    }
}

/* Vijfde vak: inhoud voortaan vanaf de bovenzijde */
.service-stack__intro {
    justify-content: flex-start;
    gap: 0;

    padding:
        clamp(24px, 3.5vh, 40px)
        clamp(24px, 2.8vw, 48px)
        clamp(24px, 3vh, 36px);

    overflow-x: hidden;
    overflow-y: auto;
}

/* Bovenste kleine regel */
.stack-intro__top {
    flex: 0 0 auto;
    padding-bottom: 12px;
}

/* Tekst niet meer verticaal centreren */
.stack-intro__content {
    flex: 0 0 auto;
    margin: 0;
    padding: clamp(20px, 3vh, 30px) 0 0;
}

/* Compactere kicker */
.stack-intro__kicker {
    margin-bottom: 10px;
}

/* Compactere hoofdtitel */
.service-stack__intro h2 {
    max-width: 620px;
    margin: 0;

    font-size: clamp(2.15rem, 3vw, 3.8rem);
    line-height: 0.92;
    letter-spacing: -0.045em;
}

/* Kleinere omschrijving */
.stack-intro__lead {
    max-width: 580px;
    margin: 16px 0 0;

    font-size: clamp(0.78rem, 0.9vw, 0.92rem);
    line-height: 1.55;
}

/*
 * De oude dienstenlijst, knop en handtekening verdwijnen.
 * De vier diensten staan reeds links in de hero.
 */
.stack-intro__services,
.stack-intro__cta,
.stack-intro__signature {
    display: none !important;
}

/* Container rond de include van calculator.php */
.stack-intro__calculator {
    position: relative;
    flex: 1 1 auto;

    width: 100%;
    min-height: 240px;
    margin-top: clamp(20px, 3vh, 30px);
    padding-top: clamp(18px, 2.5vh, 26px);

    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* Voorkom ongewenste buitenmarges vanuit calculator.php */
.stack-intro__calculator > :first-child {
    margin-top: 0;
}

.stack-intro__calculator > :last-child {
    margin-bottom: 0;
}

/* ================================================================
   Tablet
   ================================================================ */

@media (min-width: 851px) and (max-width: 1180px) {
    .service-hero.service-stack {
        height: clamp(680px, 84svh, 780px);
    }

    .service-stack__intro {
        padding: 26px 24px 28px;
    }

    .stack-intro__top {
        padding-bottom: 10px;
    }

    .stack-intro__content {
        padding-top: 18px;
    }

    .service-stack__intro h2 {
        font-size: clamp(2rem, 3.5vw, 2.8rem);
    }

    .stack-intro__lead {
        margin-top: 12px;
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .stack-intro__calculator {
        min-height: 220px;
        margin-top: 18px;
        padding-top: 18px;
    }
}

/* ================================================================
   Gsm
   ================================================================ */

@media (max-width: 850px) {
    .service-hero.service-stack {
        height: auto;
        min-height: 0;
    }

    /* Vier beeldvakken iets compacter */
    .service-stack.is-complete .service-stack__panels {
        height: min(52svh, 440px);
    }

    /* Intro en calculator onder de beelden */
    .service-stack.is-complete .service-stack__intro {
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 28px 20px 36px;
        overflow: visible;
    }

    .stack-intro__content {
        padding-top: 20px;
    }

    .service-stack__intro h2 {
        font-size: clamp(2.15rem, 10vw, 3.4rem);
        line-height: 0.94;
    }

    .stack-intro__lead {
        margin-top: 14px;
        font-size: 0.84rem;
        line-height: 1.55;
    }

    .stack-intro__calculator {
        min-height: 200px;
        margin-top: 22px;
        padding-top: 20px;
    }
}