:root {
    --fuenteHeading: 'Tinos', sans-serif;
    --fuenteParrafos: 'Roboto' sans-serif;

    --blanco: #ffffff;
    --negro: #000000;
    --texto: #B0BEC5;
    --gris: #546E7A;
    --amarillo: #F4F1AA;
    --cafe: #926428;
    --fondo: #212121;
}

html {
    box-sizing: border-box;
    font-size: 62.5%;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    background-color: var(--fondo);
    font-family: var(--fuenteParrafos);
    font-size: 1.6rem;
    line-height: 2;
    /* interlineado */
}

.hidden-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    visibility: hidden;
    transition: opacity 600ms ease-out, transform 600ms ease-out, visibility 0s linear 600ms;
    will-change: opacity, transform;
}

.hidden-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
}

/* Globales */

.contenedor {
    width: min(90%, 120rem);
    margin: 0 auto;
}

main.contenedor {
    /* * Duración: 0.7 segundos
     * Efecto: 'ease-out' (rápido al inicio, suave al final)
     * Relleno: 'forwards' (mantiene el estado final de la animación)
     */
    animation: fadeInOnLoad 0.7s ease-out forwards;
}

@keyframes fadeInOnLoad {
    /* Estado inicial: 0% */
    from {
        opacity: 0;
        /* Hacemos que también se deslice sutilmente desde abajo */
        transform: translateY(30px); 
    }
    
    /* Estado final: 100% */
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contenedor-barra {
    width: min(100%, 200rem);
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: var(--texto);
    line-height: 2;
    font-size: 3rem;
}

h1,
h2,
h3 {
    text-align: center;
    font-family: var(--fuenteHeading);
    line-height: 1.2;
    text-transform: uppercase;
}

h4 {
    text-align: left;
    font-family: var(--fuenteHeading);
    line-height: 1.2;
    text-align: center;
    font-size: 2rem;
}

p {
    line-height: 2rem;
    text-align: justify;
    font-size: 2rem;
}

img {
    max-width: 100%;
    width: 100%;
    align-items: center;
}

h1 {
    font-size: 4rem;
}

@media (min-width: 768px) {
    h1 {
        font-size: 5rem;
    }
}

h2 {
    font-size: 3rem;
}

@media (min-width: 768px) {
    h2 {
        font-size: 4rem;
    }
}

h3 {
    font-size: 2rem;
}

@media (min-width: 768px) {
    h3 {
        font-size: 3rem;
    }
}

/* Utilidades */

.no-margin {
    margin: 1;
}

.no-padding {
    padding: 1;
}

.centrar-texto {
    text-align: center;
}
.margin-m{
    margin-top: -8rem;
}

/* HEADER */
.header {
    width: 100%;
    display: flex;
    justify-content: center;
}
.barra {
    width: 100%;
    max-width: 240rem; /* ajusta si quieres */
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header_img {
    width: 20rem;
    height: auto;
}
.navegacion {
    display: flex;
    gap: 3rem;
}
.navegacion__enlace {
    background-color: var(--amarillo);
    color: var(--fondo);
    padding: 1rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: color 0.3s ease;
}
.navegacion__enlace:hover {
    background-color: var(--gris);
}
@media (max-width: 480px) {
    .header_img {
        width: 12rem;
    }
    .barra {
        align-items: center;
    }
    .navegacion {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }
    .navegacion__enlace {
        font-size: 2rem;
    }
}

/* Index */

.contenedor-i {
    width: min(90%, 240rem);
    margin: 0 auto;
    padding: 6rem 0;
    color: var(--texto);
}
.grid3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    min-height: 70vh;
    align-items: stretch;
}
.caja1 {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
    align-self: start;
    gap: 1.2rem;
}
.caja1 h1,
.caja1 h2 {
    line-height: 1.1;
}
.caja1 h4 {
    line-height: 1.4;
}
.btn-principal {
    align-self: center;
    margin-top: 2rem;
    padding: 1.2rem 3rem;
    text-decoration: none;
    border-radius: 3rem;
    background-color: var(--amarillo);
    color: var(--fondo);
    transition: background-color 0.3s ease, color 0.3s ease;
}
.btn-principal:hover {
    background-color: var(--gris);
}
.caja2 {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
}
.caja2 img {
    max-width: 100%;
    height: auto;
    display: block;
}
.caja3 {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    align-self: end;
    text-align: right;
}
.servicios {
    border: 1px solid var(--amarillo);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 32rem;      
    margin: 0 auto;
    padding: 1.8rem 2rem;
}
.servicios-titulo {
    text-align: center;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--amarillo);
    width: auto;
}
.servicios-lista {
    display: grid;
    grid-template-columns: repeat(2, auto);
    justify-content: center;
    gap: 1rem 3rem;
    text-align: center;
}
.servicio-full {
    grid-column: 1 / -1;
    text-align: center;
}
.telefono {
    text-align: center;
}
@media (max-width: 480px) {

    .grid3 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 4rem;
    }
    .caja1,
    .caja2,
    .caja3 {
        grid-column: auto;
        grid-row: auto;
        text-align: center;
        align-self: center;
    }
    .btn-principal {
        width: 90%;
        text-align: center;
    }
    .servicios {
        max-width: 90%;
    }
    .servicios-lista {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 1rem;
    }
    .servicio-full {
        grid-column: auto;
    }
}
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
    justify-content: center;
}
.grid > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
@media (max-width: 480px) {
    .grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 1rem;
    }
}
.img-i{
    max-width: 100%;
    width: 80%;
    align-items: center;
    border-radius: 5rem;
}

/* Conócenos */

.grid-mv {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
    justify-content: center;
    border: 2px solid var(--amarillo);
    padding: 3rem;
    margin-top: -8rem;
}
@media (max-width: 480px) {
    .grid-mv {
        grid-template-columns: repeat(1, 1fr);
        gap: 1rem;
    }
}
.grid-c{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    padding: 3rem;
}
@media (max-width: 480px) {
    .grid-c {
        grid-template-columns: repeat(1, 1fr);
        gap: 1rem;
    }
}
.caja-c{
    border-top: 4px solid var(--amarillo);
}

/* Formulario */

.contenedor-f {
    width: 90%;
    max-width: 240rem;
    margin: 0 auto 2rem;
    padding-bottom: .5rem;
    color: var(--texto);
    border-bottom: 3px solid var(--amarillo);
}
.formulario-caso {
    width: 90%;
    max-width: 120rem;
    margin: 0 auto 3rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
}
.campo {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    column-gap: 1rem;
}
.campo label {
    color: var(--texto);
    padding-top: .2rem;
}
.campo input,
.campo select,
.campo textarea {
    background: var(--texto);
    border: 3px solid var(--amarillo);
    padding: .9rem .6rem;
    outline: none;
    line-height: 1.4;
}
.campo.full {
    grid-column: 1 / 3;
    grid-template-columns: 1fr;
}
.campo.full label {
    margin-bottom: .4rem;
}
.campo textarea {
    height: 180px;
    resize: none;
}
.btn-enviar {
    grid-column: 1 / 3;
    justify-self: center;
    background: var(--amarillo);
    color: var(--fondo);
    border: none;
    padding: 1rem 3.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .3s ease, transform .2s ease;
}
.btn-enviar:hover {
    background-color: var(--gris);
    transform: translateY(-2px);
}
@media (max-width: 768px) {
    .formulario-caso {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }
    .campo {
        grid-template-columns: 1fr;
    }
    .campo.full {
        grid-column: 1 / 2;
    }
    .btn-enviar {
        grid-column: 1 / 2;
    }
}
@media (max-width: 480px) {
    .formulario-caso {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .full {
        grid-column: 1;
    }
    .btn-enviar {
        grid-column: 1;
    }
}
.mensaje-exito {
    color: var(--amarillo);
    text-align: center;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* FOOTER */

.footer {
    width: 100%;
    display: flex;
    justify-content: center;
    border-top: 0.3rem solid var(--amarillo);
}
.barra_f {
    width: 100%;
    max-width: 240rem;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    color: var(--texto);
}
.footer_links {
    display: flex;
    gap: 3rem;
}
@media (max-width: 480px) {
    .barra_f {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    .barra_f img {
        width: 20rem;
    }
    .footer_links {
        flex-direction: column;
        gap: 1rem;
    }
}