/* ========= ORIGINAL ========= */
html{
    font-family: "Khula";
    height: 100vh;
    width: 100vw;
}

body{
    height: 100vh;
    margin: 0px;
    font-size: 16px;
    background-image: url(images/modern\ architecture\ luxury\ house\ build\ to\ blend\ with\ acient\ riuns-b.jpg);
    background-position: left;
    background-size: 170%;
    background-repeat: no-repeat;
    color: white;
    background-color: #260502;

    animation: 80s ease-out 0s 1 both PageBackground;
}

header{
    position: fixed;
    top: 0px;
    height: 7vh;
    width: 100vw;

    background-color: white;
}

    header h1{
        height: 5vh;
        width: 7vw;
        margin: auto;
        margin-top: 1.5vh;
    }

        header h1 a{
            display: block;
            height: 5vh;

            background-image: url(images/Imaageq\ black-no\ slogan.webp);
            background-position: center;
            background-repeat: no-repeat;
            background-size: contain;
        }

        header h1 a *{
            display: none;
        }

main{
    width: 100vw;
    height: 93vh;
}

#cover{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
    top: 50vh;
    background: rgba(0, 0, 0, 0.2); /* or rgba(0,0,0,0.15) for dark mode */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);

    animation: 3s linear 0s 1 both openCover;
}

    #cover *{
        opacity: 0;
        text-shadow: 0px 0px 10px #00000033;
    }

    #cover h5{
        position: absolute;
        font-size: 84px;
        font-weight: 300;
        margin-top: -7.5vh;

        animation: 10s linear 4s 1 FadeInAndOutElements;
    }

        #cover h5 span{
            opacity: 1;
        }

    #cover h4{
        position: absolute;
        font-size: 50px;
        font-weight: 300;
        margin-top: 1.5vh;

        animation: 9s linear 5s 1 both FadeInAndOutElements;
    }

    #cover h3{
        position: absolute;
        font-size: 70px;
        font-weight: 300;
        margin-top: 6.5vh;

        animation: 8s linear 6s 1 both FadeInAndOutElements;
    }

    #cover h2{
        position: absolute;
        font-size: 48px;
        font-weight: 600;
        margin-top: 9vh;

        animation: 10s linear 19s 2 alternate FadeInAndOutElements;
    }

    #cover .dreamviewsLogo{
        position: absolute;
        width: 40vw;
        height: 9.8vw;
        aspect-ratio: 40 / 9.8;
        min-width: 700px;
        margin-top: -6vh;
        background-image: url(images/dreamviews\ hrztl\ logo.svg);
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;

        animation: 2s linear 14s 1 both FadeInElements;
    }

        #cover .dreamviewsLogo img{
            display: none;
        }


footer{
    position: fixed;
    bottom: 0px;
    width: 98vw;
    display: flex;
    flex-direction: row;
    padding: 0px 1vw;
    margin: 0px;
}

#copyright{
    flex-grow: 1;
}

#attribution{
    display: flex;
    align-self: end;
    opacity: 0;
    animation: 2s linear 4s 1 both FadeInElements;
}

#attribution strong{
    display: inline-block;
    padding: 8px;
}

#attribution img{
    width: auto;
    height: 32px;
    
}

@media screen and (width <= 480px) {

        #cover h5{
            font-size: 42px !important;
            margin-top: -7.5vh !important;

        }

        #cover h4{
            font-size: 25px !important;
            margin-top: 1.3vh !important;

        }

        #cover h3{
            font-size: 35px !important;
            margin-top: 6.5vh !important;

        }

        #cover h2{
            font-size: 24px !important;
            margin-top: 15vh !important;
        }

        #cover .dreamviewsLogo{
            width: 60vw;
            height: 57.9vw !important;
            aspect-ratio: 60 / 57.9 !important;
            min-width: 200px;
            margin-top: -14vh !important;

            background-image: url(images/dreamviews\ sqr\ logo.svg) !important;

        }


    #copyright span{
        display: block;
    }
}

@media screen and (width <= 800px) {
    body{
        background-size: cover;

        animation: none;

        animation: 60s ease-in 0s 2 alternate PageBackgroundMobile;
    }

        header h1{
            height: 5vh;
            width: 33vw;
        }

    #cover{
        animation: 3s linear 0s 1 both openCoverMobile;
    }

        #cover h5{
            font-size: 63px;
            margin-top: -7.5vh;

        }

        #cover h4{
            font-size: 37.5px;
            margin-top: 1vh;

        }

        #cover h3{
            font-size: 52.5px;
            margin-top: 6.5vh;

        }

        #cover h2{
            font-size: 36px;
            margin-top: 10vh;
            
        }

        #cover .dreamviewsLogo{
            width: 60vw;
            height: 14.7vw;
            aspect-ratio: 60 / 14.7;
            margin-top: -10vh;

        }


    #copyright span{
        display: block;
    }
}

@media screen and (width < 1280px) and (height < 480) {

        #cover h5{
            font-size: 36px !important;
            margin-top: -2vh !important;

            animation: 2s linear 4s 2 alternate FadeInElements !important;

        }

        #cover h4{
            font-size: 22px !important;
            margin-top: -1vh !important;

            animation: 2s linear 10s 2 alternate FadeInElements !important;
        }

        #cover h3{
            font-size: 28px !important;
            margin-top: -2vh !important;

            animation: 2s linear 12s 2 alternate FadeInElements !important;
        }

        #cover h2{
            font-size: 18px !important;
            margin-top: 12vh !important;

        }

        #cover .dreamviewsLogo{
            width: 60vw !important;
            height: 14.7vw !important;
            aspect-ratio: 60 / 14.7 !important;
            margin-top: -16vh !important;

        }


    #copyright span{
        display: block;
    }
}

@keyframes openCover{
    0%{
        opacity: 0;
        width: 48px;
        min-width:auto;
        padding-top: 48px;
        height: 0px;
        margin-top: 0px;
    }
    0.5%{
        opacity: 1;
        width: 48px;
        min-width:auto;
        padding-top: 48px;
        height: 0px;
        margin-top: 0px;
    }

    50%{
        min-width:48px;
        width: 48px;
        padding-top: 16vh;
        height: 21vh;
        margin-top: -18vh;
    }

    100%{
        width: 50vw;
        min-width: 800px;
        padding-top: 16vh;
        height: 21vh;
        margin-top: -18vh;
    }
}

@keyframes FadeInElements {
    from {
        opacity: 0;
        filter: blur(10px);
        display: none;
    }
    1% {
        display: block;
        opacity: 0;
      }
    to {
        opacity: 1;
        filter: blur(0px);
    }
}

@keyframes FadeInAndOutElements {
    0% {
        opacity: 0;
        filter: blur(10px);
        display: none;
    }
    1% {
        display: block;
        opacity: 0;
      }
    15% {
        opacity: 1;
        filter: blur(0px);
    }
    
    85% {
        
        opacity: 1;
        filter: blur(0px);
    }
    99% {
        display: block;
        opacity: 0;
      }
    100% {
        opacity: 0;
        filter: blur(10px);
        display: none;
    }
}

@keyframes PageBackground {
    0%{
        background-image: url(images/modern\ architecture\ luxury\ house\ build\ to\ blend\ with\ acient\ riuns-b.jpg);
        background-size: 170%;
    }
    100%{
        background-image: url(images/modern\ architecture\ luxury\ house\ build\ to\ blend\ with\ acient\ riuns-b.jpg);
        background-size: 100%;
    }
}


@keyframes openCoverMobile{
    0%{
        opacity: 0;
        width: 48px;
        min-width:auto;
        padding-top: 48px;
        height: 0px;
        margin-top: 0px;
    }
    0.5%{
        opacity: 1;
        width: 48px;
        min-width:auto;
        padding-top: 48px;
        height: 0px;
        margin-top: 0px;
    }

    50%{
        min-width:48px;
        width: 48px;
        padding-top: 16vh;
        height: 21vh;
        margin-top: -18vh;
    }

    100%{
        width: 80vw;
        min-width: 300px;
        min-height: 200px;
        padding-top: 16vh;
        height: 21vh;
        margin-top: -18vh;
    }
}


@keyframes PageBackgroundMobile {
    0%{
        background-image: url(images/modern\ architecture\ luxury\ house\ build\ to\ blend\ with\ acient\ riuns-b.jpg);
        background-position: 0%;
    }
    100%{
        background-image: url(images/modern\ architecture\ luxury\ house\ build\ to\ blend\ with\ acient\ riuns-b.jpg);
        background-position: 100%;
    }
}

/* ========= FIN ORIGINAL ========= */



/* ========= OVERRIDES AÑADIDOS (no borrar original) ========= */

/* 1) Texto unificado (h5.hero-text) y control de cortes */
#cover .hero-text{
  position: relative;
  font-size: clamp(28px, 6vw, 70px);
  font-weight: 300;
  margin: 0;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;                 /* evita que se parta en desktop */
  animation: FadeInAndOutElements 10s linear 4s 1 both; /* misma lógica de aparición */
}

/* En móviles permitimos envolver y balancear líneas */
@media (max-width: 800px){
  #cover .hero-text{
    white-space: normal;
    text-wrap: balance; /* navegadores modernos */
  }
}

/* 2) Centrado vertical del cover y compactarlo alrededor del contenido */
main{
  /* centramos todo el main; dejamos el original arriba por compatibilidad */
  min-height: 93vh;            /* si crece, que no corte */
  display: grid;
  place-items: center;         /* centra vertical y horizontal */
}

#cover{
  top: auto;                   /* neutraliza el empuje hacia abajo */
  margin-top: 0;
  padding: clamp(16px, 4vw, 32px);
  gap: clamp(8px, 2vw, 16px);
  /* usamos animación nueva que no fija height/margin-top */
  animation: 3s linear 0s 1 both openCoverUnified;
}

/* logo más pegado al texto */
#cover .dreamviewsLogo{
  margin-top: .5rem;           /* en vez de -6vh */
}

/* 3) Animación nueva sin height/margin-top forzados */
@keyframes openCoverUnified{
  0%{
    opacity: 0;
    width: 48px;
    padding-top: 24px;
  }
  1%{ opacity: 1; }
  50%{
    width: 48px;
    padding-top: 10px;
  }
  100%{
    width: min(50vw, 1100px);  /* ancho final similar al tuyo */
    /* el alto lo define el contenido (texto + logo + padding) */
  }
}

/* En móvil, misma idea pero con ancho más laxo */
@media (max-width: 800px){
  #cover{
    animation: 3s linear 0s 1 both openCoverUnifiedMobile; /* pisa openCoverMobile */
  }
  @keyframes openCoverUnifiedMobile{
    0%{
      opacity: 0;
      width: 48px;
      padding-top: 24px;
    }
    1%{ opacity: 1; }
    50%{
      width: 48px;
      padding-top: 10px;
    }
    100%{
      width: min(80vw, 720px);
    }
  }
}

/* (Opcional) Si quieres aún más compacto, descomenta:
#cover{ padding: clamp(12px, 3vw, 20px); }
*/

/* ========= FIN OVERRIDES ========= */
