@import url('https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Special+Gothic+Condensed+One&display=swap');

:root {
    --black: #000;
    --white: #fff;
    --red: #ba251d;
    --red-light: #f04c40;
    --gray: #7d7d7d;
    --font: "Special Gothic Condensed One", sans-serif;
    --card-w: 300px;
    --card-h: 400px;
    --video-opacity: .28;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    -webkit-text-size-adjust: 100%
}

body {
    background: var(--black);
    color: var(--white);
    font-family: var(--font);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased
}

/* Utilidades de cristal / arcilla */
.liquid-glass {
    background: rgba(255, 255, 255, .04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .1)
}

.clay-border {
    border-radius: 24px;
    box-shadow: inset 2px 2px 5px rgba(255, 255, 255, .1), inset -3px -3px 7px rgba(0, 0, 0, .5), 0 15px 35px rgba(0, 0, 0, .5)
}

/* ========================= HERO ========================= */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 90vh;
    margin-bottom: -70px;
    width: 100%;
    display: flex;
    align-items: center;
    background-color: var(--black);
    /* textura original */
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%237d7d7d' fill-opacity='0.3' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
}

/* Video de fondo */
.hero-video {
    position: absolute;
    inset: 0;
    z-index: -3;
    overflow: hidden;
    pointer-events: none
}

.hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1.6s ease;
}

.hero-video.is-ready iframe {
    opacity: var(--video-opacity)
}

/* Degradado para legibilidad */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .15) 70%),
        linear-gradient(to bottom, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .1) 40%, rgba(0, 0, 0, .85) 100%);
}

/* Textura encima del video para que se mantenga visible */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%237d7d7d' fill-opacity='0.3' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-bg-text {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(5rem, 24vw, 20rem);
    line-height: 1;
    color: rgba(255, 255, 255, .05);
    letter-spacing: .01em;
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
    user-select: none;
}

.hero-container {
    position: relative;
    z-index: 2;
    width: min(90%, 1400px);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1 1 0;
    min-width: 0;
    max-width: 600px
}

/* Insignia */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--black);
    border: .5px solid var(--red);
    border-radius: 999px;
    margin-bottom: 24px
}

.badge svg {
    color: var(--red);
    flex-shrink: 0
}

.badge span {
    font-size: clamp(.9rem, 2.6vw, 1rem);
    color: var(--white)
}

/* Título */
.hero-title {
    font-weight: 400;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
    color: var(--white);
    text-wrap: balance
}

.hero-title-accent {
    background: linear-gradient(90deg, var(--red-light), var(--red));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent
}

.hero-subtitle {
    margin-top: clamp(20px, 3vh, 36px);
    font-size: clamp(1.15rem, 1.9vw, 1.5rem);
    line-height: 1.3;
    color: var(--white);
    max-width: 540px
}

/* Botones */
.hero-actions {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px
}

.btn-primary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 999px;
    text-decoration: none;
    font-family: var(--font);
    font-size: 1.15rem;
    line-height: 1;
    transition: background .3s, transform .2s, border-color .3s
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    border: 1px solid var(--red)
}

.btn-primary:hover {
    background: var(--red-light);
    border-color: var(--red-light);
    transform: translateY(-2px)
}

.btn-outline {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(0, 0, 0, .35)
}

.btn-outline:hover {
    border-color: var(--red);
    transform: translateY(-2px)
}

.btn-primary:focus-visible,
.btn-outline:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 3px
}

.hero-meta {
    margin-top: 36px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: var(--white)
}

.meta-item svg {
    color: var(--red);
    flex-shrink: 0
}

/* Carrusel 3D */
.hero-right {
    position: relative;
    flex: 0 0 auto
}

.carousel-container {
    perspective: 1200px;
    width: 560px;
    height: calc(var(--card-h) + 60px);
    position: relative
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d
}

.carousel-card {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--card-w);
    height: var(--card-h);
    padding: 14px;
    display: flex;
    flex-direction: column;
    transform-origin: center right;
    will-change: transform, opacity;
    background: rgba(20, 20, 20, .55)
}

.card-image {
    width: 100%;
    flex: 1;
    min-height: 0;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    background-color: #363636;
    margin-bottom: 14px
}

.card-info h3 {
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 1.1;
    margin-bottom: 4px
}

.card-info p {
    font-size: 1.05rem;
    color: var(--red-light)
}

/* Tarjeta ISO */
.floating-card {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    border-radius: 20px;
    background: rgba(0, 0, 0, .6)
}

.floating-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--red);
    display: grid;
    place-items: center;
    color: var(--white);
    flex-shrink: 0
}

.floating-card-value {
    font-size: 1.4rem;
    line-height: 1
}

.floating-card-label {
    font-size: 1rem;
    opacity: .75;
    margin-top: 2px
}

/* ===== Responsive ===== */
@media (max-width:1200px) {
    :root {
        --card-w: min(300px, 74vw);
        --card-h: 380px
    }

    .hero {
        align-items: flex-start
    }

    .hero-container {
        flex-direction: column;
        align-items: stretch;
        gap: 44px
    }

    .hero-content {
        max-width: 640px
    }

    .hero-right {
        align-self: center;
        width: 100%
    }

    .carousel-container {
        width: 100%;
        max-width: 520px;
        margin: 0 auto
    }

    .carousel-card {
        right: auto;
        left: 50%;
        margin-left: calc(var(--card-w) / -2);
        transform-origin: center center
    }

    .floating-card {
        left: 50%;
        transform: translateX(-50%);
        bottom: 0;
        width: max-content;
        max-width: 100%
    }
}

@media (max-width:640px) {
    :root {
        --card-h: 340px;
        --video-opacity: .22
    }

    .hero {
        padding-top: 88px
    }

    .hero-container {
        width: calc(100% - 40px)
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px
    }

    .btn-primary,
    .btn-outline {
        padding: 13px 10px;
        font-size: 1.05rem;
        gap: 6px;
        width: 100%
    }

    .btn-primary svg,
    .btn-outline svg {
        width: 13px;
        height: 13px
    }

    .hero-meta {
        gap: 10px 22px
    }

    .meta-item {
        font-size: 1rem
    }
}

@media (max-width:360px) {
    .hero-actions {
        grid-template-columns: 1fr
    }
}

@media (max-height:520px) and (orientation:landscape) {
    .hero {
        min-height: auto
    }
}

@media (prefers-reduced-motion:reduce) {
    .hero-video {
        display: none
    }
}