/*
 * Figma Homepage — stories row + divider + discover intro (Group 74955).
 * Stage: 1082×625px reference; all positions scale via aspect-ratio + cqw/cqh.
 */

.tourbin-stories-intro {
    padding-block: 1.75rem 0;
    background: #fff;
    overflow: visible;
}

.tourbin-stories-intro__frame {
    width: 100%;
    max-width: 1082px;
    margin-inline: auto;
    padding-inline: 16px;
}

.tourbin-stories-intro__stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1082 / 625;
    container-type: inline-size;
    overflow: visible;
}

/* Block-only stories row — keep card size identical to homepage story row. */
@media (min-width: 901px) {
    .tourbin-stories-intro--stories-only .tourbin-stories-intro__stage {
        aspect-ratio: auto;
        display: flex;
        flex-direction: column;
        gap: clamp(0.5rem, 1.2cqw, 0.85rem);
        overflow: visible;
    }

    .tourbin-stories-intro--stories-only .tourbin-stories-intro__story-head {
        position: static;
        inset-inline: auto;
        top: auto;
        height: auto;
        min-height: 55px;
    }

    .tourbin-stories-intro--stories-only .tourbin-stories-intro__cards {
        position: static;
        inset-inline: auto;
        top: auto;
        height: 19.5cqw;
        max-height: 211px;
        min-height: 150px;
        flex-shrink: 0;
    }
}

/* --- Story header --- */

.tourbin-stories-intro__story-head {
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tourbin-stories-intro__story-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.tourbin-stories-intro__story-title {
    margin: 0;
    font-family: "Vazirmatn", var(--tourbin-font);
    font-weight: 600;
    font-size: 1.6cqw;
    line-height: 1.5625;
    color: #0f172a;
    white-space: nowrap;
}

.tourbin-stories-intro__story-play {
    display: block;
    width: 1.94cqw;
    height: 1.94cqw;
    min-width: 21px;
    min-height: 21px;
    flex-shrink: 0;
    object-fit: contain;
}

.tourbin-stories-intro__view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: "Vazirmatn", var(--tourbin-font);
    font-weight: 700;
    font-size: 1.4cqw;
    line-height: 1.571;
    color: #1c2fff;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--tourbin-duration-micro, 120ms)
        var(--tourbin-ease, cubic-bezier(0.2, 0, 0, 1));
}

.tourbin-stories-intro__view-all:hover {
    opacity: 1;
    color: #1526cc;
}

.tourbin-stories-intro__view-all-arrow {
    display: block;
    width: 11px;
    height: 5px;
    flex-shrink: 0;
    transition: transform var(--tourbin-duration-micro, 120ms)
        var(--tourbin-ease, cubic-bezier(0.2, 0, 0, 1));
}

.tourbin-stories-intro__view-all:hover .tourbin-stories-intro__view-all-arrow {
    transform: translateX(2px);
}

/* --- Story cards --- */

.tourbin-stories-intro__cards {
    position: absolute;
    inset-inline: 0;
    top: 9.28%;
    height: 33.76%;
    display: flex;
    justify-content: space-between;
    gap: 2.22%;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: visible;
}

.tourbin-stories-intro__card-item {
    --beam-size: 72px;
    --beam-half: 36px;
    --beam-duration: 6s;
    --border-duration: 4s;
    --beam-delay: 0s;
    --border-delay: 0s;
    --gold: #f5c542;
    --gold-bright: #ffe08a;
    --gold-deep: #c9961a;

    position: relative;
    flex: 0 0 18.21%;
    max-width: 18.21%;
    height: 100%;
    border-radius: 22px;
    overflow: hidden;
    isolation: isolate;
    container-type: size;
}

/*
 * Beam lives on the item, behind the card.
 * The 2px inset gap is the only place the glow shows — like the ai-box rim.
 */
.tourbin-stories-intro__card-item::before {
    content: "";
    position: absolute;
    z-index: 0;
    width: var(--beam-size);
    height: var(--beam-size);
    top: calc(var(--beam-half) * -1);
    left: calc(var(--beam-half) * -1);
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(
        circle,
        var(--gold-bright) 0%,
        rgba(245, 197, 66, 0.85) 22%,
        rgba(201, 150, 26, 0.35) 48%,
        transparent 70%
    );
    filter: blur(4px);
    will-change: transform;
    animation: tourbin-story-beam var(--beam-duration) linear infinite;
    animation-delay: var(--beam-delay);
}

.tourbin-stories-intro__card {
    position: relative;
    z-index: 1;
    display: block;
    box-sizing: border-box;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    margin: 2px;
    border: none;
    background: #f9fafb;
    box-shadow: inset 0 2px 1px rgba(255, 244, 40, 0.25);
    border-radius: 20px;
    cursor: pointer;
    padding: 0;
    font: inherit;
    overflow: hidden;
    container-type: inline-size;
    transition: box-shadow 0.3s ease;
}

/* Thin gold highlight that travels the rim only */
.tourbin-stories-intro__card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 6;
    border-radius: inherit;
    padding: 1px;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 38%,
        rgba(255, 224, 138, 0.15) 45%,
        rgba(245, 197, 66, 0.95) 50%,
        rgba(201, 150, 26, 0.75) 55%,
        transparent 62%,
        transparent 100%
    );
    background-size: 280% 100%;
    animation: tourbin-story-border var(--border-duration) linear infinite;
    animation-delay: var(--border-delay);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Desync so stories never lockstep */
.tourbin-stories-intro__card-item:nth-child(1) {
    --beam-duration: 5.6s;
    --border-duration: 3.7s;
    --beam-delay: 0s;
    --border-delay: -0.4s;
}

.tourbin-stories-intro__card-item:nth-child(2) {
    --beam-duration: 7.1s;
    --border-duration: 4.8s;
    --beam-delay: -1.8s;
    --border-delay: -1.2s;
}

.tourbin-stories-intro__card-item:nth-child(3) {
    --beam-duration: 4.9s;
    --border-duration: 3.3s;
    --beam-delay: -0.7s;
    --border-delay: -2.1s;
}

.tourbin-stories-intro__card-item:nth-child(4) {
    --beam-duration: 6.4s;
    --border-duration: 4.2s;
    --beam-delay: -2.9s;
    --border-delay: -0.9s;
}

.tourbin-stories-intro__card-item:nth-child(5) {
    --beam-duration: 7.8s;
    --border-duration: 5.1s;
    --beam-delay: -3.5s;
    --border-delay: -2.6s;
}

/*
 * Moves the beam via transform (compositor-only) instead of top/left, which
 * forced a layout reflow every frame on all 5 cards and janked page scroll.
 * translate(100cqw/100cqh) covers the same distance as the old 100% top/left
 * delta, measured against the card-item container instead of the beam itself.
 */
@keyframes tourbin-story-beam {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(100cqw, 0);
    }

    50% {
        transform: translate(100cqw, 100cqh);
    }

    75% {
        transform: translate(0, 100cqh);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes tourbin-story-border {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -50% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tourbin-stories-intro__card-item::before,
    .tourbin-stories-intro__card::after {
        animation: none;
    }

    .tourbin-stories-intro__card-item::before {
        transform: translate(calc(35cqw + var(--beam-half)), 0);
        opacity: 0.7;
    }

    .tourbin-stories-intro__card::after {
        background-position: 50% 0;
    }

    .tourbin-stories-intro__cta,
    .tourbin-stories-intro__cta-arrow,
    .tourbin-stories-intro__view-all,
    .tourbin-stories-intro__view-all-arrow {
        transition: none !important;
    }

    .tourbin-stories-intro__cta:hover,
    .tourbin-stories-intro__cta:active,
    .tourbin-stories-intro__cta:hover .tourbin-stories-intro__cta-arrow,
    .tourbin-stories-intro__view-all:hover .tourbin-stories-intro__view-all-arrow {
        transform: none !important;
    }
}

.tourbin-stories-intro__card:hover,
.tourbin-stories-intro__card:focus-visible {
    box-shadow:
        inset 0 2px 1px rgba(255, 244, 40, 0.25),
        0 12px 32px rgba(15, 15, 15, 0.08);
    outline: none;
}

.tourbin-stories-intro__card-label {
    position: absolute;
    top: 11.85%;
    left: 27.92%;
    z-index: 4;
    margin: 0;
    width: 44.67%;
    height: 17.54%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Liana-soft", "Liana-soft-FD", "Liana", var(--tourbin-font);
    font-weight: 700;
    font-size: 10.15cqw;
    line-height: 1.5;
    text-align: center;
    color: #0d0d0d;
    pointer-events: none;
    white-space: nowrap;
}

.tourbin-stories-intro__card-photos {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.tourbin-stories-intro__card-photo {
    position: absolute;
    display: block;
    box-sizing: border-box;
    border: 3px solid #fff;
    border-radius: 10px;
    box-shadow: 0 4px 50px rgba(0, 0, 0, 0.25);
    object-fit: cover;
    transition:
        transform 0.45s cubic-bezier(0.34, 1.25, 0.64, 1),
        box-shadow 0.35s ease;
    transform-origin: center bottom;
}

/* Rectangle 2406 — left, tilted */
.tourbin-stories-intro__card-photo--0 {
    width: 60.73%;
    height: 61.45%;
    left: 0;
    top: 59.29%;
    transform: rotate(-10.83deg);
    z-index: 1;
}

/* Rectangle 2408 — center */
.tourbin-stories-intro__card-photo--1 {
    width: 60.73%;
    height: 61.45%;
    left: 19.8%;
    top: 44.08%;
    transform: rotate(0.49deg);
    z-index: 2;
}

/* Rectangle 2407 — right, front */
.tourbin-stories-intro__card-photo--2 {
    width: 65.56%;
    height: 68.01%;
    left: 31.47%;
    top: 67.77%;
    transform: rotate(8.99deg);
    z-index: 3;
}

.tourbin-stories-intro__card:hover .tourbin-stories-intro__card-photo--0,
.tourbin-stories-intro__card:focus-visible
    .tourbin-stories-intro__card-photo--0 {
    transform: rotate(-24deg) translate(-14%, -18%);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
}

.tourbin-stories-intro__card:hover .tourbin-stories-intro__card-photo--1,
.tourbin-stories-intro__card:focus-visible
    .tourbin-stories-intro__card-photo--1 {
    transform: rotate(0deg) translateY(-20%) scale(1.04);
    box-shadow: 0 8px 44px rgba(0, 0, 0, 0.24);
}

.tourbin-stories-intro__card:hover .tourbin-stories-intro__card-photo--2,
.tourbin-stories-intro__card:focus-visible
    .tourbin-stories-intro__card-photo--2 {
    transform: rotate(20deg) translate(14%, -16%);
    z-index: 4;
    box-shadow: 0 10px 48px rgba(0, 0, 0, 0.28);
}

/* --- Divider (Line 259) --- */

.tourbin-stories-intro__divider {
    position: absolute;
    inset-inline: 0;
    top: 53.92%;
    margin: 0;
    border: none;
    border-top: 1px solid rgba(234, 234, 234, 0.5);
}

/* --- Left copy + CTA --- */

.tourbin-stories-intro__copy {
    position: absolute;
    left: 0;
    top: 74.4%;
    width: 24.31%;
}

.tourbin-stories-intro__text {
    margin: 0 0 1.2cqh;
    font-family: "Vazirmatn", var(--tourbin-font);
    font-weight: 400;
    font-size: 1.2cqw;
    line-height: 1.54;
    text-align: right;
    color: #000;
}

.tourbin-stories-intro__cta {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.74cqw;
    padding: 1.6cqw 2.88cqw;
    background: #fff428;
    box-shadow: 0 4px 8px rgba(255, 207, 1, 0.2);
    border-radius: 12px;
    color: #000;
    font-family: "Vazirmatn", var(--tourbin-font);
    font-weight: 600;
    font-size: 1.39cqw;
    line-height: 1.533;
    text-decoration: none;
    white-space: nowrap;
    transition:
        transform var(--tourbin-duration, 200ms) var(--tourbin-ease, cubic-bezier(0.2, 0, 0, 1)),
        box-shadow var(--tourbin-duration, 200ms) var(--tourbin-ease, cubic-bezier(0.2, 0, 0, 1)),
        background-color var(--tourbin-duration, 200ms) var(--tourbin-ease, cubic-bezier(0.2, 0, 0, 1));
}

.tourbin-stories-intro__cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--tourbin-shadow-cta-yellow, 0 8px 20px rgba(255, 207, 1, 0.35));
    background: #ffe600;
}

.tourbin-stories-intro__cta:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(255, 207, 1, 0.2);
}

.tourbin-stories-intro__cta-arrow {
    display: block;
    width: 16px;
    height: 7px;
    flex-shrink: 0;
    transition: transform var(--tourbin-duration-micro, 120ms)
        var(--tourbin-ease, cubic-bezier(0.2, 0, 0, 1));
}

.tourbin-stories-intro__cta:hover .tourbin-stories-intro__cta-arrow {
    transform: translateX(2px);
}

/* --- Center headline --- */

.tourbin-stories-intro__headline {
    position: absolute;
    left: 33%;
    top: 85.92%;
    width: 41.4%;
    margin: 0;
    font-family: "Liana", var(--tourbin-font);
    font-weight: 700;
    font-size: 3.7cqw;
    line-height: 1.75;
    text-align: center;
    color: #000;
    white-space: nowrap;
}

/* --- Speech bubble (Group 74958) — cropped SVG + CSS shadow --- */

.tourbin-stories-intro__speech {
    position: absolute;
    left: 57.95%;
    top: 76%;
    width: 16.45%;
    aspect-ratio: 178 / 61.68;
    z-index: 3;
    overflow: visible;
    pointer-events: none;
}

.tourbin-stories-intro__speech-shape {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
    container-type: inline-size;
    filter: drop-shadow(0 4px 25px rgba(0, 0, 0, 0.1));
}

.tourbin-stories-intro__speech-svg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.tourbin-stories-intro__speech-label {
    position: absolute;
    top: 21.08%;
    left: 13.48%;
    z-index: 1;
    width: 73.03%;
    height: 43.77%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Liana-soft", "Liana-soft-FD", "Liana", var(--tourbin-font);
    font-weight: 700;
    font-size: 10.11cqw;
    line-height: 1.5;
    text-align: center;
    color: #000;
    white-space: nowrap;
    pointer-events: none;
}

/* --- Mascot (Group 74889) --- */

.tourbin-stories-intro__mascot-wrap {
    position: absolute;
    left: 76.8%;
    top: 62.56%;
    width: 23.2%;
    z-index: 2;
}

.tourbin-stories-intro__mascot {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* --- Responsive --- */

@media (max-width: 900px) {
    .tourbin-stories-intro__stage {
        aspect-ratio: auto;
        container-type: normal;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding-bottom: 2rem;
    }

    .tourbin-stories-intro__story-head,
    .tourbin-stories-intro__cards,
    .tourbin-stories-intro__divider,
    .tourbin-stories-intro__copy,
    .tourbin-stories-intro__headline,
    .tourbin-stories-intro__speech,
    .tourbin-stories-intro__mascot-wrap {
        position: static;
        width: auto;
        height: auto;
    }

    .tourbin-stories-intro__cards {
        overflow: visible;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
        padding-bottom: 0;
        width: 100%;
        max-width: 420px;
        margin-inline: auto;
    }

    .tourbin-stories-intro__card-item {
        flex: none;
        width: 100%;
        max-width: none;
        margin-inline: 0;
        aspect-ratio: 197 / 211;
        height: auto;
    }

    .tourbin-stories-intro__story-title {
        font-size: 1rem;
    }

    .tourbin-stories-intro__view-all {
        font-size: 0.875rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding-block: 10px;
    }

    .tourbin-stories-intro__card-label {
        font-size: 1rem;
        width: 70%;
        left: 15%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        justify-content: center;
    }

    .tourbin-stories-intro__divider {
        margin-block: 0.5rem;
    }

    .tourbin-stories-intro__intro-mobile {
        display: grid;
        gap: 1.25rem;
    }

    .tourbin-stories-intro__headline {
        font-size: 1.75rem;
        white-space: normal;
        text-align: center;
        order: 1;
    }

    .tourbin-stories-intro__speech {
        order: 2;
        position: static;
        width: min(100%, 220px);
        margin-inline: auto;
    }

    .tourbin-stories-intro__speech-shape {
        filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.1));
    }

    .tourbin-stories-intro__speech-label {
        font-size: 1rem;
    }

    .tourbin-stories-intro__mascot-wrap {
        order: 3;
        width: 200px;
        margin-inline: auto;
    }

    .tourbin-stories-intro__copy {
        order: 4;
        text-align: center;
    }

    .tourbin-stories-intro__text {
        font-size: 0.8125rem;
        text-align: center;
    }

    .tourbin-stories-intro__cta {
        font-size: 0.9375rem;
        padding: 0.625rem 1.125rem;
    }
}
