/* =====================================================================
   PANEL DE CONTROL MAESTRO (VARIABLES)
   ===================================================================== */
:root {
  /* A) COLORES GLOBALES */
  --black: #0a0a0a;
  --white: #ffffff;
  --light-gray: #F8F9FA;

  /* B) ESPACIADOS */
  --padding-section-top: 100px;
  --padding-section-bottom: 100px;
  --contact-form-offset: 30vh; 

  /* C) NAVEGACIÓN GLOBAL */
  --nav-link-size: 0.75rem;

  /* D) HERO SECTION */
  --size-hero-giant: 19vw;
  --hero-intro-size: 0.65rem;
  --hero-intro-weight: 350;     
  --hero-labels-size: 0.85rem;  
  --hero-card-title-size: 2rem; 
  --hero-card-title-weight: 500;
  --hero-card-sub-size: 0.7rem;
  --hero-card-cat-size: 0.5rem;

  /* E) PROJECT CARDS & SIDEBAR */
  --proj-layout-proportions: 3.2fr 1fr; 
  --proj-card-gap: 90px 110px;           
  --proj-card-title-size: 0.9rem;        
  --proj-card-title-weight: 500;
  --proj-card-sub-size: 0.65rem;         
  --proj-sidebar-header-size: 1.5rem;    
  --proj-sidebar-title-size: 1.5rem;       
  --proj-sidebar-title-weight: 350;
  --proj-desc-size: 0.65rem;             
  --proj-hover-btn-size: 0.65rem;        
  --proj-hover-btn-weight: 500;

  /* F) ABOUT ME */
  --about-marquee-size: 0.65rem;
  --about-bio-size: 0.65rem;
  --about-cv-header-size: 1rem; 
  --about-cv-title-size: 0.8rem;    
  --about-cv-title-weight: 400;
  --about-cv-degree-size: 0.7rem;
  --about-cv-date-size: 0.6rem;
  --about-cv-desc-size: 0.6rem;   

  /* G) CONTACT SECTION */
  --size-contact-giant: 25vw;
  --contact-header-size: 0.8rem;  
  --contact-input-size: 0.8rem;     
  --contact-legal-size: 0.65rem;  
  --contact-btn-size: 0.95rem;    
  --contact-btn-weight: 500;
}

/* =====================================================================
   1. CONFIGURACIÓN BASE Y TEMAS
   ===================================================================== */
html { scroll-behavior: smooth; }
body, html { margin: 0; padding: 0; font-family: 'Roboto Flex', sans-serif; transition: background-color 0.4s ease, color 0.4s ease, opacity 0.4s ease; }
.page-transition { opacity: 0; }

.mono-text, .card-subtitle, .card-category, .text-box, .sidebar-proj-desc, .sidebar-default-text, .popup-info p { 
  font-family: 'Roboto Mono', monospace; font-weight: 300; line-height: 1.6; 
}

/* Temas */
body.theme-day, body.theme-day .portfolio { background-color: var(--black); color: var(--white); }
body.theme-night, body.theme-night .portfolio { background-color: var(--light-gray); color: var(--black); }

/* Animaciones Core */
.animate-on-load { opacity: 0; animation: fadeUpIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.3s; } .delay-3 { animation-delay: 0.5s; }
.delay-4 { animation-delay: 0.7s; } .delay-5 { animation-delay: 0.9s; } .delay-6 { animation-delay: 1.1s; }
@keyframes fadeUpIn { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
.fixed-ui.animate-on-load { animation-name: fadeInOnly; }
@keyframes fadeInOnly { 0% { opacity: 0; } 100% { opacity: 1; } }

.reveal-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* =====================================================================
   IMÁGENES LAZY BLUR
   ===================================================================== */
img.lazy-blur {
  filter: blur(15px);
  opacity: 0.5;
  transform: scale(1.02); /* Escala sutil para que los bordes del blur no se vean raros */
  transition: filter 0.6s ease-out, opacity 0.6s ease-out, transform 0.6s ease-out;
}
img.lazy-blur.loaded {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
}

/* =====================================================================
   2. UI FIJA (Píldoras, Menú, Toggle)
   ===================================================================== */
.fixed-ui {
  position: fixed; z-index: 100; font-size: var(--nav-link-size); letter-spacing: 1px; border-radius: 50px; 
  padding: 10px 20px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border 0.4s ease, color 0.4s ease, left 0.1s linear, top 0.1s linear;
}
body.theme-day .fixed-ui { color: #ffffff; }
body.theme-night .fixed-ui { color: #000000; }

body.theme-day .glass-pill { background: rgba(0, 0, 0, 0.3) !important; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.15) !important; color: #ffffff !important; }
body.theme-night .glass-pill { background: rgba(255, 255, 255, 0.3) !important; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(0, 0, 0, 0.15) !important; color: #000000 !important; }

#theme-toggle-container { top: 40px; left: 50px; padding: 10px 15px; }
#contact-info { top: 40vh; left: 70px; transform: none; }
#insta-info { top: 48vh; left: 70px; transform: none; }
#top-nav { top: 40px; right: 50px; gap: 30px; }
#left-pills-wrapper { display: contents; }

.nav-link { font-family: 'Roboto Flex', sans-serif; color: inherit !important; text-decoration: none; position: relative; display: inline-block; font-variation-settings: "wght" 400, "wdth" 100; transition: font-variation-settings 0.3s ease-out, color 0.3s ease; }
.nav-link:hover { font-variation-settings: "wght" 400, "wdth" 200; }
.nav-link::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 0%; height: 1px; background-color: currentColor; transition: width 0.3s ease-out; }
.nav-link:hover::after { width: 100%; }

.insta-link { display: flex; align-items: center; gap: 10px; }
.insta-text { max-width: 150px; opacity: 1; overflow: hidden; white-space: nowrap; }

.minimal-switch { width: 36px; height: 18px; border-radius: 20px; border: 1.5px solid currentColor !important; background: transparent !important; color: inherit !important; position: relative; cursor: pointer; padding: 0; display: flex; align-items: center; }
.switch-knob { position: absolute; left: 2px; width: 11px; height: 11px; border-radius: 50%; background-color: currentColor !important; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
body.theme-night .switch-knob { transform: translateX(18px); }

#scroll-arrow { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); z-index: 100; color: inherit; pointer-events: none; transition: opacity 0.4s ease, color 0.4s ease; }
@keyframes bounceArrow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(15px); } }
#scroll-arrow svg { animation: bounceArrow 2s infinite ease-in-out; }

/* Página de Proyecto: Ajustes Nav */
@media (min-width: 769px) {
  #insta-info.glass-pill { transition: background 0.4s ease, backdrop-filter 0.4s ease, border 0.4s ease, color 0.4s ease, left 0.1s linear, top 0.1s linear, transform 0.3s ease-out !important; }
  #contact-info.glass-pill:hover ~ #insta-info.glass-pill { transform: translateX(60px) !important; }

  body.page-transition #theme-toggle-container,
  body.page-transition #contact-info,
  body.page-transition #insta-info,
  #back-btn {
    top: 40px !important; height: 38px !important; box-sizing: border-box !important; padding-top: 0 !important; padding-bottom: 0 !important; display: flex !important; align-items: center !important;
  }
  body.page-transition #theme-toggle-container { transform: none !important; }
  body.page-transition #contact-info { left: 135px !important; transform: none !important; }
  body.page-transition #insta-info { left: 385px !important; transform: none !important; }
  #back-btn { right: 50px !important; }
}

/* Botón Volver */
#back-btn {
  font-family: 'Roboto Flex', sans-serif; font-size: var(--nav-link-size) !important; font-variation-settings: "wght" 500, "wdth" 100; letter-spacing: 1px; padding-left: 20px !important; padding-right: 20px !important; border-radius: 50px; gap: 8px; text-transform: uppercase; text-decoration: none !important; transition: transform 0.4s ease, background 0.4s ease, color 0.4s ease, font-variation-settings 0.4s cubic-bezier(0.25, 1, 0.5, 1), padding 0.4s ease;
}
#back-btn:hover { font-variation-settings: "wght" 600, "wdth" 130; padding-left: 26px !important; padding-right: 26px !important; }
body.theme-day #back-btn { background: rgba(0, 0, 0, 0.4) !important; color: #ffffff !important; border: 1px solid rgba(255, 255, 255, 0.3) !important; }
body.theme-day #back-btn:hover { background: #ffffff !important; color: #000000 !important; border-color: #ffffff !important; }
body.theme-night #back-btn { background: rgba(255, 255, 255, 0.4) !important; color: #000000 !important; border: 1px solid rgba(0, 0, 0, 0.3) !important; }
body.theme-night #back-btn:hover { background: #000000 !important; color: #ffffff !important; border-color: #000000 !important; }

/* =====================================================================
   3. SECCIONES HOME (Hero, Portfolio, About, Contact)
   ===================================================================== */
/* -- HERO -- */
.hero { position: relative; height: 100vh; width: 100%; overflow: hidden; transition: background-color 0.4s ease, color 0.4s ease; }
.intro-text { position: absolute; top: 22vh; left: 70px; max-width: 380px; font-size: var(--hero-intro-size); font-weight: var(--hero-intro-weight); line-height: 1.6; letter-spacing: 0.5px; text-transform: uppercase; z-index: 1; }
.hero-bottom-wrapper { position: absolute; bottom: 0; width: 100%; z-index: 10; pointer-events: none; }
.name-labels { display: flex; justify-content: space-between; padding: 0 35px; font-size: var(--hero-labels-size); transform: translateY(-20px); }
.name-container { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; box-sizing: border-box; pointer-events: none; }
.hero-line { display: contents; } 
.word { font-size: var(--size-hero-giant); line-height: 0.72; cursor: crosshair; user-select: none; margin-bottom: 10px; transform: translateY(4%); pointer-events: auto; }
.word-left { padding-left: 0; } .word-right { padding-right: 0; } .word-center { transform: translate(-50%, 4%); }
.word span { display: inline-block; transition: font-variation-settings 0.1s ease-out; }

/* -- CARRUSEL HERO -- */
.carousel-area { position: absolute; top: 120px; bottom: 0; left: 28%; right: 5%; z-index: 20 !important; pointer-events: none; }
.project-card { position: absolute; display: flex; align-items: center; gap: 40px; pointer-events: none; }
.project-card.visible { pointer-events: auto; }
.project-card .card-image-mask, .project-card .card-title, .project-card .card-subtitle, .project-card .card-category { opacity: 0; transform: translateY(30px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.project-card .card-category { transition-delay: 0s; } .project-card .card-subtitle { transition-delay: 0.05s; }
.project-card .card-title { transition-delay: 0.1s; } .project-card .card-image-mask { transition-delay: 0.15s; }
.project-card.visible .card-image-mask, .project-card.visible .card-title, .project-card.visible .card-subtitle, .project-card.visible .card-category { opacity: 1; transform: translateY(0); }
.project-card.visible .card-image-mask { transition-delay: 0s; } .project-card.visible .card-title { transition-delay: 0.15s; }
.project-card.visible .card-subtitle { transition-delay: 0.3s; } .project-card.visible .card-category { transition-delay: 0.45s; }

.card-image-mask { display: block; cursor: grab; width: 25vw; max-width: 300px !important; min-width: 200px !important; aspect-ratio: 4/3; z-index: 1; text-decoration: none; position: relative; overflow: hidden !important; border-radius: 2px; }
.project-card.dragging .card-image-mask { cursor: grabbing; } .project-card.dragging, .project-card.dragging * { transition: none !important; }
.card-image { width: 100%; height: 100%; background-color: transparent; background-size: cover; background-position: center; background-repeat: no-repeat; transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); }
.card-image-mask:hover .card-image { transform: scale(1.08); }

.card-content { display: flex; flex-direction: column; z-index: 2; width: max-content; }
.card-title { margin: 0; font-variation-settings: "wght" var(--hero-card-title-weight), "wdth" 100; font-size: var(--hero-card-title-size); text-transform: uppercase; color: inherit; }
.card-subtitle { margin: 5px 0 20px 0; font-size: var(--hero-card-sub-size); color: inherit; }
.card-category { margin: 5px 0 20px 0; font-size: var(--hero-card-cat-size); font-weight: 300 !important; font-variation-settings: "wght" 300, "wdth" 100; text-transform: uppercase; display: inline-block; width: fit-content; }

.layout-text-right { flex-direction: row; } .layout-text-right .card-content { align-items: flex-start; text-align: left; }
.layout-text-left { flex-direction: row-reverse; } .layout-text-left .card-content { align-items: flex-end; text-align: right; }

/* -- PORTFOLIO GRID -- */
.portfolio { padding-top: var(--padding-section-top); padding-bottom: var(--padding-section-bottom); padding-left: 10px; padding-right: 50px; min-height: auto !important; position: relative; z-index: 10; transition: background-color 0.4s ease, color 0.4s ease; }
.projects-grid-container { display: grid; grid-template-columns: var(--proj-layout-proportions); gap: 60px; max-width: 98%; margin: 0 auto; padding-left: 0; }
.project-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--proj-card-gap); align-content: flex-start; }
.project-card-item { width: 100%; display: flex; flex-direction: column; gap: 12px; cursor: pointer; position: relative; border: 1px solid transparent; background: transparent !important; text-decoration: none; color: inherit; }

.card-image-box { display: block; cursor: grab; width: 12vw; aspect-ratio: 4/3 !important; overflow: hidden !important; z-index: 1; text-decoration: none; position: relative; }
.card-image-inside { width: 100%; height: 100%; background-color: transparent; background-size: cover !important; background-position: center; background-repeat: no-repeat; transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); }
.project-card-item:hover .card-image-inside { transform: scale(1.05); }

.card-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; z-index: 5; }
.project-card-item:hover .card-video, .project-card:hover .card-video { opacity: 1; }

.card-hover-button { position: absolute; top: 12px; left: 12px; z-index: 15; font-family: 'Roboto Flex', sans-serif; font-size: var(--proj-hover-btn-size); font-variation-settings: "wght" var(--proj-hover-btn-weight), "wdth" 100; letter-spacing: 0.5px; padding: 8px 16px; border-radius: 30px; opacity: 0; transform: translateY(-5px); pointer-events: auto; cursor: pointer; background: rgba(0, 0, 0, 0.4) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.3) !important; color: #ffffff !important; transition: opacity 0.4s ease, transform 0.4s ease, background 0.4s ease, color 0.4s ease, font-variation-settings 0.4s cubic-bezier(0.25, 1, 0.5, 1), padding 0.4s ease; }
.project-card-item:hover .card-hover-button { opacity: 1; transform: translateY(0); }
.card-hover-button:hover { font-variation-settings: "wght" 600, "wdth" 130; padding: 8px 24px; background: #ffffff !important; color: #000000 !important; border-color: #ffffff !important; }

.project-card-info-below { position: relative; z-index: 1 !important; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
.project-card-info-below h3 { margin: 0; font-size: var(--proj-card-title-size); font-variation-settings: "wght" var(--proj-card-title-weight), "wdth" 100; text-transform: uppercase; }
.project-card-info-below p { margin: 0; font-size: var(--proj-card-sub-size); font-weight: 300 !important; font-variation-settings: "wght" 300, "wdth" 100; opacity: 0.6;}

.project-sidebar { height: 100%; border-left: none; } 
.sidebar-sticky-content { position: sticky; top: var(--padding-section-top); padding-left: 20px; z-index: 1001; }
.sidebar-header { font-size: var(--proj-sidebar-header-size); margin-top: 0; margin-bottom: 40px; border-bottom: none; padding-bottom: 10px; font-weight: bold; } 
.sidebar-dynamic-content { position: relative; }
.sidebar-default-text { font-size: var(--proj-desc-size); line-height: 1.6; opacity: 1; transition: opacity 0.3s ease; position: relative; }
.sidebar-dynamic-content.active .sidebar-default-text { opacity: 0; position: absolute; pointer-events: none; }
.sidebar-info-wrapper { display: flex; flex-direction: column; opacity: 0; visibility: hidden; position: absolute; top: 0; left: 0; width: 100%; }
.sidebar-dynamic-content.active .sidebar-info-wrapper { opacity: 1; visibility: visible; position: relative; }
.sidebar-proj-title { font-size: var(--proj-sidebar-title-size); margin: 0; font-variation-settings: "wght" var(--proj-sidebar-title-weight), "wdth" 100; text-transform: uppercase; line-height: 1.1; }
.sidebar-proj-subtitle { font-size: var(--proj-card-sub-size); font-weight: 300 !important; font-variation-settings: "wght" 300, "wdth" 100; margin: 8px 0 20px 0; text-transform: uppercase; opacity: 0.6; }
.sidebar-proj-desc { font-size: var(--proj-desc-size); line-height: 1.6; margin: 0; }
.sidebar-anim { opacity: 0; transform: translateY(15px); transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.sidebar-dynamic-content.active .sidebar-anim { opacity: 1; transform: translateY(0); }
.sidebar-dynamic-content.active #sidebar-title { transition-delay: 0.1s; } .sidebar-dynamic-content.active #sidebar-subtitle { transition-delay: 0.2s; } .sidebar-dynamic-content.active #sidebar-desc { transition-delay: 0.3s; }

/* -- ABOUT SECTION -- */
.about-section { padding-top: var(--padding-section-top); padding-bottom: var(--padding-section-bottom); padding-left: 50px; padding-right: 50px; position: relative; z-index: 10; min-height: auto !important; transition: background-color 0.4s ease, color 0.4s ease; }
.marquee-container { width: 100%; overflow: hidden; margin-bottom: 80px; -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-content { display: flex; width: max-content; animation: scroll-left 35s linear infinite; }
.marquee-content span { font-size: var(--about-marquee-size); letter-spacing: 2px; white-space: nowrap; padding-right: 15px; font-weight: 700 !important; font-variation-settings: "wght" 700, "wdth" 100; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.4fr); gap: 60px; width: 100%; margin: 0; }
.about-col-left, .about-col-center, .about-col-right { min-width: 0; }
.about-col-center { margin-left: 6vw; }

.about-giant-text { font-family: 'Roboto Flex', sans-serif; font-size: 12vw; line-height: 0.85; margin-bottom: 60px; display: flex; flex-direction: column; width: 100%; }
.about-photo-wrapper { flex-shrink: 0; margin-left: 15px; height: 0.74em !important; width: auto !important; aspect-ratio: 4/5; overflow: hidden; transform: translateY(-10%); }
.about-word-line { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; }
.about-char { 
  cursor: crosshair; 
  transition: font-variation-settings 1.2s ease-in-out; 
}
.about-photo { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0%) !important; transition: transform 0.4s ease; }
.about-giant-text:hover .about-photo { transform: scale(1.05); }

.about-bio { font-size: var(--about-bio-size); max-width: 90%; }
.cv-header { font-size: var(--about-cv-header-size); text-transform: uppercase; letter-spacing: 1px; margin-top: 0; margin-bottom: 40px; }
.cv-item { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(128, 128, 128, 0.2); }
.cv-item:last-child { border-bottom: none; }
.cv-item-trigger { display: flex; justify-content: space-between; align-items: flex-start; cursor: pointer; position: relative; }
.cv-item-trigger.no-hover { cursor: default; }
.cv-info { flex: 1; padding-right: 20px; }
.cv-item h4 { font-size: var(--about-cv-title-size); font-variation-settings: "wght" var(--about-cv-title-weight), "wdth" 100; margin: 0 0 5px 0; }
.cv-degree, .cv-company { font-size: var(--about-cv-degree-size); margin: 0 0 5px 0; }
.cv-date { font-size: var(--about-cv-date-size); opacity: 0.6; margin: 0 0 15px 0; }
.cv-toggle-icon { font-size: 1.5rem; font-weight: 300; white-space: nowrap; opacity: 0.6; transition: opacity 0.3s ease; display: inline-block; }
.cv-item-trigger:hover .cv-toggle-icon { opacity: 1; }
.cv-accordion { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.cv-accordion.open { grid-template-rows: 1fr; }
.cv-accordion-inner { overflow: hidden; }
.cv-desc { font-size: var(--about-cv-desc-size); line-height: 1.6; margin: 5px 0 0 0; opacity: 0.85; padding-top: 10px; }

/* -- CONTACT SECTION -- */
.contact-section { position: relative; min-height: 100vh; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; padding-top: var(--contact-form-offset); padding-bottom: var(--padding-section-bottom); }
.contact-bg-text { position: absolute; top: 15vh; left: 0; width: 100%; padding: 0 50px; box-sizing: border-box; font-family: 'Roboto Flex', sans-serif; font-size: var(--size-contact-giant); line-height: 0.75; text-transform: uppercase; z-index: 1; pointer-events: none; }
.contact-word-line { display: flex; justify-content: space-between; width: 100%; }
.contact-char { transition: font-variation-settings 1.2s ease-in-out; }

.contact-form-glass { position: relative; z-index: 10; width: 65%; max-width: 850px; margin: 0 !important; padding: 60px; border-radius: 12px; transition: background 0.4s ease, backdrop-filter 0.4s ease, border 0.4s ease, box-shadow 0.4s ease, color 0.4s ease; }
body.theme-day .contact-form-glass { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6); color: #ffffff !important; }
body.theme-night .contact-form-glass { background: rgba(0, 0, 0, 0.03); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border: 1px solid rgba(0, 0, 0, 0.1); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05); color: #000000 !important; }

.form-header-title { font-size: var(--contact-header-size); text-transform: uppercase; letter-spacing: 2px; margin: 0; font-weight: bold; }
.checkbox-text, .privacy-note p { font-size: var(--contact-legal-size); line-height: 1.5; margin: 0; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-top: 40px; }
.form-col { display: flex; flex-direction: column; gap: 40px; }

.glass-input { width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(128, 128, 128, 0.5); padding: 10px 0; font-family: 'Roboto Mono', monospace; font-size: var(--contact-input-size); color: inherit; transition: border-bottom-color 0.4s ease, padding-left 0.4s ease; resize: none; }
.glass-input:focus { outline: none; padding-left: 10px; }
body.theme-day .glass-input:focus { border-bottom-color: #ffffff; }
body.theme-night .glass-input:focus { border-bottom-color: #000000; }
.glass-input::placeholder { color: inherit; opacity: 0.5; } 
textarea.glass-input { flex-grow: 1; min-height: 120px; }

.checkbox-wrapper { display: flex; align-items: flex-start; gap: 15px; margin-top: auto; cursor: pointer; }
.circle-check { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: transparent; cursor: pointer; position: relative; margin-top: -2px; flex-shrink: 0; transition: border-color 0.3s ease; }
body.theme-day .circle-check { border: 1.5px solid #ffffff; }
body.theme-night .circle-check { border: 1.5px solid #000000; }
.circle-check::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; transform: translate(-50%, -50%); transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), height 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease; }
body.theme-day .circle-check::after { background: #ffffff; }
body.theme-night .circle-check::after { background: #000000; }
.circle-check:checked::after { width: 12px; height: 12px; }

.fluid-link { position: relative; color: inherit; text-decoration: none; font-weight: 700; opacity: 1; }
.fluid-link::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0%; height: 1px; background-color: currentColor; transition: width 0.3s ease; }
.fluid-link:hover::after { width: 100%; }

.form-submit-wrapper { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-top: auto; }
.privacy-note { flex: 1; }
.glass-submit { background: transparent !important; color: inherit; border-radius: 50px; padding: 12px 35px; font-family: 'Roboto Flex', sans-serif; font-variation-settings: "wght" var(--contact-btn-weight), "wdth" 100; font-size: var(--contact-btn-size); letter-spacing: 1px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, font-variation-settings 0.4s cubic-bezier(0.25, 1, 0.5, 1), padding 0.4s ease; flex-shrink: 0; }
body.theme-day .glass-submit { border: 1px solid #ffffff !important; color: #ffffff !important; }
body.theme-night .glass-submit { border: 1px solid #000000 !important; color: #000000 !important; }
.glass-submit:hover { font-variation-settings: "wght" 600, "wdth" 130; padding: 12px 45px; }
body.theme-day .glass-submit:hover { background: #ffffff !important; color: #000000 !important; }
body.theme-night .glass-submit:hover { background: #000000 !important; color: #ffffff !important; }


/* =====================================================================
   4. ESTRUCTURA MAESTRA DE PROYECTOS
   ===================================================================== */
.proj-container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.proj-header-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 80px; align-items: start; }
.proj-title-box h1 { 
  font-size: 4rem; 
  text-transform: uppercase; 
  margin: 0 0 10px 0; 
  line-height: 1; 
  /* Peso ligero y elegante */
  font-family: 'Roboto Flex', sans-serif;
  font-variation-settings: "wght" 400, "wdth" 100; 
}

.proj-title-box h2 { 
  font-size: 1.5rem; 
  margin: 0; 
  /* Mayúsculas y peso ligero */
  text-transform: uppercase; 
  font-family: 'Roboto Flex', sans-serif;
  font-variation-settings: "wght" 300, "wdth" 100; 
  letter-spacing: 1px;
}

.proj-intro-box { 
  font-family: 'Roboto Mono', monospace; 
  font-size: 0.8rem; 
  line-height: 1.6; 
  /* Peso extra fino */
  font-weight: 300; 
}
.proj-3-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.vid-wrapper video { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #111; cursor: pointer; transition: transform 0.3s ease; border-radius: 2px; }
.vid-wrapper video:hover { transform: scale(1.02); }
.vid-caption { margin-top: 15px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }

.proj-section { display: grid; grid-template-columns: 0.6fr 1fr 1fr; gap: 40px; margin-bottom: 80px; align-items: start; width: 100%; }

.proj-section-title h3 { 
  font-size: 2rem; 
  /* Forzado a mayúsculas SIEMPRE */
  text-transform: uppercase; 
  margin: 0; 
  line-height: 1.1; 
  /* Peso ligero y espaciado premium */
  font-family: 'Roboto Flex', sans-serif;
  font-variation-settings: "wght" 300, "wdth" 100; 
  letter-spacing: 1px;
}

.proj-section-text p { 
  font-family: 'Roboto Mono', monospace; 
  /* Letra un poco más pequeña */
  font-size: 0.75rem; 
  line-height: 1.6; 
  margin: 0; 
  opacity: 0.8; 
  
  /* Alineación InDesign: Justificado con última línea a la izquierda */
  text-align: justify; 
  hyphens: auto; 
  -webkit-hyphens: auto;
  
  /* Blindaje contra viudas y huérfanas */
  text-wrap: pretty; 
  orphans: 2; 
  widows: 2; 
}

.proj-section-media { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; box-sizing: border-box; }

.concept-images { justify-content: flex-start; }
.concept-images img {width: 45% !important; flex: 1; min-width: 0; aspect-ratio: 3/4; object-fit: cover; background: #111; border-radius: 2px; }
.plus-sign { font-size: 3rem; font-weight: 300; flex-shrink: 0; }


/* =====================================================================
   5. MÓDULOS DE PROYECTOS ESPECÍFICOS
   ===================================================================== */
/* -- MODAL UNIVERSAL -- */
.video-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); z-index: 999999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; cursor: pointer; transition: opacity 0.4s ease, background-color 0.4s ease; }
.video-modal-overlay.active { opacity: 1; pointer-events: auto; }
.video-modal-overlay video { max-width: 90vw; max-height: 85vh; border-radius: 8px; box-shadow: 0 30px 60px rgba(0,0,0,0.6); cursor: default; }

body.theme-day .video-modal-overlay { background-color: rgba(0,0,0,0.85); }
body.theme-day .video-close { color: #fff; background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3); }
body.theme-day .video-close:hover { background: #fff; color: #000; }
body.theme-night .video-modal-overlay { background-color: rgba(255,255,255,0.85); }
body.theme-night .video-close { color: #000; background: rgba(0, 0, 0, 0.05); border: 1px solid rgba(0, 0, 0, 0.2); }
body.theme-night .video-close:hover { background: #000; color: #fff; }

.video-close { position: absolute; top: 30px; right: 40px; font-family: 'Roboto Flex', sans-serif; font-size: var(--nav-link-size) !important; font-variation-settings: "wght" 500, "wdth" 100; text-transform: uppercase; letter-spacing: 1px; padding: 10px 20px; border-radius: 50px; backdrop-filter: blur(10px); transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); cursor: pointer; }
.video-close:hover { padding: 10px 26px; font-variation-settings: "wght" 600, "wdth" 130; }

/* -- CAJA SCATTER UNIVERSAL -- */
.scatter-container { position: relative; width: 100%; height: 80vh; min-height: 600px; border-radius: 4px; overflow: hidden; }
.scatter-title { position: absolute; top: 20px; left: 30px; z-index: 0; font-size: 1.5rem; opacity: 0.7; }
.scatter-vid { position: absolute; width: 14%; min-width: 120px; aspect-ratio: 3/4; object-fit: cover; cursor: grab; transition: box-shadow 0.3s ease; border-radius: 2px; }
.scatter-vid:active { cursor: grabbing; box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.scatter-vid.returning { transition: left 0.6s cubic-bezier(0.25, 1, 0.5, 1), top 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important; }

/* -- PRIMAD -- */
.primad-merch-wrapper { width: 60%; margin: 0 auto 80px auto; }

/* -- ARKITEKT -- */
.ark-viewer-container { width: 100%; border-radius: 4px; padding: 40px; box-sizing: border-box; display: flex; flex-direction: column; gap: 30px; }
.ark-main-display { width: 100%; height: 75vh; max-height: 550px; background: transparent; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.ark-main-display img, #modal-img-player { max-width: 100%; max-height: 100%; object-fit: contain !important; transition: opacity 0.3s ease, transform 0.3s ease; filter: drop-shadow(0px 20px 30px rgba(0,0,0,0.15)); }
.ark-thumbnails { display: flex; justify-content: center; margin-top: 20px; gap: 15px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.ark-thumbnails::-webkit-scrollbar { display: none; }
.ark-thumb { height: 80px; cursor: pointer; opacity: 0.4; transition: all 0.3s ease; border-radius: 2px; }
.ark-thumb:hover { opacity: 0.8; transform: translateY(-2px); }
.ark-thumb.active { opacity: 1; transform: scale(1.05); }

.ark-moodboard { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; width: 100%; }
.ark-moodboard img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #111; border-radius: 2px; }
img.scatter-vid { width: 18%; aspect-ratio: auto; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.ark-hero-vid { width: 40%; min-width: 450px; aspect-ratio: 5/4; object-fit: cover; border-radius: 4px; }
.ark-page { box-shadow: none !important; background: transparent !important; border-radius: 0 !important; -webkit-mask-image: radial-gradient(ellipse, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 100%); mask-image: radial-gradient(ellipse, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 100%); }
.ark-page:active { box-shadow: none !important; transform: scale(1.02); }

/* -- MARBLE RUN -- */
.marble-hero-vid { width: 55%; max-width: 800px; min-width: 400px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; cursor: pointer; }
.marble-passes-size { width: 60%; max-width: 850px; min-width: 400px; display: flex; flex-direction: column; gap: 30px; }
.render-images { position: relative; width: 100%; aspect-ratio: 16/9; background: transparent; border-radius: 4px; overflow: hidden; }
.render-pass { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; opacity: 0; z-index: 1; }
.render-range-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent !important; border: none !important; outline: none; cursor: pointer; }
.render-range-slider::-webkit-slider-runnable-track { width: 100%; height: 8px; border-radius: 10px; transition: background 0.4s ease, border 0.4s ease; }
.render-range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; border-radius: 30px; cursor: grab; margin-top: -11px; background: rgba(255, 255, 255, 0.05) !important; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), border 0.4s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.render-range-slider::-webkit-slider-thumb:active { cursor: grabbing; width: 60px; margin-top: -11px; }

body.theme-day .render-range-slider::-webkit-slider-runnable-track { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); }
body.theme-day .render-range-slider::-webkit-slider-thumb { border: 1.5px solid rgba(255, 255, 255, 0.5); }
body.theme-day .render-range-slider::-webkit-slider-thumb:hover { background: rgba(255, 255, 255, 0.3) !important; }
body.theme-night .render-range-slider::-webkit-slider-runnable-track { background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.15); }
body.theme-night .render-range-slider::-webkit-slider-thumb { border: 1.5px solid rgba(0, 0, 0, 0.4); }
body.theme-night .render-range-slider::-webkit-slider-thumb:hover { background: rgba(0, 0, 0, 0.2) !important; }

/* -- TYPICAL SPANISH -- */
.typical-hero-vid { width: 75%; max-width: 1000px; border-radius: 4px; object-fit: cover; }
.typical-bottom-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 80px; align-items: stretch; }
.typical-col-1 { display: flex; flex-direction: column; gap: 20px; }
.typical-col-1 img { width: 100%; height: auto; border-radius: 4px; object-fit: cover; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.typical-col-2 { display: flex; justify-content: center; }
.typical-col-2 video { height: 77%; width: auto; max-width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 4px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.typical-col-3 p { line-height: 1.6; opacity: 0.8; }

/* -- ARCA -- */
.arca-media-wrapper { display: flex; justify-content: center; width: 100%; margin-bottom: 80px; }
.arca-vid { width: 70%; max-width: 900px; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,0.15); transition: transform 0.3s ease; }
.arca-vid:hover { transform: scale(1.02); }
.arca-moodboard { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; width: 100%; }
.arca-moodboard img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 2px; }

/* -- ANTIMATTER -- */
.antimatter-hero-wrapper { max-width: 80%; margin: 0 auto 80px auto; }
.antimatter-hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; width: 100%; }
.antimatter-hero-right { display: flex; flex-direction: column; gap: 20px; }
.antimatter-hero-main, .antimatter-hero-sub { width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.anti-split-galleries { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.anti-gallery-50 .ark-main-display { height: 40vh; max-height: 450px; background: transparent; }
.anti-gallery-100 .ark-main-display { height: 60vh; max-height: 650px; background: transparent; }

/* -- NARRATIVA EXPANDIDA -- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');
.ne-hero-wrapper { max-width: 85%; margin: 0 auto 120px auto; }
.ne-hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; width: 100%; align-items: stretch; }
.ne-hero-derecha { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.ne-hero-main { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.ne-yt-link { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.15); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.ne-yt-link:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.3); }
.ne-hero-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ne-yt-link:hover .ne-hero-img { transform: scale(1.05); }
.yt-play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.6); color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; padding-left: 4px; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); transition: background 0.3s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.ne-yt-link:hover .yt-play-overlay { background: #ff0000; transform: translate(-50%, -50%) scale(1.1); }

/* 2. TÍTULOS DE SECCIÓN NARRATIVA EXPANDIDA */
.ne-section-title { 
  font-size: 2.2rem; 
  text-transform: uppercase; 
  margin: 0 0 20px 0; 
  line-height: 1.1; 
  font-family: 'Roboto Flex', sans-serif;
  font-variation-settings: "wght" 300, "wdth" 100; 
  letter-spacing: 1px;
}

.ne-briefing-top { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 40px; }

.ne-briefing-list { padding-left: 20px; list-style-type: disc; opacity: 0.7; font-size: 0.75rem; line-height: 2; }
.ne-briefing-list li { margin-bottom: 10px; }

.glass-bubble { padding: 30px 40px; border-radius: 20px; transition: background 0.4s ease, backdrop-filter 0.4s ease, border 0.4s ease, box-shadow 0.4s ease; }
/* 3. TEXTOS Y BURBUJAS DE CRISTAL (Estilo Editorial) */
.ne-briefing-text p,
.glass-bubble p { 
  font-family: 'Roboto Mono', monospace; 
  font-size: 0.75rem; 
  line-height: 1.6; 
  margin: 0; 
  opacity: 0.8; 
  
  /* Alineación InDesign */
  text-align: justify; 
  hyphens: auto; 
  -webkit-hyphens: auto;
  text-wrap: pretty; 
  orphans: 2; 
  widows: 2;
}
body.theme-day .glass-bubble { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); }
body.theme-night .glass-bubble { background: rgba(0, 0, 0, 0.03); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border: 1px solid rgba(0, 0, 0, 0.1); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05); }

.ne-interact-row { display: flex; flex-direction: column; gap: 80px; width: 100%; max-width: 900px; margin: 0 auto; }
.ne-interact-item { display: flex; align-items: center; justify-content: center; gap: 40px; }
.ne-interact-item.reverse-layout { flex-direction: row-reverse; }
.ne-interact-text-group { flex: 1; max-width: 500px; }
/* Subtítulos pequeños (Ej: Poke Interactor, Colores, etc.) */
.ne-interact-text-group h4,
.ne-id-col h4 {
  font-family: 'Roboto Flex', sans-serif;
  font-variation-settings: "wght" 400, "wdth" 100;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 15px 20px; 
  font-size: 1.1rem; 
  opacity: 0.8; 
}
.ne-interact-img { width: 250px; height: auto; filter: drop-shadow(0 20px 30px rgba(52,0,237,0.3)); }

.ne-id-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.ne-id-col h4 { margin: 0 0 15px 20px; font-size: 1.1rem; opacity: 0.8; font-weight: 400; }
.ne-color-stack { display: flex; flex-direction: column; gap: 15px; }
.color-pill { width: 100%; height: 60px; border-radius: 50px; display: flex; align-items: center; justify-content: flex-end; padding-right: 30px; box-sizing: border-box; font-size: 0.8rem; letter-spacing: 1px; font-weight: bold; transition: border 0.4s ease; }
body.theme-day .color-pill { border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
body.theme-night .color-pill { border: 1px solid rgba(0, 0, 0, 0.15); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.inter-font-sample { font-family: 'Inter', sans-serif !important; font-size: 1.1rem !important; font-weight: 500 !important; line-height: 1.8 !important; text-align: center; opacity: 0.9; }

/* -- LAS 7 GOTAS -- */
.l7g-hero-wrapper { width: 100%; display: flex; justify-content: center; }
.l7g-hero-video { width: 70%; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
.l7g-interactive-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; border-radius: 4px; padding: 40px; }
.l7g-col { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.l7g-scene { width: 50%; aspect-ratio: 3/2; perspective: 1200px; cursor: grab; }
.l7g-scene:active { cursor: grabbing; }
.l7g-card-3d { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.1s; }
.l7g-card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 4px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); overflow: hidden; }
.l7g-card-face img { width: 100%; height: 100%; object-fit: cover; }
.l7g-card-front { transform: rotateY(0deg); }
.l7g-card-back { transform: rotateY(180deg); }

.l7g-stacked-gallery { position: relative; width: 50%; aspect-ratio: 4/5; display: flex; justify-content: center; align-items: center; }
.l7g-stack-item { position: absolute; max-width: 70%; max-height: 80%; border-radius: 4px; box-shadow: 0 8px 25px rgba(0,0,0,0.2); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease; cursor: zoom-in; }
.l7g-stack-item.item-1 { transform: rotate(-8deg) translate(-20px, 10px); z-index: 1; }
.l7g-stack-item.item-2 { transform: rotate(5deg) translate(20px, -15px); z-index: 2; }
.l7g-stack-item.item-3 { transform: rotate(-2deg) translate(5px, 20px); z-index: 3; }
.l7g-stacked-gallery:hover .l7g-stack-item.item-1 { transform: rotate(-15deg) translate(-40px, 0px); box-shadow: 0 15px 35px rgba(0,0,0,0.3); }
.l7g-stacked-gallery:hover .l7g-stack-item.item-2 { transform: rotate(10deg) translate(40px, -25px); box-shadow: 0 15px 35px rgba(0,0,0,0.3); }
.l7g-stacked-gallery:hover .l7g-stack-item.item-3 { transform: rotate(0deg) translate(0px, 35px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); z-index: 4; }
.l7g-stack-item:hover { transform: scale(1.1) !important; z-index: 10 !important; }

.l7g-marquee-container { width: 100%; overflow: hidden; padding: 40px 0; -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent); mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent); }
.l7g-marquee-content { display: flex; align-items: center; gap: 80px; width: max-content; animation: l7g-scroll-left 30s linear infinite; }
@keyframes l7g-scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.l7g-marquee-content .l7g-svg-logo { height: 30px; width: auto; object-fit: contain; }
body.theme-day .l7g-svg-logo { filter: invert(1); }
body.theme-night .l7g-svg-logo { filter: invert(0); }


/* =====================================================================
   6. CURSOR CONTEXTUAL (PLAY, ZOOM, DRAG y RELLENO SÓLIDO)
   ===================================================================== */
@media (min-width: 769px) {
  * { cursor: none !important; }
  #custom-cursor { 
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; 
    background-color: transparent; pointer-events: none; z-index: 9999999; 
    transform: translate(-50%, -50%) scale(1); 
    transition: background-color 0.2s ease, transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), width 0.2s ease, height 0.2s ease, border-radius 0.2s ease; 
    will-change: left, top, transform; 
    /* Aquí controlas el tamaño y estilo del texto del cursor */
    font-family: 'Roboto Mono', monospace; font-size: 0.6rem; font-weight: 500; letter-spacing: 1px; opacity: 0; color: transparent;
  }
  
  body.theme-day #custom-cursor { border: 2px solid #ffffff; }
  body.theme-night #custom-cursor { border: 2px solid #000000; }
  
  /* Hover normal (Relleno sólido garantizado) */
  #custom-cursor.hovered { transform: translate(-50%, -50%) scale(1.5); }
  body.theme-day #custom-cursor.hovered { background-color: #ffffff !important; }
  body.theme-night #custom-cursor.hovered { background-color: #000000 !important; }

  /* Hover de texto (Play / Zoom / Drag) */
  #custom-cursor.hover-text {
    width: 45px; height: 45px; transform: translate(-50%, -50%) scale(1); opacity: 1;
  }
  body.theme-day #custom-cursor.hover-text { background-color: #ffffff !important; color: #000000; }
  body.theme-night #custom-cursor.hover-text { background-color: #000000 !important; color: #ffffff; }
  
  #custom-cursor::after {
    content: attr(data-cursor-text);
    transition: opacity 0.2s ease;
  }
}


/* =====================================================================
   7. MÓVIL RESPONSIVE (TODO UNIFICADO AQUÍ PARA EVITAR CONFLICTOS)
   ===================================================================== */
@media (max-width: 768px) {
  /* Panel General Móvil */
  :root {
    --padding-section-top: 80px; --padding-section-bottom: 60px; --contact-form-offset: 25vh;  
    --nav-link-size: 0.65rem; --size-hero-giant: 40vw; --hero-intro-size: 0.65rem; --hero-labels-size: 0.85rem;
    --hero-card-title-size: 1.4rem; --hero-card-sub-size: 0.55rem; --hero-card-cat-size: 0.5rem;
    --proj-card-title-size: 0.95rem; --proj-card-sub-size: 0.65rem;
    --size-about-giant: 50vw; --about-bio-size: 0.65rem; --size-contact-giant: 26vw;
  }

  /* Ocultar Barra Nav y Ajustar Botón Volver */
  body:not(:has(.hero)) #top-nav { display: none !important; }
  #back-btn { top: auto !important; right: auto !important; bottom: 30px !important; left: 50% !important; transform: translateX(-50%) !important; width: max-content !important; padding: 12px 30px !important; z-index: 9999; }
  #back-btn:hover { transform: translateX(-50%) scale(1.05) !important; padding: 12px 35px !important; }

  /* Hero Section General */
  .hero { height: 100vh !important; overflow: visible !important; }
  #scroll-arrow { display: none !important; }
  
  /* Interfaz Fija (Píldoras) */
  #left-pills-wrapper { display: flex !important; position: fixed !important; top: 20px !important; left: 15px !important; gap: 8px !important; z-index: 100; }
  #contact-info, #insta-info { position: relative !important; top: auto !important; left: auto !important; right: auto !important; transform: none !important; height: 42px !important; box-sizing: border-box !important; display: flex !important; align-items: center !important; margin: 0 !important; }
  #contact-info { padding: 0 16px !important; width: auto !important; }
  #insta-info { padding: 0 12px !important; } #insta-info .insta-text { display: none !important; } #insta-info .insta-link { gap: 0 !important; }
  #theme-toggle-container { left: auto !important; right: 15px !important; top: 20px !important; transform: none !important; height: 42px !important; padding: 0 16px !important; box-sizing: border-box !important; display: flex !important; align-items: center !important; }
  
  #top-nav { top: auto !important; bottom: 30px !important; right: auto !important; left: 50% !important; transform: translateX(-50%) !important; width: 75%; max-width: 320px; justify-content: space-around; gap: 0; backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important; }
  body.theme-day #top-nav { background: rgba(0, 0, 0, 0.3) !important; border: 1px solid rgba(255, 255, 255, 0.15) !important; color: #ffffff !important; }
  body.theme-night #top-nav { background: rgba(255, 255, 255, 0.3) !important; border: 1px solid rgba(0, 0, 0, 0.15) !important; color: #000000 !important; }
  
  /* Textos Hero */
  .intro-text { top: 90px; left: 5%; width: 90%; max-width: none; text-align: left; }
  .name-labels { padding: 0 2%; transform: translateY(-10px); }
  .hero-bottom-wrapper { padding: 0 20px; box-sizing: border-box; bottom: 5vh !important; }
  .name-container { flex-direction: column !important; width: 100%; justify-content: space-between !important; z-index: 10; margin-bottom: 2px; }
  .hero-line { display: flex !important; width: 100%; justify-content: space-between; font-size: var(--size-hero-giant) !important; line-height: 0.9 !important; transform: none !important; }
  .word, .word-center, .word-left, .word-right { display: contents !important; font-size: inherit !important; line-height: inherit !important; transform: none !important; margin: 0 !important; }
  .word span { transition: font-variation-settings 1s ease-in-out !important; }
  
  /* Carrusel Tarjeta Principal */
  .carousel-area { top: 150px !important; bottom: 25vh !important; height: auto !important; left: 5%; right: 5%; z-index: 20 !important; }
  
  .project-card { 
    flex-direction: column !important; 
    gap: 12px !important; 
    position: relative; 
    width: 55vw !important; 
    max-width: 170px !important; 
  }
  
  /* BLINDAJE DE LA CATEGORÍA PARA QUE NUNCA SE MUEVA EN MÓVIL */
  .card-category { 
    position: absolute !important; 
    top: 12px !important; 
    left: 12px !important; 
    right: auto !important; 
    bottom: auto !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 10 !important; 
    color: #ffffff !important;
    padding: 4px 8px !important;
    align-self: flex-start !important; /* Corta de raíz cualquier alineación flex del padre */
  }

  /* Anulamos la influencia de los layouts sobre la alineación en móvil */
  .layout-text-left .card-category, 
  .layout-text-right .card-category {
    left: 12px !important;
    right: auto !important;
    align-self: flex-start !important;
  }

  /* En móvil, queremos que los textos siempre empiecen desde la izquierda, independientemente de la clase */
  .layout-text-right, .layout-text-left { align-items: flex-start !important; } 
  .layout-text-right .card-content, .layout-text-left .card-content { text-align: left !important; align-items: flex-start !important; margin: 0 !important; width: 100% !important; position: static !important; } 
  
  .card-image-mask { width: 100% !important; min-width: unset; position: relative; }

  /* DEGRADADO SUTIL Y BLUR PARA LA FOTO DEL HERO EN MÓVIL */
  #dynamic-card .card-image-mask::before { 
    content: ''; 
    position: absolute !important; 
    top: 0; left: 0; width: 100%; height: 60%; 
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 100%);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 15%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 15%, rgba(0,0,0,0) 100%);
    z-index: 2; pointer-events: none; 
  }

  /* Portfolio Móvil */
  .portfolio { padding-left: 20px; padding-right: 20px; }
  .projects-grid-container { grid-template-columns: 1fr; padding-left: 0px; }
  .project-sidebar { display: none; }
  .project-list { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 35px 20px !important; padding: 0 !important; }
  .project-card-item { width: 100% !important; margin: 0 !important; position: relative; display: flex !important; flex-direction: column !important; gap: 12px !important; background: transparent !important; }
  .card-hover-button { display: none !important; } 
  .card-image-box { width: 100% !important; aspect-ratio: 4/3 !important; }
  .project-card-info-below { position: relative !important; top: auto !important; left: auto !important; right: auto !important; display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; width: 100% !important; z-index: 5; }
  .project-card-info-below h3 { font-size: var(--proj-card-title-size); font-variation-settings: "wght" var(--proj-card-title-weight), "wdth" 100; color: inherit !important; text-shadow: none !important; margin: 0 !important; line-height: 1.2 !important; }
  .project-card-info-below p { font-family: 'Roboto Mono', monospace !important; font-size: var(--proj-card-sub-size); color: inherit !important; opacity: 0.6; text-shadow: none !important; margin: 0 !important; }

  /* About Móvil */
  .about-section { padding-left: 20px; padding-right: 20px; overflow-x: hidden; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 50px; }
  .about-col-left, .about-col-center, .about-col-right { min-width: auto; }
  .about-col-center { margin-left: 0; } 
  .about-char { transition: font-variation-settings 1s ease-in-out !important; }
  .about-giant-text { width: 100%; font-size: 38vw !important; line-height: 0.95; margin-bottom: 40px; }
  .about-word-line { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; }
  .about-photo-wrapper { margin-left: 0; height: 0.78em !important; width: auto !important; aspect-ratio: 4/5; transform: translateY(-13%); }
  .about-photo { filter: grayscale(0%) !important; transform: scale(1) !important; }
  .about-bio { max-width: 100%; }

  /* Contacto Móvil */
  .contact-section { padding-bottom: 60px; }
  .contact-bg-text { padding: 0 20px; top: 12vh; }
  .contact-form-glass { width: 80% !important; padding: 40px 25px !important; margin: 0 !important; }
  .contact-form { grid-template-columns: 1fr; gap: 30px; margin-top: 30px; }
  .form-submit-wrapper { flex-direction: column; align-items: flex-start; gap: 20px; }
  textarea.glass-input { min-height: 90px; }

  /* Ajustes Generales Proyectos en Móvil */
  .proj-header-grid { grid-template-columns: 1fr; gap: 20px; }
  .proj-title-box h1 { font-size: 2.8rem; }
  .proj-3-col { grid-template-columns: 1fr; gap: 40px; }
  .proj-section { grid-template-columns: 1fr; gap: 20px; width: 100%; max-width: 100vw; overflow: hidden; }
  .proj-section-title h3, .proj-section-text p, .scatter-title { text-align: left !important; }
  
  .proj-section-media.concept-images { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: center !important; width: 100% !important; gap: 15px !important; box-sizing: border-box !important; }
  .concept-images img { width: 42% !important; flex: none !important; min-width: 0 !important; }
  .plus-sign { font-size: 2rem !important; flex-shrink: 0 !important; }
  
  .scatter-container { height: 90vh; min-height: 700px; width: 100%; box-sizing: border-box; }
  .scatter-vid { width: 30%; min-width: 100px; }

  .primad-merch-wrapper { width: 100% !important; margin-bottom: 60px; }

  /* =====================================================================
     CORRECCIÓN GALERÍAS MÓVIL (CENTRADOS Y RECORTES)
     ===================================================================== */
  
  /* 1. Blindamos el contenedor para que no se descentre ni se ensanche */
  .ark-viewer-container { width: 100%; max-width: 100vw; box-sizing: border-box; padding: 0; gap: 15px; margin-bottom: 60px; overflow: hidden; }
  .ark-main-display { width: 100%; height: auto; aspect-ratio: 16/9; } 
  .ark-hero-vid { width: 100%; min-width: 100%; }

  /* 2. Carrusel de miniaturas (Cambiamos el centrado por flex-start para evitar recortes) */
  .ark-thumbnails { 
    width: 100%;
    flex-wrap: nowrap !important; 
    justify-content: flex-start !important; 
    overflow-x: auto !important; 
    scroll-snap-type: x mandatory; 
    padding-bottom: 15px; 
    -webkit-overflow-scrolling: touch; 
  }
  .ark-thumb { scroll-snap-align: start; flex: 0 0 auto; width: auto; height: 60px !important; }

  /* 3. SUSTITUIMOS EL CENTRADO ANTIGUO PARA PRIMAD Y 7 GOTAS */
  /* Al usar flex-start garantizamos que la primera foto siempre esté accesible al deslizar */
  .primad-thumbs-merch, .l7g-thumbs-papel, .l7g-thumbs-planos, .anti-thumbs-vinilo, .anti-thumbs-cd { 
    justify-content: flex-start !important; 
  }
  /* Typical Spanish en Móvil */
  .typical-hero-vid { width: 100%; }
  .typical-spanish-layout { display: flex; flex-direction: column; gap: 40px; }
  .typical-bottom-grid { display: contents; }
  .typical-spanish-layout .proj-header-grid { order: 1; }
  .typical-col-2 { order: 2; } 
  .typical-spanish-layout .proj-section { order: 3; } 
  .typical-col-1 { order: 4; } 
  .typical-col-3 { order: 5; } 
  .typical-spanish-layout .proj-hero-media { order: 6; margin-bottom: 0 !important; } 
  .typical-col-2 video { height: auto; width: 100%; aspect-ratio: 9/16; max-height: 85vh; }

  /* Arca en Móvil */
  .arca-vid { width: 100%; }
  .arca-moodboard { gap: 10px; }

  /* Antimatter en Móvil */
  .antimatter-hero-wrapper { max-width: 100%; }
  .antimatter-hero-grid { grid-template-columns: 1fr; }
  .antimatter-hero-sub { height: auto; aspect-ratio: 4/3; }
  .anti-split-galleries { grid-template-columns: 1fr; gap: 40px; }
  .anti-gallery-50 .ark-main-display, .anti-gallery-100 .ark-main-display { height: auto; aspect-ratio: 16/9; }

  /* Narrativa Expandida en Móvil */
  .ne-hero-wrapper { max-width: 100%; }
  .ne-hero-grid { grid-template-columns: 1fr; } 
  .ne-yt-link { height: auto; aspect-ratio: 16/9; }
  .ne-briefing-top { grid-template-columns: 1fr; gap: 30px; }
  .ne-section-title { font-size: 2.2rem; }
  .ne-interact-item, .ne-interact-item.reverse-layout { flex-direction: column; text-align: center; gap: 20px; }
  .ne-interact-text-group h4 { margin-left: 0; }
  .ne-interact-img { width: 180px; }
  .ne-id-grid { grid-template-columns: 1fr; gap: 60px; }
  .ne-id-col h4 { margin-left: 0; text-align: center; }
  .inter-font-sample { font-size: 0.9rem !important; }
.ne-interact-item .glass-bubble p, 
  .ne-id-col .glass-bubble p { text-align: left !important; }


  /* Las 7 Gotas en Móvil */
  .l7g-hero-video { width: 100%; }
  .l7g-interactive-split { grid-template-columns: 1fr; gap: 60px; padding: 20px; }
  .l7g-scene { width: 100%; }
  .l7g-stacked-gallery { width: 100%; }
  .l7g-marquee-content .l7g-svg-logo { height: 40px; }
}

/* =====================================================================
   TRANSICIÓN DE CORTINILLA (PAGE WIPE) CORREGIDA
   ===================================================================== */
#page-wipe {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 9999999; pointer-events: none;
  transform: translateY(100%); /* Por defecto escondida abajo */
}

body.theme-day #page-wipe { background-color: var(--black); }
body.theme-night #page-wipe { background-color: var(--light-gray); }

/* ESTADO 1: Al cargar la página, la cortinilla ya está tapando la pantalla (sin animación) */
body.wipe-initial #page-wipe { 
  transform: translateY(0); 
  transition: none; 
}

/* ESTADO 2: Destapar (Sube y desaparece por arriba) */
body.wipe-out #page-wipe { 
  transform: translateY(-100%); 
  transition: transform 0.6s cubic-bezier(0.8, 0, 0.2, 1); 
}

/* ESTADO 3: Tapar al salir (Sube desde abajo para tapar) */
body.wipe-in #page-wipe { 
  transform: translateY(0); 
  transition: transform 0.6s cubic-bezier(0.8, 0, 0.2, 1); 
}

/* =====================================================================
   SISTEMA DE TRADUCCIÓN BILINGÜE
   ===================================================================== */
/* 1. Ocultador Maestro */
body.lang-es .lang-en { display: none !important; }
body.lang-en .lang-es { display: none !important; }

/* 2. El Switch de Idioma (Diseño Cápsula Premium) */
#lang-toggle-container { 
  position: absolute; /* Se queda en el Hero, desaparece al hacer scroll */
  top: 40px; 
  left: 150px; 
  z-index: 100;
}

.new-lang-switch {
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

.new-lang-switch:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.lang-slider {
  position: absolute;
  top: 4px; left: 4px;
  height: calc(100% - 8px);
  width: 90px;
  border-radius: 50px;
  background: #ffffff;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

/* Desplazamiento del fondo blanco/negro cuando está en inglés */
body.lang-en .lang-slider { transform: translateX(90px); }

.lang-btn {
  position: relative;
  z-index: 2;
  width: 90px;
  text-align: center;
  background: transparent;
  border: none;
  font-family: 'Roboto Flex', sans-serif;
  font-variation-settings: "wght" 500, "wdth" 100;
  font-size: 0.65rem;
  letter-spacing: 1px;
  padding: 8px 0;
  cursor: pointer;
  transition: color 0.4s ease;
}

/* Colores Dinámicos (Día y Noche) */
body.theme-day .lang-slider { background: #ffffff; }
body.theme-day .lang-btn { color: #ffffff; }
body.theme-day.lang-es .lang-btn[data-lang="es"] { color: #000000; }
body.theme-day.lang-en .lang-btn[data-lang="en"] { color: #000000; }

body.theme-night .new-lang-switch { background: rgba(255, 255, 255, 0.3); border-color: rgba(0, 0, 0, 0.15); }
body.theme-night .lang-slider { background: #000000; }
body.theme-night .lang-btn { color: #000000; }
body.theme-night.lang-es .lang-btn[data-lang="es"] { color: #ffffff; }
body.theme-night.lang-en .lang-btn[data-lang="en"] { color: #ffffff; }


/* 3. Placeholder del formulario de contacto en inglés */
body.lang-en textarea::placeholder { color: transparent; }
body.lang-en textarea { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='50px' width='250px'><text x='0' y='15' fill='gray' font-size='12' font-family='monospace' opacity='0.5'>Write your message here...</text></svg>"); background-repeat: no-repeat; background-position: 0 10px; }
body.lang-en textarea:focus { background-image: none; }

/* 4. Ocultar el botón normal en móvil (usamos pop-up) */
@media (max-width: 768px) {
  #lang-toggle-container { display: none !important; }
}

