/* =========================================================================
   javifdez.com — estilos
   Colores, tipografía y chips tomados de la web actual (Webflow).
   Regla de la casa: jerarquía por tamaño, no por negrita.
   ========================================================================= */

:root {
  --pick-ink: #212121;                /* texto sobre --pick (blanco en azul y rojo) */
  --bg: #FAFAF8;
  --ink: #212121;
  --white: #FFFFFF;
  --soft: #F3F3F0;                    /* bandas claras en los case studies */
  --line: rgba(33, 33, 33, .12);
  --muted: rgba(33, 33, 33, .5);
  --overlay: rgba(33, 33, 33, .4);
  --accent: #5769FF;                  /* se sustituye al azar en el footer */
  --pick: #5769FF;                    /* color al azar, se fija en el <head> */

  --font: "Rethink Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --header-h: 3.625rem;
  --pad: 1rem;
  --gutter: clamp(1rem, 4vw, 4rem);
  --radius: 1rem;
  --ease: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: .8rem;
  line-height: 1rem;
  letter-spacing: -0.0375rem;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
b, strong { font-weight: 400; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Chips ------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center;
  padding: .25rem .5rem;
  border-radius: 4rem;
  text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.chip--outline       { color: var(--white); border: 1px solid var(--white); }
.chip--outline:hover { color: var(--ink); background: var(--white); }
.chip--solid         { color: var(--ink); background: var(--white); }
.chip--solid:hover   { color: var(--white); background: var(--ink); }
.chip--dark          { color: var(--white); background: var(--ink); }
.chip--state         { color: var(--ink); background: var(--white); border: 1px solid var(--white); }

/* =========================================================================
   PRELOADER / TRANSICIÓN
   ========================================================================= */
.curtain { display: none; }
.js .curtain {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; justify-content: center;
  padding: 1rem var(--pad) 1.25rem;
  background: var(--ink); color: var(--white);
  transform: translateY(0);
  transition: transform .8s var(--ease);
  will-change: transform;
}
.curtain__title {
  font-size: clamp(2.5rem, 7vw, 6rem); line-height: .98; letter-spacing: -0.2rem;
  opacity: 0; transform: translateY(1rem);
  transition: opacity .4s, transform .5s var(--ease);
}
.curtain__title.is-on { opacity: 1; transform: none; }
.curtain__count { position: absolute; right: var(--pad); bottom: 1.5rem; font-size: clamp(5rem, 16vw, 14rem); line-height: .8; letter-spacing: -0.3rem; font-variant-numeric: tabular-nums; }
.curtain__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--white); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* se va hacia arriba al cargar */
.is-ready .curtain { transform: translateY(-100%); }
/* entra desde abajo al salir hacia otra página */
.is-leaving .curtain { transition: none; transform: translateY(100%); }
.is-leaving.go .curtain { transition: transform .6s var(--ease); transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .js .curtain { display: none; }
}

/* =========================================================================
   CABECERA Y FOOTER
   ========================================================================= */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 20;
  height: var(--header-h);
  background: var(--ink);
}
.site-header__inner {
  height: 100%; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between;
}
.site-header__logo img { height: 1.05rem; width: auto; }
.site-header__id { display: flex; align-items: center; gap: .9rem; }
.site-header__who { color: var(--white); margin: 0; }
.site-header__who span { color: rgba(255, 255, 255, .6); }
.site-header__roles { margin-left: .9rem; }
.site-header__roles i { font-style: normal; color: rgba(255, 255, 255, .28); margin: 0 .5em; }
.site-header__nav { display: flex; gap: 0; }
.site-header__who { white-space: nowrap; }
@media (max-width: 1100px) { .site-header__who span { display: none; } }
@media (max-width: 600px) { .site-header__who { display: none; } }

.site-footer { display: flex; min-height: 4rem; }
.site-footer__left {
  flex: 1 1 50%;
  display: flex; flex-direction: column; justify-content: center; gap: .15rem;
  padding: 1rem var(--pad);
  background: var(--ink); color: var(--white);
}
.site-footer__updated { font-weight: 200; }
.site-footer__right {
  flex: 1 1 50%;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 1rem var(--pad);
  background: var(--accent);
}
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0; }

/* =========================================================================
   HOME
   ========================================================================= */
body.page-home { background: var(--ink); }
.page-home main { padding-top: var(--header-h); }
.projects {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: var(--ink);
}
.project { position: relative; background: var(--ink); }
.project__link {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden; text-decoration: none; isolation: isolate;
}
.project__media, .project__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
  transition: filter .15s;
}
.project__video { opacity: 0; transition: opacity .35s; }
.project__link::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(18, 18, 18, 0);
  transition: background-color .5s cubic-bezier(.16, 1, .3, 1);
}
/* v52 · ficha del proyecto: título a la izquierda, información a la derecha (composición de impresión) */
.project__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem; align-items: end;
  padding: 1.4rem 1.4rem 1.3rem; color: var(--white);
  opacity: 0; transform: translateY(1.2rem);
  transition: transform .7s cubic-bezier(.16, 1, .3, 1), opacity .45s cubic-bezier(.16, 1, .3, 1);
}
.project__title { display: block; font-size: clamp(1.7rem, 2.7vw, 3rem); line-height: .9; letter-spacing: -.05em; text-wrap: balance; }
.project__client { vertical-align: top; margin-left: .4rem; font-size: .75rem; letter-spacing: 0; line-height: 1; transform: translateY(.1rem); }

@media (hover: hover) {
  .project__link:hover::after { background: rgba(18, 18, 18, .55); }
  .project__link:hover .project__cap { opacity: 1; transform: none; }
  .project__link.has-video:hover .project__video { opacity: 1; }
  .project__link.has-video:hover::after { background: rgba(18, 18, 18, .4); }
}
.project__link.has-video.is-playing .project__video { opacity: 1; }
/* táctil: sin hover, los chips se ven siempre abajo sobre un degradado */
@media (hover: none) {
  .project__link::after { background: linear-gradient(to top, rgba(18, 18, 18, .6), rgba(18, 18, 18, 0) 60%); }
  .project__cap { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .project__cap { transition: opacity .2s; transform: none; } }

/* =========================================================================
   CASE STUDY · botón volver y hero (hero sin cambios de diseño)
   ========================================================================= */
.back, .to-top {
  position: fixed; z-index: 30;
  display: inline-flex; align-items: center; gap: 0;
  height: 2.75rem; padding: 0 .875rem; border: 0;
  border-radius: 100rem;
  background: var(--white); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
  transition: background-color .3s, gap .5s cubic-bezier(.16, 1, .3, 1);
}
.back { top: 1rem; left: var(--pad); }
.back svg, .to-top svg { width: 1rem; height: 1rem; flex: 0 0 auto; }
.back__label, .to-top__label {
  display: block; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
  transition: max-width .5s cubic-bezier(.16, 1, .3, 1), opacity .25s;
}
/* Volver arriba: aparece al bajar */
.to-top {
  right: var(--pad); bottom: 1rem;
  opacity: 0; visibility: hidden; transform: translateY(.75rem);
  transition: opacity .3s, transform .4s cubic-bezier(.16, 1, .3, 1), visibility 0s .4s, background-color .3s, gap .5s cubic-bezier(.16, 1, .3, 1);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: translateY(calc(-1 * var(--lift, 0px))); transition-delay: 0s; }
/* ratón: flecha sola y se despliega en chip con el color del footer */
@media (hover: hover) {
  .back:hover, .to-top:hover { background: var(--pick); color: var(--pick-ink); gap: .45rem; }
  .back:hover .back__label, .to-top:hover .to-top__label { max-width: 12rem; opacity: 1; }
}
/* táctil: siempre desplegados */
@media (hover: none) {
  .back, .to-top { background: var(--pick); color: var(--pick-ink); gap: .45rem; }
  .back__label, .to-top__label { max-width: none; opacity: 1; }
}

.cs-hero {
  position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 10rem var(--pad) calc(1.5rem + clamp(2rem, 6vh, 4.5rem));
  background: var(--ink);
  overflow: hidden;
}
.cs-hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.cs-hero--shade::before {                /* degradado inferior: legibilidad del título */
  content: ""; position: absolute; inset: 45% 0 0 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.45));
  pointer-events: none;
}
.cs-hero::after {                        /* se oscurece al hacer scroll (js) */
  content: ""; position: absolute; inset: 0; z-index: 2; background: #000;
  opacity: calc(var(--dim, 0) * .55); pointer-events: none;
}
.cs-hero__inner { position: relative; z-index: 3; display: flex; flex-direction: column; gap: .9rem; }
.cs-hero__head { display: flex; align-items: flex-end; gap: 1rem; }
.cs-hero__title {
  flex: 0 1 auto;
  color: var(--white);
  font-size: clamp(3.2rem, 7.5vw, 8rem); line-height: .9; letter-spacing: -0.045em;
  font-weight: 400;
}
.cs-hero__btn {
  flex: 0 0 auto; margin-bottom: .55em;
  display: inline-flex; align-items: center;
  padding: .35rem .8rem;
  border-radius: 4rem; background: var(--white); color: var(--ink);
  font-size: .8rem; line-height: 1rem; text-decoration: none;
  transition: background-color .15s, color .15s;
}
.cs-hero__btn:hover { background: var(--ink); color: var(--white); }
.cs-hero__hr { flex: 1 1 auto; height: 1px; margin-bottom: .95em; background: var(--white); opacity: .8; }
.cs-hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
.cs-hero__tags .chip { margin-right: -.05rem; }
/* Hero claro (imagen sobre fondo blanco, p. ej. Banesto): texto en tinta,
   sin degradado, y la imagen se ve entera en cualquier pantalla */
.cs-hero--light { background: var(--white); }
.cs-hero--light .cs-hero__img { object-fit: contain; }
.cs-hero--light .cs-hero__title { color: var(--ink); }
.cs-hero--light .cs-hero__hr { background: var(--ink); opacity: .5; }
.cs-hero--light .cs-hero__tags .chip--outline { color: var(--ink); border-color: var(--ink); }
.cs-hero--light .cs-hero__btn { background: var(--ink); color: var(--white); }
.cs-hero--light .cs-hero__btn:hover { background: var(--white); color: var(--ink); }
/* hero con vídeo (Obriom): el fondo del vídeo es --soft, así que se ve entero sin bordes */
.cs-hero:has(.cs-hero__video) { background: var(--soft); }
.cs-hero__video { object-fit: contain; }
@media (max-width: 767px) { .cs-hero--light .cs-hero__img { object-position: 50% 38%; } }

/* =========================================================================
   CASE STUDY · hoja de contenido
   Rejilla de 12 columnas. Cada tipo de bloque usa columnas distintas
   para que la página tenga ritmo en lugar de repetir la misma fila.
   ========================================================================= */
.cs-sheet {
  position: relative; z-index: 1;
  background: var(--white);
  border-radius: 1.5rem 1.5rem 0 0;
  margin-top: -1.5rem;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, .12);
  overflow: hidden; overflow: clip;   /* clip: deja funcionar position: sticky dentro (carrusel de IG) */
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
  padding-inline: var(--gutter);
}

/* --- Intro: resumen grande + ficha -------------------------------------- */
.intro { padding-block: 5rem 4rem; row-gap: 3.5rem; }
.intro__lead {
  grid-column: 1 / span 10;
  font-size: clamp(1.75rem, 3.2vw, 3rem); line-height: 1.18; letter-spacing: -0.09rem;
  text-wrap: pretty;
}
.sheet-facts {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.sheet-facts div { padding: 1rem 1rem 1.25rem 0; }
.sheet-facts div + div { padding-left: 1rem; border-left: 1px solid var(--line); }
.sheet-facts dt { color: var(--muted); margin-bottom: .5rem; }
.sheet-facts dd { margin: 0; font-size: 1.05rem; line-height: 1.35rem; }

/* --- Cabecera de bloque --------------------------------------------------- */
.block { padding-block: 4.5rem; row-gap: 2rem; }
.block + .block { border-top: 1px solid var(--line); }
.block__head {
  grid-column: 1 / -1;
  display: flex; align-items: baseline; gap: 1rem;
}
.block__num { color: var(--muted); font-variant-numeric: tabular-nums; }
.block__title { font-size: 1rem; line-height: 1.2rem; font-weight: 300; }

/* textos */
.statement {
  grid-column: 1 / span 8;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.2; letter-spacing: -0.06rem;
  text-wrap: balance;
}
.body-copy { grid-column: 7 / span 5; display: flex; flex-direction: column; gap: 1rem; }
.body-copy p { font-size: 1rem; line-height: 1.5rem; }
.statement + .body-copy { margin-top: .5rem; }
.body-copy--left { grid-column: 1 / span 6; }

.quote {
  grid-column: 1 / -1;
  font-size: clamp(2.2rem, 5.4vw, 5.2rem); line-height: 1.02; letter-spacing: -0.2rem;
  max-width: 18ch; text-wrap: balance;
}

/* reto + objetivos en paralelo */
.pair { padding-block: 4.5rem; row-gap: 2.5rem; }
.pair + .block, .block + .pair { border-top: 1px solid var(--line); }
.pair__col { display: flex; flex-direction: column; gap: 1.5rem; }
.pair__col:first-child { grid-column: 1 / span 6; }
.pair__col:last-child  { grid-column: 8 / span 5; }
.pair__col .statement { font-size: clamp(1.5rem, 2.2vw, 2.1rem); }
.pair__col p.copy { font-size: 1rem; line-height: 1.5rem; max-width: 52ch; }

.goals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.goals li {
  display: grid; grid-template-columns: 2.5rem 1fr;
  padding: .9rem 0; border-top: 1px solid var(--line);
  font-size: 1rem; line-height: 1.35rem;
}
.goals li:last-child { border-bottom: 1px solid var(--line); }
.goals li span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* proceso */
.steps {
  grid-column: 1 / -1;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
}
.steps li { position: relative; padding: 1.5rem 1.5rem 0 0; }
.steps li::before {             /* línea de tiempo */
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 1px; background: var(--ink);
}
.steps li::after {              /* punto */
  content: ""; position: absolute; left: 0; top: -4px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--ink);
}
.steps .n { display: block; font-size: 2.6rem; line-height: 1; letter-spacing: -0.1rem; color: rgba(33, 33, 33, .25); }
.steps .t { display: block; margin-top: .9rem; font-size: 1.1rem; line-height: 1.35rem; }
.steps .d { display: block; margin-top: .5rem; font-size: .9rem; line-height: 1.3rem; color: var(--muted); max-width: 28ch; }

/* identidad: banda clara con logo y barras de color */
.identity { background: var(--soft); padding-block: 4.5rem; row-gap: 2rem; }
.identity__copy { grid-column: 1 / span 6; font-size: 1rem; line-height: 1.5rem; }
.identity__logo {
  grid-column: 1 / span 5;
  display: flex; align-items: center; justify-content: center;
  min-height: 22rem; padding: 2rem;
  background: var(--white); border-radius: var(--radius);
}
.identity__logo img { max-height: 7rem; width: auto; max-width: 80%; }
.bars { grid-column: 6 / -1; display: flex; gap: .5rem; min-height: 22rem; }
.identity--nologo .bars { grid-column: 1 / -1; }
.bar {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .15rem;
  padding: 1rem .9rem;
  border-radius: var(--radius);
  transition: flex-grow .4s var(--ease);
}
@media (hover: hover) { .bar:hover { flex-grow: 1.8; } }
.bar--light { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.bar--dark  { color: var(--white); }
.bar .name { font-size: 1rem; line-height: 1.2rem; }
.bar .hex { opacity: .75; font-variant-numeric: tabular-nums; }

/* galerías */
.gallery { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.gallery figure { grid-column: span 6; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery figure.narrow { grid-column: 3 / span 8; }
.gallery figure.bleed { grid-column: 1 / -1; margin-inline: calc(var(--gutter) * -1); }
.gallery img { width: 100%; height: auto; border-radius: var(--radius); background: var(--soft); }
.gallery figure.bleed img { border-radius: 0; }
.gallery figcaption { display: flex; gap: .75rem; margin-top: .6rem; color: var(--muted); }
.gallery figure.bleed figcaption { padding-inline: var(--gutter); }
.gallery figcaption span { font-variant-numeric: tabular-nums; }

.note { grid-column: 1 / span 6; color: var(--muted); font-size: .9rem; line-height: 1.3rem; }

/* siguiente proyecto */
.next {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100vh; min-height: 100svh; padding: 3rem var(--pad) 2rem;
  margin-top: 2rem;                      /* aire entre el contenido y el siguiente proyecto */
  color: var(--white); text-decoration: none;
  background: var(--ink);
  isolation: isolate; overflow: hidden;
}
.next__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.next::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--overlay); transition: background-color .3s; }
.next:hover::after { background: rgba(33, 33, 33, .6); }
.next__label { display: inline-flex; align-self: flex-start; }
.next__title {
  display: flex; align-items: center; gap: 1.25rem; margin-top: 1rem;
  font-size: clamp(3rem, 9vw, 8rem); line-height: .95; letter-spacing: -0.3rem; font-weight: 300;
}
.next__title svg { width: .6em; height: .6em; transition: transform .35s var(--ease); flex: none; }
.next:hover .next__title svg { transform: translateX(.6rem); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 991px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro__lead, .statement { grid-column: 1 / -1; }
  .body-copy, .body-copy--left { grid-column: 1 / span 10; }
  .pair__col:first-child, .pair__col:last-child { grid-column: 1 / -1; }
  .sheet-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sheet-facts div:nth-child(4) { padding-left: 0; border-left: 0; }
  .sheet-facts div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.5rem; }
  .identity__copy, .identity__logo, .bars { grid-column: 1 / -1; }
  .identity__logo { min-height: 14rem; }
  .bars { min-height: 14rem; }
  .gallery figure.narrow { grid-column: 2 / span 10; }
  .note { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .projects { grid-template-columns: 1fr; }
  .project__cap { padding: 1.1rem 1rem 1rem; gap: .9rem; }
  .site-footer { flex-direction: column; }
  .site-footer__right, .site-footer__links { justify-content: flex-start; }
  .gallery figure, .gallery figure.narrow { grid-column: 1 / -1; }
  .body-copy, .body-copy--left { grid-column: 1 / -1; }
  .sheet-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-facts div, .sheet-facts div + div { padding: 1rem 1rem 1.25rem 0; border-left: 0; }
  .sheet-facts div:nth-child(2n) { padding-left: 1rem; border-left: 1px solid var(--line); }
  .sheet-facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr 1fr; }
  .bars { flex-wrap: wrap; min-height: 0; }
  .bar { flex: 1 1 40%; min-height: 7rem; }
  .block, .pair, .identity { padding-block: 3.5rem; }
  .intro { padding-block: 3.5rem 3rem; }
}

@media (max-width: 479px) {
  :root { --pad: .5rem; }
  .site-header__logo img { height: 1rem; }
  .cs-hero__head { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .cs-hero__btn { margin-bottom: 0; }
  .cs-hero__hr { width: 100%; flex: none; margin: .2rem 0 0; }
  .steps { grid-template-columns: 1fr; }
  .next { min-height: 100svh; }
}

/* =========================================================================
   PRELOADER Y CORTINILLAS (referencia: higherlifefoundation.org)
   Negro del header con el contador a la izquierda y las disciplinas a la
   derecha (animación del Sydney Design Festival). Al salir, el negro sube y
   detrás salen, escalonados, los cinco colores del footer.
   ========================================================================= */
.curtain { display: none !important; }
.pre { display: none; }
.pre-on .pre, .cur-on .pre, .cur-in .pre { display: block; position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.pre-on body, .cur-on body { overflow: hidden; }
.pre__bg { position: absolute; inset: 0; will-change: transform; }
.pre__bg--ink { background: var(--ink); z-index: 6; }
.pre__bg--0 { z-index: 5; } .pre__bg--1 { z-index: 4; } .pre__bg--2 { z-index: 3; }
.pre__bg--3 { z-index: 2; } .pre__bg--4 { z-index: 1; }
.pre__in {
  position: absolute; inset: 0; z-index: 7;
  display: grid; grid-template-columns: repeat(12, 1fr); align-items: center;
  padding: 0 var(--pad); color: var(--white);
}
.pre__count {
  grid-column: 1 / 5; grid-row: 1; display: flex; align-items: flex-start;
  font-size: clamp(2.5rem, 7vw, 6rem); line-height: 1; letter-spacing: -0.04em; font-weight: 300;
  font-variant-numeric: tabular-nums;
}
.pre__col { display: inline-block; position: relative; overflow: hidden; height: 1em; width: .62em; }
.pre__strip { position: absolute; left: 0; top: 0; width: 100%; display: flex; flex-direction: column; will-change: transform; }
.pre__strip span { height: 1em; line-height: 1em; display: block; text-align: center; }
.pre__strip--h, .pre__strip--t { transition: transform .45s cubic-bezier(.65, 0, .35, 1); }
/* disciplinas: ventana con tres huecos que recorta arriba y abajo */
.pre__stack { grid-column: 7 / 13; grid-row: 1; }
.pre__win { position: relative; overflow: hidden; }
.pre__word {
  position: absolute; left: 0; top: 0; transform-origin: 0 0;
  padding: .1em .09em 0; background: var(--white); color: var(--ink);
  transition: background-color .2s;
  font-size: clamp(1.9rem, 3.6vw, 3.8rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.02em;
  text-transform: uppercase; white-space: nowrap; will-change: transform;
}
.pre__title {
  grid-column: 1 / -1; grid-row: 1; opacity: 0;
  font-size: clamp(2.5rem, 7vw, 6rem); line-height: .98; letter-spacing: -0.2rem;
}
.cur-on .pre__count, .cur-on .pre__stack, .cur-in .pre__count, .cur-in .pre__stack { display: none; }
.cur-on .pre__title { opacity: 1; }
@media (max-width: 767px) {
  .pre__in { grid-template-columns: 1fr; align-content: center; row-gap: 2.5rem; }
  .pre__count, .pre__stack { grid-column: 1 / -1; grid-row: auto; }
  .pre__word { font-size: 1.7rem; }
}
/* salida: el contenido sube y se desvanece; las capas se van una tras otra */
.pre-out .pre__in { transform: translateY(-55vh); opacity: 0; transition: transform 1s cubic-bezier(.65, 0, .35, 1), opacity .55s ease-in; }
.pre-out .pre__bg { transform: translateY(-100%); transition: transform .85s cubic-bezier(.65, 0, .35, 1); }
.pre-out .pre__bg--0 { transition-delay: .06s; } .pre-out .pre__bg--1 { transition-delay: .12s; }
.pre-out .pre__bg--2 { transition-delay: .18s; } .pre-out .pre__bg--3 { transition-delay: .24s; }
.pre-out .pre__bg--4 { transition-delay: .30s; }
/* cortinilla de salida: las franjas suben desde abajo y el negro las tapa con el título */
.cur-in .pre__bg { transform: translateY(100%); }
.cur-in.cur-go .pre__bg { transform: none; transition: transform .7s cubic-bezier(.65, 0, .35, 1); }
.cur-in.cur-go .pre__bg--4 { transition-delay: 0s; } .cur-in.cur-go .pre__bg--3 { transition-delay: .05s; }
.cur-in.cur-go .pre__bg--2 { transition-delay: .1s; } .cur-in.cur-go .pre__bg--1 { transition-delay: .15s; }
.cur-in.cur-go .pre__bg--0 { transition-delay: .2s; } .cur-in.cur-go .pre__bg--ink { transition-delay: .25s; }
.cur-in .pre__title { opacity: 0; transform: translateY(1rem); }
.cur-in.cur-go .pre__title { opacity: 1; transform: none; transition: opacity .3s .6s, transform .5s .6s cubic-bezier(.16, 1, .3, 1); }
/* seguridad: si el JS falla, desaparece solo a los 9 s */
.pre-on:not(.pre-out) .pre, .cur-on:not(.pre-out) .pre { animation: pre-failsafe 0s 9s forwards; }
@keyframes pre-failsafe { to { visibility: hidden; } }

/* Botones fijos: el header y las etiquetas del hero no cambian al pasar el cursor */
.chip--static:hover, .cs-hero__tags .chip--outline:hover { color: var(--white); background: transparent; }
.cs-hero--light .cs-hero__tags .chip--outline:hover { color: var(--ink); background: transparent; }
.site-clock { font-variant-numeric: tabular-nums; cursor: default; gap: .3em; }

/* Seguridad: si algo falla en el JS, la cortina desaparece sola a los 5 s */
.js:not(.is-ready):not(.is-leaving) .curtain { animation: curtain-failsafe 0s 5s forwards; }
@keyframes curtain-failsafe { to { visibility: hidden; } }

/* Accesibilidad: enlace para saltar al contenido */
.skip { position: absolute; left: var(--pad); top: -3rem; z-index: 200; padding: .5rem .8rem; border-radius: 4rem; background: var(--white); color: var(--ink); }
.skip:focus { top: .6rem; }

/* 404 */
.page-404 { background: var(--ink); color: var(--white); }
.notfound { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.5rem; padding: 2rem var(--pad); }
.notfound__code { color: rgba(255,255,255,.4); }
.notfound__title { font-size: clamp(2.5rem, 7vw, 6rem); line-height: 1; letter-spacing: -0.04em; font-weight: 300; }

/* =========================================================================
   CASE STUDY · estructura editorial (referencia: SDG)
   Poco texto arriba y después las imágenes, una idea por bloque.
   ========================================================================= */
.cs2-intro {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem; padding: 5.5rem var(--gutter) 5rem;
}
.cs2-head {
  grid-column: 1 / span 9; margin: 0;
  font-weight: 400; font-size: clamp(2.2rem, 5vw, 4.8rem); line-height: 1.02; letter-spacing: -.04em;
  text-wrap: balance;
}
.cs2-lead {
  grid-column: 1 / span 7; margin: 2.5rem 0 0;
  font-size: clamp(1.15rem, 1.5vw, 1.45rem); line-height: 1.45; text-wrap: pretty;
}
.cs2-info { grid-column: 9 / -1; grid-row: 2 / span 2; margin-top: 2.6rem; display: grid; gap: 2rem; align-content: start; }
.cs2-info h3, .cs2-info dt { font-weight: 400; font-size: .9rem; color: var(--muted); margin: 0 0 .5rem; }
.cs2-info ul { list-style: none; margin: 0; padding: 0; }
.cs2-info li, .cs2-info dd { margin: 0; font-size: 1rem; line-height: 1.5; }
.cs2-info dl { margin: 0; display: grid; gap: 1.25rem; }
.cs2-approach {
  grid-column: 1 / span 8; margin-top: 4rem;
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem;
  font-size: 1rem; line-height: 1.55; color: rgba(33, 33, 33, .78);
}
.cs2-approach p { margin: 0; }
.cs2-approach p:only-child { grid-column: 1 / -1; max-width: 40rem; }
.cs2-iti {
  grid-column: 1 / -1; margin-top: 4.5rem;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 1.5rem;
}
.cs2-iti > div { border-top: 2px solid currentColor; padding-top: 1rem; }
/* v34 · cada línea con un acento fijo: insight azul, tensión rojo, idea ámbar */
.cs2-iti > div:nth-child(1) { border-top-color: #5769FF; }
.cs2-iti > div:nth-child(2) { border-top-color: #FF3B30; }
.cs2-iti > div:nth-child(3) { border-top-color: #FFB300; }
.cs2-iti h3 { margin: 0 0 1.25rem; font-weight: 400; font-size: .9rem; color: var(--muted); }
.cs2-iti p { margin: 0; font-size: clamp(1.15rem, 1.6vw, 1.5rem); line-height: 1.3; letter-spacing: -.02em; text-wrap: pretty; max-width: 26ch; }

.media { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.media figure { margin: 0; }
.media img, .media video { display: block; width: 100%; height: auto; }
.m-row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.m-row--2 img { height: 100%; object-fit: cover; }
.m-logo { background: var(--soft); display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; }
.m-logo img { width: min(42%, 34rem); height: auto; }
.m-colors { display: flex; aspect-ratio: 16 / 7; }
.m-color { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: .25rem; padding: 1.25rem; font-size: .9rem; color: var(--white); }
.m-color--light { color: var(--ink); }
.m-caption { margin: 3rem var(--gutter) 2.5rem; font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: 1.12; letter-spacing: -.03em; max-width: 34ch; }
.m-kicker { display: block; margin-bottom: .9rem; font-size: .9rem; line-height: 1.2; letter-spacing: 0; color: var(--muted); }
.cs2-note { padding: 2rem var(--gutter) 0; margin: 0; font-size: .9rem; color: var(--muted); }

@media (max-width: 991px) {
  .cs2-head, .cs2-lead { grid-column: 1 / -1; }
  .cs2-info { grid-column: 1 / -1; grid-row: auto; grid-template-columns: 1fr 1fr; }
  .cs2-approach { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .cs2-intro { padding: 3.5rem var(--gutter) 3rem; }
  .cs2-approach { grid-template-columns: 1fr; row-gap: 1rem; margin-top: 2.5rem; }
  .cs2-iti { grid-template-columns: 1fr; row-gap: 2rem; margin-top: 3rem; }
  .m-row--2 { grid-template-columns: 1fr; }
  .m-colors { flex-direction: column; aspect-ratio: auto; }
  .m-color { min-height: 4.5rem; flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

/* Chip "ver proyecto" que sigue al cursor por la home (solo ratón) */
.cursor-chip { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; will-change: transform; }
.cursor-chip__in {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .55rem .25rem .6rem; border-radius: 4rem;
  background: var(--white); color: var(--ink); white-space: nowrap;
  transform: translate(.9rem, 1rem) scale(.4); transform-origin: 0 0; opacity: 0;
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), opacity .2s ease-out;
}
.cursor-chip.is-on .cursor-chip__in { transform: translate(.9rem, 1rem) scale(1); opacity: 1; }
.cursor-chip svg { width: .8rem; height: .8rem; flex: 0 0 auto; }
@media (hover: none), (pointer: coarse) { .cursor-chip { display: none; } }

/* Reloj de la cabecera: sin chip */
.site-clock { color: var(--white); border: 0; }

/* Chip "ver proyecto": hace de cursor */
.cursor-chip__in { transform: translate(-50%, -50%) scale(.4) !important; transform-origin: 50% 50% !important; }
.cursor-chip.is-on .cursor-chip__in { transform: translate(-50%, -50%) scale(1) !important; }

/* =========================================================================
   CASE STUDY · entradilla (v3): más aire, nombre del proyecto y ficha en filas
   ========================================================================= */
.cs3 {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem;
  padding: 7rem var(--gutter) 7rem;
}
.cs3-name {
  grid-column: 1 / -1; margin: 0 0 2.25rem;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem); line-height: 1.2;
}
.cs3-name span:last-child { color: var(--muted); }
.cs3-sep { color: var(--line); color: rgba(33, 33, 33, .25); }
.cs3-head {
  grid-column: 1 / span 10; margin: 0;
  font-weight: 400; font-size: clamp(2.3rem, 5.2vw, 5rem); line-height: 1.02; letter-spacing: -.04em;
  text-wrap: balance;
}
.cs3-grid {
  grid-column: 1 / -1; margin-top: 6rem; padding-top: 2.5rem; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem;
}
.cs3-text { grid-column: 1 / span 7; }
.cs3-lead { margin: 0; font-size: clamp(1.2rem, 1.55vw, 1.5rem); line-height: 1.45; text-wrap: pretty; }
.cs3-approach { margin-top: 3rem; display: grid; gap: 1.25rem; max-width: 40rem; font-size: 1rem; line-height: 1.6; color: rgba(33, 33, 33, .72); }
.cs3-approach p { margin: 0; }
.cs3-facts { grid-column: 9 / -1; margin: 0; }
.cs3-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.cs3-row:first-child { padding-top: 0; }
.cs3-row dt { color: var(--muted); font-size: .9rem; }
.cs3-row dd { margin: 0; font-size: 1rem; line-height: 1.45; }
.cs3-row ul { list-style: none; margin: 0; padding: 0; }
.cs3-row--list { border-bottom: 0; }
.cs3 .cs2-iti { margin-top: 7rem; }
@media (max-width: 991px) {
  .cs3-head { grid-column: 1 / -1; }
  .cs3-text, .cs3-facts { grid-column: 1 / -1; }
  .cs3-facts { margin-top: 3.5rem; }
}
@media (max-width: 767px) {
  .cs3 { padding: 4rem var(--gutter) 4rem; }
  .cs3-grid { margin-top: 3.5rem; padding-top: 2rem; }
  .cs3 .cs2-iti { margin-top: 4rem; }
}

/* =========================================================================
   SOBRE MÍ
   ========================================================================= */
.chip--ink { color: var(--ink); border: 1px solid var(--ink); }
body.page-about { background: var(--bg); }
.page-about main { padding-top: var(--header-h); }
.ab-hero { padding: 2.5rem var(--pad) 0; min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; }
.ab-title {
  margin: 0; font-weight: 400; font-size: clamp(2.3rem, 10.4vw, 12rem); line-height: .88; letter-spacing: -.055em;
  display: flex; flex-direction: column;
}
.ab-l1 { display: flex; justify-content: space-between; }
.ab-l3 { padding-left: 8vw; }
.ab-photo {
  margin: 3rem calc(-1 * var(--pad)) 0; flex: 1 1 auto; min-height: 16rem; max-height: 46vh;
  background: var(--pick) center / cover no-repeat;
  transition: background-color .4s, background-image .1s;
}
.ab-photo:hover { background-color: var(--ink); }
.ab-sec {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem;
  padding: 3.5rem var(--gutter); border-top: 1px solid var(--line);
}
.ab-bio { border-top: 0; padding-top: 7rem; padding-bottom: 6rem; }
.ab-label { grid-column: 1 / span 3; margin: 0; font-weight: 400; font-size: .9rem; color: var(--muted); }
.ab-main { grid-column: 4 / -1; margin: 0; }
.ab-big { margin: 0; max-width: 24ch; font-size: clamp(1.7rem, 3.2vw, 3rem); line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
.ab-p { margin: 2.5rem 0 0; max-width: 38rem; font-size: 1.1rem; line-height: 1.55; color: rgba(33, 33, 33, .72); }
.ab-list { list-style: none; padding: 0; }
.ab-row { display: grid; grid-template-columns: 8rem minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.ab-row:first-child { padding-top: 0; }
.ab-row:last-child { border-bottom: 0; }
.ab-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.ab-what { font-size: 1.15rem; line-height: 1.3; }
.ab-what em { display: block; font-style: normal; color: var(--muted); font-size: 1rem; margin-top: .2rem; }
.ab-desc { color: rgba(33, 33, 33, .72); line-height: 1.5; }
.ab-chips { display: flex; flex-wrap: wrap; }
.ab-chips .chip { margin: 0 -.05rem .05rem 0; }
.ab-mail { font-size: clamp(1.7rem, 4vw, 3.6rem); letter-spacing: -.03em; color: var(--ink); text-decoration: none; background: linear-gradient(var(--pick), var(--pick)) 0 100% / 0 .12em no-repeat; transition: background-size .5s cubic-bezier(.16, 1, .3, 1); }
.ab-mail:hover { background-size: 100% .12em; }
.ab-contact { padding-bottom: 6rem; }
@media (max-width: 767px) {
  .ab-label, .ab-main { grid-column: 1 / -1; }
  .ab-label { margin-bottom: 1.25rem; }
  .ab-row { grid-template-columns: 1fr; gap: .35rem; }
  .ab-bio { padding-top: 4rem; padding-bottom: 3.5rem; }
  .ab-hero { min-height: auto; }
  .ab-photo { min-height: 18rem; }
}

/* v26 */
.pre__sub { display: block; margin-top: .35em; font-size: .42em; letter-spacing: -.02em; line-height: 1.1; opacity: .6; }
.ab-hi { display: inline-flex; align-items: center; gap: .12em; }
.ab-wave { width: .78em; height: .78em; color: var(--pick); transform-origin: 70% 85%; animation: ab-wave 6s .9s cubic-bezier(.45, 0, .55, 1) infinite; }
.ab-hi:hover .ab-wave { animation: ab-wave-once 1.2s cubic-bezier(.45, 0, .55, 1) 1; }
/* saluda unos 2,4 s y descansa el resto del ciclo */
@keyframes ab-wave { 0%, 24%, 100% { transform: rotate(0); } 4%, 12% { transform: rotate(14deg); } 8%, 16% { transform: rotate(-8deg); } 20% { transform: rotate(10deg); } }
@keyframes ab-wave-once { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }
/* v33 · a veces, en lugar de la mano, una cara que parpadea y te sigue con la mirada */
.ab-smile { display: none; width: .78em; height: .78em; color: var(--pick); }
.ab-hi.is-smile .ab-wave { display: none; }
.ab-hi.is-smile .ab-smile { display: inline-block; }
.ab-eyes { transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.ab-eye { transform-box: fill-box; transform-origin: center; animation: ab-blink 4.2s 1.2s infinite; }
@keyframes ab-blink { 0%, 90%, 96%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .ab-wave, .ab-eye { animation: none !important; } .ab-eyes { transition: none; } }
.ab-chips .chip { transition: background-color .2s, color .2s, border-color .2s; }
.ab-chips .chip:hover { background: var(--pick); color: var(--pick-ink); border-color: var(--pick); }

/* v27 · Sobre mí */
.ab-hi { gap: .18em; }
.ab-link { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .2s, color .2s; }
.ab-link__i { display: inline-block; margin-left: .25em; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.ab-link__i svg { width: .85em; height: .85em; vertical-align: -.08em; }
.ab-link:hover { color: var(--ink); border-color: var(--ink); }
.ab-link:hover span { transform: translate(.12em, -.12em); }
.ab-cta { padding: 9rem var(--pad) 7rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; }
.ab-cta__kick { margin: 0 0 1.5rem; padding-left: calc(var(--gutter) - var(--pad)); color: var(--muted); font-size: 1rem; }
.ab-cta__big {
  display: inline-flex; align-items: center; gap: .12em;
  font-size: clamp(3.4rem, 13vw, 14rem); line-height: .9; letter-spacing: -.055em; color: var(--ink); text-decoration: none;
  transition: color .35s;
}
.ab-cta__big svg { width: .6em; height: .6em; transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.ab-cta__big:hover { color: var(--pick); }
.ab-cta__big:hover svg { transform: translate(.08em, -.08em); }
.ab-cta__links { display: flex; flex-wrap: wrap; margin-top: 2.5rem; padding-left: calc(var(--gutter) - var(--pad)); }
.ab-cta__links .chip { margin: 0 -.05rem .05rem 0; transition: background-color .2s, color .2s, border-color .2s; }
.ab-cta__links .chip:hover { background: var(--pick); color: var(--pick-ink); border-color: var(--pick); }
@media (max-width: 767px) { .ab-cta { padding: 5rem var(--pad) 4rem; } }

/* v28 · CTA al final de cada proyecto */
.cta { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding: 5.5rem var(--gutter) 5rem; border-top: 1px solid var(--line); background: var(--white); }
.cta__kick { margin: 0 0 1rem; color: var(--muted); font-size: 1rem; }
.cta__big { display: inline-flex; align-items: center; gap: .12em; font-size: clamp(2.6rem, 6vw, 5.5rem); line-height: .95; letter-spacing: -.05em; color: var(--ink); text-decoration: none; transition: color .35s; }
.cta__big svg { width: .6em; height: .6em; transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.cta__big:hover { color: var(--pick); }
.cta__big:hover svg { transform: translate(.08em, -.08em); }
.cta__links { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.cta__links .chip { margin: 0 -.05rem .05rem 0; transition: background-color .2s, color .2s, border-color .2s; }
.cta__links .chip:hover { background: var(--pick); color: var(--pick-ink); border-color: var(--pick); }
@media (max-width: 767px) { .cta { flex-direction: column; align-items: flex-start; padding: 4rem var(--gutter) 3.5rem; } .cta__links { justify-content: flex-start; } }

/* v29 · chip de línea (footer), ver proyectos y sistema de diseño */
.chip--line { color: var(--pick-ink); border: 1px solid var(--pick-ink); background: transparent; }
.chip--line:hover { background: var(--pick-ink); color: var(--pick); }
.ds-stage--ink .chip--line { color: var(--white); border-color: var(--white); }
.ds-stage--ink .chip--line:hover { background: var(--white); color: var(--ink); }
.ab-next { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 55vh; min-height: 22rem; padding: 0 var(--pad) 1.5rem; overflow: hidden; text-decoration: none; color: var(--white); background: var(--ink); }
.ab-next__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: transform 1s cubic-bezier(.16, 1, .3, 1), opacity .4s; }
.ab-next:hover .ab-next__img { transform: scale(1.03); opacity: .6; }
.ab-next .next__label { position: relative; align-self: flex-start; margin-bottom: .9rem; }
.ab-next__title { position: relative; display: inline-flex; align-items: center; gap: .3em; font-size: clamp(2.4rem, 6vw, 5.5rem); line-height: .95; letter-spacing: -.05em; }
.ab-next__title svg { width: .6em; height: .6em; transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.ab-next:hover .ab-next__title svg { transform: translateX(.15em); }

.ds-hero { padding: 4rem var(--pad) 5rem; }
.ds-title { margin: 0; font-weight: 400; font-size: clamp(3.2rem, 13vw, 15rem); line-height: .86; letter-spacing: -.06em; }
.ds-lead { margin: 2.5rem 0 0 calc(var(--gutter) - var(--pad)); max-width: 34rem; font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.45; color: rgba(33, 33, 33, .72); }
.ds-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ds-row--acc { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ds-sw { min-height: 10rem; padding: 1rem; display: flex; flex-direction: column; justify-content: flex-end; gap: .15rem; font-size: .9rem; border: 1px solid var(--line); }
.ds-sw__n { font-size: 1.1rem; }
.ds-sw__v { opacity: .7; }
.ds-sw__aa { font-size: 3rem; letter-spacing: -.04em; line-height: 1; margin-bottom: auto; }
.ds-note { margin: 1.5rem 0 2rem; max-width: 40rem; color: rgba(33, 33, 33, .72); line-height: 1.55; }
.ds-font { margin: 0; font-size: clamp(2.4rem, 5vw, 4.5rem); letter-spacing: -.04em; line-height: 1; }
.ds-font em { font-style: normal; font-size: .3em; letter-spacing: 0; color: var(--muted); margin-left: .5em; }
.ds-scale { list-style: none; margin: 0; padding: 0; }
.ds-type { display: grid; grid-template-columns: 12rem 1fr; gap: 1.5rem; align-items: baseline; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.ds-type__meta { font-size: .95rem; }
.ds-type__meta em { display: block; font-style: normal; color: var(--muted); font-size: .8rem; margin-top: .25rem; }
.ds-t1 { font-size: clamp(3rem, 6vw, 6.5rem); line-height: .9; letter-spacing: -.045em; }
.ds-t2 { font-size: clamp(2rem, 4vw, 4rem); line-height: 1.02; letter-spacing: -.04em; }
.ds-t3 { font-size: clamp(1.2rem, 1.55vw, 1.5rem); line-height: 1.45; }
.ds-t4 { font-size: 1rem; line-height: 1.6; }
.ds-t5 { font-size: .9rem; color: var(--muted); }
.ds-comps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem 2rem; }
.ds-comp { min-width: 0; }
.ds-k { margin: 0 0 .9rem; font-size: .9rem; color: var(--muted); }
.ds-stage { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: 2.25rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; }
.ds-stage .chip { margin: 0; }
.ds-stage--ink { background: var(--ink); border-color: var(--ink); }
.ds-stage--soft { background: var(--soft); }
.ds-stage--white { background: var(--white); }
.ds-hov { background: var(--pick); color: var(--pick-ink); border-color: var(--pick); }
.ds-pill { display: inline-flex; align-items: center; height: 2.75rem; padding: 0 .875rem; border-radius: 100rem; background: var(--white); color: var(--ink); box-shadow: 0 2px 12px rgba(0, 0, 0, .08); gap: 0; cursor: pointer; transition: background-color .3s, gap .5s cubic-bezier(.16, 1, .3, 1); }
.ds-pill svg { width: 1rem; height: 1rem; }
.ds-pill__l { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .5s cubic-bezier(.16, 1, .3, 1), opacity .25s; }
.ds-pill:hover { background: var(--pick); color: var(--pick-ink); gap: .45rem; }
.ds-pill:hover .ds-pill__l { max-width: 12rem; opacity: 1; }
.ds-static { transform: none !important; opacity: 1 !important; }
.ds-iti { margin: 0 0 .6rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); }
.ds-iti p { font-size: 1.05rem; }
.ds-cta { font-size: clamp(2rem, 3.5vw, 3.2rem); }
.ds-icons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ds-ic { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; aspect-ratio: 1; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.ds-ic svg { width: 2.5rem; height: 2.5rem; color: var(--ink); }
.ds-ic .ds-wave { color: var(--pick); }
.ds-motion { display: grid; gap: 1.5rem; }
.ds-mo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.ds-mo p { margin: 0; line-height: 1.5; font-size: .95rem; }
.ds-mo b { font-weight: 400; font-size: 1.1rem; }
.ds-mo p span { color: var(--muted); }
.ds-track { position: relative; height: 3.5rem; border-radius: 100rem; background: var(--soft); border: 1px solid var(--line); }
.ds-dot { position: absolute; top: .5rem; left: .5rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--pick); transition: left .7s cubic-bezier(.16, 1, .3, 1); }
.ds-dot--io { background: var(--ink); transition: left .9s cubic-bezier(.7, 0, .2, 1); }
.ds-track:hover .ds-dot { left: calc(100% - 3rem); }
.ds-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; height: 9rem; }
.ds-grid span { background: color-mix(in srgb, var(--pick) 28%, transparent); border-left: 1px solid var(--pick); border-right: 1px solid var(--pick); }
.ds-specs { list-style: none; margin: 2rem 0 0; padding: 0; }
.ds-specs li { display: grid; grid-template-columns: 12rem 1fr; gap: 1.5rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.ds-specs li span { color: var(--muted); }
@media (max-width: 991px) { .ds-comps { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .ds-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-row--acc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-type, .ds-specs li, .ds-mo { grid-template-columns: 1fr; gap: .5rem; }
  .ds-icons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ds-grid { gap: .4rem; height: 6rem; }
}

/* v32 · menú móvil: panel a pantalla completa con el color de la visita y enlaces grandes */
.nav-toggle { display: none; gap: .3em; font: inherit; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nav-toggle__i { width: .9em; height: .9em; transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.site-header__links { display: flex; }
.nav-arr { display: none; }
@media (max-width: 767px) {
  .nav-toggle { display: inline-flex; }
  .nav-toggle[aria-expanded="true"] { color: var(--ink); background: var(--white); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__i { transform: rotate(180deg); }
  .site-header__links {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 21;
    flex-direction: column; padding: 1rem var(--pad) 1.5rem;
    background: var(--pick); color: var(--pick-ink);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .7s cubic-bezier(.7, 0, .2, 1), visibility 0s .7s;
  }
  .site-header.is-open .site-header__links { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .7s cubic-bezier(.7, 0, .2, 1), visibility 0s; }
  .site-header__links .chip {
    justify-content: space-between; width: 100%;
    padding: .9rem 0; border: 0; border-top: 1px solid currentColor; border-radius: 0;
    background: none; color: var(--pick-ink);
    font-size: clamp(2.6rem, 13vw, 3.8rem); line-height: 1; letter-spacing: -.045em;
    opacity: 0; transform: translateY(1.2rem);
    transition: opacity .3s, transform .6s cubic-bezier(.16, 1, .3, 1);
  }
  .site-header__links .chip:nth-child(3) { border-bottom: 1px solid currentColor; }
  .site-header__links .chip:first-child { border-top: 0; }
  .site-header__links .chip:hover { background: none; color: var(--pick-ink); }
  .site-header__links .chip[aria-current="page"] { opacity: .45; }
  .nav-arr { display: block; }
  .nav-arr svg { width: .55em; height: .55em; }
  .site-header__links .chip:last-child {
    width: auto; align-self: flex-start; margin-top: auto;
    font-size: 1rem; letter-spacing: 0; padding: .3rem .7rem;
    border: 1px solid currentColor; border-radius: 4rem;
  }
  .site-header.is-open .site-header__links .chip { opacity: 1; transform: none; transition-delay: .25s; }
  .site-header.is-open .site-header__links .chip[aria-current="page"] { opacity: .45; }
  .site-header.is-open .site-header__links .chip:nth-child(2) { transition-delay: .31s; }
  .site-header.is-open .site-header__links .chip:nth-child(3) { transition-delay: .37s; }
  .site-header.is-open .site-header__links .chip:nth-child(4) { transition-delay: .45s; }
  .nav-scrim { display: none; }
  html.nav-lock, html.nav-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .site-header__links, .site-header__links .chip, .nav-toggle__i { transition: none !important; } }

/* v34 · nunca una palabra sola en la última línea (además, el HTML une las dos últimas con espacio duro) */
p, li, figcaption, blockquote { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

/* v35 · chip "cliente" en la home, con el color de la visita */
.chip--client { background: var(--pick); color: var(--pick-ink); border: 1px solid var(--pick); }

/* =========================================================================
   v40 · Monte Vivo: rejilla de estados y carrusel de Instagram
   ========================================================================= */
.m-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; padding: 0 var(--gutter); margin-bottom: 1.5rem; }
.m-grid figcaption { padding: .7rem 0 0; font-size: .9rem; line-height: 1.2; color: var(--muted); }
.m-grid img { aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 767px) { .m-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.25rem; } }

.m-ig { background: var(--ink); color: var(--white); position: relative; }
.m-ig__pin { padding: 3rem 0 2rem; display: flex; flex-direction: column; justify-content: center; gap: 1.75rem; }
.m-ig__track {
  display: flex; gap: 1rem; padding: 0 var(--gutter);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none;
}
.m-ig__track::-webkit-scrollbar { display: none; }
.m-ig__item { flex: 0 0 auto; width: min(52.8vh, 34vw); scroll-snap-align: start; }
.m-ig__item img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: .25rem; }
.m-ig__item figcaption { display: flex; gap: .6rem; padding-top: .75rem; font-size: .9rem; line-height: 1.2; color: rgba(255, 255, 255, .6); }
.m-ig__item figcaption span { color: var(--white); }
.m-ig__bar { display: flex; align-items: center; gap: 1rem; padding: 0 var(--gutter); font-size: .9rem; line-height: 1; }
.m-ig__count { color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-ig__count b { font-weight: 400; color: var(--white); }
.m-ig__progress { flex: 1; height: 2px; background: rgba(255, 255, 255, .18); position: relative; overflow: hidden; }
.m-ig__progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--pick); }
.m-ig__hint { display: inline-flex; align-items: center; gap: .4rem; color: rgba(255, 255, 255, .6); white-space: nowrap; }
.m-ig__hint svg { width: .9rem; height: .9rem; }
.m-ig__hint--wheel { display: none; }
/* escritorio: el bloque se queda fijo y el scroll vertical mueve los posts en horizontal */
.m-ig.is-pinned .m-ig__pin { position: sticky; top: 0; height: 100vh; padding: 0; overflow: hidden; }
.m-ig.is-pinned .m-ig__track { overflow: visible; scroll-snap-type: none; will-change: transform; }
.m-ig.is-pinned .m-ig__hint--touch { display: none; }
.m-ig.is-pinned .m-ig__hint--wheel { display: inline; }
@media (max-width: 767px) {
  .m-ig__pin { padding: 2.5rem 0 1.75rem; gap: 1.25rem; }
  .m-ig__item { width: 82vw; scroll-snap-align: center; }
  .m-ig__track { gap: .6rem; }
}

/* =========================================================================
   v40 · Imágenes a pantalla completa en móvil
   ========================================================================= */
@media (max-width: 767px) {
  .cs-sheet .media img, .cs-sheet .gallery img { cursor: zoom-in; }
}
.lb {
  position: fixed; inset: 0; z-index: 200; background: rgba(12, 12, 12, .96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .25s ease-out, visibility 0s .25s;
}
.lb.is-open { opacity: 1; visibility: visible; transition: opacity .25s ease-out; }
.lb__img { max-width: 100vw; max-height: 100svh; width: auto; height: auto; object-fit: contain; touch-action: pinch-zoom; user-select: none; -webkit-user-select: none; }
.lb__btn {
  position: absolute; display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; padding: 0;
  background: rgba(255, 255, 255, .12); color: var(--white); cursor: pointer;
}
.lb__btn svg { width: 1.1rem; height: 1.1rem; }
.lb__close { top: max(.75rem, env(safe-area-inset-top)); right: .75rem; }
.lb__prev { left: .75rem; bottom: max(1rem, env(safe-area-inset-bottom)); }
.lb__next { right: .75rem; bottom: max(1rem, env(safe-area-inset-bottom)); }
.lb__count { position: absolute; left: 50%; bottom: max(1.85rem, calc(env(safe-area-inset-bottom) + .85rem)); transform: translateX(-50%); color: rgba(255, 255, 255, .7); font-size: .9rem; font-variant-numeric: tabular-nums; }
.lb--single .lb__prev, .lb--single .lb__next, .lb--single .lb__count { display: none; }

/* =========================================================================
   v34 · HOME: selección de 6 + "ver todos" + índice
   ========================================================================= */
/* escritorio: los 6 destacados ocupan justo la primera pantalla */
@media (min-width: 992px) {
  .projects--sel .project__link { aspect-ratio: auto; height: calc((100vh - var(--header-h)) / 2); height: calc((100svh - var(--header-h)) / 2); min-height: 15rem; }
}

/* banda "ver todos": texto y trazo en el acento de la visita; al pasar el ratón se rellena con él */
.all-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  width: 100%; padding: clamp(1.75rem, 4.5vw, 3.5rem) var(--pad);
  background: var(--ink); color: var(--white);
  border: 0; border-top: 1px solid rgba(255, 255, 255, .12);
  font: inherit; text-align: left; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate; scroll-margin-top: var(--header-h);
  transition: color .35s;
}
.all-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pick);
  transform: scaleY(0); transform-origin: bottom; transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}
.all-cta__t { display: flex; align-items: flex-start; gap: .25em; font-size: clamp(2.6rem, 7.5vw, 7rem); font-weight: 400; line-height: .95; letter-spacing: -.045em; }
.all-cta__n { font-size: .26em; letter-spacing: 0; margin-top: .4em; font-variant-numeric: tabular-nums; }
.all-cta__i {
  flex: none; width: clamp(3rem, 6vw, 4.75rem); height: clamp(3rem, 6vw, 4.75rem);
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: var(--white); color: var(--ink);
  transition: transform .6s cubic-bezier(.16, 1, .3, 1), color .35s;
}
.all-cta__i svg { width: 42%; height: 42%; }
.all-cta:focus { outline: none; }
.all-cta:focus-visible { outline: 2px solid var(--pick); outline-offset: -6px; }
@media (hover: hover) {
  .all-cta:hover { color: var(--pick-ink); }
  .all-cta:hover .all-cta__i { color: var(--pick); }
  .all-cta:hover::before { transform: none; }
}
.all.is-open .all-cta__i { transform: rotate(180deg); }
/* v48-49 · abierto, "ver menos" queda bajo el header y el índice + el footer llenan justo la pantalla, aunque sobre blanco */
.js .all { display: flex; flex-direction: column; min-height: 0; transition: min-height .8s cubic-bezier(.16, 1, .3, 1); }
.js .all .ix { flex: 1 0 auto; }
.js .all.is-open { min-height: calc(100vh - var(--header-h) - var(--foot-h, 4rem)); min-height: calc(100svh - var(--header-h) - var(--foot-h, 4rem)); transition: none; }  /* al abrir, alto inmediato para que el scroll llegue; al cerrar se anima */

/* índice: se despliega bajo la banda (sin JS se ve abierto) */
.ix { display: grid; grid-template-rows: 1fr; background: var(--white); color: var(--ink); transition: grid-template-rows .8s cubic-bezier(.16, 1, .3, 1); }
.js .ix { grid-template-rows: 0fr; }
.js .all.is-open .ix { grid-template-rows: 1fr; }
.ix__in { min-height: 0; overflow: hidden; }
.ix-list { list-style: none; margin: 0; padding: 0 0 clamp(2.5rem, 6vw, 5rem); }
.ix-link {
  --ix-cols: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1.3fr) 6.5rem 1.6rem;
  display: grid; grid-template-columns: var(--ix-cols); gap: 1.5rem; align-items: center;
  padding: 1.15rem var(--pad); color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--line); position: relative; isolation: isolate;
  transition: color .3s;
}
.ix-link::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pick);
  transform: scaleX(0); transform-origin: left; transition: transform .55s cubic-bezier(.16, 1, .3, 1);
}
.ix-thumb { display: none; }
.ix-name { display: flex; align-items: center; gap: .6rem; min-width: 0; font-size: clamp(1.5rem, 3.2vw, 2.9rem); line-height: 1; letter-spacing: -.04em; transition: transform .55s cubic-bezier(.16, 1, .3, 1); }
.ix-client { font-size: .8rem; letter-spacing: 0; }
.ix-sub { min-width: 0; color: var(--muted); transition: color .3s; }
.ix-tags { min-width: 0; font-size: .72rem; line-height: 1.35; text-transform: uppercase; letter-spacing: .02em; opacity: .7; }
.ix-year { font-variant-numeric: tabular-nums; color: var(--muted); transition: color .3s; }
.ix-arr { width: 1.6rem; height: 1.6rem; opacity: .35; transition: opacity .3s, transform .55s cubic-bezier(.16, 1, .3, 1); }
.ix-arr svg { display: block; width: 100%; height: 100%; }
.ix-link:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
@media (hover: hover) {
  .ix-link:hover { color: var(--pick-ink); }
  .ix-link:hover::before { transform: none; }
  .ix-link:hover .ix-name { transform: translateX(.6rem); }
  .ix-link:hover .ix-sub, .ix-link:hover .ix-year { color: inherit; }
  .ix-link:hover .ix-arr { opacity: 1; transform: rotate(45deg); }
  .ix-link:hover .ix-client { background: var(--pick-ink); color: var(--pick); }
}

/* miniatura que sigue al cursor: las fotos del proyecto pasan solas */
.ix-prev { position: fixed; left: 0; top: 0; z-index: 70; width: clamp(15rem, 24vw, 24rem); height: clamp(11rem, 18vw, 18rem); pointer-events: none; overflow: hidden; border-radius: .35rem; background: var(--soft); box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, .25); opacity: 0; transform: translate(-50%, -50%) scale(.85); transition: opacity .25s, transform .35s cubic-bezier(.16, 1, .3, 1); }
.ix-prev.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ix-prev { transition: opacity .25s, transform .35s cubic-bezier(.16, 1, .3, 1), height .45s cubic-bezier(.16, 1, .3, 1); }
.ix-prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .35s; }
.ix-prev img.is-cur { opacity: 1; }
@media (hover: none), (pointer: coarse) { .ix-prev { display: none; } }

@media (max-width: 767px) {
  .ix-link { --ix-cols: 4.2rem minmax(0, 1fr) 1.4rem; gap: .25rem .9rem; padding: .9rem var(--pad); }
  .ix-thumb--empty { display: block; }
  .ix-thumb { display: block; width: 4.2rem; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .2rem; background: var(--soft); grid-row: span 2; }
  .ix-name { grid-column: 2; flex-wrap: wrap; font-size: 1.45rem; }
  .ix-sub { grid-column: 2; font-size: .9rem; }
  .ix-tags, .ix-year { display: none; }
  .ix-arr { grid-column: 3; grid-row: 1 / span 2; }
}

/* sistema de diseño: muestras estáticas */
.ds-stage--flush { padding: 0; overflow: hidden; }
.ds-stage--flush > .all-cta, .ds-stage--flush > .ix-link { width: 100%; border: 0; }
.ds-stage--flush > .all-cta .all-cta__t { font-size: clamp(2rem, 4vw, 3.4rem); }
.ds-stage--flush > .ix-link .ix-name { font-size: 1.8rem; }

/* filas de imágenes en los casos (mupis, stories, pantallas) */
.m-row { display: grid; gap: 1rem; padding: 0 var(--gutter); }
.m-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.m-row--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.m-row--2 { padding: 0; gap: .5rem; }
@media (max-width: 767px) {
  .m-row--3, .m-row--4, .m-row--5 { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
  .m-row--3 figure, .m-row--4 figure, .m-row--5 figure { scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  .ix, .all, .all-cta::before, .ix-link::before, .ix-name, .all-cta__i, .ix-prev, .ix-prev img { transition: none; }
}

/* v36 · carrusel de stories (9:16): mismo scroll fijado que el de posts */
.m-ig--story .m-ig__item { width: min(36vh, 24vw); }
.m-ig--story .m-ig__item img { aspect-ratio: 9 / 16; }
@media (max-width: 767px) { .m-ig--story .m-ig__item { width: 62vw; } }

/* v51 · cierre del caso: enlace a la presentación en Behance y crédito de IA (antes iban en el hero y en la ficha) */
.cs-more { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem; padding: 3rem var(--gutter) 0; }
.cs-more__link { display: inline-flex; align-items: center; gap: .35em; font-size: clamp(1.1rem, 1.6vw, 1.4rem); letter-spacing: -.03em; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: .2rem; transition: color .3s, border-color .3s; }
.cs-more__link svg { width: .8em; height: .8em; transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.cs-more__link:hover { color: var(--pick); border-color: currentColor; }
.cs-more__link:hover svg { transform: translate(.1em, -.1em); }
.cs-more__ai { margin: 0; font-size: .8rem; color: var(--muted); }

/* =========================================================================
   v52 · Regla del sistema: chip = algo que se pulsa o un estado; la información, en texto
   ========================================================================= */
.spec { display: block; margin: 0; font-size: .72rem; line-height: 1.35; text-transform: uppercase; letter-spacing: .02em; }
.spec--just { text-align: justify; text-align-last: justify; }
.project__spec { color: rgba(255, 255, 255, .92); }
.cs-hero__spec { max-width: 46rem; color: var(--white); font-size: .78rem; }
.cs-hero--light .cs-hero__spec { color: var(--ink); }
.ab-spec { font-size: clamp(.9rem, 1.2vw, 1.1rem); line-height: 1.5; letter-spacing: .01em; max-width: 40rem; }
.ds-spec { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem; align-items: end; color: var(--white); }
@media (max-width: 479px) {
  .project__cap { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .project__spec { text-align: left; text-align-last: left; }
}

/* v53 · hero del caso: título a la izquierda y la ficha a la derecha, justificada, como en la home.
   Columna estrecha para que siempre ocupe al menos dos líneas; en móvil, todo el ancho y justificada (con sus ríos) */
.cs-hero__head { align-items: flex-end; }
.cs-hero__fill { flex: 1 1 auto; }
.cs-hero__head .chip--state { flex: 0 0 auto; margin-bottom: .55em; }
.cs-hero__spec { flex: 0 0 auto; width: clamp(15rem, 24vw, 22rem); max-width: none; font-size: .8rem; line-height: 1.4; margin-bottom: .35em; }
@media (max-width: 767px) {
  .cs-hero__head { flex-wrap: wrap; }
  .cs-hero__fill { display: none; }
  .cs-hero__spec { flex-basis: 100%; width: 100%; font-size: .78rem; margin-bottom: 0; }
}
@media (max-width: 479px) { .cs-hero__head { flex-wrap: nowrap; align-items: flex-start; } .cs-hero__spec { align-self: stretch; } }

/* v54 · cliente = asterisco en el color de la visita + nota al pie en la ficha (sustituye al chip «cliente») */
.ast { color: var(--pick); }
.project__title .ast { margin-left: .02em; }
.ix-name .ast { margin-left: calc(-.6rem + .04em); }
@media (hover: hover) { .ix-link:hover .ast { color: var(--pick-ink); } }
.ix-note { margin: 0; padding: 1rem var(--pad) 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
/* el título nunca se monta sobre la ficha: su columna se ensancha lo que haga falta */
.project__cap { grid-template-columns: minmax(min-content, 1.1fr) minmax(0, 1fr); }
@media (max-width: 479px) { .project__cap { grid-template-columns: minmax(0, 1fr); } }
/* sin línea entre el enlace a Behance y el «Hablemos» */
.cs-more + .cta { border-top: 0; }
.ix-list:has(+ .ix-note) { padding-bottom: 0; }
.ix-note { padding-bottom: clamp(2.5rem, 6vw, 5rem); }
/* v55 · el asterisco de cliente en los tags del índice, a color pleno */
.ix-tags { opacity: 1; color: var(--muted); }
@media (hover: hover) { .ix-link:hover .ix-tags { color: inherit; } }
