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

body, html , .green-background {
margin: 0;
padding: 0;
overflow-x: hidden;
}


.loading-screen {
  width: 100dvw;
  height: 100dvh;
 background-color:  rgba(0, 0, 0, 0.493);
 backdrop-filter: blur(7px);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap:20px;
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 200px;
  padding: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-accent);
  --_m:
    conic-gradient(#0000 10%, #000),
    linear-gradient(#000 0 0) content-box;
  -webkit-mask: var(--_m);
  mask: var(--_m);
  -webkit-mask-composite: source-out;
  mask-composite: subtract;
  animation: l3 1s infinite linear;
}

@keyframes l3 {
  to {
    transform: rotate(1turn)
  }
}

body{
background: linear-gradient(
 0deg,
 rgba(240, 240, 240, 1) 85%,
 rgb(255, 175, 248) 100%
  
  );
}

.green-background {
  background:  rgb(1, 59, 4);
}

.black-background {
  background: #000;
}

/* === EFECTO LÍNEAS DE FONDO === */
body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 2px,
    #ffffff0d 4px
  );
  background-size: auto 100%;
  pointer-events: none;
  z-index: -1;
}

/* === CURSOR === */
.custom-cursor {
  width: 70px;
  height: 50px;
  border-radius: 30%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  color:#FF98E9;
}


/* === HEADER MENU === */
.header-menu , .header-inverted{
display:flex;
flex-direction:row;
justify-content:space-between ;
z-index: 9999;
background-color: transparent;
 gap: 1rem;
    padding: 1rem;
}

.marca , .inverted-marca{
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 5px;
}


.marca-link , .inverted-marca-link {
  color: inherit;
  text-decoration: none;
}

.header-menu .marca-link:hover .marca h1,
.header-menu .marca-link:hover .marca h4,
.header-menu .button:hover {
  color: var(--color-accent);
}


/* === SIDEBAR PANEL === */
.button,
.inverted-button {
   font-family: "texgyreheros", sans-serif;
  font-weight: 700;
  font-style: bold;
  margin: 0;
  text-transform: uppercase;
  background-color: transparent;
  border: none;
  font-size: 24px;
  transition: color 0.3s ease;
   letter-spacing: -0.1rem;
}

.button{
  color:black;
}

.inverted-button {
  color: white;
  gap:1rem;
}



.button:hover,
.inverted-button:hover {
  color: var(--color-accent);
  cursor: pointer;
}


.sidebar ul li a {
   font-family: "texgyreheros", sans-serif;
   font-weight: 400;
   font-style:italic;
    font-size: 50px;
    display: block;
    color: white;
    transition: all 0.3s ease;
}

.sidebar ul li a:hover {
  color: var(--color-accent);
  text-shadow: 0 0 15px var(--color-accent);
  cursor: pointer;
}
.sidebar {
    padding: 10px 20px;
    z-index: 1000;
    width: 100vw;
    height: 107vh;
    background-color:  rgba(1, 50, 4, 0.613);
    backdrop-filter: blur(15px);
    position: absolute;
    top: 0px;
    right: 0px;
    
}



.sidebar ul li {
  overflow: hidden;
  padding-bottom: 50px;
}
.primary-menu{
  margin-top: 50px;
  
}

/* === BOTÓN CLOSE === */
.close {
  padding: 40px;
  font-family: "texgyreheros", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  color: white;
  transition: all 0.3s ease;
}
.close:hover {
  color: var(--color-accent);
  text-shadow: 0 0 10px var(--color-accent);
  cursor: pointer;
}


/* ====== Hero con modelo 3D ====== */

.hero {
  
  height: 100vh;
  cursor: none; 
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}


#three-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}


/* Texto flotante */
#cursor-text {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  color: rgb(0, 0, 0);
  font-size: 1rem;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

#cursor-text.show {
  opacity: 1;
}

/* === INTRO === */

.intro {
padding:20px;
position: absolute;
width: 100vw;
z-index: 2;
justify-content: center;
align-content: end;
height:70vh;

  
}


/* === HOVER EFECTO === */
.project-data::after {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: calc(100% + 16px);
  height: calc(100% - 2px);
  background: var(--color-accent);
  transition: transform 0.3s ease;
  transform: scaleX(0);
  transform-origin: left;
  z-index: -1;
}
.project-item:hover .project-data::after {
  transform: scaleX(1);
}
.project-item:hover .project-data {
  color: rgb(10, 10, 10) !important;
}

/* === PORTFOLIO === */
.portfolio-container::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-background);
  opacity: 0.3;
  z-index: 100;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.portfolio-container {
  padding-top: 50px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background-color: rgb(0, 0, 0);
  justify-content: start;
  width: 100vw;
  height: 100vh;
  counter-reset: project-counter 0;
}

/* === LISTA DE PROYECTOS === */
.project-list {
  list-style: none;
  margin: 20px;
  padding: 20px;
  
}

.project-item {
  cursor: pointer;
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr 2fr 1fr 1fr 80px;
  grid-column-gap: 2rem;
  padding: 12px 0;
  align-items: center;
  border-bottom: 1px solid rgba(200, 255, 200, 0.1);
  transition: all 0.3s ease;
  opacity: 1;
  position: relative;
  color:white;
  font-family: var(--font-primary);
  font-size: 24px;
}

.project-item.active {
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(200, 255, 200, 0.2),
    inset 0 -1px 0 rgba(200, 255, 200, 0.2);
}

.portfolio-container.has-active .project-item {
  opacity: 0.3;
}
.portfolio-container.has-active .project-item.active {
  opacity: 1;
}

.project-item::before {
  content: counter(project-counter, decimal-leading-zero);
  counter-increment: project-counter;
  padding: 4px 0;
  line-height: 0.8;
  opacity: 0.6;
  justify-self: start;
  z-index: 10;
  position: relative;
  transition: opacity 0.1s ease;
}
.project-item.counter-hidden::before {
  opacity: 0.05;
}

/* === DATOS DE PROYECTO === */
.project-data {
  font-family: var(--font-primary);
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  color: white;
  z-index: 1;
  transition: all 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  padding: 2px;
}
.project-data.artist
 {
  justify-self: start;
}
.project-data.year {
  justify-self: end;
  text-align: right;
}

/* === HOVER EFECTO === */
.project-data::after {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: calc(100% + 16px);
  height: calc(100% - 2px);
  background: var(--color-accent);
  transition: transform 0.3s ease;
  transform: scaleX(0);
  transform-origin: left;
  z-index: -1;
}
.project-item:hover .project-data::after {
  transform: scaleX(1);
}
.project-item:hover .project-data {
  color: rgb(10, 10, 10) !important;
}

/* === IMAGEN DE FONDO === */
#backgroundImage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50vw;
  height: inherit;
  transform: translate(-50%, -50%) scale(0.1);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.6s ease,
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
  pointer-events: none;
  /*mix-blend-mode: lighten;*/
}

/* === ESQUINAS === */
.corner-elements {
  position: fixed;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  pointer-events: none;
  padding: 2rem;
  z-index: 200;
}

.corner-item {
  font-family: var(--font-primary);
  color: var(--color-foreground);
  font-size: 12px;
  padding: 8px;
  pointer-events: auto;
}

.corner-item a {
  color: var(--color-foreground);
  text-decoration: none;
}
.corner-item a:hover {
  text-decoration: underline;
}

.top-left {
  align-self: start;
  justify-self: start;
}
.top-right {
  align-self: start;
  justify-self: end;
}
.bottom-left {
  align-self: end;
  justify-self: start;
}
.bottom-right {
  align-self: end;
  justify-self: end;
}

.corner-square {
  background-color: var(--color-foreground);
  width: 8px;
  height: 8px;
}

.time-blink {
  animation: blink 1s steps(1) infinite;
}

/* === VIDEO MODAL === */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.video-modal.active {
  display: flex;
  opacity: 1;
}
.video-modal video {
  max-width: 90%;
  max-height: 80%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}
.video-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 30px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s;
}
.video-close:hover {
  transform: scale(1.2);
}

/* === ANIMACIÓN PARPADEO === */
@keyframes blink {
  50% {
    opacity: 0;
  }
}


/*carrusel branding*/

.branding-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden; /* Prevents scrollbars on the body */
  padding-top: 50px;
}


.project {
  cursor: pointer;                     /* 👆 muestra que es clicable */
  transition: transform 0.3s ease;
  position: relative; /* Needed for the overlay */
}

/* The color overlay */
.project::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project:hover {
  transform: scale(1.02);              /* pequeño zoom opcional */
}

#branding {
  cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 471 464"><path fill-rule="evenodd" clip-rule="evenodd" d="M434 222L2.11563e-05 222L1.94079e-05 242L434 242L225 450L239 464L471 232L239 4.07531e-05L225 14L434 222Z" fill="black" style="fill:rgba(244,189,239,1);fill-opacity:1;"></path></svg>'), auto;
  position: relative;
}

#branding .project {
  width:80vw;
  height:100vh;
  display:inline-block;
  cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 471 464"><path fill-rule="evenodd" clip-rule="evenodd" d="M434 222L2.11563e-05 222L1.94079e-05 242L434 242L225 450L239 464L471 232L239 4.07531e-05L225 14L434 222Z" fill="black" style="fill:rgba(244,189,239,1);fill-opacity:1;"></path></svg>'), auto;

}

/* -------- WebKit (Chrome, Edge, Safari) -------- */
#branding::-webkit-scrollbar {
  width: 12px !important;
}

#branding::-webkit-scrollbar-track {
 
  border-radius: 10px !important;
}

#branding::-webkit-scrollbar-thumb {
  background-color: var(--color-accent) !important;
  border-radius: 10px !important;
}

#branding::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-accent) !important;
}

#branding{
  
  overflow-y:scroll;
  overflow-x:hidden;
  transform: rotate(270deg) translateX(-100%);
  transform-origin: top left;
  position:absolute;
  width:100vh;
  height:100vw;
}
#work-2 {
  transform: rotate(90deg) translateY(-100vh);
  transform-origin: top left;
  white-space:nowrap;
  font-size:0;
}

.amet {
background-image: url("assets/branding/amet/amet-cover.webp");
background-repeat: no-repeat;
  background-size: auto;
  background-size: contain;
}
.fino {
 background-image: url("assets/branding/fino bar/fino-cover.webp");
 background-repeat: no-repeat;
  background-size: auto;
  background-size: contain;
}
.einatime {
 background-image: url("assets/branding/einatime/einatime-cover.webp");
 background-repeat: no-repeat;
  background-size: auto;
  background-size: contain;
}
.chocomel{
 background-image: url("assets/branding/chocomel/chocomel-cover.webp");
 background-repeat: no-repeat;
  background-size: auto;
  background-size: contain;
}
.mamantonia {
 background-image: url("assets/branding/mamantonia/mamantonia-cover.webp");
 background-repeat: no-repeat;
  background-size: auto;
  background-size: contain;
}


/* Translating the content's X ruines the scrollbar length. */
/*
#container {
  overflow:scroll;
  transform: rotate(90deg) translateY(-100%);
  transform-origin: top left;
  background-color:#999;
  position:absolute;
  width:100vh;
  height:100vw;
}
#container2 {
  transform: rotate(-90deg) translateX(-100vw);
  transform-origin: top left;
  white-space:nowrap;
}
*/


/* --- LIGHTBOX --- */
/* --- LIGHTBOX --- */
#gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
}

#gallery-lightbox.active {
  display: flex;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: transparent; /* ya usamos fondo en el contenedor */
}

/* --- CONTENIDO CENTRADO --- */
.gallery-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* --- CONTENEDOR DEL MEDIA --- */
.gallery-media-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

/* --- IMAGEN O VIDEO --- */
.gallery-media {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  transition: opacity 0.3s ease;
}

/* --- BOTONES --- */
.nav-btn,
#close-btn {
  position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  z-index: 20;
  transition: 0.3s;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.nav-btn:hover,
#close-btn:hover {
  color: #ddd;
}

/* Flechas */
#prev-btn { left: 2%; top: 50%; transform: translateY(-50%); }
#next-btn { right: 2%; top: 50%; transform: translateY(-50%); }

/* Botón de cerrar */
#close-btn {
  top: 0;
  right: 0;
  font-size: 2.5rem;
}

/* === VIDEO MODAL === */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.video-modal.active {
  display: flex;
  opacity: 1;
}
.video-modal video {
  max-width: 90%;
  max-height: 80%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}
.video-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 30px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s;
}
.video-close:hover {
  transform: scale(1.2);
}




.gallery-media video {
  background: black;
}


/* === RESPONSIVE === */


@media (max-width: 768px) {

  .web{
     width:100vw;
    height:65vh;
  }
  .portfolio-container {
    width:100vw;
    height:auto;
  }
  .project-item {
    grid-template-columns: 30px 1fr 1fr;
    grid-column-gap: 1rem;
  }
  .project-data:not(.artist):not(.album) {
    display: none;
  }
  .background-image {
    width: 400px;
    height: 300px;
  }
  .work-2 {
  position: relative;
  height:inherit;
  
}

.gallery-media-container img{
  width:100vw;
  height:100vh;
}

  .carrusel-2 img {
    width:100%;
  }

   .carrusel video {
    width: 90vw;
    height: auto;
  }

  .work-title, .work-title-2 {
    font-size: 1.5rem;
    padding:10px;
    margin:10px;
  }


  .gallery-media-container img{
    width:50vw;
    height:auto;
  }

 

  /* Oculta el cursor personalizado en móviles */
  .custom-cursor {
    display: none;
  }

  /* Intro */
  .intro {
    height: auto;
    padding: 2rem 1rem;
  }

  .intro p {
    position: static;
    font-size: 19px;
    padding: 1rem;
    text-align: left;
  }

  /* Galería */
  .gallery {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 2rem;
  }
  


  .delayed-section {
    position: static;
    width: 100%;
    max-width: 90%;
  }

  .delayed-section img {
    width: 100%;
    height: auto;
  }

  .branding-container {
    height: auto; /* Allow container to grow with content */
    padding-top: 0;
  }


}

/* === FOOTER STYLES === */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3rem;
  background-color: #000;
  color: #fff;
  font-family: var(--font-primary);
  font-size: 14px;
  width: 100%;
  position: relative;
  z-index: 10; /* Ensure it's above most content */
}

.footer-copyright p {
  opacity: 0.7;
  margin: 0;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  color: #fff;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
  color: var(--color-accent);
  transform: scale(1.1);
}

.gallery-media-container img{
  width:100vw;
  height:100vh;
}
/* Inverted Header for dark pages (white text, pink hover) */.header-menu.header-inverted .marca h1, .header-menu.header-inverted .marca h4, .header-menu.header-inverted .button {
  color: white; 
  transition: color 0.3s ease;
}


/* Responsive Footer */
@media (max-width: 768px) {
  .site-footer {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem 1rem;
  }
}

@media (max-width: 768px) { .gallery-media {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0; /* Remove border-radius for full screen */
    object-fit: contain; /* Ensure image is not stretched */
  }

  #branding {
    position: relative;
    transform: none;
    width: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  #work-2 {
    transform: none;
    white-space: normal;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  #branding .project {
    width: 100vw;
    height: 25vh;
    margin: 0 auto;
    background-size:cover;
    background-position:center;
    
  }

  .project-list {
  list-style: none;
  margin-top: 100px;
  padding: 10px;
  
}
}
