/* =========================================
   BLOCK: Journey Timeline
   Path: blocks/journey-timeline/journey-timeline.css
   ========================================= */

.journey-section {
    background-color: var(--color-bg-alt);
    padding: var(--section-pad-y) 0;
    overflow: hidden;
    position: relative;
}

.journey-section::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-fg-subtle), transparent);
}

.journey__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 5rem;
}

.journey__header .eyebrow {
    margin-bottom: 1rem;
    display: block;
}

.journey__heading {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-fg);
}

.journey__heading em {
    font-style: italic;
    color: var(--color-accent);
}

/* Horizontal scrolling track */
.journey__track-wrap {
    position: relative;
    max-width: var(--container-max);
    margin: 0 auto;
}

/* Connector line through disk centres */
.journey__line {
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--color-fg-subtle) 10%, var(--color-fg-subtle) 90%, transparent 100%);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
}

.journey__disks {
    display: flex;
    gap: 3.2rem;
    overflow-x: auto;
    padding: 3rem 4rem 3rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    position: relative;
    z-index: 1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4rem;
}

.journey__disks::-webkit-scrollbar { display: none; }

/* Individual disk */
.journey__disk {
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    outline: none;
    scroll-snap-align: start;
}

.journey__disk-inner {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--color-white);
    border: 2px solid var(--color-fg-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    position: relative;
    z-index: 1;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
}

.journey__disk-inner::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(var(--color-white), var(--color-white)) padding-box,
                linear-gradient(135deg, var(--color-accent), var(--color-rose), var(--color-accent)) border-box;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.journey__disk-inner::after {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1.5px solid var(--color-accent);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.4s ease, transform 0.5s ease;
    pointer-events: none;
}

.journey__disk:hover .journey__disk-inner,
.journey__disk:focus .journey__disk-inner {
    border-color: var(--color-accent);
    box-shadow: 0 12px 40px rgba(23,92,82,0.18);
}

.journey__disk:hover .journey__disk-inner::before,
.journey__disk:focus .journey__disk-inner::before {
    opacity: 1;
    animation: waveRotate 3s linear infinite;
}

.journey__disk:hover .journey__disk-inner::after,
.journey__disk:focus .journey__disk-inner::after {
    opacity: 0.35;
    transform: scale(1.1);
    animation: ripplePulse 2s ease-in-out infinite;
}

@keyframes waveRotate {
    from { filter: hue-rotate(0deg); transform: rotate(0deg) scale(1); }
    50%  { transform: rotate(180deg) scale(1.04); }
    to   { filter: hue-rotate(360deg); transform: rotate(360deg) scale(1); }
}

@keyframes ripplePulse {
    0%, 100% { transform: scale(1.08); opacity: 0.25; }
    50%       { transform: scale(1.22); opacity: 0.1; }
}

/* Active disk */
.journey__disk.is-active .journey__disk-inner {
    background: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 16px 48px rgba(23,92,82,0.28);
}

.journey__disk.is-active .journey__disk-inner::before {
    opacity: 1;
    animation: waveRotate 2s linear infinite;
}

.journey__disk.is-active .journey__disk-year {
    color: var(--color-fg-alt);
}

.journey__disk.is-active .journey__disk-label {
    color: rgba(241,239,232,0.75);
}

.journey__disk-year {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-fg);
    line-height: 1;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

.journey__disk-label {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-fg-muted);
    margin-top: 0.3rem;
    transition: color 0.3s ease;
    text-align: center;
    max-width: 300px;
    position: relative;
    z-index: 2;
}

.journey__disk:hover .journey__disk-year,
.journey__disk:focus .journey__disk-year {
    color: var(--color-accent);
}

.journey__disk:hover .journey__disk-label,
.journey__disk:focus .journey__disk-label {
    color: var(--color-accent);
}


/* =========================================
   SWIPE HINTS — left & right scroll controls
   =========================================
   Layout:  [ ‹‹‹ ]   SWIPE   [ ››› ]
   Left arrow  — far left
   SWIPE label — centre
   Right arrow — far right
   ========================================= */

/* Unified layout: arrows flanking SWIPE label — all screen sizes */
.journey__swipe-hints-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.75rem auto 0.25rem;
    position: relative;
    min-height: 44px;
    max-width: 260px; /* keeps arrows close to the centred SWIPE label */
    width: 100%;
}

/* Centre label — absolutely centred so arrows don't shift it */
.journey__swipe-hints-wrap::after {
    content: 'SWIPE';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent);
    pointer-events: none;
}

.journey__swipe-hint {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 100px;
    cursor: pointer;
    user-select: none;
    gap: 0;

    transition:
        opacity          0.25s ease,
        visibility       0.25s ease,
        background-color 0.22s ease,
        transform        0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Always hide the inline text label — label shown via ::after pseudo */
.journey__swipe-hint .journey__swipe-hint__label {
    display: none;
}

.journey__swipe-hint:hover {
    background-color: rgba(23, 92, 82, 0.07);
    transform: scale(1.05);
}

.journey__swipe-hint:active {
    transform: scale(0.94);
}

/* ── Chevron group ── */
.journey__swipe-hint__chevrons {
    display: flex;
    gap: 3px;
}

/* RIGHT button — chevrons point › › › */
.journey__swipe-hint--right .journey__swipe-hint__chevrons span {
    display: block;
    width: 11px;
    height: 11px;
    border-right: 2.5px solid var(--color-accent);
    border-top:   2.5px solid var(--color-accent);
    border-radius: 1px;
    opacity: 0;
    animation: chevronWaveRight 1.2s ease-in-out infinite;
}

.journey__swipe-hint--right .journey__swipe-hint__chevrons span:nth-child(1) { animation-delay: 0s;    }
.journey__swipe-hint--right .journey__swipe-hint__chevrons span:nth-child(2) { animation-delay: 0.18s; }
.journey__swipe-hint--right .journey__swipe-hint__chevrons span:nth-child(3) { animation-delay: 0.36s; }

/* LEFT button — chevrons point ‹ ‹ ‹ */
.journey__swipe-hint--left .journey__swipe-hint__chevrons {
    flex-direction: row-reverse;
}

.journey__swipe-hint--left .journey__swipe-hint__chevrons span {
    display: block;
    width: 11px;
    height: 11px;
    border-right: 2.5px solid var(--color-accent);
    border-top:   2.5px solid var(--color-accent);
    border-radius: 1px;
    opacity: 0;
    animation: chevronWaveLeft 1.2s ease-in-out infinite;
}

.journey__swipe-hint--left .journey__swipe-hint__chevrons span:nth-child(1) { animation-delay: 0s;    }
.journey__swipe-hint--left .journey__swipe-hint__chevrons span:nth-child(2) { animation-delay: 0.18s; }
.journey__swipe-hint--left .journey__swipe-hint__chevrons span:nth-child(3) { animation-delay: 0.36s; }

@keyframes chevronWaveRight {
    0%   { opacity: 0;   transform: rotate(45deg) translate(-3px, -3px); }
    40%  { opacity: 1;   transform: rotate(45deg) translate(0,    0);    }
    80%  { opacity: 0.2; transform: rotate(45deg) translate(3px,  3px);  }
    100% { opacity: 0;   transform: rotate(45deg) translate(5px,  5px);  }
}

@keyframes chevronWaveLeft {
    0%   { opacity: 0;   transform: rotate(225deg) translate(-3px, -3px); }
    40%  { opacity: 1;   transform: rotate(225deg) translate(0,    0);    }
    80%  { opacity: 0.2; transform: rotate(225deg) translate(3px,  3px);  }
    100% { opacity: 0;   transform: rotate(225deg) translate(5px,  5px);  }
}


/* =========================================
   POPUP OVERLAY
   ========================================= */

.journey__popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(44,44,42,0.48);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: overlayIn 0.3s ease both;
}

.journey__popup-overlay.is-open {
    display: flex;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.journey__popup {
    background: var(--color-white);
    max-width: 560px;
    width: 90%;
    border-radius: var(--radius-lg);
    padding: 3rem;
    position: relative;
    animation: popupIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
    box-shadow:
        0 0 0 1.5px rgba(23,92,82,0.25),
        0 8px  0  1.5px rgba(200,132,127,0.20),
        0 16px 0  1.5px rgba(23,92,82,0.12),
        0 32px 80px rgba(44,44,42,0.22);
}

@keyframes popupIn {
    from { opacity: 0; transform: scale(0.88) translateY(24px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.journey__popup::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: calc(var(--radius-lg) + 4px);
    background: linear-gradient(135deg, var(--color-accent), var(--color-rose), var(--color-accent-secondary), var(--color-rose));
    background-size: 300% 300%;
    animation: waveBorderAnim 4s ease infinite;
    z-index: -1;
}

@keyframes waveBorderAnim {
    0%   { background-position: 0% 50%;   }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%;   }
}

.journey__popup-close {
    position: absolute;
    top: 1.2rem; right: 1.4rem;
    background: var(--color-bg-alt);
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: var(--color-fg-muted);
    transition: background-color 0.25s, color 0.25s;
}

.journey__popup-close:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

.journey__popup-year {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-bg);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.journey__popup-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-fg-alt);
    margin-bottom: 1.2rem;
    display: block;
}

.journey__popup-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-bg);
    margin-bottom: 0.8rem;
    line-height: 1.25;
}

.journey__popup-org {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-bg);
    margin-bottom: 1.2rem;
    letter-spacing: 0.04em;
}

.journey__popup-body {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
    color: var(--color-bg-alt);
}


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 680px) {
    .journey__disks {
        justify-content: flex-start;
    }

    .journey__disk-inner {
        width: 110px;
        height: 110px;
    }

    .journey__popup {
        padding: 2rem;
    }

    .journey__popup-year {
        font-size: 2.2rem;
    }

    .journey__swipe-hints-wrap {
        max-width: 220px; /* slightly tighter on small screens */
    }
}


/* =========================================
   REDUCED MOTION
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    .journey__disk-inner,
    .journey__disk-inner::before,
    .journey__disk-inner::after,
    .journey__swipe-hint,
    .journey__swipe-hint__chevrons span {
        animation: none !important;
        transition: none !important;
    }

    .journey__swipe-hint--right .journey__swipe-hint__chevrons span {
        opacity: 1;
        transform: rotate(45deg);
    }

    .journey__swipe-hint--left .journey__swipe-hint__chevrons span {
        opacity: 1;
        transform: rotate(225deg);
    }
}