@font-face {
    font-family: typo;
    src: url(font/Typo\ Formal\ Regular\ Demo.otf);
}

@font-face {
    font-family: typo2;
    src: url(font/Typo\ Formal\ Light\ Demo.otf);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-weight: 100;
}

html,
body {
    width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
    background-color: white;
    font-family: typo;
    letter-spacing: 1.5px;
}

/* ESTILOS GENERALES */

h1 {
    font-size: 4em;
}

h2 {
    font-size: 3em;
    max-width: max-content;
    cursor: default;
}

p {
    font-size: 2em;
    cursor: default;
}

/* HEADER */

header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .5rem;
    border-bottom: 5px solid black;

    button {
        position: absolute;
        left: 1em;
        background: none;
        border: none;
        cursor: pointer;
    }
}

/* MAIN */

.preguntas {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-left: 5%;
}

.recuadro {
    position: relative;
    max-width: 800px;
    max-height: 85px;
    margin-top: 1.2em;
    overflow: hidden;
    transition: max-height 1s ease;
}

.recuadro.expandido {
    max-height: 400px;
}

/* Contenido Recuadro */

.texto {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    padding: 1rem;
    margin-top: .5rem;
    transition: opacity 1s ease;
}

.recuadro h2:hover~.texto {
    opacity: 1;
}

.recuadro.expandido:hover .texto {
    opacity: 1;
}

/* SVG Esquinas del texto */

.esquina {
    position: absolute;
    top: 0;
    left: 1em;
}

@keyframes moverSupIzq {
    0% {
        top: 0;
        left: 1em;
    }

    100% {
        top: -5px;
        left: -5px;
    }
}

@keyframes moverInfDer {
    0% {
        top: 0;
        left: 1em;
    }

    100% {
        top: calc(90% - 20px);
        left: calc(98% - 20px);
    }
}

@keyframes volverSupIzq {
    0% {
        top: -5px;
        left: -5px;
    }

    100% {
        top: 0;
        left: 1em;
    }
}

@keyframes volverInfDer {
    0% {
        top: calc(90% - 20px);
        left: calc(98% - 20px);
    }

    100% {
        top: 0;
        left: 1em;
    }
}

/* Contenido Ejemplo Practico */

.ejemplo-practico {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1em;

    .text-audio {
        display: flex;
        flex-direction: row;
        gap: 1em;
    }
}

#btn-audio,
#btn-audio2 {
    position: relative;
    padding: 10px 20px;
    border: 2px solid black;
    border-radius: .8rem;
    background: none;
    color: black;
    overflow: hidden;
    cursor: pointer;
    transition: color .3s ease;
}

#btn-audio::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    bottom: 4px;
    right: 4px;
    background: black;
    border-radius: .6rem;
    transform: scale(0);
    transform-origin: center;
    transition: transform .3s ease;
    z-index: 0;
}

#btn-audio2::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    bottom: 4px;
    right: 4px;
    background: black;
    border-radius: .6rem;
    transform: scale(0);
    transform-origin: center;
    transition: transform .3s ease;
    z-index: 0;
}

#btn-audio.playing {
    transition: box-shadow .3s ease-in-out, scale .3s ease-in-out, transform .3s ease-in-out;
    box-shadow: 5px 5px 1px black;
    transform: translateY(-5px);
}

#btn-audio2.playing {
    transition: box-shadow .3s ease-in-out, scale .3s ease-in-out, transform .3s ease-in-out;
    box-shadow: 5px 5px 1px black;
    transform: translateY(-5px);
}

#btn-audio.playing::before {
    transform: scale(1);
}

#btn-audio2.playing::before {
    transform: scale(1);
}

/* Contenido Equipos y Herramientas */

.equipos-herramientas {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2em;
}

.hard-soft {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: typo2;
}

.hard-soft p {
    width: 80%;
    font-weight: bold;
}

.hard {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hard p {
    font-size: 1em;
}

.hard ul li {
    list-style: none;
    font-weight: bold;
}

.soft {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-left: 3px solid black;
}

.hard,
.soft ul li {
    list-style: none;
    font-family: typo2;
    font-weight: bold;
    font-size: 1.3em;
}

.soft p {
    font-size: 1.4em;
}

/* Contenido Clientes Satisfechos */

.clientes {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 2em;
}

.clientes .cuadro {
    width: 320px;
    height: 190px;
    padding: .2rem;
    border: 3px solid black;
}

.cuadro img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cuadro video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

#video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.4s linear;
}

#video-overlay.active {
    background: rgba(0, 0, 0, 0.8);
}

#video-grande {
    position: absolute;
    border-radius: 10px;
    transform-origin: center center;
    cursor: default;
    transition: all 0.6s linear, opacity .5s ease;
    opacity: 1;
}

#video-grande.fadeout {
    opacity: 0;
    transform: scale(0.95);
}


/* Contenido Contacta */

.contacta {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .5em;
}

.contacta .contacto {
    display: flex;
    flex-direction: row;
    gap: 1em;
    padding: 2em;
}

#btn-contacto {
    position: relative;
}

.copiado {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.copiado::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
}

.mostrar {
    opacity: 1;
    transform: translateX(-50%) translateY(-3px);
}

.contacto button {
    padding: .3em 1em;
    border: 3px solid black;
    border-radius: 3rem;
    background: none;
    cursor: pointer;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 500;
    font-size: 1.4em;
    transition: all .5s ease;
}

.contacto button:hover {
    background: black;
    color: white;
}

/* -------------------------- */
/*     MEDIA QUERIES          */
/* -------------------------- */

/* Tablets (pantallas medianas) */
@media (max-width: 1024px) {
    h1 {
        font-size: 3em;
    }

    h2 {
        font-size: 2.2em;
    }

    p {
        font-size: 1.5em;
    }

    .preguntas {
        padding-left: 2%;
        padding-right: 2%;
    }

    .recuadro {
        max-width: 90%;
    }

    .hard-soft {
        flex-direction: column;
        border-left: none;
        gap: 1em;
    }

    .soft {
        border-left: none;
        border-top: 2px solid black;
        padding-top: 1em;
    }

    .contacta .contacto {
        flex-direction: column;
        gap: 1em;
        padding: 1em;
    }
}

/* Móviles (pantallas pequeñas) */
@media (max-width: 600px) {

    header {
        flex-direction: column;
        padding: 1em;
        text-align: center;
    }

    header h1 {
        font-size: 2.2em;
        margin-top: .5em;
    }

    header button svg {
        width: 60px;
        height: 60px;
    }

    h2 {
        font-size: 1.8em;
        text-align: center;
    }

    p {
        font-size: 1.1em;
        text-align: center;
    }

    .preguntas {
        padding: 0 1em;
    }

    .recuadro {
        max-width: 100%;
        max-height: none;
        overflow: visible;
    }

    .texto {
        padding: .5em;
        opacity: 1; /* Siempre visible en móvil */
    }

    .ejemplo-practico .text-audio {
        flex-direction: column;
        gap: .5em;
    }

    .clientes .cuadro {
        width: 90%;
        height: auto;
    }

    .equipos-herramientas {
        gap: 1em;
    }

    .hard-soft {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }

    .hard, .soft {
        width: 100%;
        border: none;
        align-items: center;
        justify-content: center;
    }

    .contacta .contacto {
        flex-direction: column;
        padding: 1em;
        gap: 1em;
    }

    #btn-contacto,
    .contacto button {
        font-size: 1em;
        padding: .5em 1em;
        width: 100%;
    }

    .esquina {
        display: none; /* Opcional: ocultar adornos para no saturar el móvil */
    }
}

/* Muy pequeñas (teléfonos compactos, <400px) */
@media (max-width: 400px) {
    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    p {
        font-size: 1em;
    }

    header button svg {
        width: 40px;
        height: 40px;
    }
}
