/* =============================================================================
   MAIN.CSS — La Providencia Patagonia
   Reset · Tokens · Tipografía · Utilidades · Nav · Footer
   Breakpoints: 1440px · 1024px · 768px
   ============================================================================= */


/* ── 1. Reset ─────────────────────────────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

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

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

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

table {
    border-collapse: collapse;
}


/* ── 2. Custom properties ─────────────────────────────────────────────────── */

:root {
    /* Colores */
    --green-dark:   #197784;
    --green-gray:   #719090;
    --green-light:  #4FB495;
    --violet:       #8D378C;
    --terracota:    #CF4C35;
    --orange:       #E1954F;
    --yellow:       #F1DA67;
    --text-dark:    #0A474F;
    --white:        #FFFFFF;
    --bg-green:     #E3ECE4;
    --text-light:       #7A969A;
    --text-grey-light:  #E3ECE4;

    /* Tipografías */
    --font-heading: "new-spirit", serif;
    --font-body:    "tt-norms-pro", sans-serif;

    /* Escala tipográfica — desktop */
    --fs-h1: 72px;
    --fs-h2: 64px;
    --fs-h3: 48px;
    --fs-h4: 36px;
    --fs-h5: 32px;
    --fs-h6: 24px;

    /* Grid */
    --container-max:     1600px;
    --padding-h:         48px;   /* horizontal en desktop */
    --padding-h-mobile:  24px;
    --padding-inner-h:   80px;   /* padding interno en columnas de texto */
    --section-v:         180px;  /* padding vertical secciones */
    --section-v-mobile:  80px;
}


/* ── 3. Base ──────────────────────────────────────────────────────────────── */

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--text-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.08;
    color: var(--text-dark);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

/* Párrafos */
p {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 27px;
}

/* Links */
a:hover {
    opacity: 0.75;
    transition: opacity 0.2s ease;
}


/* ── 4. Utilidades ────────────────────────────────────────────────────────── */

/* Contenedor centrado */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--padding-h);
}

/* Copete — label/eyebrow encima de títulos */
.copete {
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 27px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    display: block;
}

/* Texto de cuerpo largo */
.cuerpo {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 27px;
    font-weight: 300;
}

/* Etiqueta de botón / link */
.text-button {
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    line-height: 1;
}

/* CTA con flecha animada */
.cta-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--text-dark);
    border-bottom: 2px solid currentColor;
    padding-bottom: 4px;
    transition: gap 0.25s ease, opacity 0.2s ease;
}

.cta-link::after {
    content: '→';
    display: inline-block;
    transition: transform 0.25s ease;
}

.cta-link:hover {
    gap: 14px;
    opacity: 1;
}

.cta-link:hover::after {
    transform: translateX(4px);
}

/* Variante sobre fondo oscuro */
.cta-link--white {
    color: var(--white);
}


/* ── 5. NAV ───────────────────────────────────────────────────────────────── */

.site-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 100;
}

.nav__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: flex-start;
    padding: 24px var(--padding-h);
}

/* Logo */
.nav__logo { display: flex; align-items: center; }

.nav__logo-img {
    height: 148px;
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

/* Estado inicial — transparente sobre hero, scrollea con la página */
.site-header .nav__logo-img--color { display: none; }
.site-header .nav__list a,
.site-header .nav__cta              { color: var(--white); }

/* Estado scrolled — aparece fijo con animación al terminar el hero */
.site-header.is-scrolled {
    position: fixed;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
    animation: nav-slide-down 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.site-header.is-instant {
    animation: none !important;
}

@keyframes nav-slide-down {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.site-header.is-scrolled .nav__inner {
    align-items: center;
    padding-block: 14px;
}

.site-header.is-scrolled .nav__logo-img         { height: 44px; }
.site-header.is-scrolled .nav__logo-img--blanco { display: none; }
.site-header.is-scrolled .nav__logo-img--color  { display: block; }
.site-header.is-scrolled .nav__list a,
.site-header.is-scrolled .nav__cta              { color: var(--text-dark); }

/* Menú — centro */
.nav__menu {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Acciones — derecha */
.nav__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav__list li {
    position: relative;
}

.nav__list li::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1.5px;
    background: var(--white);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.site-header.is-scrolled .nav__list li::after {
    background: var(--terracota);
}

.nav__list li.is-active::after,
.nav__list li.current-menu-item::after {
    transform: scaleX(1);
}

.nav__list a {
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    transition: opacity 0.2s;
}

.nav__list a:hover { opacity: 0.6; }

/* Botón Contacto — pill */
.btn-contacto {
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
    padding: 16px 28px;
    border: none;
    border-radius: 100px;
    background: var(--terracota);
    color: var(--white) !important;
    transition: background 0.25s ease;
    line-height: 1;
}

.btn-contacto:hover,
.site-header.is-scrolled .btn-contacto:hover {
    background: #b83e29;
    opacity: 1;
}

/* Mobile overlay — oculto en desktop */
.nav__overlay { display: none; }

/* Hamburger — oculto en desktop */
.nav__toggle {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 4px;
    color: var(--white);
}

.site-header.is-scrolled .nav__toggle { color: var(--text-dark); }

.nav__toggle-bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav__toggle-bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__toggle-label {
    font-family: var(--font-body);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    line-height: 1;
    color: currentColor;
}

.nav__toggle:focus,
.nav__toggle:focus-visible,
.nav__actions .btn-contacto:focus,
.nav__actions .btn-contacto:focus-visible {
    outline: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}


/* ── 6. Footer ────────────────────────────────────────────────────────────── */

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-footer {
    background: var(--white);
    color: var(--text-dark);
}

/* Main area: logo col + nav grid */
.footer__main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 80px;
    padding-top: 80px;
    padding-bottom: 72px;
    border-bottom: 1px solid rgba(10, 71, 79, 0.10);
}

.footer__logo {
    width: 180px;
    height: auto;
    display: block;
}

.footer__tagline {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-light);
    margin-top: 24px;
    max-width: 280px;
}

/* Nav: 2 rows × 3 cols */
.footer__nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 32px;
}

.footer__nav-title {
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.footer__nav-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__nav-col a,
.footer__address p {
    font-size: 15px;
    color: var(--text-light);
    transition: color 0.2s;
}

.footer__nav-col a:hover { color: var(--text-dark); }

.footer__address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}

.footer__maps-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(10, 71, 79, 0.3);
    border-radius: 100px;
    padding: 9px 18px;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--text-dark);
    transition: border-color 0.2s, background 0.2s;
    white-space: nowrap;
}

.footer__maps-btn:hover {
    border-color: var(--green-dark);
    background: rgba(25, 119, 132, 0.06);
}

/* Bottom bar */
.footer__bottom {
    /* background: var(--text-dark); */
    padding-block: 24px;
}

.footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer__bottom-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer__bottom-left span,
.footer__bottom-left a,
.footer__bottom-right span,
.footer__bottom-right a {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--text-light);
    transition: color 0.2s;
}

.footer__bottom-left a:hover,
.footer__bottom-right a:hover {
    color: var(--text-light);
}


/* ── 7. Page Subnav — compartido entre Proyecto, Reserva y Estancia ─────── */

.page-subnav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #C3D3CE;
    transition: box-shadow 0.3s ease;
}

.page-subnav.is-sticky {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

.page-subnav__inner {
    display: flex;
    align-items: center;
    height: 56px;
}

.page-subnav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    list-style: none;
}

.page-subnav__list li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.page-subnav__list li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--terracota);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.page-subnav__list li:has(.is-active)::after,
.page-subnav__list li:has(a:hover)::after {
    transform: scaleX(1);
}

.page-subnav__link {
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--green-dark);
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.page-subnav__link:hover,
.page-subnav__link.is-active {
    color: var(--text-dark);
    opacity: 1;
}


/* ── 8. Breakpoints ───────────────────────────────────────────────────────── */

/* 1440px — pantallas grandes: sin cambios en el sistema base,
   se puede ampliar si se añaden componentes wide en el futuro */
@media (min-width: 1440px) {
    :root {
        --padding-h: 64px;
        --padding-inner-h: 120px;
    }
}

/* 1024px — tablet landscape / desktop pequeño */
@media (max-width: 1024px) {
    :root {
        --fs-h1: 52px;
        --fs-h2: 44px;
        --fs-h3: 36px;
        --fs-h4: 28px;
        --fs-h5: 24px;
        --fs-h6: 20px;
        --padding-h: 40px;
    }

    .footer__main {
        grid-template-columns: 220px 1fr;
        gap: 48px;
    }
}

/* 768px — tablet portrait / móvil grande */
@media (max-width: 768px) {
    :root {
        --fs-h1: 40px;
        --fs-h2: 34px;
        --fs-h3: 28px;
        --fs-h4: 24px;
        --fs-h5: 22px;
        --fs-h6: 18px;
        --padding-h: var(--padding-h-mobile);
        --section-v: var(--section-v-mobile);
    }

    /* Nav mobile: hamburger izq | logo centro | contacto der */
    .nav__menu { display: none; }

    .nav__inner {
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    /* Hamburger → columna izquierda */
    .nav__toggle {
        display: flex;
        order: -1;
        justify-self: start;
    }

    /* Logo → columna central */
    .nav__logo {
        justify-self: center;
    }

    /* Contacto → columna derecha */
    .nav__actions {
        display: flex;
        justify-self: end;
        order: 1;
    }

    .nav__actions .btn-contacto {
        padding: 0;
        font-size: 10px;
        background: transparent;
        border: none;
        color: var(--white) !important;
    }

    .site-header.is-scrolled .nav__actions .btn-contacto {
        color: var(--text-dark) !important;
    }

    .nav__actions .btn-contacto:hover,
    .site-header.is-scrolled .nav__actions .btn-contacto:hover {
        background: transparent;
        opacity: 0.6;
    }

    .nav__logo-img { height: 60px; }
    .site-header.is-scrolled .nav__logo-img { height: 44px; }

    /* ── Overlay full-screen ────────────────────────────────────────────── */
    .nav__overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 99;
        background: var(--green-dark);
        transform: translateY(-100%);
        transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* Cubre el viewport real incluyendo barras del navegador iOS */
        min-height: 100dvh;
    }

    .nav__overlay.is-open {
        transform: translateY(0);
    }

    .nav__overlay-inner {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 100%;
        padding: 100px var(--padding-h-mobile) 56px;
        gap: 48px;
    }

    /* ── Tres links principales grandes ─────────────────────────────────── */
    .nav__overlay-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .nav__overlay-link {
        font-family: var(--font-heading);
        font-size: clamp(44px, 14vw, 64px);
        font-weight: 400;
        font-style: italic;
        color: var(--white);
        display: block;
        line-height: 1.1;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s;
    }

    .nav__overlay-link:hover { color: var(--green-light); opacity: 1; }

    .nav__overlay.is-open .nav__overlay-link:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.10s; }
    .nav__overlay.is-open .nav__overlay-link:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.18s; }
    .nav__overlay.is-open .nav__overlay-link:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.26s; }

    /* ── Info secundaria ─────────────────────────────────────────────────── */
    .nav__overlay-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .nav__overlay.is-open .nav__overlay-meta { opacity: 1; transform: none; transition-delay: 0.34s; }

    .nav__overlay-title {
        display: block;
        font-family: var(--font-body);
        font-size: 10px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.45);
        margin-bottom: 12px;
    }

    .nav__overlay-col ul {
        display: flex;
        flex-direction: column;
        gap: 8px;
        list-style: none;
    }

    .nav__overlay-col ul a {
        font-family: var(--font-body);
        font-size: 14px;
        color: rgba(255, 255, 255, 0.75);
        transition: opacity 0.2s;
        display: block;
    }

    .nav__overlay-col ul a:hover { opacity: 0.6; }

    /* ── CTA ─────────────────────────────────────────────────────────────── */
    .nav__overlay-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14px 32px;
        border: 1.5px solid rgba(255, 255, 255, 0.35);
        border-radius: 100px;
        font-family: var(--font-body);
        font-size: 12px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-weight: 500;
        color: var(--white);
        transition: background 0.25s, border-color 0.25s;
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.35s ease, transform 0.35s ease, background 0.25s, border-color 0.25s;
    }

    .nav__overlay-cta:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.6);
        opacity: 1;
    }

    .nav__overlay.is-open .nav__overlay-cta { opacity: 1; transform: none; transition-delay: 0.42s; }

    /* ── Header cuando el menú está abierto ────────────────────────────── */
    .site-header.menu-open {
        background: var(--green-dark) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
        animation: none !important;
    }

    .site-header.menu-open .nav__inner       { align-items: center; padding-block: 14px; }
    .site-header.menu-open .nav__logo-img    { height: 44px !important; }
    .site-header.menu-open .nav__logo-img--blanco { display: block !important; }
    .site-header.menu-open .nav__logo-img--color  { display: none  !important; }
    .site-header.menu-open .nav__toggle      { color: var(--white) !important; }
    .site-header.menu-open .nav__actions     { display: none; }

    /* ── Hamburger → X ─────────────────────────────────────────────────── */
    .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
    }

    .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(0.3);
    }

    .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
    }

    /* Page Subnav mobile */
    .page-subnav__inner {
        height: 48px;
        padding-inline: 0;
    }

    .page-subnav__list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
    }

    .page-subnav__list::-webkit-scrollbar { display: none; }

    .page-subnav__list li:first-child .page-subnav__link {
        padding-inline-start: var(--padding-h-mobile);
    }

    .page-subnav__list li:last-child .page-subnav__link {
        padding-inline-end: var(--padding-h-mobile);
    }

    /* Fades laterales de scroll horizontal */
    .page-subnav {
        position: sticky;
    }

    .page-subnav::before,
    .page-subnav::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 48px;
        pointer-events: none;
        z-index: 10;
        transition: opacity 0.2s ease;
    }

    .page-subnav::before {
        left: 0;
        background: linear-gradient(to left, transparent, #C3D3CE);
        opacity: 0;
    }

    .page-subnav.scroll-left::before { opacity: 1; }

    .page-subnav::after {
        right: 0;
        background: linear-gradient(to right, transparent, #C3D3CE);
        opacity: 1;
    }

    .page-subnav.scroll-end::after { opacity: 0; }

    .copete { font-size: 10px; }

    /* Footer */
    .footer__main {
        grid-template-columns: 1fr;
        gap: 48px;
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .footer__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 24px;
    }

    .footer__nav-col {
        min-width: 0;
        overflow-wrap: break-word;
    }

    .footer__nav-col ul {
        gap: 6px;
    }

    .footer__nav-col a,
    .footer__address p {
        font-size: 13px;
    }

    .footer__bottom {
        padding-block: 16px;
    }

    .footer__bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .footer__bottom-left span,
    .footer__bottom-left a,
    .footer__bottom-right span,
    .footer__bottom-right a {
        font-size: 9px;
        letter-spacing: 0.04em;
    }

    .footer__bottom-left {
        gap: 16px;
    }
}


/* ── Lazy image fade-in ───────────────────────────────────────────────────── */

.img-reveal {
    transition: opacity 0.4s ease;
}

.img-reveal.is-loading {
    opacity: 0;
}
