/* ==========================================================================
   initiative.css — Page Initiative template
   Mobile-first. Desktop breakpoint: min-width 767px.
   ========================================================================== */

:root {
    --ini-header-h: 62px;
    --ini-nav-h: 31px;
}

/* ──────────────────────────────────────────────────────────────────────────────
   PAGE WRAPPER — remove #primary lateral padding so hero is full-bleed
   ────────────────────────────────────────────────────────────────────────────── */

.page-initiative {
    padding: 0 !important;
}

/* ──────────────────────────────────────────────────────────────────────────────
   HERO
   ────────────────────────────────────────────────────────────────────────────── */

.ini-hero {
    background-color: var(--color-lilla);
    padding: calc(var(--ini-header-h) + 40px) var(--padding-laterale) 60px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--padding-laterale);
    figure {
        width: 294px;
        svg {
            width: 100%;
            height: auto;
            display: block;
            margin: 0 auto;
            fill: var(--color-text);
            path {
                fill: var(--color-text);
            }
        }
    }
    @media screen and (max-width: 767px) {
        figure {
            margin-bottom: 80px;
        }
    }
}

.ini-hero__title {
    font-family: "zuume", sans-serif;
    font-weight: 700;
    font-style: normal;
    text-transform: uppercase;
    font-size: var(--font-big);
    line-height: 0.85;
}

.ini-hero__title p {
    margin: 0;
}

/* highlighted word(s) inside the hero title — editors wrap them in <em> or <strong> */
.ini-hero__title em,
.ini-hero__title strong {
    font-style: normal;
    font-weight: 700;
    background-image: linear-gradient(
        to right,
        var(--color-green) 0%,
        var(--color-green) 100%
    );
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 100% 75%;
    color: inherit;
}

/* ──────────────────────────────────────────────────────────────────────────────
   DESKTOP STICKY NAV (hidden on mobile)
   ────────────────────────────────────────────────────────────────────────────── */

.ini-nav {
    display: none;
    position: sticky;
    top: var(--ini-header-h);
    z-index: 8;
    background-color: #e6e5be;
    width: 100%;
    height: var(--ini-nav-h);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: center;
    gap: 0;
    padding: 0 var(--padding-laterale);
}

.ini-nav::-webkit-scrollbar {
    display: none;
}

.ini-nav__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 0 var(--padding) 0;
    font-size: clamp(14px, 1vw, 1.5vw);
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    opacity: 0.45;
    transition: opacity 0.25s ease;
    border: none;
    background: none;
}

.ini-nav__item.is-active,
.ini-nav__item:hover {
    opacity: 1;
    background-color: #bdbf45;
    color: var(--color-text);
}

/* ──────────────────────────────────────────────────────────────────────────────
   SECTIONS — shared layout
   ────────────────────────────────────────────────────────────────────────────── */

.ini-section {
    position: relative;
    padding: 0 var(--padding-laterale);
}

/* ── Section label — mobile: sticky chip ────────────────────────────────────── */

.ini-section__label {
    position: sticky;
    top: var(--ini-header-h);
    z-index: 5;
    background-color: #bdbf45;
    height: var(--ini-nav-h);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
@media (max-width: 767px) {
    .ini-section__label:before {
        content: "";
        position: absolute;
        top: 0;
        z-index: -1;
        background-color: #bdbf45;
        width: calc(100% + 2 * var(--padding-laterale));
        left: calc(-1 * var(--padding-laterale));
        height: var(--ini-nav-h);
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.ini-section__label span {
    font-size: clamp(14px, 1vw, 1.5vw);
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
}

/* ── Section body ────────────────────────────────────────────────────────────── */

.ini-section__body {
    padding: 40px 0 60px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
}

/* ──────────────────────────────────────────────────────────────────────────────
   TYPOGRAPHY
   ────────────────────────────────────────────────────────────────────────────── */

/* Large heading for group_2 title ("NOT A THINK TANK…") */
.ini-display-title {
    text-transform: uppercase;
    margin: 0;
}

/* Full-bleed giant title for group_2 big_title ("EUROPE HAS BECOME…") */
.ini-big-title {
    margin-left: calc(-1 * var(--padding-laterale));
    margin-right: calc(-1 * var(--padding-laterale));
    padding: 40px var(--padding-laterale);
    em {
        font-style: normal;
        font-weight: 700;
        background-image: linear-gradient(
            to right,
            var(--color-lilla) 0%,
            var(--color-lilla) 100%
        );
        background-repeat: no-repeat;
        background-position: left center;
        background-size: 100% 75%;
        color: inherit;
    }
}

/* Intro text (group_3 title — "We do this through three movements.") */
.ini-intro-text {
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.4;
    margin: 0;
    color: var(--color-text);
    font-family: "parabolica-text", sans-serif;
}

/* Wysiwyg body text */
.ini-wysiwyg p {
    margin: 0 0 1em;
    line-height: 1.55;
    font-size: clamp(16px, 1.8vw, 20px);
    color: var(--color-text);
}

.ini-wysiwyg p:last-child {
    margin-bottom: 0;
}

.ini-wysiwyg strong {
    font-weight: 600;
}

.ini-wysiwyg h2 {
    font-size: clamp(40px, 6vw, 8vw);
    line-height: 0.8;
    margin-bottom: var(--padding-laterale);
    font-family: "zuume", sans-serif;
    font-weight: 700;
    font-style: normal;
    text-transform: uppercase;
}

/* ──────────────────────────────────────────────────────────────────────────────
   MEDIA
   ────────────────────────────────────────────────────────────────────────────── */

.ini-media {
    width: calc(100% + 2 * var(--padding-laterale));
    margin-left: calc(-1 * var(--padding-laterale));
    margin-right: calc(-1 * var(--padding-laterale));
    overflow: hidden;
}

.ini-media--padded {
    padding: 0 var(--padding-laterale);
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.ini-media__img {
    width: 100%;
    height: auto;
    display: block;
}

/* ──────────────────────────────────────────────────────────────────────────────
   CARDS — group_3
   ────────────────────────────────────────────────────────────────────────────── */

.ini-cards {
    display: flex;
    flex-direction: column;
    margin-left: calc(-1 * var(--padding-laterale));
    margin-right: calc(-1 * var(--padding-laterale));
    margin-bottom: 60px;
}

.ini-card {
    background-color: var(--color-grey-light);
    border-top: 1px solid rgba(58, 46, 72, 0.15);
}

.ini-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px var(--padding-laterale);
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    gap: 16px;
}

.ini-card__title {
    font-family: "zuume", sans-serif;
    font-weight: 700;
    font-style: normal;
    text-transform: uppercase;
    font-size: clamp(40px, 8vw, 72px);
    line-height: 1;
    color: var(--color-text);
}

/* +/− icon via CSS pseudo-element */
.ini-card__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    position: relative;
}

.ini-card__icon::before,
.ini-card__icon::after {
    content: "";
    position: absolute;
    background-color: var(--color-text);
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.ini-card__icon::before {
    width: 2px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.ini-card__icon::after {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.ini-card--open .ini-card__icon::before {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.ini-card__body {
    padding: 0 var(--padding-laterale) 30px;
}

.ini-card__body[hidden] {
    display: none;
}

/* ──────────────────────────────────────────────────────────────────────────────
   ACCORDION ROWS — group_6
   ────────────────────────────────────────────────────────────────────────────── */

.ini-section--accordion {
    padding: 0px var(--padding-laterale) 60px;
    margin-bottom: 80px;
    .ini-section__label {
        margin-bottom: 40px;
    }
}

/* when a label is present, suppress the duplicate top border on desktop */
@media screen and (min-width: 767px) {
    .ini-section--accordion:has(.ini-section__label) {
        border-top: none;
    }
}

.ini-row {
    overflow: hidden;
}

.ini-row__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px var(--padding-laterale);
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    gap: 24px;
}

.ini-row__title {
    font-family: "zuume", sans-serif;
    font-weight: 700;
    font-style: normal;
    text-transform: uppercase;
    font-size: clamp(48px, 10vw, 100px);
    line-height: 0.95;
    color: var(--color-text);
}

.ini-row__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    position: relative;
}

.ini-row__icon::before,
.ini-row__icon::after {
    content: "";
    position: absolute;
    background-color: var(--color-text);
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.ini-row__icon::before {
    width: 2px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.ini-row__icon::after {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.ini-row--open .ini-row__icon::before {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.ini-row__body {
    padding: 0 var(--padding-laterale) 30px;
}

.ini-row__body[hidden] {
    display: none;
}

.ini-intro__body {
    position: relative;
    width: calc(100% + 2 * var(--padding-laterale));
    left: calc(-1 * var(--padding-laterale));
    background-color: var(--color-grey);
    p {
        font-family: "suisse-neue";
        padding-left: var(--padding-laterale);
        font-size: clamp(28px, 4vw, 5vw);
        line-height: 1.1;
    }
}

.ini-section-6 {
    .ini-row__title {
        font-size: clamp(40px, 4vw, 66px);
    }
}

/* ──────────────────────────────────────────────────────────────────────────────
   BUTTON
   ────────────────────────────────────────────────────────────────────────────── */

.ini-btn {
    width: fit-content;
}

/* ──────────────────────────────────────────────────────────────────────────────
   DESKTOP (≥ 767px)
   ────────────────────────────────────────────────────────────────────────────── */

@media screen and (min-width: 767px) {
    .ini-hero {
        flex-direction: row;
        figure {
            width: 25vw;
            min-width: 25vw;
        }
        .ini-hero__title {
            margin-top: 30vh;
        }
    }

    /* Show sticky nav */
    .ini-nav {
        display: flex;
    }

    /* Section labels: on desktop the nav bar serves navigation,
       labels appear as inline static section markers */
    .ini-section__label {
        display: flex;
        align-items: center;
        justify-content: center;
        height: var(--ini-nav-h);
        width: 100%;
        padding: 0 var(--padding) 0;
        font-size: clamp(14px, 1vw, 1.5vw);
        letter-spacing: 0em;
        text-decoration: none;
        white-space: nowrap;
        border: none;
        background-color: #bdbf45;
    }

    .ini-section__label {
        margin-left: calc(-1 * var(--padding-laterale));
        margin-right: calc(-1 * var(--padding-laterale));
        padding: 10px var(--padding-laterale);
    }

    /* Section body — more vertical space on desktop */
    .ini-section__body {
        padding: 100px 0 100px calc(25vw + var(--padding-laterale));
        gap: var(--padding-laterale);
        position: relative;
    }

    /* Big title spans full width, larger breathing room */
    .ini-big-title {
        padding: 60px var(--padding-laterale);
    }

    .ini-display-title {
        padding-right: 15vw;
    }

    /* Cards: horizontal row on desktop */
    .ini-cards {
        flex-direction: row;
        align-items: stretch;
        margin-bottom: 80px;
    }

    .ini-card {
        flex: 1;
        display: flex;
        flex-direction: column;
        border-top: none;
        border-left: 1px solid rgba(58, 46, 72, 0.15);
    }

    .ini-card:first-child {
        border-left: none;
    }

    .ini-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 30px var(--padding-laterale) 20px;
        flex: 1;
    }

    .ini-card__title {
        font-size: clamp(40px, 4vw, 66px);
    }

    /* Accordion rows: larger type on desktop */
    div:not(.ini-section--6) .ini-row__header {
        font-size: clamp(80px, 10vw, 140px);
    }

    .ini-row__header {
        padding: 20px var(--padding-laterale);
    }

    .ini-section--2 {
        position: relative;
        display: flex;
        flex-direction: column;
    }
    .ini-media__left {
        position: absolute;
        top: 30vh;
        left: 5vw;
        width: 22vw;
        max-width: fit-content;
        height: 100%;
        z-index: 1;
        padding: 0;
    }
    .ini-media__right {
        width: 35vw;
        max-width: fit-content;
        height: auto;
        align-self: flex-end;
    }

    .ini-intro__body {
        p {
            padding-left: calc(2 * var(--padding-laterale));
            padding-right: 7vw;
        }
    }

    /* Group 5: text + image in a two-column grid */
    .ini-section--5 .ini-btn {
        grid-column: 1;
        grid-row: 2;
    }

    .ini-wysiwyg h2 {
        padding-right: 15vw;
    }

    /* ── Cards scroll-lock animation ───────────────────────────────────────── */

    .ini-cards-outer {
        position: relative;
    }

    /* stagger order: card 1 → card 3 → card 2; each starts deeper and is slightly faster */
    .ini-cards--anim .ini-card {
        opacity: 1;
        will-change: transform, opacity;
    }

    .ini-cards--anim .ini-card:nth-child(1) {
        transform: translateY(100%);
        transition:
            transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.65s ease;
    }

    .ini-cards--anim .ini-card:nth-child(3) {
        transform: translateY(200%);
        transition:
            transform 0.72s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.58s ease;
    }

    .ini-cards--anim .ini-card:nth-child(2) {
        transform: translateY(300%);
        transition:
            transform 0.64s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.52s ease;
    }

    .ini-cards--anim .ini-card.ini-card--visible {
        transform: translateY(0);
        opacity: 1;
    }

    .ini-card__icon {
        display: none;
    }
    .ini-card__body[hidden] {
        display: block !important;
    }

    .ini-section--6 {
        .ini-section__label {
            margin-bottom: 120px;
        }
        .ini-row__title {
            font-size: clamp(40px, 4vw, 66px);
            cursor: pointer;
        }
        .ini-row__icon {
            display: none;
        }
        .ini-row__body {
            display: block !important;
        }
    }

    .ini-nav__item.is-active:first-child:before,
    .ini-nav__item.is-active:last-child:before {
        content: "";
        position: absolute;
        z-index: 1;
        background-color: #bdbf45;
        width: var(--padding-laterale);
        height: 100%;
        top: 0;
        left: calc(var(--padding-laterale) * -1);
    }
    .ini-nav__item.is-active:last-child:before {
        right: calc(var(--padding-laterale) * -1);
        left: auto;
    }
}
