/* ============================================
   GRUPO VIER — Estilos
   Para modificar apariencia visual edita aquí.
   Para modificar textos edita grupovier.html
   ============================================ */

/* --- VARIABLES GLOBALES DE COLOR Y FUENTE --- */
:root {
  --ink: #111010;           /* Color principal (negro) */
  --paper: #f5f2ec;         /* Fondo general (crema) */
  --yellow: #D4920A;        /* Amarillo oscuro */
  --yellow-bright: #F5A800; /* Amarillo brillante */
  --yellow-pale: #FDF3DC;   /* Amarillo muy claro (fondos) */
  --mid: #888070;           /* Gris medio (textos secundarios) */
  --rule: #E0DAD0;          /* Color de líneas divisorias */
  --white: #FAFAF8;
}

/* --- RESET Y BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

/* --- CURSOR PERSONALIZADO --- */
#cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--yellow-bright);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s, background .2s, border-radius .2s;
  mix-blend-mode: multiply;
}

#cursor.hover {
  width: 52px;
  height: 52px;
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  mix-blend-mode: normal;
}

/* --- NAVEGACIÓN --- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 3rem;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.logo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow-bright);
  display: inline-block;
  margin-left: 0.15rem;
  margin-bottom: 0.35rem;
}

.logo-img {
  height: 42px;
  width: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.logo-img:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  font-weight: 400;
  transition: color .2s;
}

.nav-links a:hover { 
  color: var(--ink); 
}

/* --- HERO --- */
.hero {
  min-height: 100vh;
  padding: 9rem 3rem 4rem;
  display: grid;
  grid-template-rows: 1fr auto;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-main {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 3rem;
}

.hero-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-label::before {
  content: '';
  width: 2.5rem;
  height: 1px;
  background: var(--yellow);
  display: block;
  flex-shrink: 0;
}

.hero-h1 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: clamp(4rem, 9vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--white);
}



.hero-h1 .outline {
  -webkit-text-stroke: 2px var(--white);
  color: transparent;
  font-style: italic;
}

.hero-h1 .accent { 
  color: var(--yellow); 
}

.hero-side {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 2rem;
  padding-bottom: 0.5rem;
  min-width: 200px;
}

.hero-desc {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--white);
  line-height: 1.9;
  text-align: right;
  max-width: 24ch;
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
}

.hero-stats { 
  display: flex; 
  gap: 4rem; 
}

.stat-n {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--white);
}

.stat-l {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  margin-top: 0.3rem;
}

.hero-location {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  text-align: right;
}

/* --- TICKER --- */
.ticker {
  background: var(--ink);
  padding: 0.85rem 0;
  overflow: hidden;
  border-bottom: 1px solid #1a1a1a;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: tick 30s linear infinite;
}

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

.ticker-item {
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.4);
  padding: 0 2.5rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
}

.ticker-gem {
  width: 5px;
  height: 5px;
  background: var(--yellow-bright);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* --- PORTFOLIO / TRABAJO --- */
#trabajo { 
  border-bottom: 1px solid var(--rule); 
}

.work-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}

.work-header-left {
  padding: 3.5rem 3rem;
  border-right: 1px solid var(--rule);
}

.work-header-right {
  padding: 3.5rem 3rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.sec-tag {
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sec-tag::before {
  content: '';
  width: 1.5rem;
  height: 2px;
  background: var(--yellow);
  display: block;
  flex-shrink: 0;
}

.sec-h2 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.work-desc {
  font-size: 0.82rem;
  color: var(--mid);
  line-height: 1.85;
  max-width: 36ch;
  font-weight: 300;
}

/* RETÍCULA DE PROYECTOS */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  /* El alto ahora es proporcional a la pantalla: min 120px, ideal 15% del ancho, max 220px */
  grid-auto-rows: clamp(120px, 15vw, 220px); 
  gap: 0;
}

.project {
  position: relative; /* CRÍTICO: Esto ancla a las imágenes a esta caja */
  width: 100%;
  height: 100%;
  overflow: hidden; /* Corta cualquier cosa que intente salirse de la celda */
  display: block;
}

.proj-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform .6s cubic-bezier(.25, .46, .45, .94);
}

.proj-bg img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover !important; /* El recorte mágico */
  object-position: center !important;
  display: block;
}

.project:hover .proj-bg { 
  transform: scale(1.05); 
}

.proj-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 16, 16, 0.88);
  opacity: 0;
  transition: opacity .35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  pointer-events: none; /* Permite clics a través del overlay */
}

.project:hover .proj-overlay { 
  opacity: 1; 
}

.proj-name {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.1;
  color: var(--paper);
  margin-bottom: 0.5rem;
}

.proj-cat {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--yellow-bright);
}

.img-clicker {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.proj-bg:hover {
  cursor: pointer;
}

/* Tamaños de celdas en la retícula */
.p1 { grid-column: span 9; grid-row: span 2; }
.p2 { grid-column: span 6; grid-row: span 2; }
.p3 { grid-column: span 3; grid-row: span 2; }
.p4 { grid-column: span 6; grid-row: span 4; }
.p5 { grid-column: span 3; grid-row: span 4; }
.p6 { grid-column: span 4; grid-row: span 1; }

/* Colores de fondo de proyectos (placeholders) */
.c1 { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
.c2 { background: linear-gradient(135deg, #2d1b00 0%, #5c3800 100%); }
.c3 { background: linear-gradient(135deg, #0a2e1a 0%, #1a5c34 100%); }
.c4 { background: linear-gradient(135deg, #1e0a0a 0%, #5c1a1a 100%); }
.c5 { background: linear-gradient(135deg, #0a1a2e 0%, #1a3a5c 100%); }
.c6 { background: linear-gradient(135deg, #2e2a1a 0%, #5c5430 100%); }

/* --- SERVICIOS --- */
#servicios { 
  border-bottom: 1px solid var(--rule); 
}

.services-header {
  padding: 3.5rem 3rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.srv-row {
  display: grid;
  grid-template-columns: 4rem 1fr 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1.75rem 3rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  cursor: none;
}

.srv-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--yellow-pale);
  transition: width .4s cubic-bezier(.77, 0, .18, 1);
}

.srv-row:hover::before { 
  width: 100%; 
}

.srv-row > * { 
  position: relative; 
  z-index: 1; 
}

.srv-n {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--mid);
  font-weight: 400;
}

.srv-name {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  letter-spacing: -0.01em;
  line-height: 1;
}

.srv-desc {
  font-size: 0.8rem;
  color: var(--mid);
  font-weight: 300;
  line-height: 1.6;
}

/* --- MANIFIESTO --- */
.manifesto {
  background: var(--ink);
  padding: 6rem 3rem;
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 5rem;
  align-items: center;
  border-bottom: 1px solid #1a1a1a;
}

.mf-q {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.25;
  color: rgba(245, 242, 236, 0.9);
  letter-spacing: -0.01em;
}

.mf-q strong {
  font-weight: 700;
  font-style: normal;
  color: var(--yellow-bright);
  display: block;
  font-size: 1.1em;
}

.mf-body {
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(245, 242, 236, 0.45);
  line-height: 1.95;
  margin-bottom: 2.5rem;
}

.mf-list { 
  list-style: none; 
}

.mf-list li {
  padding: 0.85rem 0;
  border-top: 1px solid rgba(245, 242, 236, 0.08);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.5);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mf-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--yellow-bright);
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- CONTACTO --- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: flex-start;
  border-bottom: 1px solid var(--rule);
}

.contact-l {
  padding: 5rem 3rem;
  border-right: 1px solid var(--rule);
}

.contact-r {
  padding: 5rem 3rem;
  background: var(--yellow-pale);
  height: 100%;
}

.contact-h {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 50px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 1.5rem 0 3rem;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.ci-item label {
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mid);
  display: block;
  margin-bottom: 0.4rem;
}

.ci-item a, .ci-item span {
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 400;
  transition: color .2s;
}

.ci-item a:hover { 
  color: var(--yellow); 
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 2rem;
}

.f-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.f-row label {
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mid);
}

.f-row input, .f-row textarea {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid #c8c0b0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--ink);
  padding: 0.65rem 0;
  outline: none;
  resize: none;
  transition: border-color .2s;
}

.f-row input:focus, .f-row textarea:focus { 
  border-bottom-color: var(--ink); 
}

.f-row input::placeholder, .f-row textarea::placeholder { 
  color: #b8b0a0; 
}

.btn-submit {
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.1rem 2.5rem;
  cursor: none;
  align-self: flex-start;
  transition: background .25s;
}

.btn-submit:hover { 
  background: var(--yellow); 
  color: var(--ink); 
}

/* --- FOOTER --- */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem;
  border-top: 1px solid var(--rule);
  background-color: var(--paper);
}

.f-logo {
  display: flex;
  align-items: center;
}

.f-logo-img {
  height: 40px; 
  width: auto;
  display: block;
  filter: brightness(0.9); 
}

.f-copy {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
}

.f-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.f-links a {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: all 0.3s ease;
}

.f-links a:hover {
  color: var(--ink);
  letter-spacing: 0.20em;
}

/* --- ANIMACIONES DE ENTRADA --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s ease, transform .75s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ============================================
   MEDIA QUERIES (Diseño Responsivo)
   ============================================ */

/* --- TABLETS Y PANTALLAS MEDIANAS (hasta 1024px) --- */
@media (max-width: 1024px) {
  nav { padding: 1.4rem 2rem; }
  .hero { padding: 8rem 2rem 3rem; }
  .hero-main { gap: 1.5rem; }
  .work-header-left, .work-header-right, 
  .services-header, .srv-row, 
  .manifesto, .contact-l, .contact-r, footer {
    padding: 3rem 2rem;
  }
}

/* ============================================================
   TELÉFONOS MÓVILES (hasta 768px)
   Afecta ÚNICAMENTE a celulares. La versión web no se toca.
   ============================================================ */

@media (max-width: 768px) {
  
  /* Reducimos el padding general de la página para ganar espacio */
  body {
    cursor: auto; /* En celular el cursor personalizado estorba, mejor el por defecto */
  }
  
  nav {
    padding: 1rem 1.5rem;
  }
  
  .nav-links {
    gap: 1rem; /* Acorta la distancia del menú */
  }
  
  .nav-links a {
    font-size: 0.65rem; /* Letra un poco más pequeña en menú */
  }

  /* --- AJUSTES DEL HERO --- */
  .hero {
    padding: 7rem 1.5rem 2rem; /* Menos espacio arriba y a los lados */
    grid-template-rows: auto auto; /* Flexibilidad de filas */
    min-height: auto; /* Evita que se bloquee a pantalla completa si el texto es largo */
  }

  .hero-main {
    grid-template-columns: 1fr; /* Pasamos de 2 columnas a 1 sola fila vertical */
    gap: 1.5rem;
    align-items: start;
  }

  .hero-label {
    margin-bottom: 1rem;
  }

  .hero-side {
    align-items: flex-start; /* Alineamos la descripción a la izquierda */
    justify-content: flex-start;
    padding-bottom: 0;
    min-width: 100%;
  }

  .hero-desc {
    text-align: left; /* Lectura más natural en móviles */
    max-width: 100%;  /* Que use todo el ancho disponible */
    font-size: 0.85rem;
  }

  /* --- PARTE INFERIOR DEL HERO --- */
  .hero-bottom {
    flex-direction: column; /* Apila las estadísticas arriba y la locación abajo */
    align-items: flex-start;
    gap: 2rem;
    padding-top: 2rem;
    margin-top: 2rem;
  }

  .hero-stats {
    flex-direction: column; /* Las estadísticas ahora bajan en lista */
    gap: 1.5rem;
    width: 100%;
  }

  .stat-item {
    display: flex;
    align-items: baseline;
    gap: 1rem; /* Ponemos el número al lado del texto para ahorrar espacio vertical */
  }

  .stat-n {
    font-size: 1.8rem;
  }

  .hero-location {
    text-align: left; /* Locación alineada a la izquierda */
    width: 100%;
  }
  
  /* --- EXTRA: Ajuste a la cuadrícula de portafolio para que no se rompa --- */
  .work-header {
    grid-template-columns: 1fr; /* Una columna para el encabezado */
  }
  .work-header-left {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 2rem 1.5rem;
  }
  .work-header-right {
    padding: 2rem 1.5rem;
  }
  .work-grid {
    display: flex;
    flex-direction: column; /* Los proyectos se listan uno abajo del otro en el celular */
  }
  .project {
    height: 250px; /* Alto fijo y cómodo para el dedo en pantallas móviles */
  }
}

  /* 5. Servicios adaptados */
  .services-header { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 1.5rem; 
    padding: 2.5rem 1.5rem; 
  }
  .srv-row { 
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem !important; 
    padding: 2rem 1.5rem !important; 
  }

  /* 6. Manifiesto y Contacto */
  .manifesto { 
    grid-template-columns: 1fr; 
    padding: 4rem 1.5rem; 
    gap: 2.5rem; 
  }
  .contact { grid-template-columns: 1fr; }
  .contact-l { 
    border-right: none; 
    border-bottom: 1px solid var(--rule); 
    padding: 3rem 1.5rem; 
  }
  .contact-r { padding: 3rem 1.5rem; }
  .contact-h { font-size: 2.2rem; }

  /* 7. Footer */
  footer { 
    flex-direction: column; 
    gap: 2rem; 
    padding: 3rem 1.5rem; 
    text-align: center; 
  }
  .f-links { 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 1.2rem; 
  }
}
/* ============================================
   ICONO DE PLAY BLANCO PURO Y HASTA ARRIBA
   ============================================ */

/* Usamos :has para detectar qué proyectos tienen video y le inyectamos el botón a su texto (overlay) */
.project:has(.img-clicker) .proj-overlay::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 0;
  height: 0;
  
  /* Triángulo un poco más grande y BLANCO PURO (#ffffff) */
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  border-left: 32px solid #ffffff !important; 
  
  z-index: 9999 !important; /* Capa extrema por encima de todo */
  opacity: 0; 
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.25, .46, .45, .94);
  
  /* Sombra oscura fuerte para que resalte muchísimo contra cualquier foto/color */
  filter: drop-shadow(0px 5px 12px rgba(0, 0, 0, 0.7)); 
  pointer-events: none; 
}

/* Efecto Hover: aparece y hace zoom a tamaño normal */
.project:hover:has(.img-clicker) .proj-overlay::after {
  opacity: 1; 
  transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   CORRECCIÓN DE CAPAS PARA EL TEXTO
   ============================================ */
.proj-overlay {
  z-index: 20 !important; /* Obliga al texto a estar por encima de la foto y el play */
  pointer-events: none !important; /* Permite que el clic "traspase" el texto y active el link */
}