/* ==========================================================================
   SUELOSINJUNTAS - FONTANERÍA
   Premium, Cinematic, Architectural
   ========================================================================== */

:root {
  --bg-color: #0a0a0a;
  --bg-carbon: #121212;
  --bg-graphite: #1a1a1a;
  --text-main: #f4f4f4;
  --text-secondary: #8c8c8c;
  --text-dark: #333333;
  --water-line: #ffffff;
  --accent: #b3b3b3;
  --font-main: 'Manrope', sans-serif;
  
  --transition-slow: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-medium: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.3s ease;
}

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

html {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  /* hide scrollbar for premium feel */
  scrollbar-width: none; 
}
html::-webkit-scrollbar {
  display: none;
}

body {
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Texture */
.bg-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  opacity: 0.04;
  background-image: 
    linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 80px 40px;
  background-position: center;
}

/* Utilities */
.d-block { display: block; }
.text-accent { color: var(--text-secondary); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.huge-text {
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -1px;
}
.huge-text-sm {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
}
.section-header {
  margin-bottom: 4rem;
  padding: 0 5vw;
}
.section-title {
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Back Nav */
.back-nav {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  mix-blend-mode: difference;
}
.back-nav:hover { opacity: 1; }

/* 1. HERO */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5vw;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1 !important;
  transform: scale(1.02);
  filter: brightness(0.88);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.6) 100%),
              linear-gradient(to top, rgba(10,10,10,0.85) 0%, transparent 50%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1200px;
}
.hero-brand {
  font-size: 0.9rem;
  letter-spacing: 6px;
  margin-bottom: 2rem;
  opacity: 0.7;
}
.hero-title {
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 2rem;
}
.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 10px;
}
.reveal-up {
  display: inline-block;
  transform: translateY(110%);
}
.hero-subtitle {
  font-size: 1.2rem;
  letter-spacing: 4px;
  font-weight: 500;
  margin-bottom: 1rem;
  opacity: 0;
}
.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 400px;
  opacity: 0;
}
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 5vw;
  font-size: 0.7rem;
  letter-spacing: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
}

.scroll-arrow {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(5px); }
  60% { transform: translateY(3px); }
}

/* 2. TRANSICIÓN */
.transition-invisible {
  height: 150vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
}
.invisible-content {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
}
.inv-text-1, .inv-text-2 {
  opacity: 0;
  transform: translateY(20px);
}
.water-line-main {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: rgba(255,255,255,0.15);
  transform-origin: top;
  transform: scaleY(0);
}

/* 3. POR DÓNDE PASA EL AGUA */
.water-path {
  min-height: 100vh;
  padding: 10vh 0;
  background: var(--bg-carbon);
  position: relative;
}
.architecture-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90vw;
  max-width: 1400px;
  margin: 4rem auto;
  border: 1px solid rgba(255,255,255,0.05);
}
.abstract-building {
  width: 65%;
  aspect-ratio: 1000 / 600;
  height: auto;
  position: relative;
}
.building-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.arch-svg {
  width: 100%;
  height: 100%;
}
.arch-path {
  fill: none;
  stroke: rgba(255,255,255,0.1);
  stroke-width: 0.2;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke 0.4s ease;
}
.arch-path.active {
  stroke: var(--water-line);
}
.node {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}
.node::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0);
  transition: all 0.3s ease;
}
.node:hover {
  background: var(--water-line);
}
.node:hover::after {
  border-color: rgba(255,255,255,0.5);
  transform: scale(1.5);
}
.node-label {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 2px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.node:hover .node-label {
  opacity: 1;
}
.path-details {
  position: relative;
  width: 30%;
  height: 400px;
  display: flex;
  align-items: center;
}
.detail-card {
  position: absolute;
  top: 50%;
  right: 0;
  width: 100%;
  padding: 2.5rem;
  background: rgba(15,15,15,0.95);
  border-left: 2px solid var(--text-main);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(30px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.detail-card.active {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.detail-card h4 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}
.detail-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 4. MANTENIMIENTO COMUNIDADES */
.communities {
  position: relative;
  min-height: 85vh;
  padding: 12vh 5vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-color);
}
.comm-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.1;
}
.comm-building-wireframe {
  width: 50vw;
  height: 70vh;
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
}
.comm-water-line {
  position: absolute;
  background: var(--water-line);
}
.vert-line {
  top: 0; left: 50%; width: 2px; height: 100%; transform: scaleY(0); transform-origin: bottom;
}
.horiz-line {
  top: 50%; left: 0; width: 100%; height: 2px; transform: scaleX(0); transform-origin: center;
}
.comm-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 2vw;
}
.comm-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 1.2rem;
}
.comm-subtitle {
  font-size: 0.95rem;
  letter-spacing: 3px;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.comm-desc {
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 750px;
  margin: 0 auto 2.5rem;
  color: #ccc;
}
.comm-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.2rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}
.comm-points span {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.75rem;
  letter-spacing: 2.5px;
  color: var(--text-main);
  backdrop-filter: blur(6px);
  border-radius: 2px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
}
.comm-points span:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
.btn-solid {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--text-main);
  color: var(--bg-color);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  font-weight: 600;
  border-radius: 2px;
  transition: transform 0.3s ease, background 0.3s ease;
}
.btn-solid:hover {
  transform: translateY(-2px);
  background: #fff;
}
.btn-outline {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.2);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  font-weight: 600;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  border-color: var(--text-main);
  background: rgba(255,255,255,0.05);
}

/* 5. SERVICIOS (WORD MAP) */
.services-map {
  padding: 15vh 0;
  background: var(--bg-graphite);
  position: relative;
  overflow: hidden;
}
.word-item {
  color: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: color 0.4s ease, transform 0.4s ease;
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.word-item:hover {
  color: var(--text-main);
  transform: scale(1.05);
}
.btn-pruebas:hover {
  color: var(--bg-color) !important;
}
.btn-pruebas:hover .btn-pruebas-bg {
  transform: scaleY(1) !important;
}
.services-footer p {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

/* 6. CUANDO EL AGUA FALLA */
.when-fails {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #000;
  position: relative;
}
.fails-content {
  text-align: center;
  z-index: 2;
}
.fails-text {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 300;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
}
.fails-animation {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100px;
  background: rgba(255,255,255,0.1);
  opacity: 0;
}
.pipe-track {
  width: 100%;
  height: 100%;
  position: relative;
}
.water-flow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--text-main);
}
.leak-point {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  opacity: 0;
}
.fix-wrap {
  position: absolute;
  top: 45%;
  left: -5px;
  width: 12px;
  height: 20px;
  border: 1px solid var(--text-secondary);
  opacity: 0;
}

/* 7. BEFORE / AFTER */
.before-after-section {
  padding: 15vh 5vw;
  background: var(--bg-carbon);
}
.slider-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}
.ba-slider {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  border: 1px solid rgba(255,255,255,0.06);
}
.ba-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.ba-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
.ba-before {
  width: 100%;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}
.ba-label {
  position: absolute;
  bottom: 2rem;
  font-size: 0.8rem;
  letter-spacing: 3px;
  background: rgba(0,0,0,0.6);
  padding: 0.5rem 1rem;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
}
.label-after { right: 2rem; }
.label-before { left: 2rem; }
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 48px;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none !important;
}
.handle-line {
  position: absolute;
  width: 2px;
  height: 100%;
  background: white;
}
.handle-circle {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}
.ba-handle:hover .handle-circle, .ba-handle:active .handle-circle {
  transform: scale(1.1);
}

.ba-info {
  margin-top: 2rem;
  max-width: 700px;
}
.ba-info h3 {
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
}
.ba-info p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

.secondary-projects {
  display: flex;
  gap: 1.2rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
}

.project-trigger {
  width: 160px;
  aspect-ratio: 16/10;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0.45;
  border-radius: 2px;
}
.project-trigger.active {
  opacity: 1;
  border-color: #fff;
  box-shadow: 0 0 15px rgba(255,255,255,0.15);
}
.project-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-trigger:hover {
  opacity: 0.85;
}
.project-trigger:hover img {
  transform: scale(1.06);
}

/* 8. DENTRO DE LA PARED */
.inside-wall {
  height: 100vh;
  background: var(--bg-color);
  position: relative;
}
.wall-container {
  position: relative;
  height: 100vh;
  overflow: hidden;
}
.wall-bg, .wall-surface {
  position: absolute;
  inset: 0;
}
.wall-bg img, .wall-surface img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wall-bg img {
  filter: grayscale(100%) brightness(0.6);
}
.wall-surface {
  clip-path: inset(0 0 0 0);
}
.wall-content {
  position: absolute;
  top: 50%;
  left: 5vw;
  transform: translateY(-50%);
  z-index: 10;
  max-width: 800px;
  mix-blend-mode: difference;
}

/* 9. MODAL DE GALERÍA Y LIGHTBOX */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.98);
  backdrop-filter: blur(20px);
  z-index: 9990;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Barra lateral visible para Firefox y navegadores modernos */
  scrollbar-width: auto;
  scrollbar-color: rgba(255, 255, 255, 0.7) rgba(255, 255, 255, 0.08);
}

/* Barra lateral para Chrome, Edge, Safari */
.gallery-modal::-webkit-scrollbar {
  display: block !important;
  width: 20px;
}

.gallery-modal::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-left: 2px solid rgba(255, 255, 255, 0.15);
}

.gallery-modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  border: 4px solid rgba(8, 8, 8, 0.95);
  transition: all 0.3s ease;
}

.gallery-modal::-webkit-scrollbar-thumb:hover {
  background: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .gallery-modal {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain;
  }
  .gallery-modal::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}

.gallery-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery-modal-header {
  position: sticky;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 5vw;
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(15px);
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-modal-count {
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: var(--text-secondary);
  font-family: monospace;
}

.gallery-modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 0.8rem 1.6rem;
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
}

.gallery-modal-close:hover {
  background: var(--text-main);
  color: #000;
  border-color: var(--text-main);
}

.gallery-modal-content {
  padding: 3rem 5vw 8rem;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.gal-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #111;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.gal-thumb:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.gal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%) contrast(1.05);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.gal-thumb:hover img {
  transform: scale(1.06);
  filter: grayscale(0%) contrast(1);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(15px);
}

.lightbox-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 5vw;
}

.lightbox-counter {
  font-size: 0.85rem;
  letter-spacing: 3px;
  color: var(--text-secondary);
  font-family: monospace;
}

.lightbox-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  padding: 0.7rem 1.5rem;
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: var(--text-main);
  color: #000;
  border-color: var(--text-main);
}

.lightbox-viewport {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3vw 3vh;
}

.lightbox-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.lightbox-nav:hover {
  background: var(--text-main);
  color: #000;
  transform: scale(1.1);
}

.lightbox-img-wrapper {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}

.lightbox-img-wrapper img {
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.96);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-img-wrapper img {
  transform: scale(1);
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
  }
}

/* 11. PRECISIÓN */
.precision-section {
  padding: 20vh 5vw;
  background: var(--bg-carbon);
  text-align: center;
}
.precision-title {
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 300;
  margin-bottom: 4rem;
}
.precision-circuit {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 4rem;
}
.circuit-path {
  fill: none;
  stroke: var(--text-main);
  stroke-width: 2;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}
.precision-subtitle {
  font-size: clamp(1.5rem, 3vw, 3rem);
  font-weight: 300;
}

/* 12. PRINCIPIOS */
.principles-section {
  padding: 15vh 0;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  gap: 10vh;
}
.prin-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  opacity: 0;
  transform: translateY(30px);
}
.prin-num {
  font-size: 1rem;
  color: var(--text-secondary);
}
.prin-title {
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 300;
  line-height: 1;
}

/* 13. PROCESO */
.process-section {
  padding: 15vh 5vw;
  background: var(--bg-graphite);
}
.process-track {
  position: relative;
  padding: 4rem 0;
}
.process-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.1);
  transform: scaleX(0);
  transform-origin: left;
}
.process-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.p-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: var(--bg-graphite);
  padding: 0 1rem;
  opacity: 0;
  transform: translateY(20px);
}
.p-num {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.p-name {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 2px;
}

/* 14. CONTACTO */
.contact-section {
  padding: 15vh 5vw;
  background: #000;
}
.contact-hero {
  margin-bottom: 10vh;
}
.contact-title {
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.ct-1, .ct-2, .ct-3 {
  opacity: 0;
  transform: translateY(20px);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
.contact-label {
  font-size: 0.9rem;
  letter-spacing: 3px;
  margin-bottom: 2rem;
}
.info-block {
  margin-bottom: 3rem;
  font-size: 1.2rem;
  font-weight: 300;
}
.info-data {
  display: block;
  color: var(--text-main);
  text-decoration: none;
  margin-top: 0.5rem;
  transition: opacity 0.3s;
}
.info-data:hover {
  opacity: 0.7;
}
.contact-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.contact-form-container {
  background: rgba(255,255,255,0.03);
  padding: 3rem;
  border: 1px solid rgba(255,255,255,0.05);
}
.input-group {
  margin-bottom: 2rem;
}
.input-group input, .input-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding: 1rem 0;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}
.input-group input:focus, .input-group textarea:focus {
  border-color: var(--text-main);
}
.btn-submit {
  width: 100%;
  padding: 1.5rem;
  background: var(--text-main);
  color: #000;
  border: none;
  font-family: var(--font-main);
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.btn-submit:hover {
  background: #fff;
}

/* 15. FOOTER */
.footer {
  padding: 4rem 5vw;
  background: var(--bg-color);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.footer-brand h4 {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 4px;
}
.footer-social {
  display: flex;
  gap: 2rem;
}
.footer-social a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s;
}
.footer-social a:hover {
  color: var(--text-main);
}
.back-to-top {
  background: none;
  border: none;
  color: var(--text-main);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 2px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.back-to-top:hover {
  opacity: 1;
}
.back-to-top:hover .btt-arrow {
  transform: translateY(-4px);
}
.btt-arrow {
  display: inline-block;
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

/* MEDIA QUERIES (Móvil) */
@media (max-width: 768px) {
  .hero-title { font-size: 3.5rem; }
  .huge-text { font-size: 2.5rem; }
  .huge-text-sm { font-size: 2rem; }
  
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 2rem; }
  
  .water-path { min-height: auto; padding: 8vh 0 10vh; }
  .architecture-container {
    flex-direction: column;
    height: auto;
    width: 92vw;
    margin: 2rem auto 0;
    gap: 1.5rem;
    border: none;
  }
  .abstract-building {
    width: 100%;
    aspect-ratio: 1000 / 600;
    height: auto;
    transform: none;
    margin-bottom: 0;
  }
  .path-details {
    width: 100%;
    min-height: 150px;
    height: auto;
    display: block;
    position: relative;
    margin-top: 1rem;
  }
  .detail-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1.5rem;
    background: rgba(15, 15, 15, 0.95);
    border-left: 2px solid var(--text-main);
    transform: translateY(15px);
    box-sizing: border-box;
  }
  .detail-card.active {
    transform: translateY(0);
  }
  .detail-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
  }
  .detail-card p {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  
  .word-item { font-size: 2.5rem; }
  
  .prin-item { margin-left: 0 !important; }
  
  .process-steps { flex-direction: column; gap: 2rem; align-items: flex-start; }
  .process-line { width: 1px; height: 100%; top: 0; left: 20px; }
  .p-step { flex-direction: row; }
  
  .slider-container {
    width: 92vw;
    margin: 0 auto;
  }
  .ba-slider {
    aspect-ratio: 4 / 3;
    width: 100%;
  }
  .ba-before {
    width: 100% !important;
  }
  .ba-label {
    font-size: 0.65rem;
    padding: 0.35rem 0.7rem;
    bottom: 1rem;
    letter-spacing: 2px;
  }
  .label-after { right: 1rem; }
  .label-before { left: 1rem; }
  .ba-handle { width: 44px; }
  .handle-circle { width: 36px; height: 36px; font-size: 0.85rem; }
  
  .ba-info {
    margin-top: 1.5rem;
  }
  .ba-info h3 {
    font-size: 0.95rem;
  }
  .ba-info p {
    font-size: 0.9rem;
  }
  .secondary-projects {
    gap: 0.8rem;
    margin-top: 1.5rem;
    justify-content: flex-start;
  }
  .project-trigger {
    width: calc(50% - 0.4rem);
    max-width: none;
  }
  
  .gallery-section { padding: 5vh 5vw; }
  .inspection-table { height: auto; display: flex; flex-direction: column; gap: 2rem; }
  .gal-item { position: relative; width: 100% !important; top: 0 !important; left: 0 !important; }
  .gallery-line { display: none; }
}

/* ====================================================
   UNIFIED BUTTONS, CONTACT & FOOTER
==================================================== */
.btn-solid, .btn-outline, .btn-submit {
  display: inline-block;
  padding: 1rem 2.5rem !important;
  text-align: center;
  text-decoration: none;
  font-size: 0.8rem !important;
  letter-spacing: 2px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.3s ease !important;
  border-radius: 2px !important;
}

.btn-solid {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #fff !important;
}
.btn-solid:hover {
  background: transparent !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
}

.btn-outline {
  background: transparent !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.3) !important;
}
.btn-outline:hover {
  border-color: #fff !important;
  background: rgba(255,255,255,0.05) !important;
}

/* CONTACT */
.contact-section {
  padding: 15vh 5vw !important;
  background: #050505 !important;
}

.contact-huge-title {
  font-size: clamp(2.5rem, 6vw, 6rem) !important;
  font-weight: 300 !important;
  line-height: 1.1 !important;
  margin-bottom: 5rem !important;
}

.contact-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 4rem !important;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr !important; }
}

.info-block {
  margin-bottom: 3rem !important;
}
.info-label {
  font-size: 0.8rem !important;
  letter-spacing: 2px !important;
  color: rgba(255,255,255,0.6) !important;
  margin-bottom: 1rem !important;
}
.info-data {
  display: block !important;
  font-size: 1.5rem !important;
  color: #fff !important;
  text-decoration: none !important;
  margin-bottom: 0.5rem !important;
  transition: color 0.3s ease !important;
}
.info-data:hover { color: rgba(255,255,255,0.6) !important; }

.contact-ctas {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  max-width: 300px !important;
}

.contact-form-container {
  background: rgba(255,255,255,0.03) !important;
  padding: 3rem !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
}

.contact-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem !important;
}
.form-title {
  font-size: 1rem !important;
  letter-spacing: 2px !important;
  margin-bottom: 1rem !important;
  font-weight: 400 !important;
}

.input-group input, .input-group textarea {
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.2) !important;
  padding: 1rem 0 !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  outline: none !important;
  transition: border-color 0.3s ease !important;
  resize: none !important;
}
.input-group input:focus, .input-group textarea:focus {
  border-color: #fff !important;
}

.btn-submit {
  background: #fff !important;
  color: #000 !important;
  border: none !important;
  margin-top: 1rem !important;
  width: 100% !important;
}
.btn-submit:hover {
  background: #d1d1d1 !important;
}

/* FOOTER */
.footer-section {
  padding: 5vh 5vw 6vh !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3rem !important;
  background: #050505 !important;
  border-top: 1px solid rgba(255,255,255,0.1) !important;
}

.footer-top-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 2rem !important;
  width: 100% !important;
}

.social-links {
  display: flex !important;
  align-items: center !important;
  gap: 1.5rem !important;
  flex-wrap: wrap !important;
}

.social-link {
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.8rem !important;
  letter-spacing: 1px !important;
  position: relative !important;
  display: inline-block !important;
  overflow: hidden !important;
  padding-bottom: 2px !important;
}

.social-line {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 1px !important;
  background: #fff !important;
  transform: translateX(-101%) !important;
  transition: transform 0.3s ease !important;
}

.social-link:hover .social-line {
  transform: translateX(0) !important;
}

.social-dot {
  color: rgba(255,255,255,0.3) !important;
}

.back-to-top {
  background: none !important;
  border: none !important;
  color: #fff !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.8rem !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 0.85rem !important;
  letter-spacing: 2px !important;
}

.back-to-top:hover .btt-arrow {
  transform: translateY(-5px) !important;
}

.btt-arrow {
  transition: transform 0.3s ease !important;
}

.footer-bottom {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 1.5rem !important;
  padding-top: 2rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  width: 100% !important;
  font-size: 0.75rem !important;
  color: rgba(255,255,255,0.6) !important;
}

.footer-legal-links {
  display: flex !important;
  align-items: center !important;
  gap: 0.8rem !important;
  flex-wrap: wrap !important;
}

.legal-link {
  color: rgba(255,255,255,0.6) !important;
  text-decoration: none !important;
  letter-spacing: 1px !important;
  transition: color 0.3s ease !important;
}

.legal-link:hover {
  color: #ffffff !important;
}

.legal-dot {
  opacity: 0.3 !important;
}

.footer-copy {
  letter-spacing: 1px !important;
  opacity: 0.6 !important;
}

.huge-text {
  font-size: clamp(2.5rem, 6vw, 6rem) !important;
  font-weight: 300 !important;
  line-height: 1.1 !important;
  letter-spacing: -1px !important;
}

:root {
  --bg-color: #0a0a0a !important;
  --bg-carbon: #121212 !important;
  --bg-graphite: #1a1a1a !important;
  --text-main: #f4f4f4 !important;
  --text-secondary: #8c8c8c !important;
  --text-dark: #333333 !important;
  --accent: #b3b3b3 !important;
}
body {
  background-color: var(--bg-color) !important;
  color: var(--text-main) !important;
}

/* UNIFIED BACK NAV */
.back-nav {
  position: fixed !important;
  top: 2rem !important;
  left: 2rem !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  color: var(--text-main) !important;
  text-decoration: none !important;
  font-size: 0.8rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  opacity: 0.7 !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
  mix-blend-mode: difference !important;
}
.back-nav:hover {
  opacity: 1 !important;
  transform: translateX(-5px) !important;
}
