* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: "Outfit", Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #111;
}

.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 100vw;
}

.description {
    max-width: 440px;
    padding: 0 16px;
    text-align: center;
}

.description h2 {
    font-size: 26px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #1d2636;
    margin: 0 0 12px;
}

.description p {
    font-size: 20px;
    line-height: 1.65;
    color: #333;
    font-weight: 400;
}

.description a {
    color: #1a6fb5;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid rgba(26, 111, 181, 0.35);
}

.description a:hover {
    border-bottom-color: #1a6fb5;
}

@media (min-width: 960px) {
    .layout {
        flex-direction: row;
        gap: clamp(32px, 5vw, 80px);
    }

    .description {
        max-width: 400px;
        text-align: left;
        order: -1;
    }

    .description p {
        font-size: 21px;
    }

    .stage {
        width: min(100vmin, calc(100vw - 480px));
        height: min(100vmin, calc(100vw - 480px));
    }
}

.stage {
    position: relative;
    width: 100vmin;
    height: 100vmin;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Central display --- */
.central {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.central a {
    display: block;
    width: 100%;
    height: 100%;
}

.central img,
.central video {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    transition: opacity 500ms ease;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .central img,
    .central video {
        transition: none;
    }
}

.central--fading img,
.central--fading video {
    opacity: 0;
}

.central h1 {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #1d2636;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.7);
    z-index: 4;
}

/* --- Ring --- */
.ring {
    position: absolute;
    inset: 0;
    z-index: 3;
    transition: transform 800ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.ring-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 17%;
    height: 17%;
    aspect-ratio: 1 / 1;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    transition: transform 800ms cubic-bezier(0.4, 0.0, 0.2, 1), border-color 200ms ease;
    cursor: pointer;
}

.ring-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ring-item:hover {
    transform: translate(-50%, -50%) scale(1.15);
    border-color: #111;
}

.ring-item--active {
    border-color: #ffd34d;
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 24px rgba(255, 211, 77, 0.7);
}

noscript p {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #b31217;
    padding: 8px 14px;
    border-radius: 8px;
}

/* --- Controls --- */
.controls {
    position: fixed;
    bottom: calc(28px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    width: fit-content;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.85);
    padding: 10px 16px;
    border-radius: 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.control-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid #1d2636;
    background: #fff;
    color: #1d2636;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.control-btn:hover {
    background: #1d2636;
    color: #fff;
    transform: scale(1.08);
}

.control-btn:active {
    transform: scale(0.95);
}

/* --- Mobile: lock the layout to the viewport so the fixed control bar
       stays pinned to the bottom regardless of which card is shown.
       (Page scroll + dynamic browser chrome is what made it drift.) --- */
@media (max-width: 959px) {
    html,
    body {
        height: 100%;
    }

    body {
        overflow: hidden;
    }

    .layout {
        height: 100vh; /* fallback for older browsers */
        height: 100dvh; /* tracks the visible viewport incl. mobile URL bar */
        min-height: 0;
        justify-content: flex-start;
        padding: 14px 0 calc(88px + env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .description {
        max-height: 34vh;
        overflow-y: auto;
        min-height: 0;
        flex-shrink: 1;
    }

    .stage {
        width: min(100vw, calc(100dvh - 280px));
        height: min(100vw, calc(100dvh - 280px));
        flex-shrink: 0;
        margin-top: auto;
    }

    .controls {
        bottom: calc(12px + env(safe-area-inset-bottom));
    }
}