
/* MENUUUUUUU */


.header {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;

  padding: 24px 40px;
  background: #fff;

  z-index: 1000;
}

a{
  text-decoration: none;
}

.header__logo {
  font-weight: 600;
  font-size: 20px;
  align-items: center; 
}

.header__logo span {
  font-size: 12px;
  vertical-align: super;
}

.header__logo .logo-registered {
  width: 30px; 
  height: auto; 
}


/* BUSCADOR */
.header__search {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  width: 400px;
  transition: transform 0.3s ease;
}
.search-prefix {
  position: absolute;
  left: 0;
  bottom: 8px;                 /* alinea con la línea */
  font-family: "Space Mono", monospace;
  font-size: 14px;
  color: #bbb;
  pointer-events: none;
}
.header__search input {
  width: 100%;
  padding: 8px 28px 8px 13px;
  border: none;
  border-bottom: 1px solid #000;
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  outline: none;
  color: #000;
}

.header__search input::placeholder {
  color: #bbb;
}

.search-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #bbb;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.header__icon {
  font-size: 20px;
  cursor: pointer;
}

/* OVERLAY GRIS */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #f0f0f0;
  padding-top: 96px; 
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10;
  inset: 0;
}

/* CONTENIDO */


.search-item {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 24px;
  cursor: pointer;
  position: relative;
}

.search-content span {
  font-size: 30x;
  color: #999;
  font-weight: 400;
  align-self: center;
}

.search-content p {
  font-size: 80px;
  font-weight: 400;
  margin: 0;
  line-height: 1.1;
  cursor: pointer;
  transition: opacity 0.25s ease;
  color: #CFCFCF;
}

.search-item:hover span,
.search-item:hover p {
  color: #000;
}

.search-open .search-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* .search-open .header__search input {
  background: #fff;
} */

.search-open .header {
  background: #f0f0f0;
}

/* .search-open .header__search input {
  background: #fff;
} */

.search-open .search-icon,
.search-open .header__icon {
  color: #555;
}

/* Cruz para cerrar búsqueda */
.header__search::after {
  content: "✕";
  position: absolute;
  right: 38px; 
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #777;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.search-open .header__search::after {
  opacity: 1;
  pointer-events: auto;
}

.search-close {
  position: absolute;
  right: 38px;
  top: 50%;
  transform: translateY(-50%);
  transform: translateY(-50%) scale(0.5); 
  font-size: 14px;
  color: #777;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.3s ease, transform 0.3s ease; 
}

.search-open .search-close {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1); 
}


.search-open .header__search {
  /* transform: translateX(-470px);  */
  transition: transform 0.3s ease; 
}

.search-item::after {
  content: "/";
  position: absolute;
  left: 26px;          /* ajusta según tu diseño */
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: #000;

  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.search-item:hover::after {
  opacity: 1;
}

/* CONTENEDOR GENERAL */
.search-wrapper {
  display: grid;
  grid-template-columns: 420px 1fr;
  height: calc(100vh - 96px);
  padding: 40px 80px;
}

/* LISTA IZQUIERDA */
.search-content {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 24px;
  row-gap: 28px;
  padding: 40px;
  margin-top: 120px;
  margin-left: 80px;
  font-family: "Space Mono", monospace;

  display: grid;
  grid-template-columns: 1fr; /* 👈 UNA columna */
  row-gap: 28px;
}

.search-content p {
  font-size: 70px;
  font-weight: 400;
  margin: 0;
  line-height: 1.1;
  cursor: pointer;
  transition: opacity 0.25s ease;
  transition: color 0.25s ease, transform 0.25s ease;
}

.search-item:hover p {
  transform: translateX(12px); 
}

/* GALERÍA DERECHA */
.hover-gallery {
  position: absolute;
  top: 220px;
  right: 10px;
  width: 660px;

  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;

  pointer-events: none;
  opacity: 0;
  transform: translateY(80px);
  transition:
    opacity 0.35s ease,
    transform 0.6s cubic-bezier(.19,1,.22,1);
  overflow: visible;
}

/* Contenedor oculto para efecto “mascara” */
.hover-img-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden; /* 👈 oculta la parte de la imagen que está fuera */
  position: relative;
}

.hover-img-wrapper img {
  width: 100%;
  transform: translateY(50px); /* empieza abajo */
  opacity: 0;
  transition:
    transform 0.6s cubic-bezier(.19,1,.22,1),
    opacity 0.35s ease 0.1s;
}

/* Estado visible de la galería */
.hover-gallery.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cuando la galería es visible, animamos las imágenes */
.hover-gallery.is-visible .hover-img-wrapper img {
  transform: translateY(0); /* sube desde detrás */
  opacity: 1;
}


/* Header */
.main-header {
  width: 100%;
  height: 10vh;
  background: currentColor;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}


@media (max-width: 1023px) {

  /* HEADER */
  .header {
    padding: 20px 24px;
    grid-template-columns: auto 1fr auto;
  }

  .header__logo {
    font-size: 18px;
  }

  /* BUSCADOR */
  .header__search {
    width: 300px;
    max-width: 300px;
  }

  .search-prefix {
    font-size: 12px;
  }

  /* OVERLAY */
  .search-wrapper {
    grid-template-columns: 1fr;
    padding: 32px 40px;
  }

  .search-content {
    margin-top: 80px;
    margin-left: 20px;
    padding: 24px;
  }

  .search-content p {
    font-size: 48px;
  }

  /* GALERÍA */
  .hover-gallery {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 40px;
    grid-template-columns: repeat(2, 1fr);
  }

  /* Animación búsqueda */
  
}

@media (max-width: 767px) {

  /* HEADER */
  .header {
    padding: 16px 20px;
    grid-template-columns: auto auto;
  }

  .header__logo {
    font-size: 16px;
  }

  /* BUSCADOR */
  .header__search {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    margin-top: 12px;
  }

  .header__search input {
    font-size: 14px;
  }

  /* ICONOS */
  .header__icon {
    font-size: 18px;
  }

  /* OVERLAY */
  .search-overlay {
    padding-top: 120px;
  }

  .search-wrapper {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }

  .search-content {
    margin-top: 40px;
    padding: 0;
  }

  .search-content p {
    font-size: 32px;
  }

  .search-content span {
    font-size: 14px;
  }

  /* GALERÍA: fuera en móvil */
  .hover-gallery {
    display: none;
  }

 
  /* Quitar detalles finos que no funcionan bien en móvil */
  .search-item::after {
    display: none;
  }

  .footer-links{
    text-align: center;
    justify-content: center;
    align-items: center;
  }
}


/* ===== Reset y body ===== */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  position: relative;
}

.pin-spacer {
  width: 100% !important;
  max-width: 100% !important;
}


/* ===== Temas ===== */
:root {
  --bg-light: #ffffff;
  --bg-dark: #111111;
  --text-light: #000000;
  --text-dark: #ffffff;
}

body.light-mode {
  background-color: var(--bg-light);
  color: var(--text-light);
}

body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}


/* Botón modo oscuro */
/* Botón modo oscuro */
/* Botón modo oscuro */
.theme-toggle {
  position: fixed !important;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1000;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle i {
  width: 26px;
  height: 26px;
  font-size: 1.3rem;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Estilos específicos para cada icono */
.theme-toggle .fa-moon {
  color: #000000;
}

.theme-toggle .fa-sun {
  color: #ffffff;
}

/* body.dark-mode .theme-toggle .fa-sun {
  color: #ffffff !important;
} */

/* Efecto hover en iconos */
.theme-toggle:hover i {
  transform: rotate(15deg);
}

.hidden { display: none; }


/* =========================
   DARK MODE
========================= */
body.dark-mode .header {
  background-color: #111;
}

body.dark-mode .header__search input {
  color: #fff;
  border-bottom: 1px solid #fff;
  background: transparent;
}

body.dark-mode .search-prefix,
body.dark-mode .search-icon,
body.dark-mode .header__icon {
  color: #bbb;
}

body.dark-mode .search-item span,
body.dark-mode .search-item p {
  color: #ccc;
}

body.dark-mode .search-item:hover span,
body.dark-mode .search-item:hover p {
  color: #fff;
}

body.dark-mode .search-open .header {
  background-color: #111;
}

body.dark-mode .search-overlay {
  background: #111;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 100svh; 
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-img {
  width: min(60vw, 600px);
  height: auto;
}

/* ===== Cursor trail ===== */
#cursor-trail {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.cursor-image {
  position: absolute;
  width: 140px;
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

/* ===== SECCIÓN 2 - Text scramble ===== */
.text-can {
  position: relative;
  width: 100%;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
  margin: 1rem 0;
  overflow: hidden;
  color: var(--text-light);
}

body.dark-mode .text-can {
  color: var(--text-dark);
}

.text-wrapper-can h2 span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0);
  will-change: transform, opacity;
}

.text-can span.bold { font-weight: 700; }
.text-can span.italic { font-style: italic; }


/* ===== SECCIÓN 3 - Sticky gallery ===== */
#seccion-tres {
  position: relative;
  min-height: 600vh;
}

.img-wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.img-seccion {
  position: absolute;
  width: 20vw;
  max-width: 420px;
  opacity: 0;
  will-change: transform;
}


/* ===== Sección 3 – Textos sobre imágenes ===== */


/* Textos sobre la imagen (funciona con tu animación) */
.img-wrapper .text-left,
.img-wrapper .text-right {
  position: absolute;
  bottom: 30px;
  font-family: 'Inter', sans-serif;
  pointer-events: none;
  transition: opacity 0.3s;
}

.text-right {
  font-weight: 600;
}

body.dark-mode .img-wrapper .text-left,
body.dark-mode .img-wrapper .text-right {
  color: var(--text-dark);
}

.img-wrapper .text-left {
  color: rgb(81, 81, 81);
  left: 10%;
  top: 50%;               
  transform: translateY(-50%); 
  max-width: 22%;
  font-size: clamp(1rem, 2vw, 1.3rem); 
  line-height: 1.4;
  text-align: left;
}

.img-wrapper .text-right {
  color: var(--text-light);
  right: 20px;
  font-size: clamp(5rem, 10vw, 12rem); 
  text-align: left;
}



/* ===== Footer ===== */
.main-footer {
  margin-top: auto;
  align-items: baseline;
  width: 100%;
  background-color: var(--bg-light);
  color: var(--text-light);
  padding: 3rem 2rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  font-family: "Space Mono", monospace;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.dark-mode .main-footer {
  background-color: var(--bg-dark);
  color: var(--text-dark);
  border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-logo-img {
  height: 50px;
  width: auto;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.footer-info { 
  flex: 1 1 200px; 
  max-width: 600px;
  font-size: 0.9rem; 
  line-height: 1.6; 
  text-align: center; 
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-direction: column-reverse;
  align-items: center;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.3s ease;
}

.footer-links a:hover { opacity: 0.6; }

/* =========================
   CUSTOM CURSOR
   ========================= */

/* Oculta el cursor nativo SOLO en desktop */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }
  a, button, input, textarea, select {
    cursor: none;
  }
}

/* wrapper fijo del cursor */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2147483647;
}

/* bola del cursor */
#custom-cursor .cursor-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;

  /* Usa una variable que definimos según el tema */
  background: var(--cursor-color);

  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.3s ease-in-out;
  pointer-events: none;

  /* CORRECCIÓN: el !important iba mal escrito */
  mix-blend-mode: difference !important;

  /* opcional */
  unicode-bidi: isolate;
}

/* efecto hover sobre links/botones */
#custom-cursor .cursor-inner.link-hover {
  transform: translate(-50%, -50%) scale(2);
}

/* Color del cursor por tema (si usas mix-blend-mode:difference, puede ir fijo también) */
body.light-mode { --cursor-color: #000000; }
body.dark-mode  { --cursor-color: #ffffff; }

/* En móvil/tablet: cursor custom OFF */
@media (hover: none), (pointer: coarse) {
  #custom-cursor { display: none; }
  body { cursor: auto; }
}


/* ===== Responsive ===== */
@media (max-width: 768px) {
  .footer-container { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}


@media (max-width: 768px) {
  #cursor-trail .cursor-image {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    transition: opacity 1s ease, transform 1s ease;
  }
}




/* ===============================
   SECCIÓN 3 – MOBILE SOLO TEXTO
================================ */

@media (max-width: 768px) {

  /* Imagen más pequeña (ya aprobado) */
  .img-seccion {
    width: 40vw;
    max-width: 200px;
  }

  /* ⬇️ SOLO BAJAMOS EL PÁRRAFO */
  .img-wrapper .text-left {
    top: 69%;              /* antes 50% */
    transform: translateY(-8%);
    max-width: 130vw;
    font-size: 0.8rem;
    line-height: 1.7;
    margin-right: 4%;
    padding-top: 2%;
  }

  .img-wrapper .text-right {
    order: 3;
    margin-top: 0;
    font-size: 2.4rem;
    text-align: left;
  }
}