/* =========================================================
   EL RINCÓN DE IRI NAN
   HOME-0004
   ========================================================= */


/* =========================================================
   VARIABLES
   ========================================================= */

:root {

    --color-green: #24351f;
    --color-green-dark: #172517;

    --color-sand: #cfad75;
    --color-sand-hover: #bb965d;

    --color-cream: #f7f4ed;

    --color-white: #ffffff;
    --color-text: #2f312d;

}


/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    font-family: "DM Sans", Arial, sans-serif;

    color: var(--color-text);

    background: var(--color-cream);

    overflow-x: hidden;

}


img {
    display: block;
    max-width: 100%;
}


a {
    color: inherit;
    text-decoration: none;
}


button {
    font: inherit;
}


/* =========================================================
   HERO
   ========================================================= */

.hero-home {

    position: relative;

    width: 100%;

    height: 720px;
    min-height: 620px;

    overflow: hidden;

    background: #1a2119;

    color: #ffffff;

}


/* =========================================================
   IMAGEN PRINCIPAL
   ========================================================= */

.hero-background {

    position: absolute;

    inset: -4%;

    z-index: 1;

    background-image:
        url("/assets/img/home/ini30.jpg");

    background-position: center center;

    background-repeat: no-repeat;

    background-size: cover;

    /*
       Comienza apenas ampliada y se aleja.
       El movimiento debe ser prácticamente imperceptible.
    */

    transform: scale(1.08);

    animation:
        heroZoomOut 20s ease-out forwards;

}


@keyframes heroZoomOut {

    from {
        transform: scale(1.08);
    }

    to {
        transform: scale(1);
    }

}


/* =========================================================
   OSCURECIMIENTO
   ========================================================= */

.hero-overlay {

    position: absolute;

    inset: 0;

    z-index: 2;

    background:
        linear-gradient(
            90deg,
            rgba(9, 17, 9, 0.72) 0%,
            rgba(9, 17, 9, 0.52) 45%,
            rgba(9, 17, 9, 0.27) 72%,
            rgba(9, 17, 9, 0.32) 100%
        );

}


/* =========================================================
   HEADER SOBRE LA FOTO
   ========================================================= */

.hero-header {

    position: relative;

    z-index: 20;

    width: min(1240px, calc(100% - 70px));

    height: 120px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


/* =========================================================
   LOGO
   ========================================================= */

.hero-brand {

    flex: 0 0 auto;

    display: block;

}


.hero-brand img {

    width: 260px;

    height: auto;

}


/* =========================================================
   NAVEGACIÓN
   ========================================================= */

.main-navigation {

    display: flex;

    align-items: center;

}


.main-menu {

    list-style: none;

    display: flex;

    align-items: center;

    gap: 9px;

}


.main-menu > li {

    position: relative;

}


.main-menu > li > a,
.submenu-toggle {

    position: relative;

    min-height: 55px;

    padding: 0 14px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 0;

    background: transparent;

    color: #ffffff;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    white-space: nowrap;

}


/* Línea inferior */

.main-menu > li > a::after,
.submenu-toggle::after {

    content: "";

    position: absolute;

    left: 14px;
    right: 14px;

    bottom: 3px;

    height: 2px;

    background: var(--color-sand);

    transform: scaleX(0);

    transition: transform 0.25s ease;

}


.main-menu > li > a:hover::after,
.submenu-toggle:hover::after,
.main-menu > li > a.active::after {

    transform: scaleX(1);

}


.submenu-arrow {

    margin-left: 7px;

    font-size: 12px;

}


/* =========================================================
   SUBMENÚ
   ========================================================= */

.submenu {

    position: absolute;

    top: 100%;
    left: 0;

    min-width: 225px;

    list-style: none;

    background: rgba(27, 42, 25, 0.97);

    border-radius: 4px;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.25);

    opacity: 0;

    visibility: hidden;

    transform: translateY(8px);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;

}


.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

}


.submenu li + li {

    border-top:
        1px solid rgba(255, 255, 255, 0.09);

}


.submenu a {

    display: block;

    padding: 14px 18px;

    color: #ffffff;

    font-size: 14px;

}


.submenu a:hover {

    color: var(--color-sand);

}


/* =========================================================
   HAMBURGUESA
   ========================================================= */

.menu-toggle {

    display: none;

    width: 48px;
    height: 44px;

    padding: 5px;

    border:
        1px solid rgba(255, 255, 255, 0.75);

    border-radius: 5px;

    background:
        rgba(0, 0, 0, 0.15);

    cursor: pointer;

}


.menu-toggle span {

    display: block;

    width: 27px;
    height: 2px;

    margin: 6px auto;

    background: #ffffff;

    transition: 0.25s ease;

}


/* =========================================================
   TEXTO HERO
   ========================================================= */

.hero-content {

    position: relative;

    z-index: 10;

    width: min(1240px, calc(100% - 70px));

    margin: 90px auto 0;

}


.hero-eyebrow {

    margin-bottom: 10px;

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 1.1px;

}


.hero-content h1 {

    max-width: 820px;

    font-family:
        "Playfair Display",
        Georgia,
        serif;

    font-size: clamp(45px, 4.5vw, 70px);

    line-height: 1.05;

    font-weight: 500;

    letter-spacing: -1px;

}


.hero-description {

    max-width: 720px;

    margin-top: 23px;

    font-size: 18px;

    line-height: 1.6;

}


/* =========================================================
   BOTONES
   ========================================================= */

.hero-actions {

    margin-top: 42px;

    display: flex;

    align-items: center;

    gap: 20px;

}


.button {

    min-height: 56px;

    padding: 0 25px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border-radius: 4px;

    font-size: 16px;

    font-weight: 700;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;

}


.button:hover {

    transform: translateY(-2px);

}


.button-primary {

    background: var(--color-sand);

    color: #ffffff;

}


.button-primary:hover {

    background: var(--color-sand-hover);

}


.button-secondary {

    background:
        rgba(27, 48, 25, 0.88);

    color: #ffffff;

}


.button-secondary:hover {

    background:
        rgba(20, 39, 19, 0.98);

}


.whatsapp-icon {

    margin-right: 9px;

    font-size: 13px;

}


/* =========================================================
   INDICADOR ABAJO
   ========================================================= */

.hero-scroll {

    position: absolute;

    z-index: 10;

    left: 50%;
    bottom: 27px;

    transform: translateX(-50%);

    width: 28px;
    height: 42px;

    border:
        1px solid rgba(255, 255, 255, 0.65);

    border-radius: 20px;

}


.hero-scroll span {

    position: absolute;

    top: 8px;
    left: 50%;

    width: 4px;
    height: 7px;

    transform: translateX(-50%);

    border-radius: 4px;

    background: #ffffff;

    animation:
        scrollIndicator 1.8s infinite;

}


@keyframes scrollIndicator {

    0% {
        opacity: 0;
        transform:
            translate(-50%, 0);
    }

    40% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform:
            translate(-50%, 12px);
    }

}


/* =========================================================
   PRESENTACIÓN ALOJAMIENTOS
   ========================================================= */

.accommodations-intro {

    min-height: 260px;

    padding: 75px 25px 55px;

    text-align: center;

    background: var(--color-cream);

}


.section-eyebrow {

    margin-bottom: 7px;

    color: var(--color-green);

    font-size: 12px;

    font-weight: 600;

    letter-spacing: 1.5px;

}


.accommodations-intro h2 {

    font-family:
        "Playfair Display",
        Georgia,
        serif;

    color: var(--color-green);

    font-size: 42px;

    line-height: 1.15;

    font-weight: 500;

}


.accommodations-intro > p:last-child {

    margin-top: 12px;

    font-size: 16px;

}


/* =========================================================
   NOTEBOOKS
   ========================================================= */

@media (max-width: 1200px) {

    .hero-header {

        width: calc(100% - 40px);

    }


    .hero-brand img {

        width: 210px;

    }


    .main-menu {

        gap: 0;

    }


    .main-menu > li > a,
    .submenu-toggle {

        padding-left: 9px;
        padding-right: 9px;

        font-size: 12px;

    }


    .hero-content {

        width: calc(100% - 70px);

    }

}


/* =========================================================
   TABLET Y MOBILE
   ========================================================= */

@media (max-width: 900px) {

    .hero-home {

        height: 700px;
        min-height: 700px;

    }


    .hero-background {

        inset: -3%;

        background-position: center center;

    }


    .hero-overlay {

        background:
            linear-gradient(
                90deg,
                rgba(9, 17, 9, 0.70),
                rgba(9, 17, 9, 0.38)
            );

    }


    /* HEADER */

    .hero-header {

        width: calc(100% - 45px);

        height: 100px;

    }


    .hero-brand img {

        width: 200px;

    }


    .menu-toggle {

        display: block;

        position: relative;

        z-index: 1002;

    }


    .main-navigation {

        position: absolute;

        top: 85px;
        right: 0;

        width: min(370px, 100%);

        display: none;

        padding: 10px 0;

        background:
            rgba(24, 39, 23, 0.98);

        box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.25);

    }


    .main-navigation.open {

        display: block;

    }


    .main-menu {

        display: block;

        width: 100%;

    }


    .main-menu > li {

        width: 100%;

    }


    .main-menu > li > a,
    .submenu-toggle {

        width: 100%;

        min-height: 52px;

        padding: 0 22px;

        justify-content: flex-start;

        font-size: 14px;

    }


    .main-menu > li > a::after,
    .submenu-toggle::after {

        display: none;

    }


    /* SUBMENÚ MOBILE */

    .submenu {

        position: static;

        display: none;

        min-width: 100%;

        opacity: 1;

        visibility: visible;

        transform: none;

        border-radius: 0;

        box-shadow: none;

        background:
            rgba(255, 255, 255, 0.05);

    }


    .has-submenu:hover > .submenu {

        display: none;

    }


    .has-submenu.submenu-open > .submenu {

        display: block;

    }


    .submenu a {

        padding:
            13px 22px
            13px 42px;

    }


    /* HERO CONTENT */

    .hero-content {

        width: calc(100% - 60px);

        margin-top: 85px;

    }


    .hero-content h1 {

        max-width: 680px;

        font-size: 50px;

    }


    .hero-description {

        max-width: 600px;

    }

}


/* =========================================================
   CELULARES
   ========================================================= */

@media (max-width: 600px) {

    .hero-home {

        height: 720px;
        min-height: 720px;

    }


    .hero-background {

        /*
         En teléfono priorizamos el centro de la fotografía.
        */

        background-position: center center;

    }


    .hero-overlay {

        background:
            linear-gradient(
                to bottom,
                rgba(9, 17, 9, 0.48) 0%,
                rgba(9, 17, 9, 0.58) 45%,
                rgba(9, 17, 9, 0.78) 100%
            );

    }


    .hero-header {

        width: calc(100% - 35px);

        height: 92px;

    }


    .hero-brand img {

        width: 175px;

    }


    .menu-toggle {

        width: 44px;
        height: 41px;

    }


    .main-navigation {

        top: 82px;

        width: 100%;

    }


    .hero-content {

        width: calc(100% - 50px);

        margin-top: 100px;

    }


    .hero-eyebrow {

        margin-bottom: 9px;

        font-size: 11px;

        line-height: 1.4;

    }


    .hero-content h1 {

        font-size: 39px;

        line-height: 1.08;

    }


    .hero-description {

        margin-top: 20px;

        font-size: 16px;

        line-height: 1.55;

    }


    .hero-actions {

        margin-top: 32px;

        flex-direction: column;

        align-items: flex-start;

        gap: 13px;

    }


    .button {

        min-height: 54px;

        padding:
            0 20px;

        font-size: 15px;

    }


    .accommodations-intro {

        min-height: 220px;

        padding:
            60px 20px
            45px;

    }


    .accommodations-intro h2 {

        font-size: 34px;

    }

}


/* =========================================================
   ACCESIBILIDAD - REDUCIR MOVIMIENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }


    .hero-background {

        animation: none;

        transform: scale(1);

    }


    .hero-scroll span {

        animation: none;

    }

}

