/* Tecno — Universal Tone: carta de tonos de piel que aparece en cascada y un visor que la recorre */

.cv--tecno {
    --cv-bg: #14110f;
    --cv-ink: #f6ebe1;
    --cv-muted: rgba(240, 220, 200, 0.68);
    --cv-accent: #e0b088;
    --cv-font-display: 'Be Vietnam Pro', system-ui, sans-serif;
    --cv-font-body: 'Be Vietnam Pro', system-ui, sans-serif;
    --cv-cta-bg: #f3dfcd;
    --cv-cta-ink: #1a120d;
    --cv-cta-radius: 4px;
    --cv-cta-shadow-hover: 0 14px 30px -12px rgba(224, 176, 136, 0.55);
    background: radial-gradient(80% 90% at 72% 50%, #2a1f18 0%, #14110f 70%);
}

.cv-te-warm {
    right: -10%;
    top: -10%;
    width: 70vw;
    height: 110vh;
    background:
        radial-gradient(closest-side at 40% 40%, rgba(224, 160, 110, 0.22), transparent),
        radial-gradient(closest-side at 70% 70%, rgba(150, 90, 60, 0.25), transparent);
    animation: cv-te-warm 16s ease-in-out infinite alternate;
}

@keyframes cv-te-warm {
    to { transform: translate3d(-6vw, 4vh, 0) rotate(8deg); }
}

/* —— Carta de tonos —— */
.cv--tecno .cv__art-in {
    --cell: clamp(30px, min(4.4vw, 7.6vh), 68px);
    --gap: calc(clamp(6px, 0.8vw, 10px) + var(--p) * 14px);
    gap: clamp(14px, 2.4vh, 22px);
}

.cv-te-chart {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, var(--cell));
    gap: var(--gap);
    padding: calc(var(--cell) * 0.3);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    rotate: calc(var(--p) * -6deg);
}

.cv-te-chart > i {
    width: var(--cell);
    height: var(--cell);
    border-radius: 28%;
    background: var(--c);
    box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.12), inset 0 4px 8px rgba(255, 255, 255, 0.18);
    animation: cv-te-cell 0.7s var(--cv-spring) both;
    animation-delay: calc(0.25s + var(--i) * 0.035s);
}

@keyframes cv-te-cell {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
}

/* Visor que salta de tono en tono */
.cv-te-focus {
    --x: 0;
    --y: 0;
    position: absolute;
    left: calc(var(--cell) * 0.3 - 7px);
    top: calc(var(--cell) * 0.3 - 7px);
    width: calc(var(--cell) + 14px);
    height: calc(var(--cell) + 14px);
    background:
        linear-gradient(#fff, #fff) 0 0 / 12px 2px no-repeat,
        linear-gradient(#fff, #fff) 0 0 / 2px 12px no-repeat,
        linear-gradient(#fff, #fff) 100% 0 / 12px 2px no-repeat,
        linear-gradient(#fff, #fff) 100% 0 / 2px 12px no-repeat,
        linear-gradient(#fff, #fff) 0 100% / 12px 2px no-repeat,
        linear-gradient(#fff, #fff) 0 100% / 2px 12px no-repeat,
        linear-gradient(#fff, #fff) 100% 100% / 12px 2px no-repeat,
        linear-gradient(#fff, #fff) 100% 100% / 2px 12px no-repeat;
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
    translate: calc(var(--x) * (var(--cell) + var(--gap))) calc(var(--y) * (var(--cell) + var(--gap)));
    animation: cv-te-scan 9s var(--cv-ease-io) 1.4s infinite both;
}

.cv-te-focus b {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: #fff;
}

@property --x {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
}

@property --y {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
}

@keyframes cv-te-scan {
    0%, 12% { --x: 0; --y: 0; }
    20%, 32% { --x: 2; --y: 1; }
    40%, 52% { --x: 5; --y: 2; }
    60%, 72% { --x: 3; --y: 3; }
    80%, 92% { --x: 1; --y: 2; }
    100% { --x: 0; --y: 0; }
}

.cv-te-readout {
    display: flex;
    gap: 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cv-muted);
    animation: cv-fade 1s ease 1.4s both;
}

.cv-te-readout span + span::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--cv-accent);
    vertical-align: 2px;
}

/* —— Texto —— */
.cv--tecno .cv__kicker {
    letter-spacing: 0.42em;
    color: var(--cv-accent);
}

.cv--tecno .cv__title {
    font-size: clamp(4rem, min(10vw, 17vh), 9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.cv--tecno .cv-ch {
    color: var(--c);
    animation: cv-rise 1s var(--cv-ease) both;
    animation-delay: calc((var(--d) + var(--i) * var(--step)) * 1ms);
}

.cv--tecno .cv__lead {
    font-weight: 600;
}

@media (max-width: 900px) {
    .cv--tecno .cv__art-in {
        --cell: clamp(24px, min(9vw, 4vh), 36px);
    }

    .cv-te-readout {
        font-size: 0.66rem;
    }

    .cv--tecno .cv__title {
        font-size: clamp(3.2rem, 18vw, 4.8rem);
    }
}
