/* SmashClub product tour: shared player, chapters and modal.
   Used by /video and the homepage. */

.tour-player {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #05070d;
    box-shadow: 0 30px 80px -20px rgba(253, 83, 33, 0.35), 0 12px 40px rgba(2, 6, 23, 0.45);
    isolation: isolate;
}
.tour-player video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #05070d;
}
.tour-play {
    display: none;
}
.tour-player.js-ready .tour-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 3.2%;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 2;
    font: inherit;
}
.tour-player.is-playing .tour-play {
    display: none;
}
.tour-play__pill {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: #FD5321;
    color: #fff;
    border-radius: 999px;
    padding: 12px 26px 12px 12px;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: clamp(15px, 1.6vw, 20px);
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: 0 10px 34px rgba(253, 83, 33, 0.5);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.tour-play:hover .tour-play__pill,
.tour-play:focus-visible .tour-play__pill {
    transform: scale(1.05);
    box-shadow: 0 14px 44px rgba(253, 83, 33, 0.65);
}
.tour-play:focus-visible {
    outline: 3px solid #FD5321;
    outline-offset: -3px;
}
.tour-play__icon {
    width: clamp(34px, 3.4vw, 44px);
    height: clamp(34px, 3.4vw, 44px);
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.tour-play__icon::after {
    content: "";
    margin-left: 4px;
    border-left: 14px solid #FD5321;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
}
.tour-play__dur {
    opacity: 0.8;
}
@media (max-width: 560px) {
    .tour-player { border-radius: 12px; }
    .tour-player.js-ready .tour-play { justify-content: flex-end; padding: 0 3% 3% 0; }
    .tour-play__label { display: none; }
    .tour-play__pill { padding: 6px 14px 6px 6px; gap: 10px; font-size: 14px; }
    .tour-play__icon { width: 30px; height: 30px; }
    .tour-play__icon::after { border-left-width: 11px; border-top-width: 7px; border-bottom-width: 7px; margin-left: 3px; }
}

/* Sound chip: shown while playing muted */
.tour-sound {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(5, 7, 13, 0.72);
    backdrop-filter: blur(6px);
    color: #fff;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.tour-sound:hover,
.tour-sound:focus-visible { background: #FD5321; border-color: #FD5321; }
.tour-player.is-playing.is-muted .tour-sound { display: inline-flex; }
@media (max-width: 560px) {
    .tour-sound { top: 8px; right: 8px; padding: 6px 11px 6px 9px; font-size: 12.5px; }
}

/* Chapters */
.tour-chapters {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.tour-chapters a {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.tour-chapters a:hover,
.tour-chapters a:focus-visible {
    border-color: rgba(253, 83, 33, 0.6);
    background: rgba(253, 83, 33, 0.08);
}
.tour-chapters a.is-active {
    border-color: #FD5321;
    background: rgba(253, 83, 33, 0.14);
}
.tour-chapters time {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13px;
    color: #FD5321;
    flex-shrink: 0;
    min-width: 34px;
}

/* Hero "watch" button on the homepage */
.tour-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1.4rem 0.8rem 0.8rem;
    font-size: 19px;
    font-weight: 600;
    border-radius: 12px;
    background: #fff;
    color: #0F172A;
    border: 1px solid rgba(15, 23, 42, 0.14);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.tour-open-btn:hover { border-color: #0F172A; transform: translateY(-1px); }
.tour-open-btn .tour-play__icon {
    width: 38px;
    height: 38px;
    background: #FD5321;
}
.tour-open-btn .tour-play__icon::after {
    border-left-color: #fff;
    border-left-width: 12px;
    border-top-width: 8px;
    border-bottom-width: 8px;
}
.tour-open-btn small {
    font-size: 15px;
    font-weight: 500;
    color: #64748B;
}

/* Modal */
.tour-modal {
    width: min(1200px, 94vw, calc((100vh - 150px) * 16 / 9));
    margin: auto;
    position: fixed;
    inset: 0;
    height: fit-content;
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}
.tour-modal::backdrop {
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(4px);
}
.tour-modal .tour-player { box-shadow: 0 30px 120px rgba(253, 83, 33, 0.25); }
.tour-modal__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 14px;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 15px;
    color: #CBD5E1;
}
.tour-modal__bar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.tour-modal__close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.tour-modal__close:hover { background: rgba(255, 255, 255, 0.24); }
