/* ═══════════════════════════════════════════════════
   PALMERA Y TABAIBA — Design System & Styles v2
   ═══════════════════════════════════════════════════ */

/* ─── TOKENS ──────────────────────────────────────── */
:root {
  --c-petrol:    #1E2D2B;
  --c-azul:      #4C6575;
  --c-verde:     #646544;
  --c-natural:   #96876C;
  --c-cream:     #F4F1EA;
  --c-white:     #FFFFFF;
  --c-black:     #0D0D0D;
  --c-gray-100:  #F7F6F3;
  --c-gray-200:  #ECEAE4;
  --c-gray-400:  #AEACA5;
  --c-gray-600:  #6B6860;
  --c-gray-800:  #2E2D2B;

  --ff-serif: 'Cormorant Garamond', Georgia, serif;
  --ff-sans:  'Roboto', system-ui, sans-serif;

  --fs-xs:   0.72rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.1rem;
  --fs-lg:   1.3rem;
  --fs-xl:   1.65rem;
  --fs-2xl:  2.1rem;
  --fs-3xl:  2.8rem;
  --fs-4xl:  3.8rem;
  --fs-5xl:  5rem;
  --fs-6xl:  7rem;

  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --nav-h: 68px;
}

/* ─── RESET ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--ff-sans); font-weight: 300; color: var(--c-black); background: var(--c-cream); overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
select, input, textarea { font: inherit; }

/* ─── CONTAINER ───────────────────────────────────── */
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--space-8); }
@media (max-width: 768px) { .container { padding-inline: var(--space-6); } }

/* ─── LABELS / TITLES ─────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-natural);
  margin-bottom: var(--space-3);
}
.section-label--light { color: rgba(255,255,255,0.5); }

.section-title {
  font-family: var(--ff-serif);
  font-size: clamp(var(--fs-3xl), 4.5vw, var(--fs-4xl));
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--c-petrol);
}
.section-title em { font-style: italic; }
.section-title--light { color: var(--c-white); }
.section-header { margin-bottom: var(--space-16); }
.section-header--center { text-align: center; }

/* ─── BOTONES ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.btn--light { color: var(--c-white); border-color: rgba(255,255,255,0.45); }
.btn--light:hover { background: var(--c-white); color: var(--c-petrol); }
.btn--dark { color: var(--c-petrol); border-color: var(--c-petrol); }
.btn--dark:hover { background: var(--c-petrol); color: var(--c-white); }

/* ─── REVEAL ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-scale {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal-scale.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }


/* ════════════════════════════════════════════════════
   NAV — centrado, flotante
   ════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--space-8);
  background: transparent;
  transition: background 0.6s ease, backdrop-filter 0.6s ease, -webkit-backdrop-filter 0.6s ease, opacity 0.6s ease;
}
.nav.is-scrolled {
  background: rgba(13,13,13,0.18);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}
.nav.is-scrolled .nav__logo-text,
.nav.is-scrolled .nav__link {
  opacity: 0.72;
}
.nav.is-scrolled .nav__logo-img {
  opacity: 0.7;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-16);
  width: 100%;
  max-width: 960px;
}

.nav__logo { display: flex; align-items: center; gap: var(--space-3); }
/* Logo SVG blanco: no necesita filter */
.nav__logo-img { width: 32px; height: 32px; object-fit: contain; }
.nav__logo-text {
  font-family: var(--ff-serif);
  font-size: var(--fs-lg);
  font-weight: 400;
  color: var(--c-white);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav__links { display: flex; align-items: center; gap: var(--space-10); }
.nav__link {
  font-size: var(--fs-sm);
  font-weight: 300;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.05em;
  transition: color 0.25s, font-weight 0.2s;
}
.nav__link:hover { color: var(--c-white); }
.nav__link--highlight { color: rgba(255,255,255,0.72); }
.nav__link--highlight:hover { color: var(--c-white); font-weight: 700; }

/* CTA especial — botón con borde y animación de relleno */
.nav__link--cta {
  position: relative;
  padding: 0.38em 1.1em;
  border: 1px solid rgba(255,255,255,0.32);
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.72) !important;
  overflow: hidden;
  transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.nav__link--cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease-out);
}
.nav__link--cta:hover::before { transform: scaleX(1); }
.nav__link--cta:hover {
  border-color: rgba(255,255,255,0.75) !important;
  color: var(--c-white) !important;
}
/* Pulso sutil para llamar la atención */
@keyframes ctaPulse {
  0%, 100% { border-color: rgba(255,255,255,0.32); box-shadow: 0 0 0 0 rgba(255,255,255,0); }
  50%       { border-color: rgba(255,255,255,0.55); box-shadow: 0 0 0 4px rgba(255,255,255,0.06); }
}
.nav__link--cta { animation: ctaPulse 3.5s ease-in-out infinite; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  position: absolute;
  right: var(--space-6);
}
.nav__burger span { display: block; width: 22px; height: 1.5px; background: var(--c-white); transition: transform 0.3s, opacity 0.3s; }

@media (max-width: 768px) {
  .nav__inner { justify-content: flex-start; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(13,13,13,0.97);
    backdrop-filter: blur(16px);
    padding: var(--space-8);
    gap: var(--space-6);
    align-items: flex-start;
  }
  .nav__link { font-size: var(--fs-xl); }
}


/* ════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }

/* Overlay: funde a negro en la parte baja para enlazar con el statement negro */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13,13,13,0.15)  0%,
    rgba(13,13,13,0.08) 40%,
    rgba(13,13,13,0.68) 82%,
    rgba(13,13,13,1)    100%
  );
}

/* Contenido centrado — aparece tras primer scroll */
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-inline: var(--space-8);
  max-width: 860px;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  pointer-events: none;
}
.hero__content.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.hero__content.is-fading { opacity: 0; transform: translateY(10px); transition-duration: 0.6s; }

.hero__eyebrow {
  font-size: var(--fs-xs);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-6);
}

/* Título old-money: serif + sans mezclados */
.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.04em;
  font-size: clamp(var(--fs-4xl), 9vw, var(--fs-6xl));
  line-height: 1.0;
  color: var(--c-white);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}
.hero__title em {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 300;
}
.hero__title span {
  font-family: var(--ff-sans);
  font-weight: 100;
  letter-spacing: 0.1em;
  font-size: 0.68em;
  text-transform: uppercase;
}

.hero__sub {
  font-size: clamp(var(--fs-sm), 1.35vw, var(--fs-md));
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  line-height: 1.72;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-10);
}

/* CTA: texto con línea expandible, sin borde cuadrado */
.hero__cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-white);
}
.hero__cta-line {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.45);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out), background 0.3s;
}
.hero__cta:hover .hero__cta-line { background: var(--c-white); transform: scaleX(1.18); }

/* Scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.5s;
}
.hero__scroll-hint.is-hidden { opacity: 0; pointer-events: none; }
.hero__scroll-line {
  display: block;
  width: 1px;
  height: 54px;
  background: rgba(255,255,255,0.35);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50%       { transform: scaleY(0.35); opacity: 0.1; }
}


/* ════════════════════════════════════════════════════
   STATEMENT — negro, texto grande, icono fondo
   ════════════════════════════════════════════════════ */
.statement {
  position: relative;
  background: var(--c-black);
  /* Más alto: ocupa casi una pantalla completa */
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-block: clamp(8rem, 16vw, 18rem);
  overflow: hidden;
}
.statement__deco {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  width: 56%;
  opacity: 0.045;
  pointer-events: none;
}
.statement__deco img { width: 100%; filter: invert(1); }

/* El texto empieza invisible+borroso y aparece al entrar en viewport */
.statement__text {
  font-family: var(--ff-serif);
  font-size: clamp(var(--fs-2xl), 4.2vw, var(--fs-4xl));
  font-weight: 300;
  line-height: 1.42;
  letter-spacing: 0.005em;
  color: rgba(255,255,255,0.9);
  max-width: 900px;
  /* Estado inicial: opaco 0, borroso */
  opacity: 0;
  filter: blur(12px);
  transform: translateY(20px);
  transition: opacity 1.4s cubic-bezier(0.16,1,0.3,1),
              filter  1.4s cubic-bezier(0.16,1,0.3,1),
              transform 1.4s cubic-bezier(0.16,1,0.3,1);
  will-change: opacity, filter, transform;
}
/* Cuando el observer lo activa */
.statement__text.is-visible {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}
/* Quitar la clase reveal genérica para que no colisione */
.statement__text.reveal { opacity: 0; transform: translateY(20px); }
.statement__text.reveal.is-visible { opacity: 1; transform: translateY(0); }

.statement__text em {
  font-style: italic;
  color: var(--c-natural);
}


/* ════════════════════════════════════════════════════
   MARCAS STRIP — logos en loop infinito, fondo negro
   ════════════════════════════════════════════════════ */
.marcas-strip {
  background: var(--c-black);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-block: var(--space-6);
  overflow: hidden;
}
/* Track: contiene 30 logos (15×2) para loop perfecto con translateX(-50%) */
.marcas-strip__track {
  display: flex;
  align-items: center;
  gap: clamp(3rem, 5vw, 5rem);
  width: max-content;
  animation: marqueeLoop 44s linear infinite;
}
.marcas-strip img {
  height: 32px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  /* Todos blancos con filter */
  filter: brightness(0) invert(1);
  opacity: 0.38;
  transition: opacity 0.3s var(--ease-out);
  flex-shrink: 0;
  display: block;
}
.marcas-strip:hover .marcas-strip__track { animation-play-state: paused; }
.marcas-strip img:hover { opacity: 0.85; }

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

@media (max-width: 768px) {
  .marcas-strip img { height: 26px; max-width: 90px; }
  .marcas-strip__track { gap: 2.5rem; }
}


/* ════════════════════════════════════════════════════
   METODOLOGÍA — compacta, centrada
   ════════════════════════════════════════════════════ */
.metodologia {
  background: var(--c-cream);
  padding-block: clamp(6rem, 14vw, 11rem);
}
.metodologia__inner { max-width: 900px; margin-inline: auto; }

.metodo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16) var(--space-16);
}
@media (max-width: 680px) { .metodo-grid { grid-template-columns: 1fr; gap: var(--space-12); } }

/* Item con animación de aparición escalonada propia */
.metodo-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: var(--space-4);
  opacity: 0;
  transform: translateY(26px);
  filter: blur(4px);
  transition: opacity 0.9s var(--ease-out),
              transform 0.9s var(--ease-out),
              filter 0.9s var(--ease-out);
}
.metodo-item.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
.metodo-item:nth-child(2) { transition-delay: 0.12s; }
.metodo-item:nth-child(3) { transition-delay: 0.06s; }
.metodo-item:nth-child(4) { transition-delay: 0.18s; }

.metodo-item__num {
  font-family: var(--ff-serif);
  font-size: var(--fs-xs);
  color: var(--c-natural);
  letter-spacing: 0.06em;
  padding-top: 4px;
}
.metodo-item__body h3 {
  font-family: var(--ff-serif);
  font-size: var(--fs-xl);
  font-weight: 400;
  color: var(--c-petrol);
  margin-bottom: var(--space-3);
  line-height: 1.2;
}
.metodo-item__body p {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--c-gray-600);
  letter-spacing: 0.01em;
  max-width: 38ch;
}


/* ════════════════════════════════════════════════════
   PARALLAX DIVISOR — scroll-overlap (sticky pin)
   La sección se queda pegada mientras la siguiente
   sube por encima, como en el ref. de Dribbble.
   ════════════════════════════════════════════════════ */

/* Wrapper que da el "pin" effect: alto doble = 100vh fijos + 100vh de scroll */
.parallax-divider-wrap {
  position: relative;
  height: 200vh;          /* espacio de scroll para el pin */
  z-index: 0;
}

.parallax-divider {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  /* La sección siguiente tiene z-index mayor y sube encima */
  z-index: 0;
}

.parallax-divider__img {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  object-fit: cover;
  will-change: transform;
}
.parallax-divider__video {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  object-fit: cover;
  will-change: transform;
}
.parallax-divider__blur {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  background: rgba(13,13,13,0.0);
  transition: backdrop-filter 0.1s, background 0.1s;
}
/* Degradado inferior: introduce la siguiente sección */
.parallax-divider__fade-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(13,13,13,0) 0%, rgba(13,13,13,1) 100%);
  pointer-events: none;
  z-index: 2;
}
/* Degradado superior: conecta con la sección anterior */
.parallax-divider__fade-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 25%;
  background: linear-gradient(to top, rgba(13,13,13,0) 0%, rgba(13,13,13,1) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Las secciones que siguen al parallax / arena tienen z-index alto
   para que "monten" encima del sticky al hacer scroll */
.parallax-divider-wrap + .servicios,
.parallax-divider-wrap + .proyectos,
.arena-wrap + .proyectos {
  position: relative;
  z-index: 2;
}

/* Imagen de transición entre servicios y arena — ocupa su ancho natural */
.serv-insert {
  position: relative;
  z-index: 2;    /* por encima del arena-wrap sticky (z-index: 1) */
  display: block;
  line-height: 0; /* elimina espacio fantasma bajo la img */
  font-size: 0;
}
.serv-insert img {
  width: 100%;
  height: auto;  /* respeta las proporciones exactas del archivo */
  display: block;
  pointer-events: none;
}


/* ════════════════════════════════════════════════════
   SERVICIOS — dark, imagen flotante en hover
   ════════════════════════════════════════════════════ */
.servicios {
  position: relative;
  z-index: 2;
  padding-block: var(--space-24);
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
}
.servicios.is-visible { opacity: 1; }
.servicios__bg { position: absolute; inset: 0; z-index: 0; }
.servicios__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(1px); transform: scale(1.12); }
.servicios__bg-tint {
  position: absolute;
  inset: 0;
  background: rgba(13,13,13,0.87);
}
/* Degradado inferior a blanco (cream) para conectar con proyectos */
.servicios__fade-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30%;
  background: linear-gradient(to bottom, rgba(244,241,234,0) 0%, rgba(244,241,234,1) 100%);
  pointer-events: none;
  z-index: 2;
}
.servicios__inner { position: relative; z-index: 1; overflow: visible; }
.servicios .section-title { color: var(--c-white); }
.servicios .section-label { color: rgba(255,255,255,0.4); }

.servicios-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); }
@media (max-width: 768px) { .servicios-cols { grid-template-columns: 1fr; } }

.servicio-col__heading {
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-natural);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.servicio-col__list { display: flex; flex-direction: column; }
.servicio-item {
  padding-block: var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: default;
  transition: padding-left 0.35s var(--ease-out);
}
.servicio-item[data-href] { cursor: pointer; }
.servicio-item:hover { padding-left: var(--space-3); }

.servicio-name {
  display: block;
  font-family: var(--ff-serif);
  font-size: var(--fs-xl);
  font-weight: 400;
  color: var(--c-white);
  margin-bottom: var(--space-2);
  line-height: 1.15;
  letter-spacing: 0.02em;
  transition: color 0.25s;
}
.servicio-item:hover .servicio-name { color: var(--c-natural); }
.servicio-item p {
  font-size: var(--fs-xs);
  line-height: 1.75;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.04em;
  max-width: 26ch;
}

/* Imagen flotante en hover de servicio — centrada sobre las columnas */
.servicio-hover-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  width: clamp(200px, 22vw, 300px);
  aspect-ratio: 3/4;
  overflow: hidden;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.38s var(--ease-out), transform 0.38s var(--ease-out);
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}
.servicio-hover-img.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.servicio-hover-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .servicio-hover-img { display: none; } }


/* ════════════════════════════════════════════════════
   PROYECTOS — carrusel maximalista
   ════════════════════════════════════════════════════ */
.proyectos {
  position: relative;
  z-index: 2;
  padding-top: var(--space-24);
  padding-bottom: var(--space-16);
  background: var(--c-cream);
  overflow: hidden;
}

.proyectos-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-10);
}

.carousel-nav { display: flex; gap: var(--space-3); padding-bottom: 4px; }
.carousel-btn {
  width: 48px; height: 48px;
  border: 1px solid var(--c-gray-200);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-petrol);
  transition: background 0.25s, border-color 0.25s, color 0.25s;
  flex-shrink: 0;
}
.carousel-btn:hover { background: var(--c-petrol); border-color: var(--c-petrol); color: var(--c-white); }
.carousel-btn:disabled { opacity: 0.25; cursor: default; pointer-events: none; }

.carousel-track-wrap {
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.carousel-track-wrap.is-dragging { cursor: grabbing; }

.carousel-track {
  display: flex;
  gap: var(--space-3);
  padding-inline: var(--space-8);
  will-change: transform;
  transition: transform 0.6s var(--ease-out);
}

/* Slides — altas, verticales, con caption en hover */
.proyecto-slide {
  flex: 0 0 clamp(240px, 28vw, 400px);
  height: 72vh;
  min-height: 500px;
  overflow: hidden;
  position: relative;
}
.proyecto-slide__link { display: block; width: 100%; height: 100%; }
.proyecto-slide__media { position: relative; width: 100%; height: 100%; overflow: hidden; }

.proyecto-slide__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: filter 0.7s var(--ease-out);
  filter: saturate(0.78);
}
.proyecto-slide:hover .proyecto-slide__media img {
  filter: saturate(0.05) blur(8px) brightness(0.38);
}

/* Caption sobre imagen al hover */
.proyecto-slide__caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  backdrop-filter: blur(0px);
}
.proyecto-slide:hover .proyecto-slide__caption { opacity: 1; }

.proyecto-slide__cat {
  font-size: var(--fs-xs);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.proyecto-slide__title {
  font-family: var(--ff-serif);
  font-size: clamp(var(--fs-xl), 2.5vw, var(--fs-3xl));
  font-weight: 300;
  color: var(--c-white);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

/* Progreso + contador */
.carousel-progress {
  height: 1px;
  background: var(--c-gray-200);
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.carousel-progress__bar {
  height: 100%;
  background: var(--c-petrol);
  width: 20%;
  transition: width 0.5s var(--ease-out);
}
.carousel-counter {
  font-size: var(--fs-xs);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--c-gray-400);
}
.carousel-counter span:first-child { color: var(--c-petrol); font-weight: 500; }

@media (max-width: 768px) {
  .proyectos-header { flex-direction: column; align-items: flex-start; gap: var(--space-6); }
  .proyecto-slide { flex: 0 0 80vw; height: 62vh; }
  .carousel-track { padding-inline: var(--space-6); }
}


/* ════════════════════════════════════════════════════
   NÚMEROS — grandes, centrados, sans-serif
   ════════════════════════════════════════════════════ */
.numeros {
  position: relative;
  z-index: 2;
  padding-block: var(--space-24);
  background: var(--c-white);
  border-top: 1px solid var(--c-gray-200);
  border-bottom: 1px solid var(--c-gray-200);
}
.numeros-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  text-align: center;
}
@media (max-width: 900px) { .numeros-grid { grid-template-columns: 1fr 1fr; gap: var(--space-12); } }
@media (max-width: 480px) { .numeros-grid { grid-template-columns: 1fr; } }

.numero { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); cursor: default; }
.numero__val {
  font-family: var(--ff-sans);
  font-size: clamp(4rem, 7.5vw, 8rem);
  font-weight: 100;
  color: var(--c-petrol);
  line-height: 1;
  letter-spacing: -0.04em;
  transition: font-weight 0.25s var(--ease-out), letter-spacing 0.25s var(--ease-out);
}
.numero:hover .numero__val {
  font-weight: 700;
  letter-spacing: -0.05em;
}
.numero__label {
  font-size: var(--fs-sm);
  font-weight: 300;
  color: var(--c-gray-600);
  line-height: 1.55;
  letter-spacing: 0.01em;
  max-width: 160px;
}


/* ════════════════════════════════════════════════════
   CONTACTO — imagen natural, texto negro sobre zona clara
   ════════════════════════════════════════════════════ */
.contacto {
  position: relative;
  z-index: 2;
  padding-top: var(--space-32);
  padding-bottom: 0;
  overflow: hidden;
  min-height: 100vh;
}
.contacto__bg { position: absolute; inset: 0; z-index: 0; }
.contacto__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* Sin overlay — imagen tal cual */
.contacto__overlay { display: none; }

.contacto__inner {
  position: relative;
  z-index: 2;
  padding-bottom: var(--space-32);
}

.contacto-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: start; }
@media (max-width: 900px) { .contacto-cols { grid-template-columns: 1fr; } }

/* Pasos — texto oscuro, hover con cambio de color */
.contacto-pasos { display: flex; flex-direction: column; gap: 0; }
.paso {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
  padding-block: var(--space-6);
  border-bottom: 1px solid rgba(30,45,43,0.1);
  cursor: default;
  transition: padding-left 0.3s var(--ease-out);
}
.paso:last-child { border-bottom: none; }
.paso:hover { padding-left: var(--space-2); }
.paso__num {
  flex-shrink: 0;
  font-family: var(--ff-serif);
  font-size: var(--fs-xs);
  font-style: italic;
  color: var(--c-natural);
  letter-spacing: 0.06em;
  padding-top: 5px;
  min-width: 1.5rem;
  transition: color 0.3s var(--ease-out);
}
.paso:hover .paso__num { color: var(--c-petrol); }
.paso strong {
  display: block;
  font-family: var(--ff-serif);
  font-size: var(--fs-xl);
  font-weight: 400;
  letter-spacing: 0.015em;
  color: var(--c-petrol);
  margin-bottom: var(--space-2);
  line-height: 1.2;
  transition: color 0.3s var(--ease-out);
}
.paso:hover strong { color: var(--c-natural); }
.paso p {
  font-size: var(--fs-sm);
  color: var(--c-gray-600);
  line-height: 1.8;
  letter-spacing: 0.01em;
}

/* Pricing — fluye naturalmente dentro de la columna de pasos */
.contacto-ticket {
  padding-top: var(--space-8);
}
.contacto-ticket__label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-gray-400);
  margin-bottom: var(--space-3);
}
.contacto-ticket__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.contacto-ticket__list li {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 300;
  color: var(--c-gray-600);
  letter-spacing: 0.02em;
}

/* Formulario — texto oscuro sobre fondo claro */
.contacto-form { display: flex; flex-direction: column; gap: var(--space-6); }
.form-row { display: flex; flex-direction: column; gap: var(--space-3); }
.form-row label {
  font-size: var(--fs-xs); font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--c-gray-400);
}
.form-row input,
.form-row select,
.form-row textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(30,45,43,0.15);
  color: var(--c-petrol);
  padding: var(--space-4) 0;
  font-size: var(--fs-base); font-weight: 300;
  outline: none;
  transition: border-color 0.3s;
  -webkit-appearance: none; appearance: none;
  border-radius: 0;
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--c-gray-400); }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { border-color: var(--c-petrol); }
.form-row select option { background: var(--c-cream); color: var(--c-petrol); }
.form-legal { font-size: var(--fs-xs); color: var(--c-gray-400); letter-spacing: 0.03em; }
.form-legal a { text-decoration: underline; color: var(--c-gray-600); }

/* Mensaje de éxito — reemplaza al formulario con animación */
.form-success {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.form-success.is-visible {
  opacity: 1;
  transform: none;
}
.form-success__msg {
  font-family: var(--ff-serif);
  font-size: clamp(var(--fs-2xl), 3.5vw, var(--fs-4xl));
  font-weight: 300;
  font-style: italic;
  color: var(--c-natural);
  line-height: 1.3;
  letter-spacing: -0.01em;
}


/* ════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════ */
.footer {
  background: var(--c-black);
  padding-block: var(--space-16) var(--space-12);
  position: relative;
}
/* Línea separadora sutil */
.footer::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
  margin-bottom: var(--space-12);
}
.footer__inner {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: var(--space-8); justify-content: space-between;
}
.footer__brand {
  display: flex; align-items: center; gap: var(--space-3);
  font-family: var(--ff-serif); font-size: var(--fs-md); color: var(--c-white);
}
.footer__logo {
  width: 26px; height: 26px; object-fit: contain; opacity: 0.6;
  transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-out);
  transform-origin: center bottom;
}
.footer__brand:hover .footer__logo {
  opacity: 1;
  transform: rotate(-8deg) scale(1.15);
}
/* Animación logo en nav también */
.nav__logo-img {
  transition: transform 0.6s var(--ease-out), opacity 0.4s;
  transform-origin: center bottom;
}
.nav__logo:hover .nav__logo-img {
  transform: rotate(-8deg) scale(1.18);
}

/* Cursor personalizado en slides de proyectos */
.proyectos { cursor: none; }
.proyecto-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--c-black);
  color: var(--c-white);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.35s var(--ease-out), opacity 0.35s;
  opacity: 0;
  text-align: center;
  line-height: 1.3;
}
.proyectos:hover .proyecto-cursor,
.proyecto-cursor.is-visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.footer__nav { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.footer__nav a { font-size: var(--fs-xs); letter-spacing: 0.08em; color: rgba(255,255,255,0.3); transition: color 0.25s; }
.footer__nav a:hover { color: var(--c-white); }
.footer__social { display: flex; gap: var(--space-4); }
.footer__social a { color: rgba(255,255,255,0.3); transition: color 0.25s, transform 0.3s; }
.footer__social a:hover { color: var(--c-white); transform: translateY(-2px); }
.footer__copy { width: 100%; font-size: var(--fs-xs); color: rgba(255,255,255,0.15); letter-spacing: 0.04em; margin-top: var(--space-4); }
@media (max-width: 768px) { .footer__inner { flex-direction: column; align-items: flex-start; } }


/* ════════════════════════════════════════════════════
   ARENA — vídeo sticky, texto scroll-driven,
   transición a crema hacia proyectos
   ════════════════════════════════════════════════════ */
.arena-wrap {
  position: relative;
  height: 300vh;   /* 300vh de scroll = sticky dura 200vh + entrada/salida */
  z-index: 1;
}

.arena-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.arena__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Velo oscuro suave — vídeo nítido, no agresivo */
.arena__overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,13,13,0.28);
  z-index: 1;
}

/* Contenedor del texto centrado */
.arena__text {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-inline: var(--space-8);
  opacity: 0; /* JS controla opacity */
}

.arena__quote {
  font-family: var(--ff-serif);
  font-size: clamp(var(--fs-3xl), 6.5vw, var(--fs-5xl));
  font-weight: 300;
  color: var(--c-white);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-8);
}
.arena__quote em {
  font-style: italic;
  color: rgba(255,255,255,0.82);
}

.arena__sub {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
}

/* Degradado de crema que emerge al final del scroll para
   fundir orgánicamente con la sección proyectos */
.arena__fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(
    to bottom,
    rgba(244,241,234,0)   0%,
    rgba(244,241,234,1) 100%
  );
  z-index: 3;
  opacity: 0; /* JS controla opacity */
  pointer-events: none;
}

@media (max-width: 768px) {
  .arena-wrap { height: 260vh; }
  .arena__quote { font-size: clamp(var(--fs-2xl), 8vw, var(--fs-3xl)); }
}


/* ═══════════════════════════════════════════════════════
   ARCHIVE — HUB DE SERVICIOS (archive-pt_servicio.php)
   ═══════════════════════════════════════════════════════ */

.hub-servicios { padding: 6rem 0; }

.hub-servicios__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2px;
}

.hub-serv-card { position: relative; overflow: hidden; background: var(--c-stone); }

.hub-serv-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.hub-serv-card__media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.hub-serv-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out-expo);
}

.hub-serv-card:hover .hub-serv-card__media img { transform: scale(1.06); }

.hub-serv-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,24,20,0.75) 0%, transparent 55%);
}

.hub-serv-card__body {
  padding: 1.5rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hub-serv-card__num {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--c-sand);
  text-transform: uppercase;
}

.hub-serv-card__cat {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  text-transform: uppercase;
}

.hub-serv-card__title {
  font-family: var(--ff-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--c-ink);
  margin: 0.4rem 0 0.25rem;
}

.hub-serv-card__tagline {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 300;
  color: var(--c-muted);
  margin: 0;
}

.hub-serv-card__arrow {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  color: var(--c-sand);
  transition: transform 0.3s ease;
}

.hub-serv-card:hover .hub-serv-card__arrow { transform: translateX(6px); }

@media (max-width: 768px) {
  .hub-servicios__grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════
   ARCHIVE — HUB DE PROYECTOS (archive-pt_proyecto.php)
   ═══════════════════════════════════════════════════════ */

.hub-proyectos { padding: 4rem 0 6rem; }

.hub-proyectos__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.hub-proy-card { position: relative; overflow: hidden; }

.hub-proy-card__link {
  display: block;
  text-decoration: none;
  position: relative;
}

.hub-proy-card__media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.hub-proy-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out-expo);
}

.hub-proy-card:hover .hub-proy-card__media img { transform: scale(1.06); }

.hub-proy-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,24,20,0.82) 0%, transparent 55%);
}

.hub-proy-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hub-proy-card__num {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.hub-proy-card__year {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.1em;
  margin-top: 0.35rem;
}

/* Usar clases existentes de proyecto-slide para las cards */
.hub-proy-card .proyecto-slide__cat {
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}

.hub-proy-card .proyecto-slide__title {
  font-family: var(--ff-serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
  color: #fff;
  margin: 0.2rem 0 0;
}

@media (max-width: 768px) {
  .hub-proyectos__grid { grid-template-columns: 1fr; }
  .hub-proy-card__media { aspect-ratio: 4/3; }
}
