/* ============================================================
   CREO — Our Approach — ViewTimeline Card Stack
   ============================================================
   JS (marketing-approach.js) drives the scale animation
   via Web Animations API + ViewTimeline.
   This CSS handles only:  layout / sticky / sizing / header.
   ============================================================ */

/* ─── SECTION ───────────────────────────────────────────────── */
.approach-section {
    background: var(--creo-dark);
    color: var(--creo-white);
    padding-top: 120px;
}

/* ─── HEADER ─────────────────────────────────────────────────── */
.mkt-approach__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 48px;
    padding-bottom: 80px;
}

.mkt-approach__left {
    flex: 0 0 auto;
    max-width: 560px;
}

.mkt-approach__badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(239, 229, 207, 0.4);
    background: rgba(239, 229, 207, 0.06);
    color: var(--creo-light);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 7px 20px;
    border-radius: var(--radius-full);
    margin-bottom: 24px;
}

.mkt-approach__headline {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: var(--creo-white);
    margin: 0;
}

.mkt-approach__headline .accent {
    color: var(--creo-accent);
    display: block;
}

.mkt-approach__right {
    flex: 0 0 auto;
    max-width: 380px;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
}

.mkt-approach__desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.65);
    text-align: right;
    width: 100%;
}

.mkt-approach__cta {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--creo-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 12px 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    background: transparent;
    text-decoration: none;
    transition: var(--transition-base);
}

.mkt-approach__cta:hover {
    border-color: var(--creo-accent);
    color: var(--creo-accent);
    background: rgba(255, 106, 0, 0.06);
    transform: translateX(3px);
}

.mkt-approach__cta-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.mkt-approach__cta:hover .mkt-approach__cta-arrow {
    transform: translateX(4px);
}

/* ─── #CARDS WRAPPER ─────────────────────────────────────────── */
/*
  #cards is the ViewTimeline subject (tracked by JS).
  It's a grid of .card rows — each row gives scroll distance
  for its card to be pinned.

  Extra padding at the bottom (driven by --numcards) ensures
  the last card has room to complete its scale animation before
  the next section takes over.
*/
.cards-stack {
    --numcards: 3;
    /* overridden by JS, kept as fallback */
    display: grid;
    grid-template-columns: 1fr;
    background: var(--creo-dark);

    /* Bottom padding = numcards × card-height so last card stays pinned */
    padding-bottom: calc(var(--numcards) * 5vh);
}

/* ─── .card (scroll zone per card) ──────────────────────────── */
/*
  Each .card provides the scroll distance for its .card__content.
  Height ~100vh = user reads this card for one full viewport scroll.
*/
.card {
    height: 100vh;
    display: grid;
    place-items: start center;
}

/* ─── .card__content (STICKY element) ───────────────────────── */
/*
  sticky is applied HERE — not on .card —
  so the height of #cards (scroll estate) is unaffected.

  top offset per card creates the stepped/fanned look:
    card 0 → top: 60px
    card 1 → top: 45px  (closer to top, peeks above card 0)
    card 2 → top: 30px  (frontmost)

  The JS animate() controls transform: scale() via ViewTimeline.
*/
.card__content {
    position: sticky;
    top: calc(60px - (var(--index, 0) * 15px));

    width: 1200px;
    max-width: 95vw;
    height: 564px;

    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;

    background: #0d1e45;

    /* transform-origin for scale anchored at top — cards shrink
       downward as they're stacked, matching the sticky top position */
    transform-origin: 50% 0;
}

/* ─── .card-media (placeholder for images) ──────────────────── */
.card-media {
    width: 100%;
    height: 100%;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1280px) {
    .card__content {
        height: clamp(280px, 42vw, 564px);
    }
}

@media (max-width: 1024px) {
    .mkt-approach__header {
        flex-direction: column;
        gap: 32px;
    }

    .mkt-approach__desc {
        text-align: left;
    }

    .mkt-approach__right,
    .mkt-approach__cta {
        align-self: flex-start;
    }

    .card {
        height: 80vh;
    }
}

@media (max-width: 768px) {
    .approach-section {
        padding-top: 64px;
    }

    .mkt-approach__headline {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .card {
        height: 65vh;
    }

    .card__content {
        top: calc(10px - (var(--index, 0) * 5px));
    }
}

/* ─── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .card__content {
        position: static;
        transform: none !important;
    }

    .card {
        height: auto;
        padding-bottom: 24px;
    }
}