/* Variables */
:root {
  color-scheme: dark;
  /* Color base */
  --color-bg: #0d0d0d;
  --color-bg-mid: #141414;
  --color-bg-card: #111111;
  --color-bg-deep: #050505;
  --color-bg-elev: #181818;
  --color-border: #1f1f1f;
  --color-line: #2a2a2a;
  --color-mute: #3a3a3a;
  --color-text: #e8e8e8;
  --color-text-soft: #c8c8c8;
  --color-text-muted: #8c8c8c; /* subido de #777 para cumplir WCAG AA sobre fondo negro */
  --color-bg-elev-2: #161616;
  --color-track: #1a1a1a;
  --color-accent: #C1392B;
  --color-accent-hover: #d44a3c;
  --color-accent-soft: rgba(193,57,43,0.15);
  --color-accent-deep: #1a0a0a;   /* fondo del badge "En ejecución" */
  --color-accent-border: #3a1010; /* borde del badge "En ejecución" */

  /* Tipografía */
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', sans-serif;
  --text-display: clamp(48px, 7vw, 96px);
  --text-h1: clamp(36px, 4.5vw, 56px);
  --text-h2: clamp(22px, 2vw, 28px);
  --text-body: 15px;
  --text-small: 12px;
  --text-label: 10px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Gradientes + sombras */
  --gradient-fade-bottom: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.92) 100%);
  --gradient-glow-red: radial-gradient(circle at 50% 50%, rgba(193,57,43,0.08) 0%, transparent 60%);
  --shadow-soft: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-deep: 0 24px 60px rgba(0,0,0,0.6);
  --shadow-glow-red: 0 0 32px rgba(193,57,43,0.18);

  /* Transitions */
  --t-fast: 150ms;
  --t-base: 280ms;
  --t-slow: 480ms;
  --t-expressive: 720ms;
  --ease-out-quart: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-expressive: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --max-content-width: 1440px;
  --max-media-width: 1200px;
  --gutter-inline-lg: 48px;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

section[id] {
  scroll-margin-top: 64px;
}

:focus-visible {
  outline: 1px solid var(--color-accent);
  outline-offset: 2px;
}

/* El <main> recibe foco al usar el skip link, pero no debe mostrar contorno */
main[tabindex="-1"]:focus {
  outline: none;
}

/* Utilidad screen-reader-only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link — oculto hasta recibir foco por teclado */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  transform: translateY(-150%);
  background: var(--color-accent);
  color: #fff;
  padding: 10px 18px;
  font-size: var(--text-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  transition: transform var(--t-base) var(--ease-expressive);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Atmósfera global: glow rojo sutil fijo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(193,57,43,0.05) 0%, transparent 45%),
    radial-gradient(circle at 88% 92%, rgba(193,57,43,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* Íconos SVG inline (sprite #i-*). Reemplazan la webfont Tabler.
   El tamaño se controla con font-size del contenedor (1em) igual que antes. */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  padding: 0 var(--space-8);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--t-base), height var(--t-base),
              backdrop-filter var(--t-base), border-color var(--t-base);
}

.nav.scrolled {
  height: 54px;
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(255,255,255,0.06);
}

.nav-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.nav-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  box-shadow: 0 0 8px rgba(193,57,43,0.6);
  transition: width var(--t-fast) linear;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--color-text);
  transition: color var(--t-base);
}

.nav-links {
  display: flex;
  gap: var(--space-8);
  align-items: center;
}

.nav-link {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--t-base);
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

.nav-cta {
  font-size: var(--text-small);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 8px 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background var(--t-base), color var(--t-base);
  margin-left: var(--space-2);
}

.nav-cta:hover {
  background: var(--color-accent);
  color: #fff;
}

/* Sections */
.section {
  padding: var(--space-20) var(--space-8);
  border-top: 1px solid #1a1a1a;
  position: relative;
}

.section > .section-label,
.section > .section-title,
.section > .services-grid,
.section > .progreso-bar,
.section > .proyecto-counter,
.section > .about-content,
.section > .contact-grid,
.section > .contact-trust {
  max-width: var(--max-content-width);
  margin-inline: auto;
}

.section-dark { background: var(--color-bg); }
.section-mid {
  background: var(--color-bg-mid);
  position: relative;
}

.section-mid::before {
  content: '';
  display: block;
  height: 32px;
  background: linear-gradient(to bottom, var(--color-bg), var(--color-bg-mid));
  position: absolute;
  top: -32px;
  left: 0;
  right: 0;
  pointer-events: none;
}

.section-label {
  font-size: var(--text-label);
  color: var(--color-accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-accent);
}

.section-title {
  font-family: var(--font-serif);
  font-size: var(--text-h1);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-12);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* Hero cinemático full-bleed */
.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 30% 20%, #1f1f1f 0%, transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(193,57,43,0.10) 0%, transparent 55%),
    linear-gradient(135deg, #141414 0%, #0a0a0a 50%, #1a1a1a 100%);
  overflow: hidden;
}

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

@media (prefers-reduced-motion: no-preference) {
  .hero-img {
    animation: heroKenBurns 24s ease-in-out infinite alternate;
  }
}

@keyframes heroKenBurns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.08) translate(-1%, -1%); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 30%, rgba(0,0,0,0.55) 65%, rgba(0,0,0,0.92) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.5) 0%, transparent 60%);
  pointer-events: none;
}

.hero-numeral {
  position: absolute;
  right: clamp(-20px, -2vw, 20px);
  bottom: -8%;
  font-family: var(--font-serif);
  font-size: clamp(160px, 24vw, 340px);
  font-weight: 500;
  line-height: 0.85;
  color: var(--color-text);
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-content-width);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-32) var(--space-8) var(--space-24);
}

.hero-tag {
  font-size: var(--text-label);
  color: var(--color-accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--color-accent);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: var(--text-display);
  font-weight: 500;
  line-height: 0.98;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-text-soft);
}

.hero-desc {
  font-size: 16px;
  color: var(--color-text-soft);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 42ch;
  font-weight: 300;
}

.hero-ctas {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Botones reutilizables */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 26px;
  font-size: var(--text-small);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-expressive),
              box-shadow var(--t-base);
  font-family: var(--font-sans);
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-glow-red), var(--shadow-soft);
}

.btn-primary .icon {
  font-size: 16px;
  transition: transform var(--t-base);
}

.btn-primary:hover .icon {
  transform: translateX(4px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  border-color: var(--color-text);
  background: rgba(255,255,255,0.04);
}

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-soft);
  font-size: var(--text-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 3;
  transition: opacity var(--t-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.hero-scroll-hint .icon {
  font-size: 16px;
}

.hero-scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-scroll-hint .icon {
    animation: heroBounce 2s ease-in-out infinite;
  }
}

@keyframes heroBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.service-card {
  background: var(--color-bg-card);
  padding: var(--space-8) var(--space-6);
  min-height: 200px;
  position: relative;
  overflow: hidden;
  transition: background var(--t-base) var(--ease-expressive),
              transform var(--t-base) var(--ease-expressive);
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-slow) var(--ease-expressive);
}

.service-card:hover {
  background: var(--color-bg-elev);
  transform: translateY(-6px);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover .service-icon {
  color: var(--color-accent);
  transform: translateY(-2px);
}

.service-num {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--color-mute);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.service-icon {
  font-size: 32px;
  color: var(--color-text-soft);
  margin-bottom: var(--space-6);
  display: block;
  transition: color var(--t-base), transform var(--t-base);
}

.service-name {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.4;
  font-weight: 500;
  margin-bottom: var(--space-2);
  letter-spacing: -0.005em;
}

.service-desc {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  line-height: 1.7;
  font-weight: 300;
  margin-top: auto;
}

/* Proyecto carrusel */
.proyecto-full {
  width: 100%;
  max-width: var(--max-media-width);
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: 2px;
  position: relative;
  box-shadow: var(--shadow-deep);
}

.proyecto-img {
  background: var(--color-bg-mid);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: grid;
  aspect-ratio: 4 / 3;
  box-shadow: inset 0 0 0 1px var(--color-border);
}

/* Fondo borroso de la propia foto: rellena el letterbox con elegancia
   (sirve tanto si la foto está en contain como en cover) */
.proyecto-img::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--bg-img, none);
  background-size: cover;
  background-position: center;
  filter: blur(34px) brightness(0.55) saturate(1.1);
  transform: scale(1.15);
  opacity: 0;
  transition: opacity var(--t-slow) ease, background-image 0s;
  pointer-events: none;
}

.proyecto-img.has-bg::before {
  opacity: 1;
}

@media (min-width: 769px) {
  .proyecto-img { aspect-ratio: 16 / 9; }
}

/* Numeración editorial sobre la imagen */
.proyecto-num {
  position: absolute;
  top: var(--space-4);
  left: var(--space-6);
  z-index: 3;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  color: var(--color-text);
  opacity: 0.35;
  letter-spacing: -0.02em;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  font-variant-numeric: tabular-nums;
}

/* Pista visual de "ampliar" — señala que la foto abre el lightbox.
   Decorativa (aria-hidden); el contenedor .proyecto-img ya gestiona el click. */
.proyecto-zoom-hint {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 10px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--color-text-soft);
  font-size: var(--text-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity var(--t-base), background var(--t-base), color var(--t-base);
}

.proyecto-zoom-hint .icon {
  font-size: 14px;
}

.proyecto-img:hover .proyecto-zoom-hint {
  opacity: 1;
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* Caption con backdrop-blur sobre la imagen */
.proyecto-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: var(--space-6) var(--space-8);
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.45) 70%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-expressive);
}

.proyecto-img:hover .proyecto-caption {
  opacity: 1;
  transform: translateY(0);
}

.proyecto-caption-name {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.proyecto-caption-meta {
  font-size: var(--text-small);
  color: var(--color-text-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: var(--space-2);
  font-weight: 400;
}

.proyecto-img img {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.proyecto-img img.hidden {
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .proyecto-img img.kb-active {
    animation: kenBurns 4.5s ease-out forwards;
  }
}

@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

.foto-progress {
  height: 2px;
  background: var(--color-track);
  overflow: hidden;
}

.foto-progress-fill {
  height: 100%;
  width: 0;
  background: var(--color-accent);
}

@media (prefers-reduced-motion: no-preference) {
  .foto-progress-fill.running {
    animation: progressFill 4.5s linear forwards;
  }
}

.foto-progress-fill.paused {
  animation-play-state: paused;
}

@keyframes progressFill {
  from { width: 0; }
  to { width: 100%; }
}

.proyecto-img-placeholder {
  grid-area: 1 / 1;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--color-mute);
  letter-spacing: 0.08em;
}

.proyecto-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-6) var(--space-8);
  background: var(--color-bg-card);
}

.proyecto-nav--ejecucion {
  background: var(--color-bg-elev-2);
}

.proyecto-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.ejecucion-badge {
  display: inline-block;
  font-size: 9px;
  color: var(--color-accent);
  border: 1px solid var(--color-accent-border);
  background: var(--color-accent-deep);
  padding: 3px 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  font-weight: 500;
  align-self: flex-start;
}

.proyecto-name {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.proyecto-loc {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: var(--space-1);
}

.proyecto-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
}

.proyecto-dots {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.pdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-line);
  cursor: pointer;
  transition: background var(--t-base), transform var(--t-base);
  border: 0;
  padding: 0;
}

.pdot:hover {
  background: var(--color-text-muted);
  transform: scale(1.2);
}

.pdot.active {
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(193,57,43,0.18);
  transform: scale(1.1);
}

.proyecto-arrows {
  display: flex;
  gap: var(--space-2);
}

.parrow {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-line);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 16px;
  transition: border-color var(--t-base), color var(--t-base),
              background var(--t-base), transform var(--t-base);
}

.parrow:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(193,57,43,0.05);
  transform: translateY(-1px);
}

.progreso-bar {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.progreso-seg {
  flex: 1;
  height: 3px;
  background: var(--color-border);
  transition: background 0.3s;
}

.progreso-seg.active {
  background: var(--color-accent);
}

.proyecto-counter {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* About */
.about-content {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: var(--space-12);
  align-items: start;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.about-stat {
  padding: var(--space-6) var(--space-4);
  background: var(--color-bg-card);
  border-left: 2px solid var(--color-accent);
  transition: transform var(--t-base) var(--ease-expressive),
              box-shadow var(--t-base);
}

.about-stat:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-soft);
}

.about-stat-num {
  font-family: var(--font-serif);
  font-size: 56px;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.about-stat-badge {
  font-size: 38px;
  letter-spacing: 0.04em;
  color: var(--color-accent);
}

.about-stat-label {
  font-size: var(--text-label);
  color: var(--color-text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: var(--space-2);
  font-weight: 500;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.about-text {
  font-size: 16px;
  color: var(--color-text-soft);
  line-height: 1.8;
  font-weight: 300;
}

.about-text-soft {
  font-size: var(--text-body);
  color: var(--color-text-muted);
}

.about-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--color-text);
  line-height: 1.5;
  padding-left: var(--space-6);
  border-left: 2px solid var(--color-line);
  position: relative;
  margin: var(--space-2) 0;
}

.about-quote-mark {
  position: absolute;
  top: -8px;
  left: -2px;
  font-family: var(--font-serif);
  font-size: 56px;
  color: var(--color-accent);
  line-height: 1;
  font-style: normal;
  font-weight: 500;
}

.about-aside {
  position: relative;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 30% 30%, rgba(193,57,43,0.18) 0%, transparent 55%),
    linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 50%, #181818 100%);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.about-aside-frame {
  position: absolute;
  inset: var(--space-4);
  border: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
}

/* Placa editorial de marca dentro del panel "Sobre el estudio" */
.about-aside-mark {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  text-align: center;
  padding: var(--space-6);
}

.about-aside-numeral {
  font-family: var(--font-serif);
  font-size: clamp(72px, 9vw, 120px);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--color-text);
  opacity: 0.92;
}

.about-aside-cap {
  font-size: var(--text-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-accent);
}

/* Contact */
.contact-trust {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-small);
  color: var(--color-text-soft);
  margin-bottom: var(--space-12);
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid var(--color-accent);
  background: rgba(193,57,43,0.04);
  letter-spacing: 0.04em;
  font-weight: 400;
}

.contact-trust .icon {
  color: var(--color-accent);
  font-size: 18px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-12);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.wa-btn-primary {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(135deg, #1f2a1a 0%, #1a1a1a 100%);
  border: 1px solid rgba(37,211,102,0.25);
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--t-base), transform var(--t-base) var(--ease-expressive),
              box-shadow var(--t-base);
  position: relative;
  overflow: hidden;
}

.wa-btn-primary:hover {
  border-color: #25D366;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.18);
}

.wa-btn-primary > .icon:first-child {
  color: #25D366;
  font-size: 28px;
  flex-shrink: 0;
}

.wa-btn-label {
  display: block;
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.wa-btn-sub {
  display: block;
  font-size: var(--text-small);
  color: var(--color-text-muted);
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.wa-btn-arrow {
  margin-left: auto;
  color: var(--color-text-muted);
  font-size: 18px;
  transition: transform var(--t-base), color var(--t-base);
}

.wa-btn-primary:hover .wa-btn-arrow {
  transform: translate(2px, -2px);
  color: #25D366;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 0;
  margin: 0;
  list-style: none;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item .icon {
  color: var(--color-text-soft);
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-item-label {
  font-size: var(--text-label);
  color: var(--color-text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 2px;
  font-weight: 500;
}

.contact-item-value {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 400;
}

.contact-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-bg-card);
  padding: var(--space-8);
  border: 1px solid var(--color-border);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-label);
  color: var(--color-text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.contact-form.sending .form-btn {
  opacity: 0.7;
  pointer-events: none;
}

.contact-form.sent {
  display: none;
}

.form-btn .form-spinner {
  display: none;
}

.contact-form.sending .form-btn .form-spinner {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.contact-form .form-btn {
  align-self: stretch;
  justify-content: center;
  margin-top: var(--space-2);
}

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

.form-success {
  background: rgba(37,211,102,0.07);
  border: 1px solid rgba(37,211,102,0.25);
  padding: var(--space-6);
  font-size: var(--text-body);
  color: var(--color-text);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-expressive);
}

.form-success .icon {
  color: #25D366;
  font-size: 18px;
  margin-right: var(--space-2);
  vertical-align: middle;
}

.form-success.visible {
  opacity: 1;
  transform: none;
}

.form-resend {
  display: block;
  margin-top: var(--space-4);
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--color-text-muted);
  font-size: var(--text-small);
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color var(--t-base), color var(--t-base);
}

.form-resend:hover {
  border-color: rgba(255,255,255,0.4);
  color: var(--color-text);
}

.form-error {
  font-size: var(--text-small);
  color: var(--color-accent);
  padding: var(--space-2) 0;
}

.contact-form.was-validated .form-input:invalid {
  border-color: var(--color-accent);
  outline: none;
}

.contact-form.was-validated .form-input:valid {
  border-color: rgba(37,211,102,0.4);
}

.form-field-error {
  font-size: var(--text-small);
  color: var(--color-accent);
  margin-top: 4px;
}

.form-input {
  background: var(--color-bg-deep);
  border: 1px solid var(--color-line);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--color-text);
  font-family: var(--font-sans);
  width: 100%;
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}

.form-input:focus {
  border-color: var(--color-accent);
  background: var(--color-bg-card);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-textarea {
  height: 120px;
  resize: vertical;
  line-height: 1.6;
}

/* Footer */
.footer {
  background: var(--color-bg-deep);
  padding: var(--space-16) var(--space-8) var(--space-6);
  border-top: 1px solid #1a1a1a;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.4;
}

.footer-grid {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col-brand {
  gap: var(--space-4);
}

.footer-col-title {
  font-size: var(--text-label);
  color: var(--color-text-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--color-text);
  letter-spacing: 0.14em;
  font-weight: 600;
}

.footer-tagline {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.5;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--color-text-muted);
  transition: color var(--t-base), transform var(--t-base);
  text-decoration: none;
  width: fit-content;
}

.footer-link:hover {
  color: var(--color-text);
  transform: translateX(2px);
}

.footer-link-static {
  cursor: default;
}

.footer-link-static:hover {
  color: var(--color-text-muted);
  transform: none;
}

.footer-link .icon {
  font-size: 16px;
  color: var(--color-mute);
}

.footer-link:hover .icon {
  color: var(--color-accent);
}

.footer-bottom {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.footer-credit a {
  color: var(--color-text-muted);
  transition: color var(--t-base);
}

.footer-credit a:hover {
  color: var(--color-accent);
}

/* ── Animaciones ── */

/* Hero: entrada staggered al cargar */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.hero-tag   { animation: fadeUp 0.7s ease 0.1s  both; }
.hero-title { animation: fadeUp 0.8s ease 0.22s both; }
.hero-desc  { animation: fadeUp 0.7s ease 0.38s both; }
.hero-ctas  { animation: fadeUp 0.7s ease 0.52s both; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--t-expressive) var(--ease-expressive),
              transform var(--t-expressive) var(--ease-expressive);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Stagger en service cards */
.services-grid .service-card:nth-child(1).reveal { transition-delay: 0s; }
.services-grid .service-card:nth-child(2).reveal { transition-delay: 0.09s; }
.services-grid .service-card:nth-child(3).reveal { transition-delay: 0.18s; }
.services-grid .service-card:nth-child(4).reveal { transition-delay: 0.27s; }
.services-grid .service-card:nth-child(5).reveal { transition-delay: 0.36s; }

/* Stagger en about-stat */
.about-stats .about-stat:nth-child(1).reveal { transition-delay: 0s; }
.about-stats .about-stat:nth-child(2).reveal { transition-delay: 0.1s; }
.about-stats .about-stat:nth-child(3).reveal { transition-delay: 0.2s; }

/* Transiciones del carrusel (usadas por JS con style.opacity) */
.proyecto-img {
  transition: opacity 0.3s ease;
}
.proyecto-name {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.proyecto-loc {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Hamburger — oculto en desktop */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 22px;
  padding: 4px;
  cursor: pointer;
  align-items: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: 1px solid var(--color-line);
  color: var(--color-text-soft);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  z-index: 201;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  color: var(--color-text);
  border-color: var(--color-accent);
}

.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { top: 50%; left: 16px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 16px; transform: translateY(-50%); }

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hero-tag, .hero-title, .hero-desc, .hero-ctas { animation: none; }
  .hero-scroll-hint, .hero-scroll-hint .icon { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .form-success { transition: none; }
  .form-success.visible { opacity: 1; transform: none; }
  .hero-img { animation: none; }
  .proyecto-img img.kb-active { animation: none; }
  .foto-progress-fill.running { animation: none; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Tablet/Mobile (≤ 768px)
══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Nav */
  .nav { padding: 0 20px; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #0a0a0a;
    border-bottom: 1px solid var(--color-border);
    padding: 8px 0;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-link {
    padding: 14px 20px;
    font-size: 12px;
    border-bottom: 1px solid var(--color-bg-elev-2);
  }
  .nav-link:last-child { border-bottom: none; }

  /* Sections */
  .section { padding: 48px 20px; }
  .section-title { font-size: 26px; margin-bottom: 24px; }

  /* Hero — full-bleed mantiene altura cinemática reducida */
  .hero { min-height: 78vh; }
  .hero-content { padding: var(--space-24) var(--space-4) var(--space-16); }
  .hero-desc { max-width: 100%; }
  .hero-numeral { font-size: clamp(120px, 38vw, 240px); bottom: -4%; }

  /* Services — 3 columnas */
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .service-card { min-height: 180px; padding: var(--space-6) var(--space-4); }
  .service-icon { font-size: 26px; margin-bottom: var(--space-4); }

  /* Proyecto */
  .proyecto-nav { padding: 14px 16px; }

  /* About — apila vertical */
  .about-content { grid-template-columns: 1fr; gap: var(--space-8); }
  .about-stats { flex-direction: row; flex-wrap: wrap; gap: var(--space-2); }
  .about-stat { flex: 1 1 140px; padding: var(--space-4); }
  .about-stat-num { font-size: 38px; }
  .about-stat-badge { font-size: 28px; }
  .about-aside { display: none; }
  .about-quote { font-size: 18px; }

  /* Contact — apila vertical */
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .contact-form-wrapper { padding: var(--space-6); }
  .contact-trust { display: flex; }

  /* Footer */
  .footer { padding: var(--space-16) var(--space-4) var(--space-6); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: var(--space-2); text-align: left; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Mobile chico (≤ 480px)
══════════════════════════════════════════ */
@media (max-width: 480px) {
  .nav { padding: 0 var(--space-4); }
  .section { padding: var(--space-12) var(--space-4); }
  .hero { min-height: 72vh; }
  .hero-content { padding: var(--space-20) var(--space-4) var(--space-12); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer { padding: var(--space-12) var(--space-4); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .nav-links .nav-cta { margin-left: 0; margin-top: var(--space-2); align-self: center; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Laptop chico (769-1023px): services en 4 columnas
══════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1023px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Desktop grande (≥ 1280px)
══════════════════════════════════════════ */
@media (min-width: 1280px) {
  .section { padding: 80px var(--gutter-inline-lg); }
  .hero { min-height: 600px; }
}
