/* OnePlus — el cuadrado rojo 1+ y el Alert Slider pasando por sus tres posiciones */

.cv--oneplus {
    --cv-bg: #ffffff;
    --cv-ink: #0b0b0b;
    --cv-muted: #626262;
    --cv-accent: #eb0029;
    --cv-red: #eb0029;
    --cv-font-display: 'Outfit', system-ui, sans-serif;
    --cv-font-body: 'Outfit', system-ui, sans-serif;
    --cv-cta-bg: #eb0029;
    --cv-cta-ink: #fff;
    --cv-cta-radius: 6px;
    --cv-cta-case: uppercase;
    --cv-cta-tracking: 0.1em;
    --cv-cta-shadow-hover: 0 14px 28px -12px rgba(235, 0, 41, 0.6);
    background: linear-gradient(160deg, #ffffff 0%, #f3f3f3 100%);
}

/* —— Fondo —— */
.cv-op1-slash {
    left: -12%;
    top: 84%;
    width: 62%;
    height: clamp(12px, 2.2vh, 22px);
    background: var(--cv-red);
    transform-origin: left center;
    transform: rotate(-22deg) translateY(calc(var(--p) * -20vh));
    opacity: 0.95;
    animation: cv-op1-swipe 1.2s var(--cv-ease) 0.1s both;
}

@keyframes cv-op1-swipe {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

.cv-op1-grid {
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(60% 70% at 30% 50%, #000, transparent);
    mask-image: radial-gradient(60% 70% at 30% 50%, #000, transparent);
}

/* —— Logo y slider —— */
.cv--oneplus .cv__art-in {
    --L: clamp(150px, min(21vw, 36vh), 320px);
    grid-auto-flow: column;
    align-items: center;
    gap: clamp(22px, 3.4vw, 54px);
    transform: scale(calc(1 + var(--p) * 0.06));
}

.cv-op1-logo {
    position: relative;
    display: block;
    width: var(--L);
    height: var(--L);
    rotate: calc(var(--p) * 90deg);
    animation: cv-op1-logo 1.2s var(--cv-spring) 0.2s both;
}

.cv-op1-logo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cv-red);
    clip-path: polygon(0 0, 64% 0, 64% 36%, 100% 36%, 100% 100%, 0 100%);
    box-shadow: 0 30px 60px -30px rgba(235, 0, 41, 0.6);
}

@keyframes cv-op1-logo {
    from {
        opacity: 0;
        transform: scale(0.3) rotate(-90deg);
    }
}

.cv-op1-logo b {
    position: absolute;
    left: 18%;
    bottom: 10%;
    font-family: 'Outfit', sans-serif;
    font-size: calc(var(--L) * 0.82);
    font-weight: 700;
    line-height: 0.8;
    color: #fff;
    animation: cv-rise 0.9s var(--cv-ease) 0.8s both;
}

.cv-op1-logo i {
    position: absolute;
    right: 0;
    top: 0;
    width: 36%;
    height: 36%;
    display: grid;
    place-items: center;
    font-family: 'Outfit', sans-serif;
    font-size: calc(var(--L) * 0.42);
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    color: var(--cv-red);
    animation: cv-op1-plus 1s var(--cv-spring) 1.1s both;
}

@keyframes cv-op1-plus {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.2);
    }
}

.cv-op1-slider {
    display: flex;
    align-items: stretch;
    gap: 14px;
    height: calc(var(--L) * 0.9);
    animation: cv-rise 1s var(--cv-ease) 0.9s both;
}

.cv-op1-track {
    position: relative;
    width: 30px;
    border-radius: 15px;
    background: linear-gradient(90deg, #a9adb3, #eef0f2 45%, #8e9298);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), inset 0 3px 8px rgba(0, 0, 0, 0.25);
}

.cv-op1-knob {
    position: absolute;
    left: 3px;
    right: 3px;
    top: 4px;
    height: 30%;
    border-radius: 12px;
    background: linear-gradient(90deg, #c3c7cc, #ffffff 50%, #b4b8be);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    animation: cv-op1-slide 7.5s var(--cv-ease-io) 1.6s infinite;
}

.cv-op1-knob::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: var(--cv-red);
}

@keyframes cv-op1-slide {
    0%, 28% { top: 4px; }
    34%, 61% { top: 35%; }
    67%, 94% { top: calc(70% - 4px); }
    100% { top: 4px; }
}

.cv-op1-modes {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b5b5b5;
}

.cv-op1-modes span {
    animation: cv-op1-mode-1 7.5s steps(1, end) 1.6s infinite both;
}

.cv-op1-modes .is-2 { animation-name: cv-op1-mode-2; }
.cv-op1-modes .is-3 { animation-name: cv-op1-mode-3; }

/* Misma duración que el slider: cada etiqueta se ilumina mientras el botón está en su posición */
@keyframes cv-op1-mode-1 {
    0% { color: var(--cv-ink); }
    31% { color: #b5b5b5; }
    97% { color: var(--cv-ink); }
}

@keyframes cv-op1-mode-2 {
    0% { color: #b5b5b5; }
    31% { color: var(--cv-ink); }
    64% { color: #b5b5b5; }
}

@keyframes cv-op1-mode-3 {
    0% { color: #b5b5b5; }
    64% { color: var(--cv-red); }
    97% { color: #b5b5b5; }
}

/* —— Texto —— */
.cv--oneplus .cv__kicker {
    color: var(--cv-red);
    letter-spacing: 0.4em;
}

.cv--oneplus .cv__title {
    font-size: clamp(3rem, min(7.2vw, 12.5vh), 6.6rem);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.cv--oneplus .cv-ch {
    animation: cv-op1-letter 0.9s var(--cv-spring) both;
    animation-delay: calc((var(--d) + var(--i) * var(--step)) * 1ms);
}

@keyframes cv-op1-letter {
    from {
        opacity: 0;
        transform: translate3d(0.4em, 0, 0) skewX(-10deg);
    }
}

.cv--oneplus .cv__lead {
    font-weight: 500;
}

.cv-op1-facts {
    display: grid;
    gap: 0;
    margin: clamp(10px, 1.8vh, 18px) 0 0;
    padding: 0;
    list-style: none;
    width: min(100%, 460px);
}

.cv-op1-facts li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 7px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.cv-op1-facts li:last-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cv-op1-facts strong {
    min-width: 7.5em;
    font-weight: 700;
}

.cv-op1-facts span {
    color: var(--cv-muted);
}

@media (max-width: 900px) {
    .cv--oneplus .cv__art-in {
        --L: clamp(96px, min(26vw, 13vh), 140px);
    }

    .cv-op1-modes {
        font-size: 0.7rem;
    }

    .cv-op1-facts {
        display: none;
    }

    .cv--oneplus .cv__title {
        font-size: clamp(2.6rem, 13vw, 4rem);
    }
}
