/* ==========================================================================
   THE MÖNKY LAB — sitio propio
   Dos mundos: claro para vender (inicio, servicios, nosotros, contacto),
   oscuro de marca para enseñar el trabajo (portfolio, fichas de proyecto).
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Claro */
  --paper: #ffffff;
  --paper-soft: #f4f4f2;
  --ink: #0d0d0f;
  --ink-soft: #3a3a40;
  --ink-mute: #8a8a8e;
  --rule: #e3e3e0;

  /* Oscuro (tokens de marca TML) */
  --night: #0d0d0f;
  --night-soft: #16161a;
  --night-rule: #2a2a30;
  --snow: #ffffff;
  --snow-dim: #ededed;
  --lime: #c6ff3a;

  /* Tipos — equivalentes libres al sistema de wearetopsecret.com (todas de pago allí):
     Steelfish          -> Anton         (condensada pesada; la mejor libre del género)
     Akzidenz-Grotesk   -> Archivo       (grotesco neo; Poppins era geométrica, otra familia)
     Perfectly Nineties -> Instrument Serif (serif de alto contraste, mismo género)
     OJO: brand.md define Anton/Poppins/Prompt. Archivo lo contradice: actualizar. */
  --display: "Anton", system-ui, sans-serif;
  --sans: "Archivo", system-ui, -apple-system, sans-serif;
  --body: "Archivo", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;

  /* Ritmo */
  --track-label: 0.18em;
  --shell: min(92vw, 1280px);
  --gap: clamp(4.5rem, 9vw, 9rem);
  --radius: 14px;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.6s ease, color 0.6s ease;
}

/* --- Fondo que cambia con el scroll ------------------------------------- */
/* Idea tomada de rallyinteractive.com: el color vive en el HTML por sección
   (allí, data-primarycolor por proyecto) y el JS interpola al hacer scroll.
   Aquí no hace falta ni canvas ni GSAP: como todo el CSS lee de los tokens,
   redefinirlos en body.is-dark invierte la página entera de una vez.
   Marca monocroma = blanco para vender, negro para enseñar el trabajo. */
body.is-dark {
  --paper: #0d0d0f;
  --paper-soft: #16161a;
  --ink: #ffffff;
  --ink-soft: #c9c9cf;
  --ink-mute: #8a8a8e;
  --rule: #2a2a30;
}
/* Todo lo que pinta fondo o borde necesita la misma transición, o el cambio
   se ve a trompicones: unos elementos saltan y otros funden. */
.section-soft,
.svc, .svc-grid,
.quote,
.value, .values,
.marquee,
.faq details,
.contact-card, .map-frame,
.svc-list, .svc-row,
.step,
.site-head {
  transition: background-color 0.6s ease, border-color 0.6s ease, color 0.6s ease;
}

/* El acento lima solo asoma sobre negro: en claro se queda discreto.
   Es como se comporta la marca en los PDFs. */
body.is-dark .em { color: var(--lime); }
body.is-dark .svc .more { color: var(--lime); }
body.is-dark .label::before { background: var(--lime); }
body.is-dark .btn-ghost:hover { background: var(--lime); border-color: var(--lime); color: var(--night); }

/* El logo se cambia por el blanco: el negro sobre negro no se ve. */
.brand { display: grid; }
.brand img { grid-area: 1 / 1; transition: opacity 0.5s ease; }
.brand .brand-light { opacity: 0; }
body.is-dark .brand .brand-dark { opacity: 0; }
body.is-dark .brand .brand-light { opacity: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--sans); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 3px; }

.shell { width: var(--shell); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Etiquetas ---------------------------------------------------------- */
.label {
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  margin: 0 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.label::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  flex: none;
}

/* --- Intro -------------------------------------------------------------- */
/* La portada de marca en negro: se levanta y descubre la web.
   Técnica: contenedor con overflow:hidden que hace de ventana, contenido
   esperando fuera en translateY(100%). Sin WebGL y sin librería de tweens:
   solo transform + opacity, que es lo único que el compositor mueve gratis.

   Oculto por defecto: solo aparece si el JS añade .has-intro. Sin JS, con
   reduce-motion o en visita repetida no existe, y el contenido nunca se bloquea. */
.intro { display: none; }
.has-intro .intro {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--night);
  will-change: transform;
}
.has-intro { overflow: hidden; } /* sin scroll mientras la cortina está puesta */

.intro-stage {
  display: grid;
  place-items: center;
  position: relative;
}
/* Tiempo 1: el logo que entra girando. */
.intro-spin {
  grid-area: 1 / 1;
  width: clamp(72px, 9vw, 104px);
  opacity: 0;
  will-change: transform, opacity;
}
/* Tiempo 2: el logo real, descubierto con un barrido de arriba abajo.
   Al estar el lockup apilado, el barrido lee el nombre línea a línea
   (THE / MÖNKY / LAB / AGENCY) sin trocear la imagen ni recomponer el
   wordmark en Anton — que brand.md prohíbe expresamente. */
.intro-word {
  grid-area: 1 / 1;
  width: clamp(180px, 26vw, 300px);
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  will-change: clip-path, opacity;
}

/* --- Cabecera ----------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-head.is-stuck { border-bottom-color: var(--rule); }
.site-head .bar {
  width: var(--shell);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
}
/* display: grid para que los dos logos (oscuro/blanco) queden apilados en la
   misma celda (grid-area 1/1) y hagan crossfade en el mismo sitio. Con
   inline-flex caían en ranuras distintas y el logo saltaba al conmutar. */
.brand { display: grid; justify-items: start; align-items: center; text-decoration: none; flex: none; }
.brand img { width: 46px; }

.nav { display: flex; align-items: center; gap: 2rem; }
/* :not(.btn) ist Pflicht, nicht Kosmetik: `.nav a` (0,1,1) schlägt `.btn` (0,1,0)
   und würde dem CTA sein Padding, seine Schriftgröße und seine Farbe nehmen —
   die Pille klebte dann am Text und bekam die Nav-Unterstreichung dazu. */
.nav a:not(.btn) {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--ink-soft);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav a:not(.btn):hover { color: var(--ink); }
.nav a:not(.btn):hover::after,
.nav a:not(.btn)[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav a:not(.btn)[aria-current="page"] { color: var(--ink); }
.nav .btn { flex: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- Botones ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 100px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); background: #24242a; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-lime { background: var(--lime); border-color: var(--lime); color: var(--night); }
.btn-lime:hover { background: #d4ff63; border-color: #d4ff63; }
.btn-snow { background: var(--snow); border-color: var(--snow); color: var(--night); }
.btn-snow:hover { background: var(--snow-dim); border-color: var(--snow-dim); }
.btn-outline-snow { background: transparent; border-color: var(--night-rule); color: var(--snow); }
.btn-outline-snow:hover { background: var(--snow); border-color: var(--snow); color: var(--night); }

/* --- Portada ------------------------------------------------------------ */
.hero {
  padding: clamp(1rem, 3vh, 2.25rem) 0 var(--gap);
  position: relative;
}
/* El límite de medida va sobre el propio titular: así `ch` se calcula con SU
   tamaño de fuente y la columna escala sola. Puesto en .hero-inner (17px de
   body) daba una columna de 225px para un texto de 115px. */
.hero h1 {
  font-size: clamp(3.1rem, 9vw, 7.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0 0 1.1rem;
  max-width: 15ch;
  text-transform: uppercase;
}
/* En mayúsculas ya no hay ascendentes ni descendentes que separen las líneas:
   sin apretar el interlineado, el titular se ve flotando. */
.hero h1 { line-height: 0.95; }
/* El rotador serif italic: el gesto que ya tiene la web actual, mantenido */
.rotator {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  position: relative;
  min-height: 1.1em;
}
.rotator span {
  position: absolute;
  inset: 0;
  opacity: 0;
  white-space: nowrap;
}
.rotator span.is-on { opacity: 1; }
.has-motion .rotator span { opacity: 0; }

.hero .sub {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.hero-meta {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 4rem;
}
.hero-meta div { min-width: 120px; }
@media (max-width: 1024px) {
  /* Los 4 datos en una sola línea también en tablet (petición Santi). */
  .hero-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
  .hero-meta div { min-width: 0; }
  .hero-meta strong { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
  .hero-meta small { font-size: 0.62rem; letter-spacing: 0.08em; }
}
.hero-meta strong {
  display: block;
  font-family: var(--sans);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.hero-meta small {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
}

/* --- Secciones ---------------------------------------------------------- */
.section { padding: var(--gap) 0; }
.section-soft { background: var(--paper-soft); }
.section h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  max-width: 22ch;
  margin-bottom: 1.4rem;
}
.section .lede {
  max-width: 58ch;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--ink-soft);
}
.section-head { margin-bottom: clamp(2.8rem, 5vw, 4.5rem); }
.section-head.split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: end;
}
.section-head.split h2 { margin-bottom: 0; }
.em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* --- Servicios (rejilla) ------------------------------------------------ */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.svc {
  background: var(--paper);
  padding: 2.6rem 2rem 2.8rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background 0.28s ease;
  position: relative;
}
.svc:hover { background: var(--paper-soft); }
.svc .n {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
}
.svc h3 { font-size: 1.32rem; font-weight: 500; }
.svc p { font-size: 0.94rem; color: var(--ink-soft); margin: 0; }
.svc .more {
  margin-top: auto;
  padding-top: 1.4rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.svc .more svg { transition: transform 0.25s ease; }
.svc:hover .more svg { transform: translateX(4px); }

/* --- Servicios de la home (patrón Basic, sin imágenes) ------------------
   Basic pone la obra a la derecha de cada fila. Aquí no: solo 3 de los 6
   servicios tienen proyecto al que agarrarse, y tres huecos vacíos serían
   peor que la rejilla que había. A la derecha va lo que sí existe: qué
   incluye. Mismo ritmo (contador, titular grande, fila), contenido real.
   La obra vive en servicios.html, donde cada emparejamiento se justifica. */
.svc-list-home { counter-reset: hs 0 hs-total 6; border-top: 1px solid var(--rule); }
/* El total va en el HTML: la home lista 6, servicios.html los 9. */
.svc-list-home[data-total="9"] { counter-reset: hs 0 hs-total 9; }
/* Tres columnas: servicio · qué incluye · imagen. */
.svc-item {
  counter-increment: hs;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(180px, 0.8fr) minmax(220px, 0.9fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(2rem, 3.5vw, 3rem) 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.6s ease;
}
.svc-item .count {
  display: flex;
  justify-content: space-between;
  /* Sin tope, `space-between` manda el "/06" al otro extremo de la columna y el
     contador deja de leerse como "01 de 06". */
  max-width: 8rem;
  font-family: var(--body);
  font-size: 0.7rem;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  margin-bottom: 1.4rem;
}
.svc-item .count::before { content: counter(hs, decimal-leading-zero); }
.svc-item .count::after { content: "/" counter(hs-total, decimal-leading-zero); }
.svc-item h3 {
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 0.9rem;
  max-width: 13ch;
  transition: color 0.25s ease;
}
.svc-item:hover h3 { color: var(--ink-mute); }
body.is-dark .svc-item:hover h3 { color: var(--lime); }
.svc-item .desc { font-size: 0.95rem; color: var(--ink-soft); max-width: 36ch; margin: 0; }
.svc-item .more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
}
.svc-item .more svg { transition: transform 0.25s ease; }
.svc-item:hover .more svg { transform: translateX(4px); }
body.is-dark .svc-item .more { color: var(--lime); }
/* Una sola columna: las dos de antes se juntan aquí y la tercera es la imagen. */
.svc-item .incl { display: grid; grid-template-columns: 1fr; gap: 0.4rem; padding-top: 0.3rem; }
.svc-item .incl li {
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding-left: 1.1rem;
  position: relative;
}
.svc-item .incl li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.68em;
  width: 6px; height: 1px;
  background: var(--ink-mute);
}
body.is-dark .svc-item .incl li::before { background: var(--lime); }

/* Tercera columna: la imagen. En gris, a color al pasar el cursor — el mismo
   gesto que ya tiene la web actual. `filter` es de las pocas propiedades no
   compositoras que vale la pena: aquí es el efecto, no un adorno. */
.svc-shot {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  transition: background-color 0.6s ease, border-color 0.6s ease;
}
.svc-shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.5s ease, transform 0.7s cubic-bezier(0.2, 0, 0.2, 1);
}
.svc-item:hover .svc-shot img { filter: grayscale(0) contrast(1); transform: scale(1.04); }
/* Sin foto todavía: se ve que falta, nunca una de banco haciéndose pasar por nuestra. */
.svc-shot.pending {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg,
    var(--paper-soft) 0 10px, color-mix(in srgb, var(--paper-soft) 60%, var(--rule)) 10px 20px);
}
.svc-shot.pending span {
  font-family: var(--body);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  text-align: center;
  padding: 0 1rem;
}
@media (prefers-reduced-motion: reduce) {
  .svc-shot img { transition: none; }
}

@media (max-width: 1100px) {
  /* Tablet: texto y lista apilados a la izquierda, imagen a la derecha centrada.
     (Antes la imagen colgaba bajo la lista y dejaba huecos enormes — visto en iPad.) */
  .svc-item { grid-template-columns: 1.05fr 0.95fr; grid-template-rows: auto auto; }
  .svc-item > div:first-child { grid-column: 1; grid-row: 1; }
  .svc-item .incl { grid-column: 1; grid-row: 2; }
  .svc-item > .svc-shot { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 100%; }
}
@media (max-width: 720px) {
  .svc-item { grid-template-columns: 1fr; grid-template-rows: none; gap: 1.2rem; }
  .svc-item > div:first-child, .svc-item .incl { grid-column: auto; grid-row: auto; }
  .svc-item h3 { max-width: none; }
  .svc-item .count { margin-bottom: 1rem; }
  .svc-item > .svc-shot { grid-column: auto; grid-row: auto; width: 100%; max-width: none; }
}

/* --- Proceso ------------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; }
.step { border-top: 2px solid var(--ink); padding-top: 1.4rem; }
.step .n {
  font-family: var(--display);
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 0.8rem;
  display: block;
}
.step h3 { font-size: 1.1rem; font-weight: 500; margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* --- Reseñas ------------------------------------------------------------ */
.quotes {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 1fr);
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1.5rem;
  scrollbar-width: thin;
}
.quote {
  scroll-snap-align: start;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
}
.section-soft .quote { background: var(--paper); }
.quote .stars { color: #f5b301; letter-spacing: 0.15em; font-size: 0.85rem; margin-bottom: 1rem; }
.quote blockquote { margin: 0 0 1.5rem; font-size: 0.97rem; color: var(--ink-soft); }
.quote figcaption {
  margin-top: auto;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
}
.quote figcaption small { display: block; font-weight: 400; color: var(--ink-mute); font-family: var(--body); }

/* --- Cajas de texto: borde abierto en L (arriba + izquierda) -------------
   Cambio de dirección (2026-07-17): las cajas de TEXTO dejan de encerrarse con
   borde completo + esquinas redondeadas y pasan a un marco abierto — solo línea
   arriba y a la izquierda, las otras dos esquinas al aire, sin radio. Más
   editorial, menos "tarjeta". Las IMÁGENES no entran aquí: sin radio se ven
   cortadas con esquina dura. */
.open-frame {
  border: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  border-radius: 0;
  transition: border-color 0.6s ease, background-color 0.6s ease;
}

/* Misma estructura que el widget de la web actual (panel + carrusel + respuesta
   del propietario) pero construida aquí: sin script de terceros, sin cookies
   ajenas, y con la tipografía de la casa. Datos reales, verbatim, con fecha de
   recogida: nunca se inventa ni se retoca una reseña. */
.reviews { display: grid; grid-template-columns: minmax(230px, 300px) 1fr; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }

.reviews-panel { border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); border-radius: 0;
  padding: 2rem 1.8rem;
  background: var(--paper);
  transition: background-color 0.6s ease, border-color 0.6s ease;
  position: sticky;
  top: 100px;
}
.reviews-panel .who { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.2rem; }
.reviews-panel .who img { width: 40px; flex: none; }
.reviews-panel .who h3 { font-size: 0.95rem; font-weight: 600; line-height: 1.25; }
.reviews-score { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.4rem; }
.reviews-score strong {
  font-family: var(--sans);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stars { color: #f5b301; letter-spacing: 0.1em; font-size: 0.95rem; white-space: nowrap; }
.reviews-panel .based { font-size: 0.85rem; color: var(--ink-mute); margin-bottom: 0.3rem; }
.reviews-panel .taken { font-size: 0.72rem; color: var(--ink-mute); margin-bottom: 1.4rem; opacity: 0.8; }
.reviews-panel .btn { width: 100%; }

.reviews-track {
  display: grid;
  grid-auto-flow: column;
  /* 360px: por debajo, el texto se parte en columnas de 4 palabras y se lee fatal. */
  grid-auto-columns: minmax(360px, 1fr);
  gap: 1.2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1.2rem;
  scrollbar-width: thin;
}
.review {
  scroll-snap-align: start; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); border-radius: 0;
  padding: 1.5rem 1.4rem;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  transition: background-color 0.6s ease, border-color 0.6s ease;
}
.review .head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.review .ava {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  flex: none;
}
.review .head h4 { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; line-height: 1.2; }
.review .head .g { margin-left: auto; width: 15px; height: 15px; flex: none; }
.review .stars { font-size: 0.8rem; margin-bottom: 0.7rem; }
.review blockquote { margin: 0 0 1.1rem; font-size: 0.9rem; color: var(--ink-soft); }
.review blockquote.none { font-style: italic; opacity: 0.5; }
/* La respuesta del propietario, plegable: oculta por defecto, se abre con un
   <details>. summary es el botón "ver respuesta"; al abrir, muestra el texto. */
.review .reply { margin-top: auto; }
.review .reply summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
  transition: color 0.2s ease;
}
.review .reply summary::-webkit-details-marker { display: none; }
.review .reply summary::after {
  content: "+";
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.25s ease;
}
.review .reply[open] summary::after { transform: rotate(45deg); }
.review .reply summary:hover { color: var(--snow); }
body.is-dark .review .reply summary:hover { color: var(--lime); }
.review .reply .answer {
  border-left: 2px solid var(--lime);
  padding-left: 0.9rem;
  margin-top: 0.7rem;
}
.review .reply h5 {
  font-family: var(--body);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  margin-bottom: 0.35rem;
}
.review .reply p { margin: 0; font-size: 0.82rem; color: var(--ink-mute); line-height: 1.5; }

@media (max-width: 900px) {
  .reviews { grid-template-columns: 1fr; }
  .reviews-panel { position: static; }
  .reviews-track { grid-auto-columns: 82vw; }
}

/* --- Marquee ------------------------------------------------------------ */
/* Antes: todo del mismo tamaño, mismo color, un punto lima entre medias. Plano.
   Ahora contrasta como la referencia (wearetopsecret.com): display condensado
   grande contra serif fino en cursiva, alternando. El ritmo lo da la mezcla,
   no la separación. */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.4rem, 2.5vw, 2.2rem) 0;
  display: flex;
  user-select: none;
  transition: background-color 0.6s ease, border-color 0.6s ease;
}
.marquee ul {
  display: flex;
  align-items: baseline;
  gap: clamp(1.6rem, 3vw, 3rem);
  flex: none;
  min-width: 100%;
  padding-right: clamp(1.6rem, 3vw, 3rem);
  animation: slide 46s linear infinite;
}
.marquee li {
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  gap: clamp(1.6rem, 3vw, 3rem);
}
/* Los pares: display condensado, grande, en mayúsculas */
.marquee li {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  letter-spacing: 0.01em;
  color: var(--ink);
}
/* Los impares: serif en cursiva, más pequeño, en minúsculas. El contraste. */
.marquee li:nth-child(even) {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  color: var(--ink-mute);
}
/* Cada tercero, en lima: el acento aparece cada pocas palabras, no en todas */
.marquee li:nth-child(3n) { color: var(--lime); }
.marquee li::after {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  flex: none;
  align-self: center;
}
@keyframes slide { to { transform: translateX(-100%); } }
.marquee:hover ul { animation-play-state: paused; }

/* Hover: la banda entera se va a negro y las letras se invierten.
   No se anima `background` de los <li> (no existe): se invierte la banda y el
   color del texto, que es lo que el compositor mueve barato. */
.marquee {
  background: transparent;
  transition: background-color 0.45s ease, border-color 0.45s ease;
}
.marquee li { transition: color 0.45s ease; }
.marquee:hover { background: var(--night); border-color: var(--night); }
.marquee:hover li { color: var(--snow); }
.marquee:hover li:nth-child(even) { color: var(--ink-mute); }
.marquee:hover li:nth-child(3n) { color: var(--lime); }
@media (prefers-reduced-motion: reduce) {
  .marquee, .marquee li { transition: none; }
}

/* --- Rail vertical de redes (como en la web actual) --------------------- */
.social-rail {
  position: fixed;
  left: clamp(0.9rem, 2.2vw, 2rem);
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding-bottom: clamp(2rem, 6vh, 5rem);
  mix-blend-mode: difference; /* legible sobre blanco y sobre negro sin tocar nada */
}
.social-rail a {
  writing-mode: vertical-rl;
  transform: rotate(180deg);   /* se lee de abajo arriba */
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: var(--track-label);
  text-decoration: none;
  color: #fff;                 /* con difference, sale negro sobre blanco */
  transition: opacity 0.2s ease;
  opacity: 0.75;
}
.social-rail a:hover { opacity: 1; }
.social-rail .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.55;
  flex: none;
}
.social-rail .line {
  width: 1px;
  height: clamp(48px, 8vh, 84px);
  background: #fff;
  opacity: 0.4;
}
@media (max-width: 1100px) { .social-rail { display: none; } }

/* --- Cursor ------------------------------------------------------------- */
/* Punto que sigue al ratón con retardo. Solo con puntero fino (ratón): en
   táctil no existe cursor y en reduce-motion no se activa. */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--lime);
  margin: -3px 0 0 -3px;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid var(--ink-mute);
  margin: -17px 0 0 -17px;
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease,
              border-color 0.25s ease, background-color 0.25s ease;
}
.cursor-ring.is-hot {
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  border-color: var(--lime);
  background: color-mix(in srgb, var(--lime) 12%, transparent);
}
/* Estela: SVG a pantalla completa, la traza el JS con una cola de nodos. */
.cursor-trail {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 89;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cursor-trail polyline {
  fill: none;
  stroke: var(--lime);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring, .cursor-trail { display: none; }
}

/* --- Marca de agua ------------------------------------------------------
   El logo real, gigante y casi transparente, detrás del contenido. Se usa el
   PNG y no el wordmark recompuesto en Anton: brand.md lo prohíbe expresamente. */
.ghost {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.04;
  line-height: 0;
}
.ghost img { width: 100%; height: auto; }
body.is-dark .ghost { opacity: 0.05; }

/* Hero: el NOMBRE COMPLETO de marca de agua, no el logo.
   Es un wordmark apaisado (~6:1): barre el ancho del hero en vez de ocupar una
   columna estrecha como el lockup apilado. Se sale por la derecha a propósito,
   como en la referencia (wearetopsecret.com): un nombre recortado se lee como
   textura, uno centrado y entero compite con el titular. */
.hero { position: relative; overflow: hidden; }
/* A sangre: el nombre ocupa todo el ancho del banner y lo cortan sus bordes.
   Entero se lee como un segundo logo y compite con el titular; cortado se lee
   como textura, que es lo que tiene que ser. */
/* Partida por la mitad en el borde inferior del banner: el centro del wordmark
   se apoya exactamente en el canto del hero y el overflow se come la mitad de
   abajo. Se lee la mitad superior de las letras y el ojo completa el resto.
   El ancho entra entero (no se corta de largo); el único corte es el horizontal. */
/* 100%, no 100vw: el hero es `.hero.shell` (min(92vw,1280px)) y tiene
   overflow:hidden. Con 100vw la marca sobresalía 80px por lado y su propio
   contenedor le cortaba la L y la B. Ancho = el del hero → frase entera. */
.hero .ghost {
  left: 50%;
  bottom: 0;
  width: 100%;
  transform: translate(-50%, 50%);
  opacity: 0.05;
}
.hero .shell, .hero-inner, .hero-meta { position: relative; z-index: 1; }
/* El nombre en claro; sobre negro se cambia por el blanco. */
.hero .ghost .gw { display: none; }
body.is-dark .hero .ghost .gd { display: none; }
body.is-dark .hero .ghost .gw { display: block; }

@media (max-width: 900px) {
  /* En estrecho el wordmark (6:1) no cabe a 100% y el hero le corta la L y la B.
     Se deja al 100% igualmente pero sin recorte lateral: cabe entero. */
  .hero .ghost { width: 100%; opacity: 0.05; }
}

/* Pie: la marca de agua, entera y centrada.
   El logo es un lockup apilado (~309×360): dimensionado por ANCHO se sale de
   largo y el pie lo recorta. Se dimensiona por ALTURA y el ancho lo pone la
   propia proporción, así se ve completo sea cual sea el alto del pie. */
.site-foot { position: relative; overflow: hidden; }
.site-foot .ghost {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 84%;
  width: auto;
  opacity: 0.06;
}
.site-foot .ghost img { height: 100%; width: auto; }
.site-foot .shell { position: relative; z-index: 1; }
/* En móvil el footer es muy alto (columnas apiladas): a 84% de alto el wordmark
   apilado se volvía gigante y desbordaba. Lo escalamos por ancho, contenido y
   sutil, anclado arriba para no chocar con el bloque de contacto del final. */
@media (max-width: 760px) {
  .site-foot .ghost {
    height: auto;
    width: 58%;
    max-width: 260px;
    top: 34%;
    opacity: 0.05;
  }
  .site-foot .ghost img { width: 100%; height: auto; }
}

/* --- Aviso de cookies --------------------------------------------------- */
.cookie {
  position: fixed;
  left: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 95;
  max-width: 420px;
  background: var(--night);
  color: var(--snow-dim);
  border: 1px solid var(--night-rule);
  border-radius: var(--radius);
  padding: 1.6rem;
  font-size: 0.88rem;
  line-height: 1.55;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.cookie[hidden] { display: none; }
/* El aviso siempre es oscuro, así que el logo va en blanco. */
.cookie .head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.7rem; }
.cookie .head img { width: 30px; flex: none; }
.cookie h2 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--snow);
  margin: 0;
}
.cookie p { margin: 0 0 1.2rem; }
.cookie a { color: var(--lime); }
.cookie .row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie .btn { padding: 0.6rem 1.2rem; font-size: 0.82rem; }
@media (max-width: 560px) { .cookie { right: clamp(1rem, 3vw, 2rem); max-width: none; } }

/* El mapa no carga hasta que hay consentimiento: sin permiso, sin cookies de Google. */
.map-frame.blocked { display: grid; place-items: center; text-align: center; padding: 2rem; }
.map-frame.blocked p { font-size: 0.9rem; color: var(--ink-soft); max-width: 32ch; margin-bottom: 1rem; }

/* --- FAQ ---------------------------------------------------------------- */
.faq { max-width: 860px; }
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
}
.faq summary {
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  flex: none;
  transition: transform 0.3s ease;
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 1rem 0 0; max-width: 68ch; color: var(--ink-soft); font-size: 0.97rem; }

/* --- Bloque CTA --------------------------------------------------------- */
.cta-block {
  background: var(--night);
  color: var(--snow);
  border-radius: var(--radius);
  padding: clamp(3rem, 6vw, 5.5rem);
  text-align: center;
}
.cta-block h2 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  letter-spacing: -0.01em;
  max-width: none;
  margin: 0 auto 1.3rem;
}
.cta-block p { max-width: 52ch; margin: 0 auto 2.4rem; color: var(--snow-dim); }
.cta-block .cta-row { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* --- Pie ---------------------------------------------------------------- */
.site-foot {
  background: var(--night);
  color: var(--snow-dim);
  padding: clamp(3.5rem, 6vw, 5rem) 0 2rem;
  font-size: 0.9rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--night-rule);
}
.foot-grid img { width: 54px; margin-bottom: 1.4rem; }
.foot-grid h4 {
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  margin-bottom: 1.1rem;
}
.foot-grid a { color: var(--snow-dim); text-decoration: none; transition: color 0.2s ease; }
.foot-grid a:hover { color: var(--lime); }
.foot-grid li { margin-bottom: 0.55rem; }
.foot-grid address { font-style: normal; color: var(--ink-mute); line-height: 1.8; }
.foot-base {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--ink-mute);
  font-size: 0.8rem;
}
.foot-base a { color: var(--ink-mute); text-decoration: none; }
.foot-base a:hover { color: var(--snow); }
/* Footer en móvil: centrado, con Servicios y Empresa en dos columnas.
   El logo (primer bloque) y Contacto (último) ocupan el ancho completo;
   los dos bloques del medio (Servicios, Empresa) se colocan lado a lado. */
@media (max-width: 760px) {
  .site-foot .foot-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
    row-gap: 2.5rem;
    text-align: center;
  }
  .site-foot .foot-grid > div:first-child,
  .site-foot .foot-grid > div:last-child { grid-column: 1 / -1; }
  .site-foot .foot-grid img { margin-left: auto; margin-right: auto; }
  .site-foot .foot-grid ul { padding: 0; }
  .site-foot .foot-grid p { margin-left: auto; margin-right: auto; }
  .site-foot .foot-base { justify-content: center; text-align: center; }
}

/* ==========================================================================
   MUNDO OSCURO — portfolio + fichas de proyecto
   ========================================================================== */
.night { background: var(--night); color: var(--snow); }
.night .site-head {
  background: color-mix(in srgb, var(--night) 86%, transparent);
}
.night .site-head.is-stuck { border-bottom-color: var(--night-rule); }
.night .nav a { color: var(--ink-mute); }
.night .nav a:hover, .night .nav a[aria-current="page"] { color: var(--snow); }
.night .nav-toggle { color: var(--snow); }
/* Invierte solo el .btn base. Los modificadores (lima, outline…) mandan sobre él:
   sin el :not(), `.night .btn` los pisaba por especificidad y el acento lima
   desaparecía justo en las páginas de marca. */
.night .btn:not(.btn-lime):not(.btn-ghost):not(.btn-outline-snow) {
  background: var(--snow);
  border-color: var(--snow);
  color: var(--night);
}
.night .btn:not(.btn-lime):not(.btn-ghost):not(.btn-outline-snow):hover {
  background: var(--snow-dim);
  border-color: var(--snow-dim);
}
.night .label { color: var(--ink-mute); }
.night .site-foot { border-top: 1px solid var(--night-rule); }

/* En negro el bloque CTA se fundía con el fondo y perdía la forma de tarjeta. */
.night .cta-block {
  background: var(--night-soft);
  border: 1px solid var(--night-rule);
}

.night-hero { padding: clamp(4rem, 10vh, 7rem) 0 clamp(3rem, 6vw, 5rem); }
.night-hero h1 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3rem, 10vw, 8rem);
  letter-spacing: -0.005em;
  line-height: 0.92;
  margin-bottom: 1.6rem;
}
.night-hero .sub { max-width: 56ch; color: var(--snow-dim); font-size: clamp(1rem, 1.5vw, 1.2rem); }

/* Filtros del portfolio */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--night-rule);
  margin-bottom: 3rem;
}
.filters button {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  border: 1px solid var(--night-rule);
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filters button:hover { color: var(--snow); border-color: var(--snow-dim); }
.filters button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--night); }

/* Rejilla de trabajos */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 1.8rem; }

/* Tarjeta CTA: "tu web puede ser la próxima". Ocupa el hueco de una obra, mismo
   aspecto 4:3, pero es la portada de marca en negro con un guiño al visitante.
   Reconstruida con los tokens de TML, no copiada del Elementor de la web actual. */
.work-cta {
  grid-column: span 1;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  text-align: center;
  text-decoration: none;
  color: var(--snow);
  background: var(--night);
  border: 1px solid var(--night-rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.4s cubic-bezier(0.2,0,0.2,1), border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}
.work-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--lime) 22%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.work-cta:hover { transform: translateY(-4px); border-color: var(--lime); }
.work-cta:hover::after { opacity: 1; }
.work-cta img { width: clamp(90px, 40%, 140px); position: relative; z-index: 1; }
.work-cta .line {
  position: relative; z-index: 1;
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-mute);
}
.work-cta .big {
  position: relative; z-index: 1;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.01em;
  line-height: 0.95;
  color: var(--snow);
}
.work-cta .aqui {
  position: relative; z-index: 1;
  font-family: var(--body);
  font-size: 0.74rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--lime);
}
.work {
  text-decoration: none;
  color: inherit;
  display: block;
}
.work .frame {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--night-soft);
  border: 1px solid var(--night-rule);
  margin-bottom: 1.1rem;
}
.work .frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0, 0.2, 1);
}
.work:hover .frame img { transform: scale(1.05); }
/* Marcador cuando aún no hay captura del proyecto */
.work .frame.pending {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, #16161a 0 10px, #141418 10px 20px);
}
.work .frame.pending span {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  text-transform: uppercase;
  color: #2f2f38;
  padding: 0 1rem;
  text-align: center;
  line-height: 1;
}
.work .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.work h3 { font-size: 1.1rem; font-weight: 500; transition: color 0.2s ease; }
.work:hover h3 { color: var(--lime); }
.work .tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  flex: none;
}
.work[hidden] { display: none; }

/* --- Ficha de proyecto -------------------------------------------------- */
.case-head { padding: clamp(3rem, 8vh, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-mute);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.2s ease;
}
.back:hover { color: var(--lime); }
.case-head h1 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 0.94;
  margin-bottom: 1.5rem;
}
.case-head .sub { max-width: 54ch; color: var(--snow-dim); font-size: clamp(1rem, 1.5vw, 1.15rem); }

.case-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 2.2rem 0;
  border-top: 1px solid var(--night-rule);
  border-bottom: 1px solid var(--night-rule);
  margin-top: 3rem;
}
.case-facts h4 {
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  margin-bottom: 0.6rem;
}
.case-facts p { margin: 0; font-size: 0.95rem; color: var(--snow-dim); }
.case-facts a { color: var(--lime); text-decoration: none; }
.case-facts a:hover { text-decoration: underline; }

.case-shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--night-rule);
  aspect-ratio: 16 / 9;
  background: var(--night-soft);
}
.case-shot img { width: 100%; height: 100%; object-fit: cover; }
.case-shot.pending {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, #16161a 0 12px, #141418 12px 24px);
}
.case-shot.pending span {
  font-family: var(--display);
  font-size: clamp(1.2rem, 3vw, 2rem);
  text-transform: uppercase;
  color: #2f2f38;
}

.case-body { padding: var(--gap) 0; }
.case-body .chapter {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 3rem 0;
  border-top: 1px solid var(--night-rule);
}
.case-body .chapter:first-child { border-top: 0; padding-top: 0; }
.case-body .chapter h2 {
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 500;
  max-width: none;
  margin: 0;
}
.case-body .chapter .prose { color: var(--snow-dim); max-width: 62ch; }
.case-body .chapter .prose p:last-child { margin-bottom: 0; }
.case-body .chapter .prose ul { margin: 0 0 1.1em; }
.case-body .chapter .prose li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.55rem;
}
.case-body .chapter .prose li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 7px; height: 1px;
  background: var(--lime);
}

/* Resultados con cifras reales */
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1rem; }
.result {
  background: var(--night-soft); border-top: 1px solid var(--night-rule); border-left: 1px solid var(--night-rule); border-radius: 0;
  padding: 1.8rem 1.5rem;
}
.result strong {
  display: block;
  font-family: var(--sans);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--lime);
  margin-bottom: 0.5rem;
}
.result span { font-size: 0.85rem; color: var(--ink-mute); display: block; }
.result small { display: block; margin-top: 0.7rem; font-size: 0.7rem; color: #5a5a62; }

/* Aviso de contenido pendiente — visible a propósito, nunca inventamos */
.pending-note {
  background: var(--night-soft);
  border: 1px dashed #3d3d46;
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  color: var(--ink-mute);
  font-size: 0.9rem;
}
.pending-note strong {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--snow-dim);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.pending-note p { margin: 0; }

/* Navegación entre proyectos */
.case-next {
  border-top: 1px solid var(--night-rule);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.case-next .label { margin: 0 0 0.5rem; }
.case-next a {
  text-decoration: none;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3.5vw, 2.6rem);
  transition: color 0.2s ease;
}
.case-next a:hover { color: var(--lime); }

/* --- Páginas legales ---------------------------------------------------- */
.legal { padding: clamp(3rem, 8vh, 5rem) 0 var(--gap); max-width: 78ch; }
.legal h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 2rem; }
.legal h2 { font-size: 1.3rem; margin: 2.8rem 0 0.9rem; }
.legal p, .legal li { color: var(--ink-soft); font-size: 0.97rem; }
.legal li { padding-left: 1.2rem; position: relative; margin-bottom: 0.5rem; }
.legal li::before { content: "—"; position: absolute; left: 0; color: var(--ink-mute); }
.legal a { color: var(--ink); }

/* --- Contacto ----------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact-card { border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); border-radius: 0;
  padding: 2.2rem;
}
.contact-card h3 { font-size: 1.15rem; font-weight: 500; margin-bottom: 1.2rem; }
.contact-list li { margin-bottom: 1.4rem; }
.contact-list h4 {
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  margin-bottom: 0.3rem;
}
.contact-list a, .contact-list address {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-style: normal;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.5;
}
.contact-list a:hover { color: var(--ink-mute); }
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  aspect-ratio: 4 / 3;
  background: var(--paper-soft);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* --- Nosotros ----------------------------------------------------------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 3rem; }
.value { border-top: 2px solid var(--ink); padding-top: 1.4rem; transition: border-color 0.6s ease; }
.value h3 { font-size: 1.05rem; font-weight: 500; margin-bottom: 0.5rem; }
.value p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* --- Servicios con obra (patrón Basic Agency) ---------------------------
   Estructura tomada de basicagency.com/services: una <ol> donde cada <li> es
   una fila flex — izquierda el servicio, derecha la obra que lo demuestra.
   Los contadores 01/04 no son adorno: son la semántica de la lista hecha
   visible, por eso aquí se generan con counter() y no a mano.

   Sin sticky, sin JS, sin librería: allí tampoco hay (364 KB de CSS y un solo
   position:sticky, que además es para otra cosa). Es flex sobre una lista. */
.work-list {
  counter-reset: svc 0 svc-total 4; /* el total va aquí: cambiar si cambian las filas */
  border-top: 1px solid var(--rule);
}
.work-row {
  counter-increment: svc;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2.1fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.work-row .aside { display: flex; flex-direction: column; height: 100%; }
.work-row .count {
  display: flex;
  justify-content: space-between;
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  margin-bottom: clamp(2rem, 6vw, 5rem);
}
.work-row .count::before { content: counter(svc, decimal-leading-zero); }
.work-row .count::after { content: "/" counter(svc-total, decimal-leading-zero); }
.work-row h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.3rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 1rem;
  max-width: 12ch;
}
.work-row .aside p {
  font-size: 0.97rem;
  color: var(--ink-soft);
  max-width: 34ch;
  margin-bottom: 1.6rem;
}
.work-row .aside .btn { align-self: flex-start; margin-top: auto; }

.work-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 1.8rem); }
.work-pair a { text-decoration: none; color: inherit; display: block; }
.work-pair .frame {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  margin-bottom: 1rem;
  transition: background-color 0.6s ease, border-color 0.6s ease;
}
.work-pair .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2,0,0.2,1); }
.work-pair a:hover .frame img { transform: scale(1.04); }
/* Marcador mientras no hay captura del proyecto. Se ve que falta a propósito:
   nunca una foto de banco haciéndose pasar por trabajo nuestro. */
.work-pair .frame.pending {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg,
    var(--paper-soft) 0 10px, color-mix(in srgb, var(--paper-soft) 70%, var(--rule)) 10px 20px);
}
.work-pair .frame.pending span {
  font-family: var(--display);
  font-size: clamp(1rem, 2vw, 1.5rem);
  text-transform: uppercase;
  color: var(--ink-mute);
  opacity: 0.5;
  text-align: center;
  padding: 0 1rem;
  line-height: 1;
}
.work-pair h4 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
  transition: color 0.2s ease;
}
.work-pair a:hover h4 { color: var(--ink-mute); }
body.is-dark .work-pair a:hover h4 { color: var(--lime); }
.work-pair p {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

@media (max-width: 900px) {
  .work-row { grid-template-columns: 1fr; gap: 2rem; }
  .work-row .count { margin-bottom: 1.2rem; }
  .work-row h3 { max-width: none; }
  .work-row .aside .btn { margin-top: 0; }
}
/* Fila con tres proyectos en vez de dos (p. ej. Desarrollo web). */
.work-pair.trio { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 860px) {
  .work-pair.trio { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .work-pair,
  .work-pair.trio { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- Detalle servicio (acordeón grande) --------------------------------- */
.svc-list { border-top: 1px solid var(--rule); }
.svc-row { border-bottom: 1px solid var(--rule); }
.svc-row summary {
  list-style: none;
  cursor: pointer;
  padding: 2.2rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.svc-row summary::-webkit-details-marker { display: none; }
.svc-row h3 {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 500;
  transition: color 0.2s ease;
}
.svc-row summary:hover h3 { color: var(--ink-mute); }
.svc-row .plus {
  font-size: 1.6rem;
  font-weight: 200;
  line-height: 1;
  transition: transform 0.3s ease;
}
.svc-row[open] .plus { transform: rotate(45deg); }
.svc-row .panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  padding: 0 0 2.6rem;
  max-width: 1100px;
}
.svc-row .panel .intro { color: var(--ink-soft); }
.svc-row .panel .intro p:last-child { margin-bottom: 0; }
.svc-row .panel .what h4 {
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink-mute);
  margin-bottom: 0.9rem;
}
.svc-row .panel .what li {
  padding-left: 1.3rem;
  position: relative;
  margin-bottom: 0.5rem;
  font-size: 0.93rem;
  color: var(--ink-soft);
}
.svc-row .panel .what li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7em;
  width: 7px; height: 1px;
  background: var(--ink);
}

/* --- Motion: estados iniciales (solo con JS activo) --------------------- */
.has-motion [data-reveal] { opacity: 0; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .case-facts { grid-template-columns: repeat(2, 1fr); }
  .results { grid-template-columns: 1fr; }
  .case-body .chapter { grid-template-columns: 1fr; gap: 1.2rem; }
  .section-head.split { grid-template-columns: 1fr; align-items: start; gap: 1.5rem; }
  .svc-row .panel { grid-template-columns: 1fr; gap: 1.6rem; }
  .svc-row summary { gap: 1rem; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .site-head .bar { padding: 0.9rem 0; }
  .nav {
    position: fixed;
    inset: 64px 0 auto;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 4vw 2rem;
    transform: translateY(-120%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .night .nav { background: var(--night); border-bottom-color: var(--night-rule); }
  .nav-open .nav { transform: translateY(0); }
  .nav a:not(.btn) { padding: 0.9rem 0; font-size: 1.15rem; width: 100%; }
  .nav .btn { margin-top: 1rem; width: 100%; }
  /* Hero a pantalla completa en móvil: el bloque (eyebrow→h1→sub→CTA) llena la
     primera pantalla y los CTA se anclan abajo, así los datos (+80, +150…) caen
     por debajo del pliegue. Lo último que se ve son los CTA. */
  .hero-inner {
    max-width: none;
    min-height: calc(100vh - 140px);
    min-height: calc(100svh - 140px);
    display: flex;
    flex-direction: column;
  }
  .hero .cta-row { margin-top: auto; }
  /* El titular en Archivo (no condensada) se salía por la derecha en móvil:
     la palabra larga "DEPARTAMENTO" no cabía a 3.1rem. Bajamos el mínimo y
     dejamos que escale con el ancho para que ninguna palabra se corte. */
  .hero h1 { font-size: clamp(2.2rem, 11vw, 4rem); }
  /* Los 4 datos en rejilla 2x2 (2 arriba, 2 abajo) en vez de 2+1+1. */
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem 2rem; }
  .hero-meta div { min-width: 0; }
  .svc-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; gap: 2rem; }
  .steps { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
  .case-facts { grid-template-columns: 1fr; gap: 1.5rem; }
  .quotes { grid-auto-columns: 82vw; }
}

/* --- Sin animación por preferencia del sistema -------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee ul { animation: none; }
  .rotator span { position: relative; opacity: 1; }
  .rotator span:not(:first-child) { display: none; }
}

@media print {
  .site-head, .nav, .cta-block { display: none; }
  body { background: #fff; color: #000; }
}

/* --- Selector de idioma (ES / CA / EN) ---------------------------------- */
/* Banderas como data-URI en CSS (una sola vez), para no repetir SVG en las
   ~60 páginas. Estilo TML: monocromo (blanco y negro), discreto. Las banderas
   van en grayscale y atenuadas; solo la activa (o al pasar el cursor) resalta. */
.lang { display: inline-flex; align-items: center; gap: 0; margin-left: 0.5rem; }
.lang a {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.4rem; border-radius: 5px;
  font-family: var(--body); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); text-decoration: none; line-height: 1;
  opacity: 0.5; transition: opacity 0.2s ease, color 0.2s ease;
}
.lang a:hover, .lang a.is-on { opacity: 1; color: var(--ink); }
.night .lang a { color: var(--snow-dim); }
.night .lang a:hover, .night .lang a.is-on { color: var(--snow); }
/* Solo letras: banderas ocultas (el markup queda, se ignora). */
.lang .flag { display: none; }
.flag-es { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23c60b1e'/%3E%3Crect y='5' width='30' height='10' fill='%23ffc400'/%3E%3C/svg%3E"); }
.flag-ca { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23FCDD09'/%3E%3Cg fill='%23DA121A'%3E%3Crect y='2.22' width='30' height='2.22'/%3E%3Crect y='6.67' width='30' height='2.22'/%3E%3Crect y='11.11' width='30' height='2.22'/%3E%3Crect y='15.56' width='30' height='2.22'/%3E%3C/g%3E%3C/svg%3E"); }
.flag-en { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='c'%3E%3Crect width='60' height='30'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23c)'%3E%3Crect width='60' height='30' fill='%23012169'/%3E%3Cpath d='M0,0 60,30M60,0 0,30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0,0 60,30M60,0 0,30' stroke='%23C8102E' stroke-width='3.5'/%3E%3Cpath d='M30,0 V30M0,15 H60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30,0 V30M0,15 H60' stroke='%23C8102E' stroke-width='6'/%3E%3C/g%3E%3C/svg%3E"); }
@media (max-width: 760px) {
  /* En móvil el selector vive en la barra, siempre visible, junto al menú */
  .site-head .bar .lang { margin-left: auto; margin-right: 0.3rem; }
  .lang a { padding: 0.3rem 0.35rem; gap: 0.28rem; }
}
