:root {
    --xc-accent: #FF5800;
    --xc-accent2: #5842F2;
    --xc-dark: #000;
    --xc-bg: #F8F8F8;
    --xc-header-font: 'Montserrat', sans-serif;
    --xc-body-font: 'Open Sans', sans-serif;
    --card-width: 80vw;
    --card-max-width: 650px;
}

.xc-wrapper {
    position: relative;
    overflow:hidden;
    font-family: var(--xc-body-font);
    background: white;
    position: relative;
    overflow: hidden;
    height: calc(100vh - 80px);
    min-height: fit-content;
    max-height: 920px;
    display: flex;
    flex-direction: column;
}

.xc-wrapper {
    @media (min-width: 768px) {
        height: calc(100vh - 110px);
    }
}

.xc-wrapper:before{
    position: absolute;
    display: block;
    width: 50vw;
    height: 50vw;
    right: -7%;
    top: 0;
    max-width: 600px;
    min-width: 300px;
    content: url('/img/x_curves_large.svg');
    opacity: 0.3;
}

.xc-stack-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 40px;
}

.xc-stack {
    position: relative;
    width: var(--card-width);
    max-width: var(--card-max-width);
    height: var(--card-height);
    perspective: 1000px;
}

.xc-card {
    position: absolute;
    width: 100%;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    cursor: grab;
    user-select: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform-origin: center center;
    transition: transform 0.5s ease, opacity 0.5s ease;
    box-sizing: border-box;
    padding: clamp(15px, calc(4vw + 1px), 30px);
    backface-visibility: hidden;
}

.re-stacking {
    animation: fadeInBack 0.6s forwards;
}

@keyframes fadeInBack {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
    }
}

.card-accent-1 {
    background: var(--xc-accent);
}

.card-accent-2 {
    background: var(--xc-accent2);
}

.xc-img-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 2/1;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0,0,0,0.1);
}

.xc-img-frame::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    width: 100%;
    height: 70px;
    background: linear-gradient(0deg,rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 100%);
}

.xc-card-img { width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    object-position: left center;
}

.xc-card-body {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 3;
}

.xc-card-body h2 {
    margin: 0 0 clamp(14px, calc(3vw + 1px), 18px) -3px;
    color: white;
    font-family: var(--xc-header-font);
    font-weight: 900;
    font-size: clamp(24px, calc(6vw + 1px), 50px);
    margin-top: -.84em;
    line-height: 1;
}

.xc-card-body p {
    color: rgba(255,255,255,0.9);
    font-size: clamp(14px, calc(3vw + 1px), 18px);
    line-height: 1.5;
    margin: 0;
}

.xc-card-body p strong {
    color: white;
    font-size: 1.1em;
}

.xc-next-btn {
    position: absolute;
    bottom: clamp(10px, calc(2vw + 1px), 30px);
    right: clamp(10px, calc(2vw + 1px), 25px);
    z-index: 100;
    padding: 15px 45px 15px 30px;
    margin: 0;
    background: var(--xc-dark);
    color: white;
    border: none;
    font-family: var(--xc-header-font);
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.3s, padding 0.3s, clip-path 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%);
    box-shadow: none;
}

.xc-next-btn.is-last {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 100% 100%, 0% 100%);
    padding: 15px 30px;
}

.xc-next-btn:focus {
    background: var(--xc-dark);
}

.xc-next-btn:hover,
.xc-next-btn:focus-visible {
    background: var(--next-accent, var(--xc-accent));
}

.xc-next-btn:not(.is-last):hover,
.xc-next-btn:not(.is-last):focus-visible {
    padding-right: 48px;
}

.xc-timeline-section {
    position: relative;
    height: clamp(80px, calc(10vw + 1px), 120px);
    width: 100%;
    background: var(--xc-bg);
    overflow: hidden;
}

.xc-center-indicator {
    position: absolute;
    left: calc(50% - 1px);
    top: 0;
    bottom: 0;
    width: 1px;
    z-index: 0;
    opacity: 0.15;
    background: var(--xc-dark);
}

.xc-timeline-track {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    align-items: center;
    transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

.xc-time-unit {
    min-width: 176px;
    text-align: center;
    color: #bbb;
    padding-top: 5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.xc-time-unit.active {
    color: var(--xc-dark);
    transform: scale(1.1);
    padding-top: 10px;
}

.xc-time-unit .xc-label {
    font-family: var(--xc-header-font);
    font-weight: 900;
    font-size: 0.85rem;
    transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.xc-time-unit.active .xc-label {
    font-size: 1rem;
}

.xc-time-unit .xc-dot {
    width: 6px;
    height: 6px;
    background: #ddd;
    border-radius: 50%;
    margin: 0 auto clamp(5px, calc(1vw + 1px), 10px);
    transition: 0.4s;
}

.xc-time-unit.active .xc-dot {
    background: var(--active-accent, var(--xc-accent));
    transform: scale(2);
}

.swiped-away {
    pointer-events: none;
    opacity: 0 !important;
    transition: transform 0.6s ease-out, opacity 0.4s !important;
}