/* ============================================================
   CRUZ & ASOCIADOS — Estudio de Arquitectura
   css/styles.css — Mobile-first, minimalista, production-quality
   ============================================================ */

/* ============================================================
   0. CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Palette */
  --color-white:       #ffffff;
  --color-black:       #0d0d0d;
  --color-gray-mid:    #888888;
  --color-gray-light:  #f4f4f4;
  --color-terracota:   #c0694e;
  --color-terracota-dk:#a85540;
  --color-overlay:     rgba(13, 13, 13, 0.72);

  /* Typography */
  --font-sans:         'Inter', system-ui, -apple-system, sans-serif;
  --font-serif:        'DM Serif Display', Georgia, serif;

  /* Type scale — fluid */
  --fs-xxs:            0.625rem;   /* 10px */
  --fs-xs:             0.75rem;    /* 12px */
  --fs-sm:             0.875rem;   /* 14px */
  --fs-base:           1rem;       /* 16px */
  --fs-md:             1.125rem;   /* 18px */
  --fs-lg:             1.25rem;    /* 20px */
  --fs-xl:             1.5rem;     /* 24px */
  --fs-2xl:            2rem;       /* 32px */
  --fs-3xl:            2.5rem;     /* 40px */
  --fs-hero:           clamp(3.5rem, 8vw, 7.5rem);
  --fs-section:        clamp(2.25rem, 5vw, 4.5rem);
  --fs-deco:           clamp(4rem, 10vw, 9rem);

  /* Spacing scale */
  --sp-2:              0.125rem;
  --sp-4:              0.25rem;
  --sp-8:              0.5rem;
  --sp-12:             0.75rem;
  --sp-16:             1rem;
  --sp-24:             1.5rem;
  --sp-32:             2rem;
  --sp-40:             2.5rem;
  --sp-48:             3rem;
  --sp-64:             4rem;
  --sp-80:             5rem;
  --sp-96:             6rem;
  --sp-128:            8rem;
  --sp-160:            10rem;

  /* Layout */
  --container-max:     1320px;
  --container-pad:     var(--sp-24);
  --section-gap:       var(--sp-128);

  /* Transitions */
  --ease-out:          cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:       cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:          180ms;
  --dur-base:          320ms;
  --dur-slow:          600ms;
  --dur-xslow:         900ms;

  /* Nav */
  --nav-h:             72px;

  /* Borders — minimal, near zero */
  --radius:            0px;
}

/* ============================================================
   1. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-black);
  background-color: var(--color-white);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

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

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

address {
  font-style: normal;
}

/* Focus visible — accessibility */
:focus-visible {
  outline: 2px solid var(--color-terracota);
  outline-offset: 3px;
}

/* ============================================================
   2. TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-section); }
h3 { font-size: var(--fs-xl); }

p {
  font-size: var(--fs-base);
  line-height: 1.72;
  color: var(--color-black);
}

em {
  font-style: italic;
  color: var(--color-terracota);
}

/* Section label */
.section-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gray-mid);
  margin-bottom: var(--sp-16);
}

.section-title {
  margin-bottom: var(--sp-24);
}

.section-desc {
  font-size: var(--fs-md);
  color: var(--color-gray-mid);
  max-width: 52ch;
  line-height: 1.6;
}

/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section-header {
  margin-bottom: var(--sp-64);
}

/* ============================================================
   4. BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-block;
  padding: var(--sp-16) var(--sp-40);
  background-color: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid var(--color-black);
  border-radius: var(--radius);
  transition: background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-terracota);
  border-color: var(--color-terracota);
  color: var(--color-white);
}

.btn-ghost {
  display: inline-block;
  padding: var(--sp-16) var(--sp-40);
  background-color: transparent;
  color: var(--color-black);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid var(--color-black);
  border-radius: var(--radius);
  transition: background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background-color: var(--color-black);
  color: var(--color-white);
}

/* ============================================================
   5. NAVIGATION
   ============================================================ */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-h);
  background-color: var(--color-white);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}

.nav-header.scrolled {
  border-bottom-color: rgba(13, 13, 13, 0.1);
  box-shadow: 0 1px 0 0 rgba(13, 13, 13, 0.06);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-24);
  height: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.nav-logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-black);
  flex-shrink: 0;
  transition: color var(--dur-fast) var(--ease-out);
}

.nav-logo:hover {
  color: var(--color-terracota);
}

.nav-links {
  display: none;
  gap: var(--sp-40);
  align-items: center;
}

.nav-link {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-black);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-terracota);
  transition: width var(--dur-base) var(--ease-out);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--color-terracota);
}

.nav-cta {
  display: none;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-terracota);
  border: 1.5px solid var(--color-terracota);
  padding: var(--sp-8) var(--sp-24);
  border-radius: var(--radius);
  transition: background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background-color: var(--color-terracota);
  color: var(--color-white);
}

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: var(--sp-8);
  margin: calc(-1 * var(--sp-8));
  flex-shrink: 0;
}

.hamburger-line {
  display: block;
  width: 28px;
  height: 1.5px;
  background-color: var(--color-black);
  border-radius: 0;
  transform-origin: center;
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-base) var(--ease-out),
              width var(--dur-base) var(--ease-out);
}

/* Hamburger open state */
.nav-hamburger[aria-expanded="true"] .hamburger-line:first-child {
  transform: translateY(4.75px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] .hamburger-line:last-child {
  transform: translateY(-4.75px) rotate(-45deg);
}

/* Mobile menu open */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background-color: var(--color-white);
  padding: var(--sp-48) var(--sp-24);
  gap: var(--sp-32);
  border-top: 1px solid rgba(13, 13, 13, 0.08);
  z-index: 800;
  animation: slideDown var(--dur-base) var(--ease-out) both;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-links.open .nav-link {
  font-size: var(--fs-lg);
  letter-spacing: 0.05em;
}

/* ============================================================
   6. HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--sp-64) var(--container-pad) var(--sp-80);
  width: 100%;
  gap: var(--sp-48);
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-eyebrow {
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gray-mid);
  margin-bottom: var(--sp-24);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: var(--fs-hero);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--color-black);
  margin-bottom: var(--sp-32);
}

.hero-subtitle {
  font-size: var(--fs-md);
  color: var(--color-gray-mid);
  line-height: 1.6;
  margin-bottom: var(--sp-48);
  max-width: 42ch;
}

/* Stats counter */
.hero-stats {
  display: flex;
  gap: var(--sp-40);
  margin-bottom: var(--sp-48);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: 400;
  line-height: 1;
  color: var(--color-black);
  display: block;
}

.stat-label {
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gray-mid);
}

.hero-actions {
  display: flex;
  gap: var(--sp-16);
  flex-wrap: wrap;
}

.hero-image {
  width: 100%;
  height: 50vw;
  min-height: 280px;
  max-height: 480px;
  overflow: hidden;
  flex-shrink: 0;
}

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

/* Scroll hint */
.hero-scroll-hint {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-8);
  padding-bottom: var(--sp-32);
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background-color: var(--color-black);
  animation: scrollPulse 2s var(--ease-in-out) infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50%       { opacity: 1;   transform: scaleY(1);   }
}

.scroll-text {
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gray-mid);
}

/* ============================================================
   7. PROYECTOS
   ============================================================ */
.proyectos {
  padding-block: var(--section-gap);
  background-color: var(--color-gray-light);
}

.proyectos .section-header,
.proyectos-filtros,
.proyectos-cta {
  padding-inline: var(--container-pad);
  max-width: var(--container-max);
  margin-inline: auto;
  width: 100%;
}

.proyectos .section-header {
  display: block;
}

/* Filtros */
.proyectos-filtros {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-48);
}

.filtro-btn {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--sp-8) var(--sp-24);
  border: 1px solid rgba(13, 13, 13, 0.18);
  border-radius: var(--radius);
  color: var(--color-gray-mid);
  background-color: transparent;
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.filtro-btn:hover {
  border-color: var(--color-black);
  color: var(--color-black);
}

.filtro-btn.active {
  background-color: var(--color-black);
  border-color: var(--color-black);
  color: var(--color-white);
}

/* Masonry grid via CSS columns */
.proyectos-grid {
  columns: 1;
  column-gap: 0;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  width: 100%;
}

.proyecto-card {
  break-inside: avoid;
  display: block;
  margin-bottom: var(--sp-4);
  position: relative;
  overflow: hidden;
  background-color: var(--color-white);
}

.proyecto-card[data-hidden="true"] {
  display: none;
}

.proyecto-imagen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.proyecto-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.proyecto-card:hover .proyecto-imagen img {
  transform: scale(1.04);
}

/* Proyecto overlay on hover */
.proyecto-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--color-overlay);
  display: flex;
  align-items: flex-end;
  padding: var(--sp-32);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}

.proyecto-card:hover .proyecto-overlay,
.proyecto-card:focus-within .proyecto-overlay {
  opacity: 1;
}

.proyecto-overlay-content {
  transform: translateY(12px);
  transition: transform var(--dur-base) var(--ease-out);
}

.proyecto-card:hover .proyecto-overlay-content {
  transform: translateY(0);
}

.proyecto-nombre {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  color: var(--color-white);
  margin-bottom: var(--sp-8);
  line-height: 1.2;
}

.proyecto-meta-overlay {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-16);
}

.proyecto-ver {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 2px;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.proyecto-ver:hover {
  border-color: var(--color-white);
}

/* Proyecto card info */
.proyecto-info {
  padding: var(--sp-20, 1.25rem) var(--sp-24) var(--sp-24);
}

.proyecto-tipo {
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-terracota);
  display: block;
  margin-bottom: var(--sp-8);
}

.proyecto-titulo {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-12);
  line-height: 1.2;
}

.proyecto-meta {
  display: flex;
  gap: var(--sp-16);
  flex-wrap: wrap;
}

.proyecto-meta span {
  font-size: var(--fs-xs);
  color: var(--color-gray-mid);
  letter-spacing: 0.05em;
}

.proyectos-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-64);
}

/* ============================================================
   8. SERVICIOS
   ============================================================ */
.servicios {
  padding-block: var(--section-gap);
  background-color: var(--color-white);
}

.servicios-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.servicios-lista {
  border-top: 1px solid rgba(13, 13, 13, 0.1);
}

.servicio-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-24);
  align-items: start;
  padding-block: var(--sp-40);
  border-bottom: 1px solid rgba(13, 13, 13, 0.1);
  cursor: default;
  transition: background-color var(--dur-fast) var(--ease-out);
  position: relative;
}

.servicio-item:hover {
  background-color: var(--color-gray-light);
}

/* Decorative large number */
.servicio-numero {
  font-family: var(--font-serif);
  font-size: var(--fs-deco);
  font-weight: 400;
  line-height: 0.85;
  color: rgba(13, 13, 13, 0.06);
  user-select: none;
  flex-shrink: 0;
  width: 3ch;
  transition: color var(--dur-base) var(--ease-out);
}

.servicio-item:hover .servicio-numero {
  color: rgba(192, 105, 78, 0.12);
}

.servicio-contenido {
  padding-top: var(--sp-12);
}

.servicio-nombre {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: var(--sp-16);
  transition: color var(--dur-base) var(--ease-out);
}

.servicio-item:hover .servicio-nombre {
  color: var(--color-terracota);
}

.servicio-contenido p {
  font-size: var(--fs-base);
  color: var(--color-gray-mid);
  line-height: 1.7;
  max-width: 65ch;
  margin-bottom: var(--sp-16);
}

.servicio-precio {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-terracota);
}

.servicio-flecha {
  font-size: var(--fs-xl);
  color: var(--color-gray-mid);
  padding-top: var(--sp-12);
  transition: transform var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
  flex-shrink: 0;
  opacity: 0;
}

.servicio-item:hover .servicio-flecha {
  transform: translateX(6px);
  color: var(--color-terracota);
  opacity: 1;
}

/* ============================================================
   9. EL ESTUDIO
   ============================================================ */
.estudio {
  padding-block: var(--section-gap);
  background-color: var(--color-gray-light);
  overflow: hidden;
}

.estudio-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-64);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.estudio-texto {
  display: flex;
  flex-direction: column;
}

.estudio-columnas {
  display: flex;
  flex-direction: column;
  gap: var(--sp-24);
  margin-bottom: var(--sp-48);
}

.estudio-col p {
  margin-bottom: var(--sp-16);
}

.estudio-col p:last-child {
  margin-bottom: 0;
}

.estudio-firma {
  border-left: 3px solid var(--color-terracota);
  padding-left: var(--sp-24);
}

.firma-cita {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-style: italic;
  line-height: 1.4;
  color: var(--color-black);
  margin-bottom: var(--sp-8);
}

.firma-autor {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gray-mid);
}

.estudio-imagen {
  position: relative;
  overflow: hidden;
}

.estudio-imagen img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center 30%;
}

.estudio-imagen-caption {
  position: absolute;
  bottom: var(--sp-16);
  right: var(--sp-16);
  font-size: var(--fs-xxs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  background-color: rgba(13, 13, 13, 0.4);
  padding: var(--sp-4) var(--sp-12);
}

/* ============================================================
   10. PROCESO
   ============================================================ */
.proceso {
  padding-block: var(--section-gap);
  background-color: var(--color-white);
}

.proceso-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.proceso-pasos {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: var(--sp-64);
}

.proceso-paso {
  display: flex;
  gap: var(--sp-32);
  padding-bottom: var(--sp-64);
  position: relative;
}

.paso-numero {
  font-family: var(--font-serif);
  font-size: var(--fs-deco);
  font-weight: 400;
  line-height: 0.85;
  color: rgba(13, 13, 13, 0.06);
  user-select: none;
  flex-shrink: 0;
  width: 2.5ch;
}

.paso-linea {
  position: absolute;
  left: 2.1ch;
  top: 5rem;
  bottom: 0;
  width: 1px;
  background-color: rgba(13, 13, 13, 0.1);
}

.proceso-paso:last-child .paso-linea {
  display: none;
}

.paso-contenido {
  padding-top: var(--sp-12);
  flex: 1;
}

.paso-titulo {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: 400;
  margin-bottom: var(--sp-16);
  line-height: 1.2;
}

.paso-desc {
  color: var(--color-gray-mid);
  line-height: 1.72;
  max-width: 60ch;
  margin-bottom: var(--sp-16);
}

.paso-duracion {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-terracota);
}

/* ============================================================
   11. TESTIMONIOS
   ============================================================ */
.testimonios {
  padding-block: var(--section-gap);
  background-color: var(--color-black);
  color: var(--color-white);
}

.testimonios-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.testimonios .section-label {
  color: rgba(255, 255, 255, 0.4);
}

.testimonios .section-title {
  color: var(--color-white);
}

.testimonios-grid {
  display: grid;
  gap: var(--sp-2);
}

.testimonio-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--sp-48) var(--sp-40);
  position: relative;
}

.testimonio-card::before {
  content: '"';
  font-family: var(--font-serif);
  font-size: 8rem;
  line-height: 0.6;
  color: var(--color-terracota);
  opacity: 0.3;
  position: absolute;
  top: var(--sp-32);
  left: var(--sp-40);
  user-select: none;
}

.testimonio-cita {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-style: italic;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--sp-32);
  position: relative;
  z-index: 1;
}

.testimonio-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--sp-24);
}

.testimonio-autor {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.autor-nombre {
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  color: var(--color-white);
}

.autor-proyecto {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   12. PREMIOS
   ============================================================ */
.premios {
  padding-block: var(--section-gap);
  background-color: var(--color-white);
}

.premios-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.premios-lista {
  border-top: 1px solid rgba(13, 13, 13, 0.1);
  margin-top: var(--sp-64);
}

.premio-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-32);
  align-items: center;
  padding-block: var(--sp-32);
  border-bottom: 1px solid rgba(13, 13, 13, 0.1);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.premio-item:hover {
  background-color: var(--color-gray-light);
}

.premio-anio {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-gray-mid);
  min-width: 2.5rem;
  flex-shrink: 0;
}

.premio-nombre {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: var(--sp-4);
}

.premio-org {
  font-size: var(--fs-xs);
  color: var(--color-gray-mid);
  letter-spacing: 0.06em;
}

.premio-icono {
  font-size: var(--fs-xs);
  color: var(--color-terracota);
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-out);
}

.premio-item:hover .premio-icono {
  transform: rotate(45deg);
}

/* ============================================================
   13. CONTACTO
   ============================================================ */
.contacto {
  padding-block: var(--section-gap);
  background-color: var(--color-gray-light);
}

.contacto-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-64);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.contacto-desc {
  font-size: var(--fs-md);
  color: var(--color-gray-mid);
  margin-bottom: var(--sp-48);
  max-width: 44ch;
  line-height: 1.6;
}

.contacto-datos {
  display: flex;
  flex-direction: column;
  gap: var(--sp-24);
}

.dato-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.dato-label {
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gray-mid);
}

.dato-valor {
  font-size: var(--fs-base);
  color: var(--color-black);
  line-height: 1.5;
}

.dato-link {
  transition: color var(--dur-fast) var(--ease-out);
}

.dato-link:hover {
  color: var(--color-terracota);
}

/* Form */
.contacto-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-24);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-24);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-black);
}

.form-label span {
  color: var(--color-terracota);
}

.form-input {
  width: 100%;
  padding: var(--sp-16) var(--sp-20, 1.25rem);
  border: 1px solid rgba(13, 13, 13, 0.2);
  border-radius: var(--radius);
  background-color: var(--color-white);
  color: var(--color-black);
  font-size: var(--fs-base);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: rgba(136, 136, 136, 0.6);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-black);
  box-shadow: 0 0 0 2px rgba(13, 13, 13, 0.08);
}

.form-input.error {
  border-color: var(--color-terracota);
  box-shadow: 0 0 0 2px rgba(192, 105, 78, 0.12);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='none' stroke='%230d0d0d' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-20, 1.25rem) center;
  padding-right: var(--sp-48);
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
  align-items: flex-start;
}

.btn-submit {
  min-width: 200px;
  position: relative;
}

.btn-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-disclaimer {
  font-size: var(--fs-xs);
  color: var(--color-gray-mid);
  max-width: 42ch;
  line-height: 1.6;
}

/* ============================================================
   14. FOOTER
   ============================================================ */
.footer {
  background-color: var(--color-black);
  color: var(--color-white);
  padding-block: var(--sp-32);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  display: flex;
  flex-direction: column;
  gap: var(--sp-24);
  align-items: flex-start;
}

.footer-logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-white);
  flex-shrink: 0;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.footer-datos {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
}

.footer-redes {
  display: flex;
  gap: var(--sp-24);
}

.footer-red {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-red:hover {
  color: var(--color-terracota);
}

/* ============================================================
   15. BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: var(--sp-32);
  right: var(--sp-32);
  width: 44px;
  height: 44px;
  background-color: var(--color-black);
  color: var(--color-white);
  font-size: var(--fs-base);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  z-index: 700;
  transition: background-color var(--dur-fast) var(--ease-out),
              opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top[hidden] {
  display: none;
}

.back-to-top:hover {
  background-color: var(--color-terracota);
}

/* ============================================================
   16. TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: var(--sp-32);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: var(--color-black);
  color: var(--color-white);
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: var(--sp-16) var(--sp-32);
  border-radius: var(--radius);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.toast--success {
  background-color: var(--color-black);
  border-left: 3px solid #3d9970;
}

.toast.toast--error {
  background-color: var(--color-black);
  border-left: 3px solid var(--color-terracota);
}

/* ============================================================
   17. LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(13, 13, 13, 0.96);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-24);
  animation: fadeIn var(--dur-base) var(--ease-out) both;
}

.lightbox[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: var(--sp-24);
  right: var(--sp-32);
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
  transition: color var(--dur-fast) var(--ease-out);
  padding: var(--sp-8);
}

.lightbox-close:hover {
  color: var(--color-white);
}

.lightbox-content {
  display: grid;
  gap: var(--sp-40);
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.lightbox-img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
}

.lightbox-info {
  color: var(--color-white);
  padding-inline: var(--sp-8);
}

.lightbox-tipo {
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-terracota);
  display: block;
  margin-bottom: var(--sp-12);
}

.lightbox-titulo {
  font-family: var(--font-serif);
  font-size: var(--fs-3xl);
  color: var(--color-white);
  margin-bottom: var(--sp-24);
  line-height: 1.1;
}

.lightbox-desc {
  font-size: var(--fs-base);
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.72;
  margin-bottom: var(--sp-24);
  max-width: 60ch;
}

.lightbox-datos {
  display: flex;
  gap: var(--sp-40);
  flex-wrap: wrap;
}

.lightbox-dato {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.lightbox-dato-label {
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.lightbox-dato-valor {
  font-size: var(--fs-base);
  color: var(--color-white);
}

/* ============================================================
   18. SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.reveal-up {
  transform: translateY(40px);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   19. PREFERS-REDUCED-MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   20. RESPONSIVE — 480px
   ============================================================ */
@media (min-width: 480px) {
  :root {
    --container-pad: var(--sp-32);
  }

  .hero-stats {
    gap: var(--sp-64);
  }

  .proyectos-grid {
    columns: 2;
    column-gap: var(--sp-4);
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-24);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .footer-left {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-12);
  }
}

/* ============================================================
   21. RESPONSIVE — 768px
   ============================================================ */
@media (min-width: 768px) {
  :root {
    --container-pad: var(--sp-48);
    --section-gap: var(--sp-160);
  }

  .nav-links {
    display: flex;
  }

  .nav-cta {
    display: inline-block;
  }

  .nav-hamburger {
    display: none;
  }

  /* Hero split */
  .hero-content {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }

  .hero-text {
    flex: 0 0 52%;
    padding: var(--sp-80) var(--sp-64) var(--sp-80) var(--sp-48);
    justify-content: center;
  }

  .hero-image {
    flex: 0 0 48%;
    height: auto;
    max-height: none;
  }

  .hero-scroll-hint {
    display: flex;
  }

  /* Estudio */
  .estudio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-80);
    align-items: start;
  }

  .estudio-columnas {
    flex-direction: row;
    gap: var(--sp-40);
  }

  .estudio-imagen img {
    height: 560px;
  }

  /* Proceso */
  .proceso-pasos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-64);
  }

  .paso-linea {
    display: none;
  }

  /* Testimonios */
  .testimonios-grid {
    grid-template-columns: 1fr;
  }

  /* Contacto */
  .contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: var(--sp-96);
    align-items: start;
  }

  /* Premios */
  .premio-anio {
    min-width: 4rem;
    font-size: var(--fs-sm);
  }
}

/* ============================================================
   22. RESPONSIVE — 1024px
   ============================================================ */
@media (min-width: 1024px) {
  :root {
    --container-pad: var(--sp-64);
  }

  /* Hero */
  .hero-text {
    flex: 0 0 55%;
    padding: var(--sp-96) var(--sp-80) var(--sp-96) var(--sp-64);
  }

  .hero-image {
    flex: 0 0 45%;
  }

  /* Proyectos — masonry 3 cols */
  .proyectos-grid {
    columns: 3;
  }

  /* Servicios */
  .servicio-item {
    gap: var(--sp-32);
  }

  .servicio-flecha {
    opacity: 0;
  }

  /* Testimonios 3 col */
  .testimonios-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Proceso — 4 cols */
  .proceso-pasos {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   23. RESPONSIVE — 1280px+
   ============================================================ */
@media (min-width: 1280px) {
  .hero-text {
    padding-left: var(--sp-96);
  }

  .estudio-imagen img {
    height: 640px;
  }

  .premio-item {
    gap: var(--sp-48);
  }
}

/* ============================================================
   24. PRINT
   ============================================================ */
@media print {
  .nav-header,
  .back-to-top,
  .toast,
  .lightbox,
  .hero-scroll-hint,
  .proyectos-filtros,
  .nav-cta,
  .nav-hamburger {
    display: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  .proyecto-card,
  .servicio-item,
  .proceso-paso {
    page-break-inside: avoid;
  }
}

/* ============================================================
   25. MISCELLANEOUS & POLISH
   ============================================================ */

/* Smooth image rendering */
img {
  image-rendering: -webkit-optimize-contrast;
}

/* Selection */
::selection {
  background-color: rgba(192, 105, 78, 0.25);
  color: var(--color-black);
}

/* Scrollbar minimal */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background-color: var(--color-gray-light);
}

::-webkit-scrollbar-thumb {
  background-color: rgba(13, 13, 13, 0.3);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-terracota);
}

/* Prevent fouc on hidden nav-links */
.nav-links:not(.open) {
  display: none;
}

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

/* Page load transition */
body {
  animation: pageIn 0.5s var(--ease-out) both;
}

@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Hover lift for cards */
.proyecto-card {
  transition: box-shadow var(--dur-base) var(--ease-out);
}

.proyecto-card:hover {
  box-shadow: 0 8px 40px rgba(13, 13, 13, 0.12);
}

/* Active nav state (scrollspy) */
.nav-link.active-section {
  color: var(--color-terracota);
}

.nav-link.active-section::after {
  width: 100%;
}

/* Form submit loading state */
.btn-submit[data-loading="true"] .btn-text {
  visibility: hidden;
}

.btn-submit[data-loading="true"] .btn-loading {
  display: flex !important;
}

/* Premio info */
.premio-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* Proyecto overlay touch fix */
@media (hover: none) {
  .proyecto-overlay {
    opacity: 1;
    background-color: rgba(13, 13, 13, 0.5);
  }

  .proyecto-overlay-content {
    transform: none;
  }

  .servicio-flecha {
    opacity: 1;
  }
}

/* Extra spacing for hero stats on desktop */
@media (min-width: 768px) {
  .stat-number {
    font-size: var(--fs-3xl);
  }
}

/* Lightbox scroll lock */
body.lightbox-open {
  overflow: hidden;
}

/* Contact form wrap full width on mobile */
.contacto-form-wrap {
  width: 100%;
}

/* Ensure proyectos section padding is correct on all screen sizes */
.proyectos .section-header {
  width: 100%;
}

/* Prevent text overflow on small screens */
.hero-title br {
  display: block;
}

/* Badge CPAU in nav hover */
.nav-logo::after {
  content: '';
  display: none;
}

/* Reduce image flicker */
.proyecto-imagen img {
  will-change: transform;
}

/* Line clamp for overlay description */
.proyecto-meta-overlay {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Consistent vertical alignment for grid items in masonry */
.proyectos-grid .proyecto-card:nth-child(3n+2) {
  margin-top: 0;
}

/* Footer compact on mobile */
@media (max-width: 479px) {
  .footer-inner {
    gap: var(--sp-16);
  }

  .footer-redes {
    gap: var(--sp-16);
  }
}

/* Adjust hero for very small screens */
@media (max-width: 360px) {
  :root {
    --container-pad: var(--sp-16);
  }

  .hero-title {
    font-size: clamp(3rem, 10vw, 5rem);
  }

  .btn-primary,
  .btn-ghost {
    padding: var(--sp-12) var(--sp-24);
    font-size: var(--fs-xxs);
  }
}

/* Masonry card tall image variation */
@media (min-width: 480px) {
  .proyecto-card:nth-child(2n) .proyecto-imagen {
    aspect-ratio: 3/4;
  }
}

@media (min-width: 1024px) {
  .proyecto-card:nth-child(3n) .proyecto-imagen {
    aspect-ratio: 3/4;
  }

  .proyecto-card:nth-child(3n+1) .proyecto-imagen {
    aspect-ratio: 4/3;
  }

  .proyecto-card:nth-child(3n+2) .proyecto-imagen {
    aspect-ratio: 1/1;
  }
}
