/* explore-more.css - the Explore More peek carousel (wiki/explore-more.html + explore-more.js); link it after the page's own CSS */

/* ══ EXPLORE MORE - peek carousel ══ */

/* ── Responsive sizing tokens ── */
:root {
    --em-card: 88vw;   /* card width           */
    --em-gap:  16px;   /* gap between cards    */
    --em-pad:   6vw;   /* peek margin per side */
}
@media (max-width: 600px) {
    :root {
        --em-card: 84vw;
        --em-gap:  10px;
        --em-pad:   8vw;
    }
}


/* ── Section shell ── */
/* the controls are glass; their ink follows what sits behind them: explore-more.js reads it and sets data-em-tone */
/* a light tint leaning away from its ink, and strong dots, keep ≥ 3:1 on mid tones too */
.explore-more-section {
    /* dark ground (the default, and every gradient card): white ink */
    --em-ctrl-bg:       rgba(18, 22, 18, 0.14);
    --em-ctrl-bg-hover: rgba(18, 22, 18, 0.24);
    --em-ctrl-border:   rgba(255, 255, 255, 0.2);
    --em-ctrl-ink:      rgba(255, 255, 255, 0.95);
    --em-dot:           rgba(255, 255, 255, 0.7);
    --em-dot-hover:     rgba(255, 255, 255, 0.8);
    --em-fill:          rgba(255, 255, 255, 0.95);
    width: 100%;
    background: transparent;   /* inherits page gradient - no black separation */
    padding: 2rem 0 0rem;
    /* margin, not padding, so the nav stays by the card */
    margin-bottom: 4rem;
    /* hidden = fallback for iOS Safari < 16; clip elsewhere */
    overflow-x: hidden;
    overflow-x: clip;
    position: relative;
}

/* light ground: near-black ink */
.explore-more-section[data-em-tone="light"] {
    --em-ctrl-bg:       rgba(255, 255, 255, 0.24);
    --em-ctrl-bg-hover: rgba(255, 255, 255, 0.38);
    --em-ctrl-border:   rgba(27, 27, 24, 0.12);
    --em-ctrl-ink:      rgba(27, 27, 24, 0.88);
    --em-dot:           rgba(27, 27, 24, 0.7);
    --em-dot-hover:     rgba(27, 27, 24, 0.8);
    --em-fill:          rgba(27, 27, 24, 0.9);
}
/* reduce transparency: the controls turn solid light (accessibility.css), so the ink is dark whatever the tone */
html[data-reduce-transparency] .explore-more-section {
    --em-ctrl-ink:      rgba(27, 27, 24, 0.88);
    --em-dot:           rgba(27, 27, 24, 0.5);
    --em-dot-hover:     rgba(27, 27, 24, 0.72);
    --em-fill:          rgba(27, 27, 24, 0.9);
}

/* ── Eyebrow label (indented to align with card left edge) ── */
.explore-eyebrow {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--text-muted);   /* dark sage - visible on light page bg */
    margin: 0 0 1.2rem var(--em-pad);
    padding: 0;
}

/* ── Viewport - clips the sliding track ── */
.carousel-viewport {
    width: 100%;
    overflow: hidden;
}

/* ══ TRACK + ANIMATION ══ */
.carousel-track {
    display: flex;
    gap: var(--em-gap);
    /* a <ul>: no bullets, no list margins */
    list-style: none;
    margin: 0;
    padding-left: var(--em-pad);
    /* flex-start: card height from aspect-ratio */
    align-items: flex-start;
    will-change: transform;
    /* position controlled by JS via inline transform + transition */
}


/* ══ CARD ══ */
/* the <li> is the flex item; the card link fills it */
.carousel-item {
    flex: 0 0 var(--em-card);
}
.carousel-card {
    /* one aspect-ratio for all cards */
    aspect-ratio: 2.1 / 1;
    height: auto;
    border-radius: var(--radius-card);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;      /* stack content vertically */
    align-items: flex-start;     /* left-aligned */
    justify-content: flex-start; /* content at top */
    padding: 2rem 2.4rem;
    /* the cards are <a> links now (press → go to a page) */
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Featured first card - taller than the rest */
.card-featured { aspect-ratio: 2.1 / 1; }

/* Content group sits at top-left */
.card-top {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

/* Recommended badge */
.card-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 50px;
    background: rgba(255,255,255,0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.32);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.60rem;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.92);
    width: fit-content;
}

/* 5 earthy, page-complementary gradients - dusty, muted, same palette family */
.cs-1 { background: linear-gradient(135deg, #8faacf 0%, #5f85b5 50%, #3d6898 100%); } /* slate blue   - echoes page lavender   */
.cs-2 { background: linear-gradient(135deg, #8aba8a 0%, #62a064 50%, #428044 100%); } /* sage green   - echoes page sage bg    */
.cs-3 { background: linear-gradient(135deg, #c8a07a 0%, #ae7a48 50%, #905828 100%); } /* warm amber   - echoes page cream      */
.cs-4 { background: linear-gradient(135deg, #b09ed4 0%, #8c76bc 50%, #6e54a4 100%); } /* dusty violet - echoes page lavender   */
.cs-5 { background: linear-gradient(135deg, #7ab4b0 0%, #4a9894 50%, #2a7c78 100%); } /* sage teal    - echoes page cool sage  */

/* ── cards with a photo: .has-photo + the page's hero as .card-photo, an <img> so explore-more.js can read its colours ── */
.card-photo {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* the photo stays clear: the highlight turns into a shade at the top only, behind the label; no circle */
.carousel-card.has-photo::before {
    z-index: 1;
    background: linear-gradient(to bottom, rgba(0,0,0,0.42), rgba(0,0,0,0) 45%);
}
.carousel-card.has-photo::after { display: none; }
.carousel-card.has-photo .card-label { text-shadow: 0 1px 10px rgba(0,0,0,0.35); }

/* ── card focus: dim neighbours, brighten the active one ── */
.carousel-card {
    filter: brightness(0.72) saturate(0.82);
    transition: filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.carousel-card.em-active { filter: brightness(1.0) saturate(1.08); }

/* ── label reveal: easeOutExpo in, easeInExpo out ── */

/* Top-left highlight */
.carousel-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%);
    pointer-events: none;
}

/* Decorative circle (top-right corner) */
.carousel-card::after {
    content: '';
    position: absolute;
    width: 62%;
    aspect-ratio: 1;
    top: -18%;
    right: -10%;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 50%;
    pointer-events: none;
}

/* Label - JS toggles .em-visible / .em-exit */
.card-label {
    position: relative;
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.95rem, calc(1.8vw * var(--fs-scale, 1)), 1.4rem);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.88);
    margin: 0;
    /* Base: hidden, offset downward */
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    filter: blur(12px);
    transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1),
                transform 1s cubic-bezier(0.19, 1, 0.22, 1),
                filter 1s cubic-bezier(0.19, 1, 0.22, 1);
}
/* Enter: easeOutExpo  ≈  1 − 2^(−10t) */
.card-label.em-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}
/* Exit: easeInExpo  ≈  2^(10(t−1)) */
.card-label.em-exit {
    opacity: 0;
    transform: translateY(-20px);
    filter: blur(12px);
    transition: opacity 1s cubic-bezier(0.95, 0.05, 0.795, 0.035),
                transform 1s cubic-bezier(0.95, 0.05, 0.795, 0.035),
                filter 1s cubic-bezier(0.95, 0.05, 0.795, 0.035);
}

/* ══ NAVIGATION BAR (pill with scaleX fill) ══ */

/* ── Nav row ── */
.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
    /* sticky 1.5rem above the viewport bottom */
    position: absolute; 
    bottom: 2rem;
    left: 0;
    width: 100%;
    bottom: 1.0rem;
    z-index: 20;
    /* Birth animation: starts invisible */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.38s ease;
}

/* ── Pill container around all dots ── */
.dots-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    background: var(--em-ctrl-bg);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--em-ctrl-border);
    border-radius: 50px;
    box-shadow:
        inset 0 1px 4px rgba(0,0,0,0),          /* layer 1 - inner top tint    (JS sets colour) */
        0 -4px 18px     rgba(0,0,0,0),           /* layer 2 - upward soft halo  (JS sets colour) */
        0 4px 20px      rgba(0,0,0,0.10),         /* layer 3 - base drop shadow  */
        inset 0 1px 0   rgba(255,255,255,0.45),   /* layer 4 - white top edge    */
        inset 0 -1px 0  rgba(0,0,0,0.06);         /* layer 5 - bottom edge       */
    /* Birth: collapsed toward the button (right edge), grows leftward */
    transform: scaleX(0);
    transform-origin: right center;
    opacity: 0;
    transition:
        transform  0.62s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity    0.12s ease,
        box-shadow 0.9s  cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.6s ease,
        border-color     0.6s ease;
}

/* ── dot - shape by class, fill by JS ── */
.nav-dot {
    position: relative;
    height: 10px;
    width: 10px;
    border-radius: 50px;
    background: var(--em-dot);
    /* overflow: visible so the hit area is not clipped */
    overflow: visible;
    flex-shrink: 0;
    cursor: pointer;
    border: none;
    padding: 0;
    /* Birth: dots fade in on step 3 */
    opacity: 0;
    transition:
        width     0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.2s ease,
        opacity   0.28s ease,
        background-color 0.6s ease;
}
.nav-dot.em-dot-active { width: 58px; }

/* ── target size (WCAG 2.5.8): invisible enlarged hit area ── */
.nav-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 44px;
    width: calc(100% + 8px);
}

/* fill: width, not scaleX, so the radius stays round */
.dot-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    background: var(--em-fill);
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
}




/* ── Pause / Play button ── */
.pause-btn {
    width:  48px;
    height: 48px;
    border-radius: 50%;
    background: var(--em-ctrl-bg);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--em-ctrl-border);
    box-shadow:
        inset 0 1px 4px rgba(0,0,0,0),          /* layer 1 - inner top tint    (JS sets colour) */
        0 -4px 18px     rgba(0,0,0,0),           /* layer 2 - upward soft halo  (JS sets colour) */
        0 4px 20px      rgba(0,0,0,0.10),         /* layer 3 - base drop shadow  */
        inset 0 1px 0   rgba(255,255,255,0.45),   /* layer 4 - white top edge    */
        inset 0 -1px 0  rgba(0,0,0,0.06);         /* layer 5 - bottom edge       */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: var(--em-ctrl-ink);
    padding: 0;
    /* Birth: pops in as the "seed" circle on step 1 */
    transform: scale(0);
    transition:
        transform    0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
        background   0.6s ease,
        border-color 0.6s ease,
        color        0.6s ease,
        box-shadow   0.9s  cubic-bezier(0.16, 1, 0.3, 1); /* glow colour interpolation */
}
/* ── tactility on the carousel controls ── */
.carousel-nav.nav-active .pause-btn:active,
.carousel-nav.nav-active .nav-dot:active,
.carousel-nav .em-arrow:active {
    transform: scale(0.9);
    transition: transform 0.09s ease;
}
@media (hover: hover) {
    .nav-dot:hover  { background: var(--em-dot-hover); transform: scale(1.15); }
    .dots-pill:hover,
    .pause-btn:hover { background: var(--em-ctrl-bg-hover); }
}

.pause-btn svg { width: 18px; height: 18px; }
/* Birth: icons start invisible, fade in on step 3 */
.pause-btn svg {
    opacity: 0;
    transition: opacity 0.28s ease;
}
.icon-play, .icon-replay { display: none; }



/* ── Responsive ── */
@media (max-width: 600px) {
    /* phone: card ~70% of the screen height (dvh, vh fallback) */
    .carousel-card,
    .card-featured   {
        aspect-ratio: auto;
        height: 70vh;
        height: 70dvh;
        border-radius: var(--radius-card);
        padding: 1.8rem 1.8rem;
    }
    .explore-eyebrow { margin-bottom: 1rem; }
    /* clearer dots + more gap - easier to tap on a phone */
    .dots-pill       { height: 44px; padding: 0 18px; gap: 9px; }
    .nav-dot         { width: 11px; height: 11px; }
    .nav-dot.em-dot-active { width: 54px; }
    .pause-btn       { width: 44px; height: 44px; }
    .pause-btn svg   { width: 14px; height: 14px; }
    .carousel-nav    { bottom: 1rem; }
}

/* ══ NAV BIRTH ANIMATION - 3 steps (JS toggles classes) ══ */

/* Step 1: nav becomes visible; button springs in */
.carousel-nav.nav-s1 {
    opacity: 1;
}
.carousel-nav.nav-s1 .pause-btn {
    transform: scale(1);
}

/* Step 2: pill grows leftward (from right edge, near the button) */
.carousel-nav.nav-s2 .dots-pill {
    transform: scaleX(1);
    opacity: 1;
}

/* Step 3: dots + button icon fade in */
.carousel-nav.nav-s3 .nav-dot {
    opacity: 1;
}
.carousel-nav.nav-s3 .pause-btn svg {
    opacity: 1;
}

/* Active: interactivity enabled */
.carousel-nav.nav-active {
    pointer-events: auto;
}

/* ── fallback without backdrop-filter: more opaque surfaces ── */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    .dots-pill,
    .pause-btn {
        background: linear-gradient(160deg, rgba(233, 238, 231, 0.94) 0%, rgba(223, 230, 221, 0.94) 100%);
    }
    .card-badge {
        background: rgba(58, 75, 58, 0.72);
    }
}