/* Guía interactiva de la landing: réplica de GuideScreen.kt (app).
 * Todas las medidas van en --u, el "unit" de la app (Dimensions.unit = ancho * 0.008).
 * --u se define con unidades de contenedor (cqw), así la guía escala con su ancho. */

.guide-section {
    --guide-bg: #FFFFFF; /* blanco: separa la sección del resto */
    background: var(--guide-bg);
    isolation: isolate; /* el subrayado de .highlight (z-index -1) queda encima del fondo */
    padding: 20px 16px 50px;
}

/* Los pasos 1, 2 y 3 uno al lado del otro; en móvil, uno debajo del otro. */
.guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    width: min(100%, 960px);
    margin: 0 auto;
    font-family: 'Readex Pro', 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
@media (max-width: 760px) {
    .guide { grid-template-columns: minmax(0, 300px); justify-content: center; gap: 32px; }
}

/* Nota bajo los tres pasos. */
.guide-note {
    max-width: 640px;
    margin: 36px auto 0;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}
.guide-note strong { color: var(--primary-color); font-weight: 700; }

/* Cada paso escala con su propio ancho. Nada se puede tocar: lo hace el ratón de la demo. */
.g-panel {
    container-type: inline-size;
    min-width: 0;
    /* Grisáceo mientras no es su turno; toma color sin brusquedad al animarse (guide.js: COLOR_FADE_MS). */
    filter: grayscale(0.85) opacity(0.6);
    transition: filter 600ms ease;
}
.g-panel.g-active { filter: none; }
@media (prefers-reduced-motion: reduce) { .g-panel { transition: none; } }
.g-panel * { pointer-events: none; } /* el panel sí recibe el ratón: al pasar por encima se anima solo ese paso */

.g-root {
    --u: 0.8cqw;
    position: relative;
    aspect-ratio: 1 / 1.75;
    overflow: hidden; /* la oferta descartada sale por el borde, como en la pantalla del móvil */
    line-height: 1.2;
    color: #000;
}

.g-root * { box-sizing: border-box; }
.g-root img { display: block; max-width: none; -webkit-user-drag: none; }
.g-root b { font-weight: 700; }


/* Capas de los pasos (AnimatedContent: fundido cruzado). */
.g-stage { position: relative; flex: 1; min-height: 0; align-self: stretch; }
.g-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Icono tintado a partir de una imagen con alfa (Icon(painterResource) de Compose). */
.g-mask {
    display: inline-block;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: currentColor;
}

.g-svg { display: block; fill: currentColor; }

.g-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (prefers-reduced-motion: reduce) {
    .g-root *, .g-root *::before, .g-root *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ─── Panel interactivo de la cabecera (panel-demo.js) ─────────────────────── */
.pd-wrap {
    container-type: inline-size;
    width: min(100%, 240px);
    margin: 0 auto;
    font-family: 'Readex Pro', 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
.pd-root {
    /* Pantalla de 125u + marco de 4.7u a cada lado = 134.4u de ancho total. */
    --u: calc(100cqw / 134.4);
    line-height: 1.2;
    color: #000;
    text-align: left;
}
.pd-root * { box-sizing: border-box; }
.pd-root img { display: block; max-width: none; -webkit-user-drag: none; }
.pd-root .g-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-root .g-mask {
    display: inline-block;
    -webkit-mask-size: contain; mask-size: contain;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    background-color: currentColor;
}
.pd-root .g-svg { display: block; fill: currentColor; }
.pd-root .g-click { cursor: pointer; }
