/* ================================================================
   HP WORKSTATIONS Z — style2.css
   Metodología BEM | Mobile-First | Vanilla CSS3
   Índice:
   00 · Variables / Design tokens
   01 · Reset & Base
   02 · Header
   03 · Intro (presentación)
   04 · Section Visual (imagen de transición)
   05 · Features grid
   06 · Banner (portátiles para trabajar y jugar)
   07 · Products heading
   08 · Product card & Gallery CSS-only
   09 · Button
   10 · Animaciones / Keyframes
   11 · Media Queries
   ================================================================ */


/* ── 00 · Variables ────────────────────────────────────────── */
:root {
    /* Colores */
    --c-brand: #0096D6;
    /* HP Cyan */
    --c-dark: #181818;
    /* Secciones oscuras */
    --c-text: #1e1d1d;
    --c-text-80: #4b4a4a;
    --c-text-60: #787777;
    --c-border: rgba(0, 0, 0, .08);
    --c-border-inv: rgba(255, 255, 255, .15);
    --c-white: #ffffff;

    /* Tipografía */
    --font: "HP Simplified", Arial, Helvetica, sans-serif;

    /* Espaciado (escala 8 pt) */
    --sp-1: .8rem;
    --sp-2: 1.6rem;
    --sp-3: 2.4rem;
    --sp-4: 4.0rem;
    --sp-6: 6.4rem;
    --sp-8: 8.0rem;
    --sp-12: 12.0rem;

    /* Layout */
    --max-w: 1280px;

    /* Transiciones */
    --ease: .3s ease;
    --ease-med: .6s cubic-bezier(.4, 0, .2, 1);
    /* para transition */
    --ease-slow: .9s cubic-bezier(.4, 0, .2, 1);
    /* para transition */
    /* Timing-functions puras (para usar en animation shorthand) */
    --ease-fn: cubic-bezier(.4, 0, .2, 1);
}


/* ── 01 · Reset & Base ─────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    /* 1rem = 10px */
    font-family: var(--font);
    color: var(--c-text);
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}


/* ── 02 · Header ───────────────────────────────────────────── */
.site-header {
    background-image: url("../assets/header_360_texture.jpg");
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Gradiente superior (oscurece el tope para el logo) */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .9) -4%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Logo */
.site-header__logo-link {
    position: relative;
    z-index: 2;
}

.site-header__logo {
    display: block;
    margin: 0 auto;
    width: 120px;
    animation: anim-fade-down .6s var(--ease-fn) .1s both;
}

/* Laptop imagen */
.site-header__laptop {
    position: relative;
    z-index: 2;
}

.site-header__laptop--mobile {
    display: block;
    width: 280px;
    margin: 4rem auto 0;
    animation: anim-fade-up .8s var(--ease-fn) .4s both;
}

.site-header__laptop--wide {
    display: none;
}


/* ── 03 · Intro ────────────────────────────────────────────── */
.intro {
    width: 100%;
    background-color: var(--c-dark);
    padding: 4rem;
}

.intro__inner {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.intro__br {
    display: none;
}

.intro__headline {
    color: var(--c-white);
    font-size: 1.8rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 2rem;
}

.intro__headline strong {
    display: block;
    font-size: 3.4rem;
    font-weight: 700;
}

.intro__body {
    color: var(--c-white);
    font-size: 1.8rem;
    font-weight: 300;
    text-align: center;
}

.intro__body--em {
    font-style: italic;
    font-weight: 400;
    text-decoration: underline;
}


/* ── 04 · Section Visual ───────────────────────────────────── */
.section-visual {
    display: block;
    margin: 0 auto;
    padding: 4rem 2rem 0;
    width: 100%;
    background: linear-gradient(180deg, var(--c-dark) 60%, var(--c-white) 40%);
}

.section-visual__img {
    width: 100%;
    max-width: 390px;
    margin: 0 auto 4rem;
    transition: transform var(--ease-slow);
}

.section-visual__img:hover {
    transform: scale(1.025);
}


/* ── 05 · Features ─────────────────────────────────────────── */
.features {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto 4rem;
    padding: 2rem 4rem;
}

/* Cabecera del grid: span completo */
.features__header {
    grid-column: 1 / -1;
}

.features__heading {
    color: var(--c-text);
    font-size: 3.2rem;
    font-weight: 600;
    padding-bottom: 1rem;
}

.features__subheading {
    display: block;
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 2rem;
    color: var(--c-text);
}

/* Items */
.features__item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--c-border);
    transition: background-color var(--ease);
}

.features__item:last-child {
    border-bottom: none;
}

.features__item:hover {
    background-color: rgba(0, 150, 214, .03);
}

.features__icon {
    display: block;
    height: 70px;
    width: auto;
    margin-bottom: 2rem;
    transition: transform var(--ease);
}

.features__item:hover .features__icon {
    transform: translateY(-4px);
}

.features__item-title {
    font-size: 2.4rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--c-text);
}

.features__item-body {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--c-text);
}


/* ── 06 · Banner ───────────────────────────────────────────── */
.banner {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto var(--sp-8);
    display: flex;
    flex-direction: column;
}

.banner__content {
    padding: 4rem;
    background-color: var(--c-text);
}

.banner__heading {
    color: var(--c-white);
    font-size: 3.2rem;
    border-bottom: 1px solid var(--c-border-inv);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.banner__body {
    color: var(--c-white);
    font-size: 1.8rem;
    line-height: 2.4rem;
    font-weight: 300;
}

.banner__visual {
    padding: 0 4rem;
    /* Mobile: blanco arriba (conecta con features) → oscuro desde el 50% */
    background: linear-gradient(180deg, var(--c-white) 30%, var(--c-text) 30%);
}

.banner__visual img {
    width: 100%;
}


/* ── 07 · Products heading ─────────────────────────────────── */
.products-heading {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto var(--sp-8);
    padding: 0 4rem;
    display: flex;
    justify-content: center;
}

.products-heading__title {
    color: var(--c-text-60);
    font-size: 3.2rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 3.6rem;
}

.products-heading__title span {
    color: var(--c-text-80);
}


/* ── 08 · Product card & Gallery ───────────────────────────── */
.product {
    width: 100%;
    padding: 0 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 4rem;
}

/* ── Gallery (CSS-only slider) ─────────────────────────────── */

/*
   Estructura HTML requerida (inputs DENTRO de .gallery__frame):
   .gallery > .gallery__frame >
     input[type=radio] × 6  (siblings de reel y dots)
     .gallery__reel > .gallery__slide × 6
     .gallery__dots > label.gallery__dot × 6
*/

.gallery__frame {
    position: relative;
    max-width: 650px;
    width: 100%;
    height: 300px;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 auto;
}

/* Esconde los inputs dentro del frame */
.gallery__frame input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Reel: 6 slides side-by-side, ocupa 600% del frame */
.gallery__reel {
    display: flex;
    width: 600%;
    height: 100%;
    transition: transform var(--ease-med);
}

/* Cada slide = 1/6 del reel = 100% del frame */
.gallery__slide {
    flex: 0 0 calc(100% / 6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery__slide img {
    width: 100%;
    max-width: 700px;
    height: auto;
}

/* Thumbnails (absolutos, sobreimpuestos en la parte inferior) */
.gallery__dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 14px;
}

.gallery__dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border: 1px solid #c8c8c8;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255, 255, 255, .5);
    transition: transform var(--ease), background-color var(--ease);
}

.gallery__dot:hover {
    transform: scale(2);
}

.gallery__dot img {
    display: inline-block;
    height: 100%;
    max-width: none;
    opacity: 0;
    transition: opacity var(--ease);
}

.gallery__dot:hover img {
    opacity: 1;
}

/* ── Slide-state CSS (4 productos × 6 slides)
   Con width: 600% en el reel, cada slide = 100%/6 del reel.
   Mover N slides = translateX(-N × 100%/6) = -N × 16.6667%
   ─────────────────────────────────────────────────────────── */

/* Slide 1 (default) — sin transform */
#pra-1:checked~.gallery__reel,
#prb-1:checked~.gallery__reel,
#prc-1:checked~.gallery__reel,
#prd-1:checked~.gallery__reel {
    transform: translateX(0);
}

/* Slide 2 */
#pra-2:checked~.gallery__reel,
#prb-2:checked~.gallery__reel,
#prc-2:checked~.gallery__reel,
#prd-2:checked~.gallery__reel {
    transform: translateX(-16.6667%);
}

/* Slide 3 */
#pra-3:checked~.gallery__reel,
#prb-3:checked~.gallery__reel,
#prc-3:checked~.gallery__reel,
#prd-3:checked~.gallery__reel {
    transform: translateX(-33.3333%);
}

/* Slide 4 */
#pra-4:checked~.gallery__reel,
#prb-4:checked~.gallery__reel,
#prc-4:checked~.gallery__reel,
#prd-4:checked~.gallery__reel {
    transform: translateX(-50%);
}

/* Slide 5 */
#pra-5:checked~.gallery__reel,
#prb-5:checked~.gallery__reel,
#prc-5:checked~.gallery__reel,
#prd-5:checked~.gallery__reel {
    transform: translateX(-66.6667%);
}

/* Slide 6 */
#pra-6:checked~.gallery__reel,
#prb-6:checked~.gallery__reel,
#prc-6:checked~.gallery__reel,
#prd-6:checked~.gallery__reel {
    transform: translateX(-83.3333%);
}

/* Dot activo — agrupa los 24 selectores en una sola declaración */
#pra-1:checked~.gallery__dots label[for="pra-1"],
#pra-2:checked~.gallery__dots label[for="pra-2"],
#pra-3:checked~.gallery__dots label[for="pra-3"],
#pra-4:checked~.gallery__dots label[for="pra-4"],
#pra-5:checked~.gallery__dots label[for="pra-5"],
#pra-6:checked~.gallery__dots label[for="pra-6"],
#prb-1:checked~.gallery__dots label[for="prb-1"],
#prb-2:checked~.gallery__dots label[for="prb-2"],
#prb-3:checked~.gallery__dots label[for="prb-3"],
#prb-4:checked~.gallery__dots label[for="prb-4"],
#prb-5:checked~.gallery__dots label[for="prb-5"],
#prb-6:checked~.gallery__dots label[for="prb-6"],
#prc-1:checked~.gallery__dots label[for="prc-1"],
#prc-2:checked~.gallery__dots label[for="prc-2"],
#prc-3:checked~.gallery__dots label[for="prc-3"],
#prc-4:checked~.gallery__dots label[for="prc-4"],
#prc-5:checked~.gallery__dots label[for="prc-5"],
#prc-6:checked~.gallery__dots label[for="prc-6"],
#prd-1:checked~.gallery__dots label[for="prd-1"],
#prd-2:checked~.gallery__dots label[for="prd-2"],
#prd-3:checked~.gallery__dots label[for="prd-3"],
#prd-4:checked~.gallery__dots label[for="prd-4"],
#prd-5:checked~.gallery__dots label[for="prd-5"],
#prd-6:checked~.gallery__dots label[for="prd-6"] {
    background: var(--c-white);
}

/* Product info */
.product__info {
    display: grid;
    grid-template-columns: 50% 50%;
    height: auto;
}

.product__info-item {
    padding: 0 .2rem 4rem;
}

.product__info-item--header {
    grid-column: 1 / -1;
}

.product__info-item--header h2 {
    font-size: 2.4rem;
    font-weight: 400;
    color: var(--c-text);
    margin-bottom: 1rem;
}

.product__info-item--header p {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--c-text-80);
}

/* Spec items (icon + texto) */
.product__info-item img {
    height: 50px;
    width: auto;
    margin-bottom: 2rem;
}

.product__info-item p {
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--c-text-60);
}

/* CTA row */
.product__info-item--cta {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
}


/* ── 09 · Button ───────────────────────────────────────────── */
.btn {
    display: inline-block;
    font-family: var(--font);
    font-size: 2rem;
    font-weight: 400;
    text-decoration: none;
    background-color: var(--c-text);
    color: var(--c-white);
    border: 2px solid var(--c-text);
    padding: 1rem 4rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background-color var(--ease), color var(--ease),
        text-decoration var(--ease), transform var(--ease);
}

/* Shimmer de luz sobre el botón */
.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .2), transparent);
    transform: skewX(-20deg);
    transition: left .55s ease;
}

.btn:hover {
    background-color: var(--c-white);
    color: var(--c-text);
    text-decoration: underline;
    transform: translateY(-2px);
}

.btn:hover::after {
    left: 125%;
}


/* ── 10 · Animaciones / Keyframes ──────────────────────────── */
@keyframes anim-fade-down {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes anim-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes anim-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes anim-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}


/* ── 11 · Media Queries ────────────────────────────────────── */

/* 400px — gallery más alta */
@media (min-width: 400px) {
    .gallery__frame {
        height: 350px;
    }
}

/* 520px — imagen de escritorio en header */
@media (min-width: 520px) {

    .site-header {
        background-image: url("../assets/header_desk.jpg");
    }

    .site-header::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(360deg, rgba(0, 0, 0, .84) 5%, transparent 30%);
        pointer-events: none;
        z-index: 1;
    }

    .intro__br {
        display: inline;
    }

    .intro__headline {
        font-size: 2.4rem;
    }

    .intro__headline strong {
        font-size: 4.8rem;
    }

    .intro__body {
        font-size: 2rem;
        line-height: 2.8rem;
        max-width: 600px;
        margin: 0 auto;
    }

    .site-header__laptop--mobile {
        display: none;
    }

    .site-header__laptop--wide {
        display: block;
        width: 100%;
        max-width: 1110px;
        margin: 4rem auto 0;
        animation: anim-fade-up 1s var(--ease-fn) .6s both;
    }

    .features__heading {
        font-size: 4rem;
    }

    .features__subheading {
        font-size: 1.8rem;
    }

    .products-heading__title {
        font-size: 4rem;
        line-height: 4rem;
    }

    .gallery__frame {
        height: 450px;
    }
}

/* 720px — 2 columnas en features */
@media (min-width: 720px) {

    .features {
        grid-template-columns: 1fr 1fr;
        padding: 4rem;
    }

    .features__item:nth-child(even) {
        padding-right: 2rem;
        border-right: 1px solid var(--c-border);
    }

    .features__item:nth-child(odd) {
        padding-left: 2rem;
    }

    .products-heading__title {
        font-size: 6rem;
        line-height: 6rem;
        text-align: center;
    }
}

/* 768px — banner horizontal, productos en fila */
@media (min-width: 768px) {

    .site-header {
        min-height: 450px;
    }

    .site-header__logo {
        width: 190px;
    }

    .features {
        margin-bottom: 12rem;
    }

    .section-visual__img {
        max-width: 600px;
    }

    /* Banner: imagen a la izquierda sobreimpuesta */
    .banner {
        flex-direction: row-reverse;
        background-color: var(--c-text);
        padding: 4rem 0;
        position: relative;
        margin-bottom: 12rem;
    }

    .banner__content,
    .banner__visual {
        width: 50%;
        display: flex;
        align-items: center;
    }

    .banner__content {
        flex-direction: column;
    }

    .banner__content {
        background-color: transparent;
    }

    .banner__visual {
        background: transparent;
        position: absolute;
        left: 2%;
        top: -20%;
    }

    .banner__visual img {
        width: auto;
        height: 500px;
        animation: anim-float 6s ease-in-out infinite;
    }

    /* Productos en fila */
    .product {
        flex-direction: row;
        justify-content: space-between;
        max-width: var(--max-w);
        margin: 0 auto 4rem;
    }

    .product--reverse {
        flex-direction: row-reverse;
    }

    .product__info-item--cta {
        justify-content: flex-end;
    }
}

/* 1080px */
@media (min-width: 1080px) {

    .site-header {
        background-position: center;
    }

    .product__gallery,
    .product__info {
        min-width: 480px;
    }

    .banner__visual {
        left: 10%;
    }
}

/* 1200px — 3 columnas features, specs en línea */
@media (min-width: 1200px) {

    .features {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .features__item--title {
        grid-column: 1 / -1;
    }

    .features__item:nth-child(3) {
        border-right: 1px solid var(--c-border);
    }

    .features__item:nth-child(4) {
        border-right: none;
        padding-left: 2rem;
    }

    .features__item:nth-child(5) {
        border-right: 1px solid var(--c-border);
        padding: 2rem 2rem 2rem 0;
    }

    .features__item:nth-child(6) {
        padding: 2rem;
    }

    .product {
        margin-bottom: 8rem;
    }

    /* Specs: icon + texto en línea */
    .product__info-item {
        display: flex;
        align-items: center;
    }

    .product__info-item img {
        margin-right: 2rem;
        margin-bottom: 0;
    }

    .product__info-item--header,
    .product__info-item--cta {
        display: block;
    }
}