/* realme — Dare to Leap: la rampa amarilla sube y una bola salta de gama en gama hasta GT */

.cv--realme {
    --cv-bg: #ffffff;
    --cv-ink: #111111;
    --cv-muted: #5c5c5c;
    --cv-accent: #111111;
    --cv-yellow: #ffc915;
    --cv-font-display: 'Lexend', system-ui, sans-serif;
    --cv-font-body: 'Lexend', system-ui, sans-serif;
    --cv-cta-bg: #111;
    --cv-cta-ink: #ffc915;
    --cv-cta-radius: 6px;
    --cv-cta-shadow-hover: 0 14px 28px -14px rgba(0, 0, 0, 0.6);
    background: #fff;
}

/* —— Rampa —— */
.cv-rm-slope {
    inset: 0;
    background: var(--cv-yellow);
    clip-path: polygon(calc(34% - var(--p) * 14%) 100%, 100% calc(18% - var(--p) * 14%), 100% 100%);
    animation: cv-rm-rise 1.3s var(--cv-ease) 0.1s backwards;
}

@keyframes cv-rm-rise {
    from { clip-path: polygon(34% 100%, 100% 100%, 100% 100%); }
}

.cv-rm-stripes {
    left: var(--cv-gutter);
    top: calc(var(--header-height, 76px) + 20px);
    width: 120px;
    height: 18px;
    background: repeating-linear-gradient(-45deg, #111 0 3px, transparent 3px 9px);
    opacity: 0.85;
    animation: cv-draw-x 0.9s var(--cv-ease) 0.4s both;
    transform-origin: left;
}

/* —— Escalones (gamas) y la bola —— */
.cv--realme .cv__art-in {
    --sw: clamp(250px, min(36vw, 62vh), 540px);
    translate: 0 calc(var(--p) * -6vh);
}

.cv-rm-stairs {
    position: relative;
    display: block;
    width: var(--sw);
    height: calc(var(--sw) * 0.82);
}

.cv-rm-step {
    position: absolute;
    bottom: 0;
    width: 28%;
    display: flex;
    justify-content: center;
    padding-top: 12px;
    background: #111;
    border-radius: 6px 6px 0 0;
    transform-origin: bottom;
    animation: cv-draw-y 0.9s var(--cv-spring) both;
}

.cv-rm-step em {
    font-family: 'Lexend', sans-serif;
    font-size: clamp(0.7rem, 0.95vw, 0.95rem);
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
    color: var(--cv-yellow);
    padding: 0 6px;
}

.cv-rm-step--1 { left: 1%; height: 30%; animation-delay: 0.5s; }
.cv-rm-step--2 { left: 36%; height: 54%; animation-delay: 0.62s; }
.cv-rm-step--3 { left: 71%; height: 80%; animation-delay: 0.74s; }

.cv-rm-step--3 em {
    font-size: clamp(1.2rem, 2vw, 1.9rem);
}

.cv-rm-trail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.cv-rm-trail path {
    fill: none;
    stroke: #111;
    stroke-width: 2;
    stroke-dasharray: 2 7;
    stroke-linecap: round;
    opacity: 0.55;
    animation: cv-fade 1s ease 1.2s both;
}

/* La bola recorre las cimas: Narzo → serie numerada → GT */
.cv-rm-ball {
    --b: calc(var(--sw) * 0.085);
    position: absolute;
    left: 15%;
    bottom: 30%;
    width: var(--b);
    height: var(--b);
    margin-left: calc(var(--b) / -2);
    border-radius: 50%;
    background: var(--cv-yellow);
    box-shadow: inset 0 0 0 3px #111, 0 10px 18px -8px rgba(0, 0, 0, 0.5);
    animation: cv-rm-leap 4.2s var(--cv-ease-io) 1.4s infinite both;
}

@keyframes cv-rm-leap {
    0% { left: 15%; bottom: 30%; transform: scale(1, 1); opacity: 0; }
    6% { opacity: 1; transform: scale(1.15, 0.8); }
    18% { left: 32%; bottom: 74%; transform: scale(0.92, 1.08); }
    32% { left: 50%; bottom: 54%; transform: scale(1.15, 0.8); }
    48% { left: 67%; bottom: 100%; transform: scale(0.92, 1.08); }
    62%, 86% { left: 85%; bottom: 80%; transform: scale(1, 1); opacity: 1; }
    96%, 100% { left: 85%; bottom: 80%; opacity: 0; }
}

/* —— Texto —— */
.cv--realme .cv__kicker {
    padding: 0 4px;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    font-weight: 800;
    letter-spacing: 0.24em;
    color: var(--cv-ink);
    background: linear-gradient(transparent 55%, var(--cv-yellow) 55%);
}

.cv--realme .cv__title {
    font-size: clamp(4rem, min(10vw, 18vh), 9rem);
    font-weight: 700;
    letter-spacing: -0.045em;
}

.cv--realme .cv-ch {
    animation: cv-rm-hop 0.9s var(--cv-ease) both;
    animation-delay: calc((var(--d) + var(--i) * var(--step)) * 1ms);
}

@keyframes cv-rm-hop {
    0% {
        opacity: 0;
        transform: translate3d(0, -0.6em, 0);
    }
    55% {
        opacity: 1;
        transform: translate3d(0, 0.06em, 0) scale(1.06, 0.92);
    }
    100% {
        transform: none;
    }
}

.cv--realme .cv__lead {
    max-width: 24ch;
    font-weight: 500;
}

@media (max-width: 900px) {
    .cv--realme .cv__art-in {
        --sw: clamp(190px, min(64vw, 26vh), 280px);
    }

    .cv-rm-slope {
        clip-path: polygon(0 100%, 100% calc(46% - var(--p) * 14%), 100% 100%);
    }

    @keyframes cv-rm-rise {
        from { clip-path: polygon(0 100%, 100% 100%, 100% 100%); }
    }

    .cv-rm-stripes {
        display: none;
    }

    .cv--realme .cv__title {
        font-size: clamp(3.4rem, 18vw, 5rem);
    }
}
