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


:root {

  /* ===== COLORS ===== */

  --color-primary: #6C78D6;
  --color-primary-dark: #4E57A8;
  --color-accent-warm: #E2C6B5;

  --color-text-dark: #111215;
  --color-text-soft: #2A2D36;

  --color-background: #F4F2EE;
  --color-surface: #FFFFFF;

  --color-border: #B7B2A8;


  /* ===== TYPOGRAPHY ===== */

  --font-main: "figtree", sans-serif;

  /* ===== FONT WEIGHTS ===== */

  --font-light: 300;
  --font-regular: 400;
  --font-bold: 700;

}

  /* ----------------------------- ROOT FINISH ----------------------------- */


  /* ----------------------------- PRELOADER ----------------------------- */


/* ============================= */
/* PRELOADER */
/* ============================= */

/* Preloader completo, cubre toda la pantalla */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-text-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;

  /* transición para el telón */
  transition: transform 1s cubic-bezier(0.10, 0, 0, 1);
}

/* Estado "cerrado" (visible) */
.preloader.active {
  transform: translateY(0%);
}

/* Estado "abierto" (telón subido) */
.preloader.hidden {
  transform: translateY(-100%);
}

.preloader-lottie{
  width:5vhpx;
}






  /* ===== TEXT BODY ===== */

body {
  font-family: "figtree", sans-serif;
  font-weight: 300;
  font-size: 1.125vw;      /* ya reducido ~10% */
  line-height: 1.2;         /* más compacto que antes */
  color: var(--color-text-dark);
  background-color: var(--color-background);
}

.body-large {
  font-size: 1.475vw;
  line-height: 1.25;        /* ligeramente mayor que body normal */
}

.small {
  font-size: 0.91vw;
  line-height: 1.15;
}

/* ===== Headings ===== */

/* Color general */
h1, h2, h3, h4 {
  color: var(--color-primary);
}

h1 {
  font-size: 6.67vw;       
  line-height: .8;      
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 4.13vw;
  line-height: .85;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 2.54vw;
  line-height: .9;
  font-weight: 700;
}

h4 {
  font-size: 1.57vw;
  line-height: .95;
  font-weight: 700;
}

  /* ===== HEADER STILO ===== */

  .site-header {

  position: fixed;
  bottom: 0;
  left: 0;

  width: 100%;
  height: 15vh;

  background-color: var(--color-text-dark);

  z-index: 1000;
  }

  .header-row {

  display: flex;
  justify-content: space-between;

  align-items: center;
  margin: 2vh auto 0 auto;
  width: 100%;

}


.header-container {

  width: 100%;
  height: 100%;

  padding-left: clamp(20px, 6vw, 80px);
  padding-right: clamp(20px, 6vw, 80px);

  display: flex;
  align-items: flex-start;

  }


  /* ===== LOGOTIPO HEADER ===== */

  .logo img {
  height: 2.5vh;
  }

  /* ===== CONTACT BUTTON ===== */

.contact-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  
  font-family: var(--font-main);
  font-weight: var(--font-light); /* peso light */
  font-style: italic;             /* cursiva */
  
  color: var(--color-text-dark);
  text-decoration: none;
  border-radius: 12px;                 
  background-color: var(--color-primary); 
  overflow: hidden;

  /* Animación wiggle orgánico aumentado y más lento */
  animation: wiggleOrganic 5s ease-in-out infinite;
  transform-origin: center;
  transition: all 0.3s ease;
}

/* Texto encima */
.button-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

/* Hover con gradiente trippy */
.contact-button:hover {
  animation-play-state: paused; /* opcional: pausa wiggle al hover */
  background: linear-gradient(270deg, #FFE600, #FF7A00, #FF2BD6, #7B00FF, #00FFA8);
  background-size: 1000% 1000%;
  animation: neonBg 6s ease infinite, wiggleOrganic 5s ease-in-out infinite; 
  color: white;
}

/* Animación gradiente para hover */
@keyframes neonBg {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Wiggle orgánico con 25% más amplitud */
@keyframes wiggleOrganic {
  0%   { transform: translate(0,0) rotate(0deg); }
  10%  { transform: translate(2.5px,-1.25px) rotate(0.625deg); }
  20%  { transform: translate(-2.5px,1.25px) rotate(-0.5deg); }
  30%  { transform: translate(1.25px,-2.5px) rotate(0.375deg); }
  40%  { transform: translate(-1.25px,1.25px) rotate(-0.25deg); }
  50%  { transform: translate(2.5px,0px) rotate(0.5deg); }
  60%  { transform: translate(-2.5px,-1.25px) rotate(-0.375deg); }
  70%  { transform: translate(1.25px,2.5px) rotate(0.25deg); }
  80%  { transform: translate(-1.25px,-1.25px) rotate(-0.25deg); }
  90%  { transform: translate(1.25px,1.25px) rotate(0.375deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}


/* ------------------------ CONTACTO FULLSCREEN ------------------------ */

/* Overlay fullscreen inicial (fuera de la pantalla) */
.contact-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(17, 18, 21, 0.5);                    
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  overflow: hidden;

  transform: translateY(100%);

  /* curva de SALIDA */
  transition: transform 1s cubic-bezier(0.20, 0.00, 0.00, 1.00);
}

.contact-overlay.active {
  transform: translateY(0%);

  /* curva de ENTRADA */
  transition: transform 1s cubic-bezier(0.00, 0.78, 0.29, 0.99);
}

/* Botón de cerrar */
.contact-close {
  position: absolute;
  top: 20px;
  right: 20px;

  width: 5vh;
  height: 5vh;

  background: none;
  border: none;
  cursor: pointer;

  transition: transform 0.25s ease;
}

.contact-close::before,
.contact-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;

  width: 4vh;
  height: 0.3vh;

  background: var(--color-background);

  transform-origin: center;
}

.contact-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.contact-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.contact-close:hover {
  transform: rotate(90deg);
}


/* Contenido del overlay */
.contact-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;

  width: 90%;

  max-height: 80vh;

  padding: 40px;
  gap: 60px;

  overflow-y: auto;

  background-color: var(--color-accent-warm);
  border-radius: 6px;
}

/* ---------------- CONTACT TOP / MARQUESINA ---------------- */

.contact-top {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* líneas superior e inferior */

.contact-top .line {
  width: 100%;
  height: 1px;
  background-color: var(--color-text-dark);
  margin: 15px 0;
}

/* contenedor que recorta la marquesina */

.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* banda que se mueve */

.marquee {
  display: flex;
  flex-shrink: 0;
  gap: 3vw;
  width: max-content;
  align-items: center;
  animation: marquee-scroll 70s linear infinite;
}

/* cada bloque de texto */

.marquee-item {
  font-family: var(--font-main);
  font-weight: var(--font-light);
  font-style: italic;
  font-size: 2.54vh;
  color: var(--color-text-dark);
  display: flex;
  align-items: center;
  gap: 3vw;
  white-space: nowrap;
}

/* asterisco */

.asterisk {
  width: 2vh;
  height: 2vh;
  fill: none;
  stroke: var(--color-text-dark);
  stroke-width: 2px;
  animation: rotate 4s linear infinite;
}

/* animación de la marquesina */

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* rotación del asterisco */

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}


/* --- Columnas de contacto --- */
.contact-columns {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  gap: 2vw;
}

.contact-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.contact-column h3 {
  font-weight: var(--font-bold);
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.contact-column p {
  font-weight: var(--font-light);
  font-style: italic;
  color: white;
}

.contact-column img {
  width: 30px;
  height: 30px;
}

/* --- Footer inferior --- */
.contact-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid var(--color-text-dark);
  padding-top: 20px;
  height: 10vh;
}

.footer-logo img {
  height: 5vh;
}

.footer-text {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  font-size: 1.125vw;
  color: var(--color-text-dark);
}

.footer-text .line-fill {
  flex: 1;
  border-top: 1px solid var(--color-text-dark);
}


/* ------------------------ HERO SECTION ------------------------ */


/* ===== Hero con imagen de fondo ===== */
.hero {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;   /* centra hero-box horizontalmente */
  align-items: center;       /* centra hero-box verticalmente */
  position: sticky;
  top:0;
  z-index:1;
  overflow:hidden;
}

.hero-lottie{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
  will-change: transform;
}


/* ===== Caja principal con stroke, fill y blur ===== */


.hero-box {
  width: 94vw;
  height: 70vh;                  
  /* background-color: rgba(245, 243, 237, 0.25); 
  border: 1px solid white;                     
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(10px);*/
  border-radius: 2vh;

  margin-top: calc((100vh - 15vh - 70vh)/2);
  margin-bottom: auto;
  position:relative;
  z-index:2;
  display: flex;
  flex-direction: column;         /* hijos verticales */
  justify-content: space-between; /* top arriba, bottom abajo */
  align-items: flex-start;        /* alinea contenido a la izquierda */
  
  padding-left: clamp(20px, 3vw, 40px);
  padding-right: clamp(20px, 3vw, 40px);
  padding-top: clamp(20px, 3vw, 40px);
  padding-bottom: clamp(20px, 3vw, 40px);
}

/* ===== Contenedor superior apilado ===== */

.hero-text-top {
  display: flex;
  flex-direction: column;    /* Body arriba y H1 debajo */
  align-items: flex-start;
  gap: 5px;                  /* distancia entre Body y H1 */
  width: fit-content;        /* ancho determinado por H1 */
}

/* Body arriba */
.hero-top-body {
  text-align: right;
  width: 100%;

}

/* H1 arriba */
.hero-top-h1 {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.4em;
}
.hero-top-h1 div:last-child {
  flex: 1;
  display: flex;
  align-items: center;
}

.hero-top-h1 img {
  width: 90%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Contenedor inferior */
.hero-text-bottom {
  width: 100%;
  text-align: right;          /* contenido alineado a la derecha */
}

.hero-top-h1 h1 {
  margin: 0;
}


/* ------------------------ VIDEO REEL SECTION ------------------------ */

/* Sección de video a pantalla completa */
.video-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 5;
}

/* Video de fondo */
.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
/* Contenido de la sección encima del video */
.video-content {
  position: relative;
  z-index: 11;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white; /* ejemplo, ajustar según diseño */
  text-align: center;
}

/* ------------------------ ABOUT ------------------------ */

.about {
  background-color: var(--color-background);
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 6;
  padding-bottom: 10vh;
}

.about-container {
  padding-top: 5vh;
  width: 94vw;
  margin: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.about-title {
  position: -webkit-sticky;
  position: sticky;

  top: 10vh;

  /* ALINEACIÓN: A la izquierda */
  align-self: flex-start; 
  
  /* SINCRONIZACIÓN: 
     Reducimos este margen para que el texto lo alcance mucho antes */
  margin-bottom: 25vh; 
  
  z-index: 10;
  white-space: nowrap;
}

.about-content-wrapper {
  /* ALINEACIÓN: Empujamos la caja hacia el centro/derecha */
  align-self: flex-end; 
  width: 100%;
  max-width: 40vw;
  margin-right: 25vw;
  margin-left: auto; 
}

.reveal-text {
  position: relative;
  padding-bottom: 25vh; /* Espacio final para que no corte de golpe */
}

/* ------------------------ WORK ------------------------ */

/* --- 1. CURSOR FLOTANTE (Typewriter Follower) --- */

/* --- CONTENEDOR DEL CURSOR --- */
.work-item-floating-title {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  display: flex;
  align-items: center; /* Centra el texto verticalmente respecto al círculo */
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
  
  /* Eliminamos el centrado horizontal para que el origen sea la izquierda */
  justify-content: flex-start; 
}

/* --- EL CÍRCULO (Anclado al centro del mouse) --- */
.cursor-circle {
  position: absolute; 
  /* Centramos el círculo exactamente sobre el punto (0,0) del transform */
  left: 0%;
  top: 0%;
  width: 20px; 
  height: 20px;
  background-color: #E2C6B5;
  border-radius: 50%;
  z-index: -1;
  
  /* El translate(-50%, -50%) es lo que hace que el centro del círculo 
     coincida con la punta del mouse */
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.work-item-floating-title.active .cursor-circle {
  transform: translate(-50%, -50%) scale(1);
}

/* --- EL TEXTO (Nace desde el círculo) --- */
.cursor-text {
  font-family: var(--font-main);
  color: var(--color-text-dark);
  
  /* Empujamos el texto un poco a la derecha para que no tape el círculo */
  margin-left: 30px; 
  white-space: nowrap;
}

/* Estilo para cada letra inyectada por JS */
.char {
  display: inline-block;
  opacity: 0;
  transition: opacity 0.2s ease; /* Solo opacidad, sin desplazamiento */
}

.char.visible {
  opacity: 1;
}

/* --- 2. CONTENEDOR PRINCIPAL --- */
.work-section {
  position: relative;
  background-color: var(--color-background);
  min-height: 300vh; /* Altura para el recorrido de scroll */
  z-index: 10;
}

/* Capa de texto central (HOW WE DO) */
.work-sticky-background {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2; /* Por encima de las fotos */
  pointer-events: none; /* Permite interactuar con lo que hay debajo */
}

.work-text-container {
  max-width: 60vw;
  text-align: center;
}

/* --- 3. CAPA DE IMÁGENES (GRID ASIMÉTRICO) --- */
.work-items-layer {
  position: relative;
  z-index: 1; /* Por debajo del texto sticky */
  padding: 0 6vw;
  margin-top: -20vh; 
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.work-item {
  position: relative;
  width: 40vw; /* Ancho base de la caja */
  margin-bottom: 10vh; /* Espacio vertical entre proyectos */
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

/* --- 4. ALINEACIONES ESPECÍFICAS --- */
.item-left { 
  align-self: flex-start; 
}

.item-right { 
  align-self: flex-end; 
  margin-top: -10vh; /* Solapamiento visual */
}

.item-center { 
  align-self: center; 
  width: 45vw; /* Un poco más grande para el centro */
}

/* --- 5. ESTILO E INTERACCIÓN DE IMAGEN --- */
.work-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 15px;
  
  /* Estado inicial: B&W y baja opacidad */
  opacity: 0.3;
  filter: grayscale(100%);
  
  /* Transición premium */
  transition: 
    opacity 0.6s ease-out, 
    filter 0.6s ease-out, 
    transform 0.6s ease-out;
}

.work-item:hover img {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.02); /* Feedback de escala muy sutil */
}

/* --- 6. ELEMENTOS DE CIERRE --- */
.section-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-text-dark);
  z-index: 10;
}