/**
 * RAY-BAN.EXE Replica - Standalone Stylesheet
 * Prefix: rbexe- (rayban exe)
 * All classes, variables, and keyframes use the rbexe- prefix
 * to prevent naming conflicts when integrated into larger projects.
 */

/* ===== CSS VARIABLES ===== */
:root {
    --rbexe-bg: #000000;
    --rbexe-text: #f2f2f2;
    --rbexe-text-white: #ffffff;
    --rbexe-border-gray: #818181;
    --rbexe-accent-red: #f2f2f2;
    --rbexe-accent: #00e5cc;
    --rbexe-font-primary: 'Roboto', sans-serif;
    --rbexe-font-heading: 'Roboto Flex', sans-serif;
    --rbexe-slant: 20px;
    --rbexe-frame-padding: 24px;
    --rbexe-font-scale: 1;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--rbexe-bg);
    font-family: var(--rbexe-font-primary);
    color: var(--rbexe-text);
    cursor: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
button { cursor: none; font-family: inherit; }
ul { list-style: none; }

/* ===== MAIN CONTAINER ===== */
#rbexe-main {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--rbexe-bg);
    opacity: 0;
    transition: opacity 0.6s ease;
}
#rbexe-main.rbexe-page-ready {
    opacity: 1;
}

/* ===== SECTION ===== */
#rbexe-section {
    position: relative;
    width: 100%;
    height: 100dvh;
    height: 100vh;
    padding: var(--rbexe-frame-padding);
    overflow: hidden;
    background: var(--rbexe-bg);
}

/* ===== EXTERNAL FRAME (24px black border overlay) ===== */
.rbexe-external-frame {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 65;
    pointer-events: none;
    border: var(--rbexe-frame-padding) solid var(--rbexe-bg);
}
.rbexe-external-frame::after {
    display: none;
}

/* ===== WRAPPER (1px gray border) ===== */
.rbexe-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
}

/* ===== LOGO ===== */
.rbexe-logo {
    position: absolute;
    top: -5px;
    left: 20px;
    z-index: 155;
    pointer-events: none;
}

/* ===== FRAME DECORATIONS ===== */
.rbexe-frame {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 150;
}

/* Corner decorations - rotated black squares */
.rbexe-frame-corner {
    position: absolute;
    z-index: 150;
}
.rbexe-frame-corner-fill {
    width: 40px;
    height: 40px;
    background: var(--rbexe-bg);
    position: relative;
}
.rbexe-frame-corner-fill::after {
    display: none;
}

.rbexe-corner-tl {
    top: -20px; left: -20px;
    transform: rotate(315deg);
}
.rbexe-corner-tr {
    top: -20px; right: -20px;
    transform: rotate(45deg);
}
.rbexe-corner-bl {
    bottom: -20px; left: -20px;
    transform: rotate(225deg);
}
.rbexe-corner-br {
    bottom: -20px; right: -20px;
    transform: rotate(135deg);
}

/* Frame cutouts - trapezium shapes on edges */
.rbexe-frame-cutout {
    position: absolute;
    background: var(--rbexe-bg);
    z-index: 149;
}
.rbexe-cutout-left {
    top: 50%;
    left: -1px;
    width: 32px;
    height: 125px;
    transform: translateY(-50%);
    clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%);
}
.rbexe-cutout-right {
    top: 50%;
    right: -1px;
    width: 32px;
    height: 125px;
    transform: translateY(-50%);
    clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 85%);
}
.rbexe-cutout-bottom {
    bottom: -1px;
    left: 50%;
    width: 315px;
    height: 30px;
    transform: translateX(-50%);
    clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}
.rbexe-cutout-left::after,
.rbexe-cutout-right::after {
    display: none;
}

/* ===== CONTENT AREA ===== */
.rbexe-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ===== CHARACTER BACKGROUND ===== */
.rbexe-char-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 0.4s ease;
    z-index: 0;
}

/* ===== CHROMATIC ABERRATION + GLITCH ===== */
.rbexe-char-image {
    transform-style: preserve-3d;
    will-change: transform;
}

/* RGB split layers (chromatic aberration) — hidden by default */
.rbexe-char-image::before,
.rbexe-char-image::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--rbexe-product-img, none) 60% center / auto 65% no-repeat;
    pointer-events: none;
    display: none;
    z-index: 1;
}

/* Show RGB split only on product images (those with --rbexe-product-img set) */
.rbexe-char-notebook-bird::before,
.rbexe-char-notebook-bird::after {
    display: block;
}

/* Red channel — offset left (subtle resting state) */
.rbexe-char-image::before {
    mix-blend-mode: screen;
    opacity: 0.35;
    transform: translate(-2px, 0);
    filter: sepia(1) hue-rotate(-30deg) saturate(3);
    transition: transform 0.08s, opacity 0.08s;
}

/* Cyan channel — offset right (subtle resting state) */
.rbexe-char-image::after {
    mix-blend-mode: screen;
    opacity: 0.35;
    transform: translate(2px, 0);
    filter: sepia(1) hue-rotate(140deg) saturate(3);
    transition: transform 0.08s, opacity 0.08s;
}

/* Glitch burst — toggled by JS */
.rbexe-char-image.rbexe-glitch::before {
    transform: translate(-10px, 3px) skewX(-2deg);
    opacity: 0.85;
    transition: none;
}
.rbexe-char-image.rbexe-glitch::after {
    transform: translate(10px, -3px) skewX(2deg);
    opacity: 0.85;
    transition: none;
}

/* 3D perspective on panel content */
.rbexe-content {
    perspective: 1200px;
}

/* Character backgrounds - B&W */
.rbexe-char-collection,
.rbexe-char-clubmaster,
.rbexe-char-round,
.rbexe-char-wayfarer,
.rbexe-char-aviator {
    background: #000;
}

/* Beak panel — foreground character (transparent bg so scene layer shows through) */
.rbexe-char-beak-maya {
    background: transparent url('images/Beak/01_Maya_fullBody.png') center 3% / auto 155% no-repeat;
}
.rbexe-char-beak-front {
    background: transparent url('images/Beak/01_Beak_front_View.png') center 3% / auto 155% no-repeat;
}

/* Beak panel — static background scene layer (sits below the foreground character) */
.beak-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.4s ease;
    z-index: 0;
}
.beak-bg-beak {
    background: #000 url('images/Beak/Beak_Background.png') center center / cover no-repeat;
}
.beak-bg-maya {
    background: #000 url('images/Beak/Maya_background.png') center center / cover no-repeat;
}

/* Foreground character must sit above the background layer */
#rbexe-panel-beak .rbexe-char-image {
    z-index: 1;
}

/* BlackTrack panel — center backgrounds (full images, 155% height, shifted down) */
.rbexe-char-bt-zayla {
    background: #000 url('images/BlackTrack/zaylas_Fullshot.png') center 3% / auto 155% no-repeat;
}
.rbexe-char-bt-friends {
    background: #000 url('images/BlackTrack/zaylasFriends_Fullshot.png') center 3% / auto 155% no-repeat;
}

/* Product image backgrounds (Amazon Store) */
.rbexe-char-notebook-bird {
    --rbexe-product-img: url('images/61zqakKhvdL._SL1500_.jpg');
    background: #000 var(--rbexe-product-img) 60% center / auto 65% no-repeat;
}

/* Scanline overlay for CRT feel */
.rbexe-content::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* ===== CHARACTER INFO PANEL ===== */
.rbexe-info {
    position: absolute;
    top: 80px;
    left: 40px;
    width: 30%;
    min-width: 300px;
    max-width: 420px;
    z-index: 3;
}

.rbexe-title {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    color: var(--rbexe-text);
    font-family: var(--rbexe-font-heading);
    font-size: calc(clamp(110px, 13vw, 180px) * var(--rbexe-font-scale));
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    opacity: 0.25;
    transition: opacity 0.3s ease;
    will-change: transform;
}

.rbexe-description {
    position: relative;
    z-index: 2;
    max-width: 400px;
    color: var(--rbexe-text);
    font-family: var(--rbexe-font-primary);
    font-size: calc(16px * var(--rbexe-font-scale));
    font-weight: 300;
    line-height: 1.2;
    padding: 12px 14px;
    border: 1px solid var(--rbexe-text);
    background: var(--rbexe-bg);
    transition: opacity 0.3s ease;
    will-change: transform;
}

/* CTA Button — fixed position so large title font-scale can't push it off-screen */
.rbexe-cta-wrap {
    position: absolute;
    top: 320px;
    left: 0;
    z-index: 3;
    padding-top: 25px;
    overflow: hidden;
    will-change: transform;
}
.rbexe-cta-wrap::before {
    content: "";
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--rbexe-text);
    transition: width 0s;
}
.rbexe-cta-wrap.active::before {
    width: 80%;
    transition: width 0.6s ease-in-out 0.3s;
}

.rbexe-cta {
    --rbexe-btn-slant: 16px;
    position: relative;
    display: inline-block;
    padding: 14px 28px;
    background: var(--rbexe-text);
    color: var(--rbexe-bg);
    font-family: var(--rbexe-font-primary);
    font-size: calc(14px * var(--rbexe-font-scale));
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    clip-path: polygon(
        var(--rbexe-btn-slant) 0,
        100% 0,
        100% calc(100% - var(--rbexe-btn-slant)),
        calc(100% - var(--rbexe-btn-slant)) 100%,
        0 100%,
        0 var(--rbexe-btn-slant)
    );
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.4s ease 0.5s, opacity 0.4s ease 0.5s, background 0.2s;
}
.rbexe-cta:hover {
    filter: brightness(0.85);
}
.rbexe-cta-wrap.active .rbexe-cta {
    transform: translateY(0);
    opacity: 1;
}

/* ===== CHARACTER CARDS ===== */
.rbexe-cards {
    display: flex;
    align-items: flex-end;
    position: absolute;
    bottom: 30px;
    left: 40px;
    padding: 20px 0;
    z-index: 60;
    gap: 12px;
}

.rbexe-card {
    position: relative;
    width: 90px;
    height: 112px;
    opacity: 0;
    transform: translateY(20px);
}
.rbexe-card.rbexe-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.rbexe-card-button-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.2s ease;
}
.rbexe-card-button-wrapper:hover {
    transform: translateY(-10px);
}

/* Active indicator bar */
.rbexe-card-button-wrapper::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 70%;
    height: 4px;
    background-color: var(--rbexe-accent);
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.rbexe-card[data-active="true"] .rbexe-card-button-wrapper::after {
    transform: scaleX(1);
}

.rbexe-card-button {
    --rbexe-card-slant: 18px;
    position: relative;
    width: 100%;
    height: 100%;
    border: 1px solid var(--rbexe-accent);
    padding: 0;
    overflow: hidden;
    clip-path: polygon(
        0 0,
        calc(100% - var(--rbexe-card-slant)) 0,
        100% var(--rbexe-card-slant),
        100% 100%,
        0 100%
    );
    transition: filter 0.3s ease;
}
.rbexe-card[data-active="false"] .rbexe-card-button {
    filter: brightness(0.5) grayscale(0.3);
}
.rbexe-card[data-active="true"] .rbexe-card-button {
    filter: brightness(1);
}

/* Angled corner decoration on card — on wrapper so clip-path doesn't hide it */
.rbexe-card-button-wrapper::before {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: calc(var(--rbexe-card-slant, 18px) + 4px);
    height: calc(var(--rbexe-card-slant, 18px) + 4px);
    background: linear-gradient(to left bottom, var(--rbexe-accent) 50%, transparent 50.1%);
    z-index: 2;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.rbexe-card[data-active="true"] .rbexe-card-button-wrapper::before {
    opacity: 1;
}

/* Card label */
.rbexe-card-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-family: var(--rbexe-font-primary);
    font-size: calc(10px * var(--rbexe-font-scale));
    font-weight: 600;
    color: var(--rbexe-text);
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Card backgrounds - B&W */
.rbexe-card-btn-collection,
.rbexe-card-btn-clubmaster,
.rbexe-card-btn-round,
.rbexe-card-btn-wayfarer,
.rbexe-card-btn-aviator {
    background: #111;
}

/* Product image card thumbnails (Amazon Store) */
.rbexe-card-btn-notebook-bird {
    background: #111 url('images/notebook-bird.jpg') center center / cover no-repeat;
}

/* Beak panel — card thumbnails (portraits) */
.rbexe-card-btn-beak-maya {
    background: #111 url('images/Beak/01_Maya_headonly.png') center center / cover no-repeat;
}
.rbexe-card-btn-beak-front {
    background: #111 url('images/Beak/Beak_QuarterPortrait.png') center center / cover no-repeat;
}

/* BlackTrack panel — card thumbnails (portraits) */
.rbexe-card-btn-bt-zayla {
    background: #111 url('images/BlackTrack/zayla_closeup.png') center center / cover no-repeat;
}
.rbexe-card-btn-bt-friends {
    background: #111 url('images/BlackTrack/zaylaFriends_closeup.png') center center / cover no-repeat;
}

/* ===== CARD CAROUSEL (Amazon Store) ===== */
.rbexe-cards-carousel {
    display: flex;
    align-items: flex-end;
    position: absolute;
    bottom: 30px;
    left: 40px;
    z-index: 60;
    gap: 8px;
}
.rbexe-cards-carousel .rbexe-cards {
    position: relative;
    bottom: auto;
    left: auto;
    padding: 20px 0;
    max-width: calc(5 * 90px + 4 * 12px);
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.rbexe-cards-carousel .rbexe-cards::-webkit-scrollbar {
    display: none;
}
.rbexe-cards-carousel .rbexe-card {
    flex-shrink: 0;
}
.rbexe-carousel-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--rbexe-text);
    color: var(--rbexe-text);
    font-family: var(--rbexe-font-primary);
    font-size: 14px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    flex-shrink: 0;
    align-self: center;
}
.rbexe-carousel-arrow:hover {
    opacity: 1;
}
.rbexe-carousel-arrow:disabled {
    opacity: 0.15;
    cursor: default;
}

/* ===== VIDEO WIDGET ===== */
.rbexe-video-widget {
    position: absolute;
    top: 50%;
    right: 40px;
    width: 240px;
    z-index: 10;
    opacity: 0;
    transform: translateY(calc(-50% + 15px));
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.rbexe-video-widget.rbexe-visible {
    opacity: 1;
    transform: translateY(-50%);
}

.rbexe-video-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.rbexe-video-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    background: #111;
    border: 1px solid var(--rbexe-accent);
    clip-path: polygon(0 0, calc(100% - 25px) 0, 100% 25px, 100% 100%, 0 100%);
}
/* Diagonal corner decoration — on preview wrapper so clip-path doesn't hide it */
.rbexe-video-preview::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 29px;
    height: 29px;
    background: linear-gradient(to left bottom, var(--rbexe-accent) 50%, transparent 50.1%);
    z-index: 2;
    opacity: 0.4;
    pointer-events: none;
}

.rbexe-video-text {
    padding: 12px 0 0;
    text-align: right;
    font-size: calc(14px * var(--rbexe-font-scale));
    font-weight: 600;
    color: var(--rbexe-text);
}

/* Bounce video thumbnail */
.rbexe-video-thumb-bounce {
    background: #000 url('images/bounce-thumbnail.jpg') center center / cover no-repeat;
}

/* Video play icon overlay on clickable video widgets */
.rbexe-video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    pointer-events: none;
    transition: background 0.2s, transform 0.2s;
}
.rbexe-video-widget[data-yt] {
    cursor: pointer;
}
.rbexe-video-widget[data-yt]:hover .rbexe-video-play-icon {
    background: rgba(0, 229, 204, 0.8);
    transform: translate(-50%, -50%) scale(1.15);
}

/* ===== VIDEO OVERLAY ===== */
.rbexe-video-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.rbexe-video-overlay.is-active {
    pointer-events: auto;
    opacity: 1;
}
.rbexe-video-overlay-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}
.rbexe-video-overlay-content {
    position: relative;
    width: 80vw;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--rbexe-accent);
    transform: scale(0.3);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.rbexe-video-overlay.is-active .rbexe-video-overlay-content {
    transform: scale(1);
    opacity: 1;
}
.rbexe-video-overlay-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.rbexe-video-overlay-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--rbexe-accent);
    font-size: 32px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}
.rbexe-video-overlay-close:hover {
    color: #fff;
}

/* ===== KOREAN TICKER QUOTE ===== */
.rbexe-quote {
    position: absolute;
    right: 40px;
    bottom: 100px;
    width: 22%;
    min-width: 200px;
    max-width: 360px;
    font-family: var(--rbexe-font-primary);
    font-size: calc(18px * var(--rbexe-font-scale));
    font-weight: 200;
    line-height: 1.3;
    text-align: right;
    color: var(--rbexe-text-white);
    opacity: 0.4;
    z-index: 60;
    overflow: hidden;
    max-height: 130px;
}

/* ===== AUDIO / VOLUME WIDGET ===== */
.rbexe-audio-control-container {
    pointer-events: auto;
}
.rbexe-volume-group {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.rbexe-audio-widget {
    display: flex;
    align-items: flex-end;
}
.rbexe-audio-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 18px;
}
.rbexe-audio-bar {
    display: block;
    width: 3px;
    background: var(--rbexe-accent);
    transition: height 0.2s ease;
}
.rbexe-audio-bar:nth-child(1) { height: 6px; }
.rbexe-audio-bar:nth-child(2) { height: 14px; }
.rbexe-audio-bar:nth-child(3) { height: 10px; }
.rbexe-audio-bar:nth-child(4) { height: 18px; }
.rbexe-audio-bar:nth-child(5) { height: 8px; }

/* Animated equalizer when not muted */
.rbexe-audio-widget:not(.is-muted) .rbexe-audio-bar {
    animation: rbexe-eq-bounce 0.6s ease-in-out infinite alternate;
}
.rbexe-audio-widget:not(.is-muted) .rbexe-audio-bar:nth-child(1) { animation-delay: 0s; }
.rbexe-audio-widget:not(.is-muted) .rbexe-audio-bar:nth-child(2) { animation-delay: 0.1s; }
.rbexe-audio-widget:not(.is-muted) .rbexe-audio-bar:nth-child(3) { animation-delay: 0.2s; }
.rbexe-audio-widget:not(.is-muted) .rbexe-audio-bar:nth-child(4) { animation-delay: 0.05s; }
.rbexe-audio-widget:not(.is-muted) .rbexe-audio-bar:nth-child(5) { animation-delay: 0.15s; }

/* Muted state: bars go flat */
.rbexe-audio-widget.is-muted .rbexe-audio-bar {
    height: 3px !important;
}
/* Paused state: stop animation but keep bar heights */
.rbexe-audio-widget.is-paused .rbexe-audio-bar {
    animation: none !important;
}

/* ===== SONG CONTROLS ===== */
.rbexe-song-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rbexe-song-btn {
    background: none;
    border: none;
    color: var(--rbexe-accent);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.rbexe-song-btn:hover {
    opacity: 1;
}
.rbexe-song-name {
    color: var(--rbexe-accent);
    font-family: var(--rbexe-font-primary);
    font-size: calc(11.7px * var(--rbexe-font-scale));
    font-weight: 400;
    letter-spacing: 0.5px;
    white-space: nowrap;
    max-width: 169px;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}
.rbexe-song-prev,
.rbexe-song-next {
    letter-spacing: -4px;
}
.rbexe-song-playpause {
    letter-spacing: -2px;
}
.rbexe-song-shuffle {
    font-size: 12px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.rbexe-song-shuffle.is-active {
    opacity: 1;
}

/* ===== DOT CONTROLS (Exact Replica from standalone-projects/dot-controls) ===== */
.rbexe-dotctrl-container {
    --rbexe-dotctrl-control-width: 24px;
    --rbexe-dotctrl-control-height: 55px;
    --rbexe-dotctrl-dot-bg-color: #333;
    --rbexe-dotctrl-dot-fg-color: #00e5cc;
    position: absolute;
    top: 32px;
    right: 110px;
    z-index: 15;
    display: flex;
    gap: 6px;
    align-items: flex-end;
}

.rbexe-dotctrl-control-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rbexe-dotctrl-dot-control {
    position: relative;
    width: var(--rbexe-dotctrl-control-width);
    height: var(--rbexe-dotctrl-control-height);
    cursor: pointer;
}

.rbexe-dotctrl-dot-control canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.rbexe-dotctrl-control-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
    color: var(--rbexe-text);
    font-family: var(--rbexe-font-primary);
    font-size: calc(8px * var(--rbexe-font-scale));
    font-weight: 300;
    transition: color 0.5s ease;
}

.rbexe-dotctrl-control-value {
    margin-top: 0.05rem;
    color: var(--rbexe-text);
    font-family: var(--rbexe-font-primary);
    font-size: calc(8px * var(--rbexe-font-scale));
    font-weight: 600;
    transition: color 0.5s ease;
}

/* ===== NAVIGATION MENU ===== */
.rbexe-nav-menu {
    position: absolute;
    top: 0; right: 0;
    z-index: 200;
}

/* Hamburger button */
.rbexe-nav-button-wrap {
    position: absolute;
    top: 40px;
    right: 55px;
    width: 45px;
    height: 45px;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rbexe-nav-button {
    position: relative;
    width: 30px;
    height: 2px;
    background: var(--rbexe-accent);
    transition: background 0.1s 0.3s;
}
.rbexe-nav-button::before,
.rbexe-nav-button::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--rbexe-accent);
}
.rbexe-nav-button::before {
    bottom: 8px;
    transition: bottom 0.3s cubic-bezier(.23,1,.32,1) 0.3s,
                transform 0.3s cubic-bezier(.23,1,.32,1);
}
.rbexe-nav-button::after {
    top: 8px;
    transition: top 0.3s cubic-bezier(.23,1,.32,1) 0.3s,
                transform 0.3s cubic-bezier(.23,1,.32,1);
}

/* Hamburger to X animation */
.rbexe-nav-button.rbexe-animate {
    background: transparent;
    transition: background 0.1s 0s;
}
.rbexe-nav-button.rbexe-animate::before {
    bottom: 0;
    transform: rotate(-45deg);
    transition: bottom 0.3s cubic-bezier(.23,1,.32,1),
                transform 0.3s cubic-bezier(.23,1,.32,1) 0.3s;
}
.rbexe-nav-button.rbexe-animate::after {
    top: 0;
    transform: rotate(45deg);
    transition: top 0.3s cubic-bezier(.23,1,.32,1),
                transform 0.3s cubic-bezier(.23,1,.32,1) 0.3s;
}

/* Slide-down nav panel */
.rbexe-nav-list {
    position: absolute;
    top: var(--rbexe-frame-padding);
    right: var(--rbexe-frame-padding);
    transform: translateY(-120%);
    transition: transform 0.4s ease-in-out;
    z-index: 200;
}
.rbexe-nav-list.rbexe-open {
    transform: translateY(0);
}

.rbexe-nav-list-wrap {
    position: relative;
    width: 380px;
    background: var(--rbexe-bg);
    padding: 60px 40px 30px;
    border: none;
    border-left: 1px solid var(--rbexe-accent);
    border-bottom: 1px solid var(--rbexe-accent);
    /* Angled top-left corner */
    clip-path: polygon(28px 0, 100% 0, 100% 100%, 0 100%, 0 28px);
}
/* Diagonal line at angled corner */
.rbexe-nav-list-wrap::after {
    display: none;
}

.rbexe-nav-item {
    margin-bottom: 12px;
}

.rbexe-nav-divider {
    height: 5px;
    margin: 16px 0;
    border-top: 1px solid var(--rbexe-accent);
    border-bottom: 1px solid var(--rbexe-accent);
    opacity: 0.5;
}

.rbexe-nav-link {
    position: relative;
    display: inline-block;
    font-size: calc(22px * var(--rbexe-font-scale));
    font-weight: 600;
    line-height: 1.3;
    color: var(--rbexe-text);
    transition: color 0.2s;
}
.rbexe-nav-link:hover .rbexe-nav-link-text::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 22px;
    margin-left: 4px;
    background: var(--rbexe-text);
    vertical-align: text-bottom;
    animation: rbexe-cursor-blink 0.8s step-end infinite;
}

.rbexe-nav-deco {
    margin-top: 30px;
}
.rbexe-nav-deco-svg {
    width: 220px;
    height: 90px;
    opacity: 0.6;
}

/* ===== LOADING SCREEN ===== */
#rbexe-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rbexe-bg);
    z-index: 9999;
    transition: opacity 0.5s ease;
}
#rbexe-loader.rbexe-hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.rbexe-loader-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 90%;
    max-width: 500px;
}

.rbexe-loader-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
}
.rbexe-loader-copy {
    font-size: calc(14px * var(--rbexe-font-scale));
    font-weight: 300;
    color: var(--rbexe-text);
    letter-spacing: 1px;
}
.rbexe-loader-percentage {
    font-size: calc(14px * var(--rbexe-font-scale));
    font-weight: 600;
    color: var(--rbexe-text);
    font-variant-numeric: tabular-nums;
}

.rbexe-loader-progress-wrap {
    width: 100%;
}
.rbexe-loader-progress-bar {
    display: flex;
    gap: 3px;
    width: 100%;
    padding: 4px;
    border: none;
    animation: rbexe-blinkBarContainer 2s step-end infinite;
}
.rbexe-loader-bar {
    flex: 1;
    height: 12px;
    background: transparent;
    transition: background 0.1s;
}
.rbexe-loader-bar.rbexe-filled {
    background: var(--rbexe-text);
    animation: rbexe-blinkBar 0.3s step-end 1;
}

/* ===== CUSTOM CURSOR ===== */
.rbexe-custom-cursor {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: difference;
}

.rbexe-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--rbexe-text);
    border-radius: 50%;
    margin-left: -3px;
    margin-top: -3px;
    pointer-events: none;
    will-change: transform;
    z-index: 99999;
}

.rbexe-cursor-outline {
    position: fixed;
    width: 30px;
    height: 15px;
    margin-left: -15px;
    margin-top: -22px;
    pointer-events: none;
    will-change: transform;
    z-index: 99998;
    transition: width 0.3s, height 0.3s, margin 0.3s;
}
/* Top corners */
.rbexe-cursor-outline::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 8px; height: 8px;
    border-top: 1px solid var(--rbexe-text);
    border-left: 1px solid var(--rbexe-text);
}
.rbexe-cursor-outline::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 8px; height: 8px;
    border-top: 1px solid var(--rbexe-text);
    border-right: 1px solid var(--rbexe-text);
}

/* Bottom corners */
.rbexe-cursor-outline-bottom {
    margin-top: 8px;
}
.rbexe-cursor-outline-bottom::before {
    top: auto; bottom: 0;
    border-top: none;
    border-bottom: 1px solid var(--rbexe-text);
    border-left: 1px solid var(--rbexe-text);
}
.rbexe-cursor-outline-bottom::after {
    top: auto; bottom: 0;
    border-top: none;
    border-bottom: 1px solid var(--rbexe-text);
    border-right: 1px solid var(--rbexe-text);
}

/* Hover expansion */
.rbexe-cursor-outline.rbexe-hover {
    width: 45px;
    height: 22px;
    margin-left: -22px;
    margin-top: -30px;
}
.rbexe-cursor-outline.rbexe-hover::before,
.rbexe-cursor-outline.rbexe-hover::after {
    width: 12px;
    height: 12px;
}
.rbexe-cursor-outline-bottom.rbexe-hover {
    margin-top: 12px;
}

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes rbexe-blinkBarContainer {
    0%    { border-color: #fff; }
    12.5% { border-color: rgba(255,255,255,0.2); }
    25%   { border-color: #fff; }
    37.5% { border-color: rgba(255,255,255,0.2); }
    50%   { border-color: #fff; }
    62.5% { border-color: rgba(255,255,255,0.2); }
    75%   { border-color: #fff; }
    87.5% { border-color: rgba(255,255,255,0.2); }
    100%  { border-color: #fff; }
}

@keyframes rbexe-blinkBar {
    0%  { opacity: 0; }
    30% { opacity: 1; }
    50% { opacity: 0.3; }
    70% { opacity: 1; }
    100%{ opacity: 1; }
}

@keyframes rbexe-cursor-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes rbexe-cardBlink {
    0%   { opacity: 0; }
    10%  { opacity: 1; }
    20%  { opacity: 0; }
    30%  { opacity: 1; }
    40%  { opacity: 0; }
    50%  { opacity: 1; }
    100% { opacity: 1; }
}

@keyframes rbexe-eq-bounce {
    0%   { height: 4px; }
    100% { height: 18px; }
}

@keyframes rbexe-blink-in {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    30%  { opacity: 0; }
    45%  { opacity: 1; }
    60%  { opacity: 0.3; }
    75%  { opacity: 1; }
    100% { opacity: 1; }
}

/* ===== UTILITY CLASSES ===== */
.rbexe-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
.rbexe-hidden {
    display: none !important;
}

/* ===== HUD OVERLAY (persists across all sections) ===== */
.rbexe-hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}
.rbexe-hud-overlay .rbexe-dotctrl-container {
    pointer-events: auto;
}

.rbexe-frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ===== HORIZONTAL SCROLL CONTAINER ===== */
.rbexe-scroll-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.rbexe-scroll-container::-webkit-scrollbar {
    display: none;
}

/* ===== PANEL (each horizontal section) ===== */
.rbexe-panel {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    overflow: hidden;
}


/* ===== NAV TITLE ===== */
.rbexe-nav-title {
    font-family: var(--rbexe-font-heading);
    font-size: calc(12px * var(--rbexe-font-scale));
    font-weight: 800;
    color: var(--rbexe-text);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0.5;
}
.rbexe-nav-title--prominent {
    font-size: calc(28px * var(--rbexe-font-scale));
    letter-spacing: 4px;
    opacity: 1;
    margin-bottom: 4px;
}
.rbexe-nav-subtitle {
    font-family: var(--rbexe-font-primary);
    font-size: calc(11px * var(--rbexe-font-scale));
    font-weight: 300;
    color: var(--rbexe-text);
    opacity: 0.5;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

/* ===== SECTION INDICATOR ===== */
.rbexe-section-indicator {
    display: none;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
    z-index: 100;
    pointer-events: auto;
}
.rbexe-section-dot {
    width: 24px;
    height: 3px;
    background: var(--rbexe-text);
    opacity: 0.2;
    transition: opacity 0.3s ease;
    clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
    cursor: none;
}
.rbexe-section-dot.active {
    opacity: 1;
}

/* Active nav link indicator — turquoise highlight */
.rbexe-nav-link--active {
    opacity: 1;
    color: var(--rbexe-accent);
}
.rbexe-nav-link--active .rbexe-nav-link-text::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--rbexe-accent);
    margin-right: 8px;
    vertical-align: middle;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .rbexe-info {
        top: 50%;
        left: 20px;
        transform: translateY(-50%);
        width: 60%;
        min-width: unset;
    }
    .rbexe-title {
        font-size: calc(68px * var(--rbexe-font-scale));
    }
    .rbexe-description {
        font-size: calc(13px * var(--rbexe-font-scale));
    }
    .rbexe-cta-wrap {
        position: relative;
        top: auto;
    }
    .rbexe-cards {
        left: 20px;
        bottom: 20px;
        gap: 8px;
    }
    .rbexe-card {
        width: 60px;
        height: 75px;
    }
    .rbexe-cards-carousel {
        left: 20px;
        bottom: 20px;
    }
    .rbexe-cards-carousel .rbexe-cards {
        max-width: calc(4 * 60px + 3 * 8px);
    }
    .rbexe-carousel-arrow {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    .rbexe-video-widget {
        display: none;
    }
    .rbexe-quote {
        display: none;
    }
    .rbexe-nav-button-wrap {
        top: 30px;
        right: 35px;
    }
    .rbexe-nav-list-wrap {
        width: 280px;
    }
    .rbexe-nav-link {
        font-size: calc(18px * var(--rbexe-font-scale));
    }

    .rbexe-nav-deco-svg {
        width: 200px;
    }
    .rbexe-logo {
        left: 10px;
    }
    .rbexe-logo svg {
        width: 130px;
    }
    /* Product image: smaller and repositioned on mobile */
    .rbexe-char-notebook-bird {
        background-size: auto 38%;
        background-position: 75% 50%;
    }
    /* Disable chromatic aberration on mobile (no mouse = no tilt) */
    .rbexe-char-notebook-bird::before,
    .rbexe-char-notebook-bird::after {
        display: none;
    }
    /* Disable 3D perspective on mobile */
    .rbexe-content {
        perspective: none;
    }
    .rbexe-char-image {
        transform-style: flat;
        will-change: auto;
    }
    /* Compact dot controls on mobile — positioned left of hamburger */
    .rbexe-dotctrl-container {
        --rbexe-dotctrl-control-width: 18px;
        --rbexe-dotctrl-control-height: 36px;
        top: 30px;
        right: 85px;
        gap: 4px;
    }
    .rbexe-dotctrl-control-label,
    .rbexe-dotctrl-control-value {
        font-size: 7px;
    }
    /* Audio widget — compact on mobile */
    .rbexe-volume-group {
        gap: 2px;
    }
    .rbexe-audio-bars {
        height: 10px;
    }
    .rbexe-song-controls {
        gap: 4px;
    }
    .rbexe-song-btn {
        font-size: 10px;
    }
    .rbexe-song-name {
        font-size: 9px;
        max-width: 91px;
    }
    /* Disable custom cursor on mobile/touch */
    .rbexe-custom-cursor {
        display: none;
    }
    body, html {
        cursor: auto;
    }
    a, button { cursor: pointer; }
}

/* =============================================================
   BEAK PANEL — Image Carousel Integration
   Exact replica of standalone-projects/image-carousel/
   with beak-carousel- prefix. Only names differ from original.
   ============================================================= */

/* Hide legacy panel elements — kept in DOM for JS compatibility */
.beak-carousel-hidden { display: none !important; }

/* Carousel fills the full panel content area */
.beak-carousel-main {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    z-index: 2;
}

/* Character thumbnail portraits — shown when slide is in thumbnail position */
.beak-carousel-char-maya {
    background: #000 url('images/Beak/01_Maya_headonly.png') center center / cover no-repeat;
}
.beak-carousel-char-beak {
    background: #000 url('images/Beak/Beak_QuarterPortrait.png') center center / cover no-repeat;
}

/* Background scene — fills the slide, hidden unless in fullscreen slot */
.beak-carousel-bg {
    position: absolute;
    inset: -10px; /* compensates for blur edge bleeding */
    background-size: cover;
    background-position: center;
    z-index: 0;
    display: none;
    filter: blur(6px);
}

/* Foreground character PNG — over the bg, receives mouse tilt */
.beak-carousel-fg {
    position: absolute;
    inset: 0;
    background-size: auto 120%;
    background-position: 66% -50%;
    background-repeat: no-repeat;
    z-index: 1;
    will-change: transform;
    transform-origin: center center;
    display: none;
}

/* Show bg/fg only when the slide is in a fullscreen position */
.beak-carousel-item:nth-child(1) .beak-carousel-bg,
.beak-carousel-item:nth-child(1) .beak-carousel-fg,
.beak-carousel-item:nth-child(2) .beak-carousel-bg,
.beak-carousel-item:nth-child(2) .beak-carousel-fg {
    display: block;
}

/* Per-character image URLs */
.beak-carousel-char-maya .beak-carousel-bg { background-image: url('images/Beak/Maya_background.png'); }
.beak-carousel-char-maya .beak-carousel-fg { background-image: url('images/Beak/01_Maya_fullBody.png'); }
.beak-carousel-char-beak .beak-carousel-bg { background-image: url('images/Beak/Beak_Background.png'); }
.beak-carousel-char-beak .beak-carousel-fg { background-image: url('images/Beak/01_Beak_front_View.png'); }

/* Each slide card */
.beak-carousel-item {
    width: 100px;
    height: 150px;
    list-style-type: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    background-position: center;
    background-size: cover;
    border-radius: 20px;
    box-shadow: 0 20px 30px rgba(255,255,255,0.3) inset;
    transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s;

    &:nth-child(1), &:nth-child(2) {
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        transform: none;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        background: none; /* inner bg/fg divs provide the image in fullscreen */
    }
    /* Thumbnails: bottom-left strip — [prev 52px] [10px gap] [thumb] [10px] [thumb] [10px] [next] */
    &:nth-child(3) { left: 92px;  top: calc(100% - 180px); transform: none; }
    &:nth-child(4) { left: 202px; top: calc(100% - 180px); transform: none; }
    &:nth-child(5) { left: 312px; top: calc(100% - 180px); transform: none; opacity: 0; }
    &:nth-child(6) { left: 422px; top: calc(100% - 180px); transform: none; opacity: 0; }
}

/* Text content overlay on the active slide */
.beak-carousel-content {
    position: absolute;
    top: calc(80px + 10%);
    left: 3rem;
    right: 10%;
    z-index: 2;
    color: var(--rbexe-text);
    text-shadow: 0 3px 8px rgba(0,0,0,0.5);
    opacity: 0;
    display: none;

    & .beak-carousel-title {
        position: relative;
        z-index: 1;
        font-family: var(--rbexe-font-heading);
        font-size: calc(clamp(110px, 13vw, 180px) * var(--rbexe-font-scale));
        font-weight: 800;
        line-height: 1;
        letter-spacing: -2px;
        text-transform: uppercase;
        margin-bottom: 40px;
        will-change: transform;
        white-space: nowrap;
    }
    & .beak-carousel-desc {
        position: relative;
        z-index: 2;
        font-family: var(--rbexe-font-primary);
        font-size: calc(16px * var(--rbexe-font-scale));
        font-weight: 300;
        line-height: 1.2;
        padding: 12px 14px;
        border: 1px solid var(--rbexe-text);
        background: var(--rbexe-bg);
        margin: 0 0 2.5rem;
        will-change: transform;
    }
    & button {
        position: relative;
        z-index: 3;
        display: block;
        margin-left: auto;
        width: fit-content;
        font-family: var(--rbexe-font-primary);
        font-size: calc(14px * var(--rbexe-font-scale));
        font-weight: 600;
        background-color: var(--rbexe-text);
        color: var(--rbexe-bg);
        border: none;
        padding: 14px 28px;
        cursor: pointer;
        will-change: transform;
    }
}

/* Animate in the content on the active (2nd) slide */
.beak-carousel-item:nth-of-type(2) .beak-carousel-content {
    display: block;
    animation: beak-carousel-show 0.75s ease-in-out 0.3s forwards;
}

@keyframes beak-carousel-show {
    0%   { filter: blur(5px); transform: translateY(75px); }
    100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

/* Prev / Next navigation buttons — flanking the thumbnail strip */
.beak-carousel-nav {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    -webkit-user-select: none;
    user-select: none;

    & .beak-carousel-btn {
        position: absolute;
        bottom: 79px; /* vertically centred with 150px thumb: 30 + 75 − 26 */
        pointer-events: all;
        background-color: rgba(255,255,255,0.5);
        color: rgba(0,0,0,0.7);
        border: 2px solid rgba(0,0,0,0.6);
        padding: 0.75rem;
        border-radius: 50%;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;

        &:hover { background-color: rgba(255,255,255,0.3); }
    }

    /* Prev: left of first thumbnail; Next: right of last thumbnail */
    /* Layout: [prev 52px] [10px] [100px thumb] [10px] [100px thumb] [10px] [next] */
    & .beak-carousel-prev { left: 30px; }
    & .beak-carousel-next { left: 312px; }
}

/* Responsive: medium screens (650px–900px) */
/* Thumbnails: 80×135px — [prev 52px] [10px] [80px] [10px] [80px] [10px] [next] */
@media (width > 650px) and (width < 900px) {
    .beak-carousel-content {
        & .beak-carousel-title { font-size: calc(2rem * var(--rbexe-font-scale)); }
        & .beak-carousel-desc  { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
        & button               { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
    }
    .beak-carousel-item {
        width: 80px;
        height: 135px;
        &:nth-child(3) { left: 92px;  top: calc(100% - 165px); transform: none; }
        &:nth-child(4) { left: 182px; top: calc(100% - 165px); transform: none; }
        &:nth-child(5) { left: 272px; top: calc(100% - 165px); transform: none; opacity: 0; }
        &:nth-child(6) { left: 362px; top: calc(100% - 165px); transform: none; opacity: 0; }
    }
    .beak-carousel-nav {
        /* centred with 135px thumb: 30 + 67 − 26 = 71px */
        & .beak-carousel-btn  { bottom: 71px; }
        & .beak-carousel-next { left: 272px; }
    }
}

/* Responsive: small screens (< 650px) */
/* Thumbnails: 65×110px — [prev 52px] [8px] [65px] [8px] [65px] [8px] [next] */
@media (width < 650px) {
    .beak-carousel-content {
        & .beak-carousel-title { font-size: calc(1.5rem * var(--rbexe-font-scale)); }
        & .beak-carousel-desc  { font-size: calc(0.65rem * var(--rbexe-font-scale)); }
        & button               { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
    }
    .beak-carousel-item {
        width: 65px;
        height: 110px;
        &:nth-child(3) { left: 80px;  top: calc(100% - 130px); transform: none; }
        &:nth-child(4) { left: 153px; top: calc(100% - 130px); transform: none; }
        &:nth-child(5) { left: 226px; top: calc(100% - 130px); transform: none; opacity: 0; }
        &:nth-child(6) { left: 299px; top: calc(100% - 130px); transform: none; opacity: 0; }
    }
    .beak-carousel-nav {
        /* centred with 110px thumb: 20 + 55 − 26 = 49px */
        & .beak-carousel-btn  { bottom: 49px; }
        & .beak-carousel-prev { left: 20px; }
        & .beak-carousel-next { left: 226px; }
    }
}

/* =============================================================
   BLACKTRACK PANEL — Image Carousel Integration
   Exact replica of beak carousel template. Only names differ.
   bt-carousel- prefix.
   ============================================================= */

.bt-carousel-hidden { display: none !important; }

.bt-carousel-main {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    z-index: 2;
}

.bt-carousel-char-zayla {
    background: #000 url('images/BlackTrack/zayla_closeup.png') center center / cover no-repeat;
}
.bt-carousel-char-friends {
    background: #000 url('images/BlackTrack/zaylaFriends_closeup.png') center center / cover no-repeat;
}

.bt-carousel-bg {
    position: absolute;
    inset: -10px;
    background-size: cover;
    background-position: center;
    z-index: 0;
    display: none;
    filter: blur(6px);
}

.bt-carousel-fg {
    position: absolute;
    inset: 0;
    background-size: auto 120%;
    background-position: 66% -50%;
    background-repeat: no-repeat;
    z-index: 1;
    will-change: transform;
    transform-origin: center center;
    display: none;
}

.bt-carousel-item:nth-child(1) .bt-carousel-bg,
.bt-carousel-item:nth-child(1) .bt-carousel-fg,
.bt-carousel-item:nth-child(2) .bt-carousel-bg,
.bt-carousel-item:nth-child(2) .bt-carousel-fg {
    display: block;
}

.bt-carousel-char-zayla   .bt-carousel-bg { background-image: url('images/BlackTrack/zaylas_Fullshot.png'); }
.bt-carousel-char-zayla   .bt-carousel-fg { background-image: url('images/BlackTrack/zaylas_Fullshot.png'); }
.bt-carousel-char-friends .bt-carousel-bg { background-image: url('images/BlackTrack/zaylasFriends_Fullshot.png'); }
.bt-carousel-char-friends .bt-carousel-fg { background-image: url('images/BlackTrack/zaylasFriends_Fullshot.png'); }

.bt-carousel-item {
    width: 100px;
    height: 150px;
    list-style-type: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    background-position: center;
    background-size: cover;
    border-radius: 20px;
    box-shadow: 0 20px 30px rgba(255,255,255,0.3) inset;
    transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s;

    &:nth-child(1), &:nth-child(2) {
        left: 0; top: 0; width: 100%; height: 100%;
        transform: none; border-radius: 0; box-shadow: none; opacity: 1;
        background: none;
    }
    &:nth-child(3) { left: 92px;  top: calc(100% - 180px); transform: none; }
    &:nth-child(4) { left: 202px; top: calc(100% - 180px); transform: none; }
    &:nth-child(5) { left: 312px; top: calc(100% - 180px); transform: none; opacity: 0; }
    &:nth-child(6) { left: 422px; top: calc(100% - 180px); transform: none; opacity: 0; }
}

.bt-carousel-content {
    position: absolute;
    top: calc(80px + 10%);
    left: 3rem;
    right: 10%;
    z-index: 2;
    color: var(--rbexe-text);
    text-shadow: 0 3px 8px rgba(0,0,0,0.5);
    opacity: 0;
    display: none;

    & .bt-carousel-title {
        position: relative; z-index: 1;
        font-family: var(--rbexe-font-heading);
        font-size: calc(clamp(110px, 13vw, 180px) * var(--rbexe-font-scale));
        font-weight: 800; line-height: 1; letter-spacing: -2px;
        text-transform: uppercase; margin-bottom: 40px; will-change: transform;
        white-space: nowrap;
    }
    & .bt-carousel-desc {
        position: relative; z-index: 2;
        font-family: var(--rbexe-font-primary);
        font-size: calc(16px * var(--rbexe-font-scale));
        font-weight: 300; line-height: 1.2; padding: 12px 14px;
        border: 1px solid var(--rbexe-text); background: var(--rbexe-bg);
        margin: 0 0 2.5rem; will-change: transform;
    }
    & button {
        position: relative; z-index: 3; display: block; margin-left: auto; width: fit-content;
        font-family: var(--rbexe-font-primary);
        font-size: calc(14px * var(--rbexe-font-scale)); font-weight: 600;
        background-color: var(--rbexe-text); color: var(--rbexe-bg);
        border: none; padding: 14px 28px; cursor: pointer; will-change: transform;
    }
}

.bt-carousel-item:nth-of-type(2) .bt-carousel-content {
    display: block;
    animation: bt-carousel-show 0.75s ease-in-out 0.3s forwards;
}

@keyframes bt-carousel-show {
    0%   { filter: blur(5px); transform: translateY(75px); }
    100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.bt-carousel-nav {
    position: absolute; inset: 0; pointer-events: none; z-index: 5;
    -webkit-user-select: none; user-select: none;

    & .bt-carousel-btn {
        position: absolute; bottom: 79px; pointer-events: all;
        background-color: rgba(255,255,255,0.5); color: rgba(0,0,0,0.7);
        border: 2px solid rgba(0,0,0,0.6); padding: 0.75rem; border-radius: 50%;
        cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
        &:hover { background-color: rgba(255,255,255,0.3); }
    }
    & .bt-carousel-prev { left: 30px; }
    & .bt-carousel-next { left: 312px; }
}

@media (width > 650px) and (width < 900px) {
    .bt-carousel-content {
        & .bt-carousel-title { font-size: calc(2rem * var(--rbexe-font-scale)); }
        & .bt-carousel-desc  { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
        & button             { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
    }
    .bt-carousel-item {
        width: 80px; height: 135px;
        &:nth-child(3) { left: 92px;  top: calc(100% - 165px); transform: none; }
        &:nth-child(4) { left: 182px; top: calc(100% - 165px); transform: none; }
        &:nth-child(5) { left: 272px; top: calc(100% - 165px); transform: none; opacity: 0; }
        &:nth-child(6) { left: 362px; top: calc(100% - 165px); transform: none; opacity: 0; }
    }
    .bt-carousel-nav {
        & .bt-carousel-btn  { bottom: 71px; }
        & .bt-carousel-next { left: 272px; }
    }
}

@media (width < 650px) {
    .bt-carousel-content {
        & .bt-carousel-title { font-size: calc(1.5rem * var(--rbexe-font-scale)); }
        & .bt-carousel-desc  { font-size: calc(0.65rem * var(--rbexe-font-scale)); }
        & button             { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
    }
    .bt-carousel-item {
        width: 65px; height: 110px;
        &:nth-child(3) { left: 80px;  top: calc(100% - 130px); transform: none; }
        &:nth-child(4) { left: 153px; top: calc(100% - 130px); transform: none; }
        &:nth-child(5) { left: 226px; top: calc(100% - 130px); transform: none; opacity: 0; }
        &:nth-child(6) { left: 299px; top: calc(100% - 130px); transform: none; opacity: 0; }
    }
    .bt-carousel-nav {
        & .bt-carousel-btn  { bottom: 49px; }
        & .bt-carousel-prev { left: 20px; }
        & .bt-carousel-next { left: 226px; }
    }
}

/* =============================================================
   BOUNCE PANEL — Image Carousel Integration
   Exact replica of beak carousel template. Only names differ.
   bounce-carousel- prefix.
   Add images to images/Bounce/ and update URLs below.
   ============================================================= */

.bounce-carousel-hidden { display: none !important; }

.bounce-carousel-main {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    z-index: 2;
}

/* TODO: replace placeholder paths with actual character thumbnail images */
.bounce-carousel-char-a {
    background: #111 url('images/Bounce/char_a_thumb.png') center center / cover no-repeat;
}
.bounce-carousel-char-b {
    background: #111 url('images/Bounce/char_b_thumb.png') center center / cover no-repeat;
}

.bounce-carousel-bg {
    position: absolute;
    inset: -10px;
    background-size: cover;
    background-position: center;
    z-index: 0;
    display: none;
    filter: blur(6px);
}

.bounce-carousel-fg {
    position: absolute;
    inset: 0;
    background-size: auto 120%;
    background-position: 66% -50%;
    background-repeat: no-repeat;
    z-index: 1;
    will-change: transform;
    transform-origin: center center;
    display: none;
}

.bounce-carousel-item:nth-child(1) .bounce-carousel-bg,
.bounce-carousel-item:nth-child(1) .bounce-carousel-fg,
.bounce-carousel-item:nth-child(2) .bounce-carousel-bg,
.bounce-carousel-item:nth-child(2) .bounce-carousel-fg {
    display: block;
}

/* TODO: replace placeholder paths with actual bg + fg images */
.bounce-carousel-char-a .bounce-carousel-bg { background-image: url('images/Bounce/char_a_bg.png'); }
.bounce-carousel-char-a .bounce-carousel-fg { background-image: url('images/Bounce/char_a_fg.png'); }
.bounce-carousel-char-b .bounce-carousel-bg { background-image: url('images/Bounce/char_b_bg.png'); }
.bounce-carousel-char-b .bounce-carousel-fg { background-image: url('images/Bounce/char_b_fg.png'); }

.bounce-carousel-item {
    width: 100px;
    height: 150px;
    list-style-type: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    background-position: center;
    background-size: cover;
    border-radius: 20px;
    box-shadow: 0 20px 30px rgba(255,255,255,0.3) inset;
    transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s;

    &:nth-child(1), &:nth-child(2) {
        left: 0; top: 0; width: 100%; height: 100%;
        transform: none; border-radius: 0; box-shadow: none; opacity: 1;
        background: none;
    }
    &:nth-child(3) { left: 92px;  top: calc(100% - 180px); transform: none; }
    &:nth-child(4) { left: 202px; top: calc(100% - 180px); transform: none; }
    &:nth-child(5) { left: 312px; top: calc(100% - 180px); transform: none; opacity: 0; }
    &:nth-child(6) { left: 422px; top: calc(100% - 180px); transform: none; opacity: 0; }
}

.bounce-carousel-content {
    position: absolute;
    top: calc(80px + 10%);
    left: 3rem;
    right: 10%;
    z-index: 2;
    color: var(--rbexe-text);
    text-shadow: 0 3px 8px rgba(0,0,0,0.5);
    opacity: 0;
    display: none;

    & .bounce-carousel-title {
        position: relative; z-index: 1;
        font-family: var(--rbexe-font-heading);
        font-size: calc(clamp(110px, 13vw, 180px) * var(--rbexe-font-scale));
        font-weight: 800; line-height: 1; letter-spacing: -2px;
        text-transform: uppercase; margin-bottom: 40px; will-change: transform;
        white-space: nowrap;
    }
    & .bounce-carousel-desc {
        position: relative; z-index: 2;
        font-family: var(--rbexe-font-primary);
        font-size: calc(16px * var(--rbexe-font-scale));
        font-weight: 300; line-height: 1.2; padding: 12px 14px;
        border: 1px solid var(--rbexe-text); background: var(--rbexe-bg);
        margin: 0 0 2.5rem; will-change: transform;
    }
    & button {
        position: relative; z-index: 3; display: block; margin-left: auto; width: fit-content;
        font-family: var(--rbexe-font-primary);
        font-size: calc(14px * var(--rbexe-font-scale)); font-weight: 600;
        background-color: var(--rbexe-text); color: var(--rbexe-bg);
        border: none; padding: 14px 28px; cursor: pointer; will-change: transform;
    }
}

.bounce-carousel-item:nth-of-type(2) .bounce-carousel-content {
    display: block;
    animation: bounce-carousel-show 0.75s ease-in-out 0.3s forwards;
}

@keyframes bounce-carousel-show {
    0%   { filter: blur(5px); transform: translateY(75px); }
    100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.bounce-carousel-nav {
    position: absolute; inset: 0; pointer-events: none; z-index: 5;
    -webkit-user-select: none; user-select: none;

    & .bounce-carousel-btn {
        position: absolute; bottom: 79px; pointer-events: all;
        background-color: rgba(255,255,255,0.5); color: rgba(0,0,0,0.7);
        border: 2px solid rgba(0,0,0,0.6); padding: 0.75rem; border-radius: 50%;
        cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
        &:hover { background-color: rgba(255,255,255,0.3); }
    }
    & .bounce-carousel-prev { left: 30px; }
    & .bounce-carousel-next { left: 312px; }
}

@media (width > 650px) and (width < 900px) {
    .bounce-carousel-content {
        & .bounce-carousel-title { font-size: calc(2rem * var(--rbexe-font-scale)); }
        & .bounce-carousel-desc  { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
        & button                 { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
    }
    .bounce-carousel-item {
        width: 80px; height: 135px;
        &:nth-child(3) { left: 92px;  top: calc(100% - 165px); transform: none; }
        &:nth-child(4) { left: 182px; top: calc(100% - 165px); transform: none; }
        &:nth-child(5) { left: 272px; top: calc(100% - 165px); transform: none; opacity: 0; }
        &:nth-child(6) { left: 362px; top: calc(100% - 165px); transform: none; opacity: 0; }
    }
    .bounce-carousel-nav {
        & .bounce-carousel-btn  { bottom: 71px; }
        & .bounce-carousel-next { left: 272px; }
    }
}

@media (width < 650px) {
    .bounce-carousel-content {
        & .bounce-carousel-title { font-size: calc(1.5rem * var(--rbexe-font-scale)); }
        & .bounce-carousel-desc  { font-size: calc(0.65rem * var(--rbexe-font-scale)); }
        & button                 { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
    }
    .bounce-carousel-item {
        width: 65px; height: 110px;
        &:nth-child(3) { left: 80px;  top: calc(100% - 130px); transform: none; }
        &:nth-child(4) { left: 153px; top: calc(100% - 130px); transform: none; }
        &:nth-child(5) { left: 226px; top: calc(100% - 130px); transform: none; opacity: 0; }
        &:nth-child(6) { left: 299px; top: calc(100% - 130px); transform: none; opacity: 0; }
    }
    .bounce-carousel-nav {
        & .bounce-carousel-btn  { bottom: 49px; }
        & .bounce-carousel-prev { left: 20px; }
        & .bounce-carousel-next { left: 226px; }
    }
}

/* =============================================================
   THE MURK PANEL — Image Carousel Integration
   Exact replica of beak carousel template. Only names differ.
   murk-carousel- prefix.
   Add images to images/Murk/ and update URLs below.
   ============================================================= */

.murk-carousel-main {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    z-index: 2;
}

/* TODO: replace placeholder paths with actual character thumbnail images */
.murk-carousel-char-a {
    background: #111 url('images/Murk/char_a_thumb.png') center center / cover no-repeat;
}
.murk-carousel-char-b {
    background: #111 url('images/Murk/char_b_thumb.png') center center / cover no-repeat;
}

.murk-carousel-bg {
    position: absolute;
    inset: -10px;
    background-size: cover;
    background-position: center;
    z-index: 0;
    display: none;
    filter: blur(6px);
}

.murk-carousel-fg {
    position: absolute;
    inset: 0;
    background-size: auto 120%;
    background-position: 66% -50%;
    background-repeat: no-repeat;
    z-index: 1;
    will-change: transform;
    transform-origin: center center;
    display: none;
}

.murk-carousel-item:nth-child(1) .murk-carousel-bg,
.murk-carousel-item:nth-child(1) .murk-carousel-fg,
.murk-carousel-item:nth-child(2) .murk-carousel-bg,
.murk-carousel-item:nth-child(2) .murk-carousel-fg {
    display: block;
}

/* TODO: replace placeholder paths with actual bg + fg images */
.murk-carousel-char-a .murk-carousel-bg { background-image: url('images/Murk/char_a_bg.png'); }
.murk-carousel-char-a .murk-carousel-fg { background-image: url('images/Murk/char_a_fg.png'); }
.murk-carousel-char-b .murk-carousel-bg { background-image: url('images/Murk/char_b_bg.png'); }
.murk-carousel-char-b .murk-carousel-fg { background-image: url('images/Murk/char_b_fg.png'); }

.murk-carousel-item {
    width: 100px;
    height: 150px;
    list-style-type: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    background-position: center;
    background-size: cover;
    border-radius: 20px;
    box-shadow: 0 20px 30px rgba(255,255,255,0.3) inset;
    transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s;

    &:nth-child(1), &:nth-child(2) {
        left: 0; top: 0; width: 100%; height: 100%;
        transform: none; border-radius: 0; box-shadow: none; opacity: 1;
        background: none;
    }
    &:nth-child(3) { left: 92px;  top: calc(100% - 180px); transform: none; }
    &:nth-child(4) { left: 202px; top: calc(100% - 180px); transform: none; }
    &:nth-child(5) { left: 312px; top: calc(100% - 180px); transform: none; opacity: 0; }
    &:nth-child(6) { left: 422px; top: calc(100% - 180px); transform: none; opacity: 0; }
}

.murk-carousel-content {
    position: absolute;
    top: calc(80px + 10%);
    left: 3rem;
    right: 10%;
    z-index: 2;
    color: var(--rbexe-text);
    text-shadow: 0 3px 8px rgba(0,0,0,0.5);
    opacity: 0;
    display: none;

    & .murk-carousel-title {
        position: relative; z-index: 1;
        font-family: var(--rbexe-font-heading);
        font-size: calc(clamp(110px, 13vw, 180px) * var(--rbexe-font-scale));
        font-weight: 800; line-height: 1; letter-spacing: -2px;
        text-transform: uppercase; margin-bottom: 40px; will-change: transform;
        white-space: nowrap;
    }
    & .murk-carousel-desc {
        position: relative; z-index: 2;
        font-family: var(--rbexe-font-primary);
        font-size: calc(16px * var(--rbexe-font-scale));
        font-weight: 300; line-height: 1.2; padding: 12px 14px;
        border: 1px solid var(--rbexe-text); background: var(--rbexe-bg);
        margin: 0 0 2.5rem; will-change: transform;
    }
    & button {
        position: relative; z-index: 3; display: block; margin-left: auto; width: fit-content;
        font-family: var(--rbexe-font-primary);
        font-size: calc(14px * var(--rbexe-font-scale)); font-weight: 600;
        background-color: var(--rbexe-text); color: var(--rbexe-bg);
        border: none; padding: 14px 28px; cursor: pointer; will-change: transform;
    }
}

.murk-carousel-item:nth-of-type(2) .murk-carousel-content {
    display: block;
    animation: murk-carousel-show 0.75s ease-in-out 0.3s forwards;
}

@keyframes murk-carousel-show {
    0%   { filter: blur(5px); transform: translateY(75px); }
    100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.murk-carousel-nav {
    position: absolute; inset: 0; pointer-events: none; z-index: 5;
    -webkit-user-select: none; user-select: none;

    & .murk-carousel-btn {
        position: absolute; bottom: 79px; pointer-events: all;
        background-color: rgba(255,255,255,0.5); color: rgba(0,0,0,0.7);
        border: 2px solid rgba(0,0,0,0.6); padding: 0.75rem; border-radius: 50%;
        cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
        &:hover { background-color: rgba(255,255,255,0.3); }
    }
    & .murk-carousel-prev { left: 30px; }
    & .murk-carousel-next { left: 312px; }
}

@media (width > 650px) and (width < 900px) {
    .murk-carousel-content {
        & .murk-carousel-title { font-size: calc(2rem * var(--rbexe-font-scale)); }
        & .murk-carousel-desc  { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
        & button               { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
    }
    .murk-carousel-item {
        width: 80px; height: 135px;
        &:nth-child(3) { left: 92px;  top: calc(100% - 165px); transform: none; }
        &:nth-child(4) { left: 182px; top: calc(100% - 165px); transform: none; }
        &:nth-child(5) { left: 272px; top: calc(100% - 165px); transform: none; opacity: 0; }
        &:nth-child(6) { left: 362px; top: calc(100% - 165px); transform: none; opacity: 0; }
    }
    .murk-carousel-nav {
        & .murk-carousel-btn  { bottom: 71px; }
        & .murk-carousel-next { left: 272px; }
    }
}

@media (width < 650px) {
    .murk-carousel-content {
        & .murk-carousel-title { font-size: calc(1.5rem * var(--rbexe-font-scale)); }
        & .murk-carousel-desc  { font-size: calc(0.65rem * var(--rbexe-font-scale)); }
        & button               { font-size: calc(0.7rem * var(--rbexe-font-scale)); }
    }
    .murk-carousel-item {
        width: 65px; height: 110px;
        &:nth-child(3) { left: 80px;  top: calc(100% - 130px); transform: none; }
        &:nth-child(4) { left: 153px; top: calc(100% - 130px); transform: none; }
        &:nth-child(5) { left: 226px; top: calc(100% - 130px); transform: none; opacity: 0; }
        &:nth-child(6) { left: 299px; top: calc(100% - 130px); transform: none; opacity: 0; }
    }
    .murk-carousel-nav {
        & .murk-carousel-btn  { bottom: 49px; }
        & .murk-carousel-prev { left: 20px; }
        & .murk-carousel-next { left: 226px; }
    }
}
