@font-face {
  font-family: Satoshi-R;
  src: url(../css/fuentes/Satoshi-Regular.otf);
}

@font-face {
  font-family: Satoshi-B;
  src: url(..css/fuentes/Satoshi-Bold.otf);
}

@font-face {
  font-family: Casper-M;
  src: url(../css/fuentes/CasperDisplay\ Medium.ttf);
}
@font-face {
  font-family: Casper-L;
  src: url(../css/fuentes/CasperDisplay\ Light.ttf);
}
@font-face {
  font-family: Casper-R;
  src: url(../css/fuentes/CasperDisplay\ Regular.ttf);
}

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

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: #0c0a0a;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  padding-top: 100px;
}

.bg {
  position: fixed;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  width: 200%;
  height: 200vh;
  background: transparent
    url("http://assets.iceable.com/img/noise-transparent.png") repeat 0 0;
  background-repeat: repeat;
  animation: bg-animation 0.2s infinite;
  opacity: 0.9;
  visibility: visible;
}

@keyframes bg-animation {
  0% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(-5%, -5%);
  }
  20% {
    transform: translate(-10%, 5%);
  }
  30% {
    transform: translate(5%, -10%);
  }
  40% {
    transform: translate(-5%, 15%);
  }
  50% {
    transform: translate(-10%, 5%);
  }
  60% {
    transform: translate(15%, 0);
  }
  70% {
    transform: translate(0, 10%);
  }
  80% {
    transform: translate(-15%, 0);
  }
  90% {
    transform: translate(10%, 5%);
  }
  100% {
    transform: translate(5%, 0);
  }
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #0c0a0a00;
  z-index: 9999 !important;
}

.logo img {
  width: 250px;
  height: auto;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding-top: 30px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1.3rem;
  font-family: Casper-M;
  letter-spacing: 0.1em;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.6;
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.icono-derecha img {
  width: 40px;
  height: auto;
  padding-top: 30px;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: #fff;
  transition: 0.3s;
}

.hero {
  padding: 6rem 4rem 4rem;
  display: flex;
  width: 100%;
  align-items: center;
  flex-direction: column;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5vw;
  font-family: Casper-M;
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.4;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero h1::before {
  content: "";
  width: 220px;
  height: 3px;
  background: #fff;
  flex-shrink: 0;
}

.hero p {
  font-size: 2.5vw;
  font-family: Casper-L;
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-align: left;

  opacity: 0;
  transform: translateX(10px);
  animation: aparecer 1s ease forwards;
  animation-delay: 1.5s;
}

@keyframes aparecer {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.gallery {
  padding: 1rem 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: #1a1a1a;
  text-decoration: none;
  color: #fff;
  display: block;
}

.gallery-home .gallery-item:nth-child(1) {
  grid-column: 2 / 3;
}

.gallery-home .gallery-item:nth-child(2) {
  grid-column: 3 / 4;
}

.gallery-home .gallery-item:nth-child(3) {
  grid-column: 1 / 4;
  grid-row: 2;
  aspect-ratio: 2.25/1;
  width: 80%;
  justify-self: start;
}

/* Esta regla de .wide parece que no la usas, pero por si acaso, la limitamos también */
.gallery-home .gallery-item.wide {
  aspect-ratio: 2/1 !important;
  height: auto;
}

.gallery-home .gallery-item:nth-child(4) {
  grid-column: 2 / 3;
  grid-row: 3;
}

.gallery-home .gallery-item:nth-child(5) {
  grid-column: 3 / 4;
  grid-row: 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover video {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: 2rem;
  /* text-align: center; */
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h6 {
  font-family: Casper-L;
  font-size: 3rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.1s;
}

.gallery-item:hover .gallery-overlay h6 {
  transform: translateY(0);
}

.gallery-overlay p {
  font-family: Satoshi-R;

  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.6;
  max-width: 500px;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.2s;
}

.gallery-overlay i {
  font-size: 6rem;
  margin-bottom: 1rem;
}

.gallery-item:hover .gallery-overlay p {
  transform: translateY(0);
}

.gallery-proyectos {
  padding-top: 6rem;
}

.botones {
  display: flex;
  justify-content: flex-end;
  padding: 2rem 4rem;
  overflow: visible;
  position: relative;
}

.boton-default {
  text-decoration: none;
  display: inline-flex;
  font-size: 2rem;
  font-family: Casper-M;
  letter-spacing: 0.1em;
  background-color: transparent;
  border: none;
  color: #fff;
  align-items: center;
}

.boton-default i {
  margin-left: 0.5rem;
  font-size: 3rem;
}

.boton-default span {
  transition: transform 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.boton-default:hover span {
  transform: translateX(-80px);
  opacity: 0.6;
}

.boton-default i {
  transition: transform 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.boton-default:hover i {
  transform: translateX(-40px);
  opacity: 0.6;
}

footer {
  padding: 6rem 4rem 4rem;
  margin-top: 4rem;
}

footer h2 {
  font-size: 4rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  width: 600px;
}

.footer-divider {
  display: inline-block;
  width: 60px;
  height: 1px;
  background: #fff;
  margin: 0 10px;
  vertical-align: middle;
}

.social-links {
  display: flex;
  gap: 3rem;
}

.social-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  transition: opacity 0.3s;
}

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

/* --- ESTILOS AVANZADOS SOBRE MÍ --- */

/* Marquee Infinito (Cinta corredera) */
.marquee-section {
  background: #ffffff;
  color: #0c0a0a;
  padding: 1.5rem 0;
  overflow: hidden;
  white-space: nowrap;
  transform: rotate(-2deg) scale(1.05); /* Ligeramente inclinado para dinamismo */
  margin: -3rem 0 3rem 0;
  z-index: 10;
  position: relative;
  border-top: 5px solid #0c0a0a;
  border-bottom: 5px solid #0c0a0a;
}

.marquee-content {
  display: inline-block;
  animation: marquee 20s linear infinite;
}

.marquee-content span {
  font-family: "Casper-M";
  font-size: 3rem;
  padding-right: 2rem;
  font-weight: bold;
  text-transform: uppercase;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Horizontal Scroll Container */
.scroll-container {
  width: 100%;
  height: 100vh; /* Ocupa toda la pantalla */
  overflow: hidden; /* Esconde lo que se sale */
  display: flex; /* Paneles en fila */
}

.horizontal-scroll-wrapper {
  display: flex;
  flex-wrap: nowrap;
  height: 100%;
}

.panel {
  width: 100vw; /* Cada panel ocupa el ancho de la pantalla */
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-right: 1px solid #222;
  flex-shrink: 0; /* No encogerse */
  position: relative;
  padding: 4rem;
}

/* Estilos de los Paneles */
.intro-panel h2 {
  font-family: "Casper-M";
  font-size: 6rem;
  line-height: 1;
}
.intro-panel p {
  font-family: "Satoshi-R";
  font-size: 1.5rem;
  margin-top: 1rem;
  color: #888;
}

.panel-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 600px;
}

.panel-content .year {
  font-family: "Casper-M";
  font-size: 8rem;
  color: transparent;
  -webkit-text-stroke: 1px #fff; /* Efecto outline */
  opacity: 0.6;
  line-height: 1;
  margin-bottom: -3rem;
  z-index: 99;
}

.panel-img {
  width: 400px;
  height: 300px;
  overflow: hidden;
  margin-bottom: 2rem;
  z-index: 1;
  border: 1px solid #333;
}

.panel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.panel:hover .panel-img img {
  transform: scale(1.1);
}

.panel-content h3 {
  font-family: "Casper-M";
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.panel-content p {
  font-family: "Satoshi-R";
  color: #ccc;
  line-height: 1.6;
}

/* Manifiesto Grid */
.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 6rem 4rem;
  gap: 4rem;
  align-items: center;
}

.manifesto-txt h3 {
  font-family: "Casper-M";
  font-size: 3rem;
  margin-bottom: 2rem;
}

.manifesto-txt p {
  font-family: "Satoshi-R";
  font-size: 1.2rem;
  line-height: 1.8;
}

.stats-list {
  list-style: none;
  margin-top: 2rem;
}

.stats-list li {
  font-family: "Casper-M";
  font-size: 1.5rem;
  border-bottom: 1px solid #333;
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
}

.stats-list li span {
  color: #aaa;
}

.manifesto-visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

/* IFRAME */

.iframe-container {
  width: 100%;
  padding: 4rem 4rem 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.iframe-title {
  text-align: center;
  margin-bottom: 1rem;
}

.iframe-title h3 {
  font-family: "Casper-M", sans-serif;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.iframe-title p {
  font-family: "Satoshi-R", sans-serif;
  font-size: 1.1rem;
  color: #999;
  letter-spacing: 0.05em;
}

.iframe-wrapper {
  width: 100%;
  max-width: 1800px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  background: #000;
}

.iframe-wrapper.bg-white {
  background: #fff;
}

.iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */

/* RESPONSIVE */
@media (max-width: 1152px) {
  .hero h1::before {
    display: none;
  }

  .footer-logo {
    width: 400px;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: #000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s;
    z-index: 999;
  }

  nav.active {
    right: 0;
  }

  .hamburger {
    display: flex;
    z-index: 1000;
  }

  .hero {
    padding: 4rem 2rem 3rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.6rem;
    text-align: center;
  }

  .gallery {
    padding: 2rem;
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(3),
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(5) {
    grid-column: 1;
    grid-row: auto;
  }

  footer {
    padding: 4rem 2rem 3rem;
  }

  footer h2 {
    font-size: 2.5rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .social-links {
    gap: 2rem;
  }

  .icono-derecha {
    display: none;
  }

  .gallery-proyectos {
    padding-top: 6rem;
  }
  .about-hero-dynamic .hero-overlay-text h1 {
    font-size: 15vw;
  }

  .scroll-container {
    /* En móvil desactivamos el scroll horizontal complejo y lo hacemos vertical para mejor UX */
    height: auto;
    overflow: visible;
    display: block;
  }

  .horizontal-scroll-wrapper {
    display: block;
    flex-wrap: wrap;
  }

  .panel {
    width: 100%;
    height: auto;
    padding: 4rem 2rem;
    border-right: none;
    border-bottom: 1px solid #222;
  }

  .manifesto-grid {
    grid-template-columns: 1fr;
  }
  .iframe-container {
    padding: 3rem 2rem 4rem;
  }

  .iframe-title h3 {
    font-size: 2rem;
  }

  .iframe-wrapper {
    border-radius: 4px;
  }
}

@media (max-width: 770px) {
  .hero {
    padding: 3rem 1.5rem 2rem;
  }
  .hero h1 {
    font-size: 1.2rem;
    text-align: center;
  }

  .hero p {
    font-size: 1rem;
  }

  footer h2 {
    font-size: 2rem;
  }

  .social-links {
    flex-direction: column;
    gap: 1rem;
  }

  .hero p br {
    display: none;
  }

  .footer-logo {
    width: 300px;
  }

  .iframe-container {
    padding: 2rem 1.5rem 3rem;
  }

  .iframe-title h3 {
    font-size: 1.5rem;
  }

  .iframe-title p {
    font-size: 0.9rem;
  }

  .iframe-wrapper {
    aspect-ratio: 4/3;
  }
}

/* =========================================
   SISTEMA DE FILTROS
   ========================================= */
.filters-wrapper {
  width: 100%;
  margin: 4rem 0 0px 0; /* Ajusta según el margen de tu H1 */
  display: flex;
  justify-content: center; /* Centrado en Desktop */

  position: relative;
  z-index: 10;
}

.filter-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  font-family: "Casper Display", sans-serif;
  text-transform: uppercase;
  font-size: 14px; /* O 16px si lo ves muy pequeño */
  letter-spacing: 1px;
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 24px;
  border-radius: 50px; /* Estilo píldora elegante */
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* Estado Activo */
.filter-btn.active {
  background: #ffffff;
  color: #0c0a0a; /* Tu color oscuro de fondo */
  border-color: #ffffff;
}

/* Clases para la animación de JS (con !important para pisar temporalmente a AOS si interfiere) */
.gallery-item {
  transition:
    opacity 0.35s ease,
    transform 0.35s ease !important;
}

.gallery-item.filtering-out {
  opacity: 0 !important;
  transform: scale(0.95) !important;
  pointer-events: none;
}

.gallery-item.hidden-by-filter {
  display: none !important;
}

/* HAVEN PREVIEW SECTION */
.haven-section {
  padding: 40px 5%;
}

.haven-wrapper {
  background: #111;
  border-radius: 24px;
  padding: 50px;
  display: flex;
  gap: 50px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid #222;
}

.haven-image-col {
  flex: 1.2;
  min-width: 320px;
}

.haven-browser-dots {
  display: flex;
  gap: 6px;
  padding: 8px 10px 12px 10px;
}

.haven-preview-img {
  width: 100%;
  border-radius: 8px 8px 0 0;
  display: block;
}

.haven-content-col {
  flex: 1;
  min-width: 320px;
  color: white;
}

.haven-title {
  font-size: 36px;
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 1px;
}

.haven-subtitle {
  color: #888;
  font-size: 13px;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.haven-description {
  color: #aaa;
  line-height: 1.7;
  margin-bottom: 32px;
  font-size: 15px;
}

.haven-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.haven-btn {
  padding: 14px 28px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-block;
}

.haven-btn-primary {
  background: white;
  color: black;
}

.haven-btn-primary:hover {
  background: #e5e5e5;
  transform: translateY(-2px);
}

.haven-btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid #333;
}

.haven-btn-secondary:hover {
  border-color: white;
  background: #1a1a1a;
}

.haven-note {
  margin-top: 16px;
  font-size: 12px;
  color: #555;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
  .haven-wrapper {
    padding: 30px 24px;
    gap: 30px;
  }
  .haven-title {
    font-size: 28px;
  }
}

/* =========================================
   RESPONSIVE (Móviles)
   ========================================= */
@media (max-width: 770px) {
  .filters-wrapper {
    justify-content: flex-start;
    margin: 20px 0 40px 0;
    padding: 0 5%; /* Mismo padding lateral de tu layout móvil */
  }

  .filter-container {
    flex-wrap: nowrap;
    overflow-x: auto; /* Scroll horizontal */
    justify-content: flex-start;
    padding-bottom: 5px;
    -ms-overflow-style: none; /* Ocultar scrollbar en IE/Edge */
    scrollbar-width: none; /* Ocultar scrollbar en Firefox */
  }

  /* Ocultar scrollbar en Chrome/Safari/Opera */
  .filter-container::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0; /* Evita que el texto se aplaste */
    font-size: 13px;
    padding: 8px 20px;
  }
}
