/* =========================================================
   Hamlet — sitio principal
   Paleta: el oscuro de estudio con verde lima como único acento.
   El turnaround conserva los grises de su propio render.
   Tipografía: Bricolage Grotesque variable (titulares con tamaño óptico
   de display, etiquetas en su versión más estrecha).
   ========================================================= */

:root {
  --ink: #1A1B1D;
  --ink-2: #242628;
  --slate: #5E6060;   /* fondo superior del render */
  --fog: #A7B5B2;     /* suelo del render */
  --paper: #ECEEEA;
  --lime: #C8F03C;    /* acento */
  --lime-deep: #A9D11E;
  --muted: #9EA3A1;
  --line: #34363A;

  /* Bricolage Grotesque, la misma familia de Hamlet Impresión: une las dos marcas.
     Ejes: tamaño óptico (12–96), anchura (75–100) y peso (200–800).
     A tamaños grandes el tamaño óptico activa sus trampas de tinta y remates expresivos. */
  --body: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --display: var(--body);
  /* Etiquetas y filtros: una sans neutra y legible a tamaño pequeño */
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.12vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.22vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.05rem + 0.6vw, 1.55rem);
  --step-2: clamp(1.7rem, 1.25rem + 2vw, 3.1rem);

  --gutter: clamp(1rem, 3.2vw, 2.75rem);
  --max: 1520px;

  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { background: var(--ink); scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 5rem); }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--body); font-size: var(--step-0); line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
main { overflow-x: clip; } /* la cinta inclinada no genera scroll lateral (clip no rompe el sticky) */
img, video { max-width: 100%; display: block; }
a { color: inherit; }
/* Todo lo que "grita" usa la tipografía de titulares */
h1, h2, h3, .logo, .turn-word, .ribbon span, .tile-client, .contact-mail, .menu nav a, .manifesto strong {
  font-family: var(--display);
}
h1, h2, h3 { margin: 0; line-height: 1; font-weight: 800; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--lime); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: calc(env(safe-area-inset-top, 0px) + .9rem) var(--gutter) .9rem;
  transition: background-color .3s ease;
}
.site-header.is-solid { background: color-mix(in srgb, var(--ink) 90%, transparent); backdrop-filter: blur(10px); }
.logo {
  font-weight: 900; font-size: var(--step-1); text-decoration: none; letter-spacing: -0.02em;
  font-variation-settings: "wdth" 125;
}
.site-header nav { display: flex; align-items: center; gap: clamp(.8rem, 2.2vw, 1.8rem); }
.site-header nav a { text-decoration: none; font-weight: 600; font-variation-settings: "wdth" 80; }
.site-header nav a:hover { color: var(--lime); }
.site-header .nav-cta { background: var(--lime); color: var(--ink); padding: .45rem 1rem; border-radius: 999px; }
.site-header .nav-cta:hover { background: var(--paper); color: var(--ink); }
.menu-btn {
  display: none; font: inherit; font-weight: 700; font-variation-settings: "wdth" 80;
  background: var(--lime); color: var(--ink); border: 0; border-radius: 999px;
  padding: .5rem 1.1rem; cursor: pointer;
}
.menu {
  position: fixed; inset: 0; z-index: 19; background: var(--lime); color: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 5.5rem) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 2rem);
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu nav { display: grid; }
.menu nav a {
  font-size: clamp(2.6rem, 13vw, 5rem); line-height: 1; font-weight: 900; letter-spacing: -0.04em;
  font-variation-settings: "wdth" 125; text-decoration: none; padding: .25rem 0;
}
.menu-foot { margin: 2rem 0 0; font-weight: 600; }
.menu :focus-visible { outline-color: var(--ink); }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { background: transparent; backdrop-filter: none; color: var(--ink); }
body.menu-open .menu-btn { background: var(--ink); color: var(--paper); }
@media (max-width: 899px) {
  .nav-desktop { display: none !important; }
  .menu-btn { display: inline-block; }
}

/* =========================================================
   Turnaround — el momento memorable
   ========================================================= */
.turn { position: relative; height: 420vh; background: var(--ink); }
.turn-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  /* mismo degradado que el borde del render: ciclorama gris que baja a niebla */
  background: linear-gradient(to bottom, #606060 0%, #5B5B5B 25%, #5D5D5D 50%, #81817C 75%, #9A9F9E 100%);
}
.turn-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.turn-ruler {
  position: absolute; left: calc(var(--gutter) - 12px); width: 40px;
  top: var(--head, 12%); height: calc(var(--feet, 90%) - var(--head, 12%));
  overflow: visible; pointer-events: none;
}
.turn-ruler line { stroke: var(--paper); stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: .7; }
.turn-ruler .ticks line { opacity: .5; }
.turn-ground {
  position: absolute; left: 0; right: 0; top: var(--feet, 90%);
  border-top: 1.5px dashed color-mix(in srgb, var(--ink) 45%, transparent);
  pointer-events: none;
}

.turn-word {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  text-align: center; line-height: .78; white-space: nowrap;
  font-size: clamp(4rem, 17vw, 24rem); font-weight: 900; letter-spacing: -0.04em;
  font-variation-settings: "wdth" var(--wdth, 125);
  color: var(--paper); mix-blend-mode: overlay; opacity: .9;
  transform: translateY(12%);
  pointer-events: none; user-select: none;
}

.turn-intro {
  position: absolute; left: var(--gutter); top: calc(env(safe-area-inset-top, 0px) + 6rem);
  max-width: min(46rem, 60vw);
  opacity: var(--intro, 1); transform: translateY(calc((1 - var(--intro, 1)) * -2rem));
}
.turn-intro h1 {
  font-size: clamp(2rem, 1rem + 4.2vw, 5.4rem); line-height: .95; font-weight: 800;
  font-variation-settings: "wdth" 112; letter-spacing: -0.035em;
  text-wrap: balance;
}
.scroll-cue {
  display: inline-flex; align-items: center; gap: .6rem; margin: 1.6rem 0 0;
  font-weight: 600; font-variation-settings: "wdth" 70;
}
.scroll-cue::before { content: ""; width: 2.2rem; height: 2px; background: var(--lime); }

.turn-steps {
  list-style: none; margin: 0; padding: 0;
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  width: min(21rem, 30vw); display: grid; gap: 1.1rem;
  opacity: var(--steps, 0);
}
.turn-steps li { display: grid; grid-template-columns: 3.6rem 1fr; column-gap: .6rem; color: color-mix(in srgb, var(--paper) 55%, transparent); transition: color .3s ease; }
.turn-steps .n { font-weight: 700; font-variation-settings: "wdth" 75; font-size: var(--step--1); padding-top: .35rem; white-space: nowrap; }
.turn-steps h2 { font-size: var(--step-2); font-variation-settings: "wdth" 118; letter-spacing: -0.03em; }
.turn-steps p { grid-column: 2; margin: .5rem 0 0; font-size: var(--step--1); line-height: 1.45; display: none; max-width: 30ch; }
.turn-steps li.is-active { color: var(--paper); }
.turn-steps li.is-active .n { color: var(--lime); }
.turn-steps li.is-active p { display: block; }

.turn-readout {
  position: absolute; left: var(--gutter); bottom: 1.4rem; margin: 0;
  font-size: var(--step--1); font-weight: 600; font-variation-settings: "wdth" 62;
  color: var(--ink); font-variant-numeric: tabular-nums;
  display: flex; gap: 1rem;
}
.turn-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: color-mix(in srgb, var(--ink) 25%, transparent); }
.turn-progress span { display: block; height: 100%; width: 100%; background: var(--lime); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* Pantallas anchas: el vídeo ocupa la derecha y la columna izquierda es para el texto,
   así el titular nunca tapa al personaje */
@media (min-width: 720px) and (min-aspect-ratio: 5/4) {
  .turn-stage { --col: clamp(340px, 32%, 520px); }
  .turn-video {
    left: var(--col); width: calc(100% - var(--col));
    -webkit-mask-image: linear-gradient(to right, transparent, #000 14%);
            mask-image: linear-gradient(to right, transparent, #000 14%);
  }
  .turn-ruler { left: calc(var(--col) + 1.2rem); }
  .turn-intro { max-width: calc(var(--col) - var(--gutter) * 2); top: auto; bottom: 34%; }
  .turn-intro h1 { font-size: clamp(2.4rem, 1rem + 2.6vw, 4.4rem); }
  .turn-steps { left: var(--gutter); right: auto; top: auto; bottom: 34%; transform: none; width: calc(var(--col) - var(--gutter) * 2); }
}

/* Sin JS o con movimiento reducido: el vídeo se reproduce solo y la sección no se fija */
.turn.is-static { height: auto; }
.turn.is-static .turn-stage { position: relative; height: 100svh; min-height: 560px; }
.turn.is-static .turn-steps { opacity: 1; }
.turn.is-static .turn-steps p { display: block; }

/* =========================================================
   Cinta de marca: horizontal, sigue la dirección del scroll
   ========================================================= */
.ribbon {
  overflow: hidden; border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line);
  padding: clamp(.6rem, 1.4vw, 1rem) 0; user-select: none;
}
.ribbon-track { display: flex; width: max-content; will-change: transform; }
.ribbon span {
  display: inline-flex; align-items: center; gap: .45em; padding-right: .45em;
  font-size: clamp(2rem, 1rem + 5vw, 5.8rem); line-height: 1; font-weight: 900; letter-spacing: -0.035em;
  font-variation-settings: "wdth" 125; white-space: nowrap;
}
/* alterna relleno y contorno para dar ritmo */
.ribbon span:nth-child(odd) { color: var(--paper); }
/* Relleno sólido: el contorno de una fuente variable muestra los solapes internos de los trazos */
.ribbon span:nth-child(even) { color: var(--lime); }
.ribbon span::after {
  content: ""; width: .32em; height: .32em; border-radius: 50%; background: var(--lime); flex: none;
}
.ribbon span:nth-child(even)::after { background: var(--paper); }

/* =========================================================
   Manifiesto
   ========================================================= */
.manifesto { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 12vh, 8rem) var(--gutter) clamp(3rem, 8vh, 5rem); }
.manifesto h2 {
  font-size: clamp(1.6rem, 0.9rem + 3vw, 4rem); line-height: 1.08; font-weight: 500; letter-spacing: -0.025em;
  font-variation-settings: "wdth" 100; max-width: 28ch; text-wrap: pretty;
}
.manifesto strong { font-weight: 900; font-variation-settings: "wdth" 125; }
.tagline {
  margin: 1.8rem 0 0; color: var(--lime);
  font-size: var(--step-2); font-weight: 800; font-variation-settings: "wdth" 70; letter-spacing: -0.02em;
}

/* =========================================================
   Reel a sangre
   ========================================================= */
.reel { position: relative; background: #5E6060; overflow: hidden; }
.reel-video { width: 100%; aspect-ratio: 16 / 9; max-height: 100svh; object-fit: cover; }
.reel-overlay {
  position: absolute; inset: auto 0 0 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem;
  padding: var(--gutter);
}
.reel h2 {
  font-size: clamp(3rem, 1rem + 10vw, 13rem); line-height: .8; font-weight: 900; letter-spacing: -0.05em;
  font-variation-settings: "wdth" 125; color: var(--paper); mix-blend-mode: difference;
}
.reel-btn {
  font: inherit; font-weight: 700; font-variation-settings: "wdth" 80;
  background: var(--paper); color: var(--ink); border: 0; border-radius: 999px;
  padding: .75rem 1.3rem; cursor: pointer;
}
.reel-btn:hover { background: var(--lime); }

/* =========================================================
   Proyectos — collage en vídeo
   ========================================================= */
.work { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vh, 5rem) clamp(.5rem, 1.2vw, 1rem) 3rem; }
.work-head { padding: 0 calc(var(--gutter) - clamp(.5rem, 1.2vw, 1rem)); }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 1.5rem; margin-bottom: clamp(1.2rem, 3vh, 2rem); }
.work-head h2 { font-size: var(--step-2); font-variation-settings: "wdth" 118; }

.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters button {
  font-family: var(--ui); font-size: var(--step--1); font-weight: 500; font-variation-settings: normal;
  background: transparent; color: var(--muted);
  border: 1.5px solid var(--line); border-radius: 999px; padding: .4rem .95rem; cursor: pointer;
}
.filters button:hover { color: var(--paper); }
.filters button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.collage {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(70px, 7.2vw, 118px);
  gap: clamp(6px, .8vw, 10px);
}
/* El JS asigna columnas (--c) y filas (--r) a cada pieza para que el mosaico cierre sin huecos */
.tile { grid-column: span var(--c, 4); grid-row: span var(--r, 3); min-width: 0; }
.tile.is-hidden { display: none; }

.tile-btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: block;
  position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--ink-2);
}
.tile-media { position: absolute; inset: 0; }
.tile-media img, .tile-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-media img { transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.tile-media video { opacity: 0; transition: opacity .3s ease; }
.tile.is-playing .tile-media video { opacity: 1; }
.tile-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12, 13, 14, .82) 0%, rgba(12, 13, 14, .25) 32%, transparent 55%);
  transition: opacity .3s ease;
}

.tile-info { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(.8rem, 1.4vw, 1.3rem); display: grid; gap: .1rem; }
.tile-client {
  font-size: clamp(1.05rem, .8rem + .9vw, 1.7rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em;
  font-variation-settings: "wdth" 118;
}
.tile--hero .tile-client { font-size: clamp(1.5rem, 1rem + 2.2vw, 3.2rem); }
.tile-title { color: color-mix(in srgb, var(--paper) 78%, transparent); line-height: 1.3; font-size: var(--step--1); font-weight: 500; }

.tile-tags {
  position: absolute; top: clamp(.6rem, 1vw, .9rem); left: clamp(.6rem, 1vw, .9rem); right: 4.5rem;
  display: flex; flex-wrap: wrap; gap: .3rem;
}
.tile-tags span {
  font-family: var(--ui); font-size: .72rem; font-weight: 500; letter-spacing: .01em; line-height: 1;
  font-variation-settings: normal;
  background: rgba(12, 13, 14, .55); backdrop-filter: blur(6px); color: var(--paper);
  padding: .32rem .55rem; border-radius: 999px;
}
.tile-view {
  position: absolute; top: clamp(.6rem, 1vw, .9rem); right: clamp(.6rem, 1vw, .9rem);
  background: var(--lime); color: var(--ink); font-size: .78rem; font-weight: 800; font-variation-settings: "wdth" 80;
  padding: .32rem .7rem; border-radius: 999px;
  opacity: 0; transform: translateY(-4px); transition: opacity .2s ease, transform .2s ease;
}
.tile-btn:hover .tile-media img, .tile-btn:focus-visible .tile-media img { transform: scale(1.05); }
.tile-btn:hover .tile-view, .tile-btn:focus-visible .tile-view { opacity: 1; transform: none; }
.tile-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }
.grid-status { color: var(--muted); }

/* =========================================================
   Clientes
   ========================================================= */
.clients { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vh, 5rem) var(--gutter); }
.clients h2 { font-size: var(--step-1); font-variation-settings: "wdth" 110; margin-bottom: 1.5rem; }
.logo-wall {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid var(--line); border-left: 1.5px solid var(--line);
}
.logo-wall li {
  border-right: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line);
  display: grid; place-items: center; padding: clamp(1.2rem, 3vw, 2.4rem) 1rem; aspect-ratio: 2 / 1;
}
.logo-wall img { width: min(100%, 180px); opacity: .65; transition: opacity .2s ease; }
.logo-wall li:hover img { opacity: 1; }

/* =========================================================
   Estudio
   ========================================================= */
.studio { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vh, 5rem) var(--gutter) clamp(4rem, 10vh, 6rem); }
.studio > h2 { font-size: var(--step-2); font-variation-settings: "wdth" 118; margin-bottom: clamp(2rem, 5vh, 3rem); }
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); }
.services li { border-top: 3px solid var(--lime); padding-top: 1.1rem; }
.services .n { display: block; font-weight: 700; font-variation-settings: "wdth" 62; color: var(--lime); margin-bottom: .6rem; }
.services h3 { font-size: var(--step-2); font-variation-settings: "wdth" 110; letter-spacing: -0.03em; margin-bottom: .7rem; }
.services p { margin: 0; color: var(--muted); max-width: 34ch; }

.print-teaser {
  max-width: var(--max); margin: 0 auto; padding: 2.2rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1.5rem;
  border-top: 1.5px solid var(--line);
}
.print-teaser h2 { font-size: var(--step-1); font-variation-settings: "wdth" 110; }
.print-teaser p { margin: 0; color: var(--muted); flex: 1; }
.print-teaser a { font-weight: 700; color: var(--lime); text-underline-offset: 4px; }

/* =========================================================
   Contacto: bloque ámbar a sangre
   ========================================================= */
.contact { position: relative; overflow: hidden; background: var(--lime); color: var(--ink); padding: clamp(4rem, 12vh, 8rem) var(--gutter); }
.contact > * { position: relative; max-width: var(--max); margin-left: auto; margin-right: auto; }
/* El personaje impreso sobre el ámbar como un duotono */
.contact > .contact-figure {
  position: absolute; top: 0; right: 0; bottom: 0; width: 46%; max-width: none; margin: 0;
  height: 100%; object-fit: cover; object-position: 30% 40%;
  mix-blend-mode: multiply; filter: grayscale(1) contrast(1.2) brightness(1.35);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 30%);
          mask-image: linear-gradient(to right, transparent, #000 30%);
  pointer-events: none;
}
@media (max-width: 900px) { .contact > .contact-figure { display: none; } }
.contact h2 {
  font-size: clamp(2.6rem, 1rem + 7.4vw, 9.5rem); line-height: .88; font-weight: 900; letter-spacing: -0.045em;
  font-variation-settings: "wdth" 125; max-width: 12ch; margin-left: 0;
}
.contact-sub { font-size: var(--step-1); line-height: 1.4; max-width: 40ch; margin: 2rem 0 2.5rem; font-weight: 500; }
.contact-mail {
  display: inline-block; font-size: clamp(1.5rem, 0.8rem + 3vw, 3.4rem); font-weight: 800;
  font-variation-settings: "wdth" 90; letter-spacing: -0.02em;
  text-decoration-thickness: 3px; text-underline-offset: 8px; word-break: break-all;
}
.contact-mail:hover { text-decoration-thickness: 6px; }
.contact-info { display: flex; flex-wrap: wrap; gap: 1.2rem 3rem; margin: 2.5rem 0 0; }
.contact-info dt { font-weight: 700; font-variation-settings: "wdth" 62; font-size: var(--step--1); }
.contact-info dd { margin: .2rem 0 0; font-weight: 600; }
.contact-info a { text-underline-offset: 3px; }
.contact .social { list-style: none; padding: 0; margin: 3rem 0 0; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.contact .social a { font-weight: 700; text-underline-offset: 4px; }
.contact :focus-visible { outline-color: var(--ink); }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.4rem var(--gutter) 1.8rem; color: var(--muted); font-size: var(--step--1);
}
.site-footer p { margin: 0; }

/* ---------- Diálogo de proyecto ---------- */
.project-dialog {
  width: min(1100px, 100%); height: 100dvh; max-height: 100dvh;
  margin: 0 0 0 auto; padding: 0; border: 0; background: var(--ink); color: var(--paper);
}
.project-dialog::backdrop { background: rgba(10, 10, 12, .72); backdrop-filter: blur(4px); }
.project-dialog[open] { animation: slide-in .35s ease-out; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.dlg-close {
  position: sticky; top: 0; float: right; z-index: 2; margin: 1rem var(--gutter) 0 0;
  font: inherit; font-weight: 700; background: var(--paper); color: var(--ink);
  border: 0; border-radius: 999px; padding: .5rem 1.1rem; cursor: pointer;
}
.dlg-content { padding: calc(env(safe-area-inset-top, 0px) + 2rem) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 3rem); }
.dlg-head { margin-bottom: 1.2rem; }
.dlg-head h2 { font-size: clamp(2rem, 1rem + 3.5vw, 4.2rem); font-variation-settings: "wdth" 125; max-width: 16ch; letter-spacing: -0.04em; }
.dlg-meta { color: var(--muted); margin: .7rem 0 0; font-variation-settings: "wdth" 70; font-weight: 600; }
.dlg-desc { max-width: 60ch; margin: 0 0 2rem; }
.dlg-gallery { display: grid; gap: 1rem; margin-bottom: 2rem; }
.dlg-gallery img, .dlg-gallery video { width: 100%; height: auto; border-radius: 6px; }
.btn { display: inline-block; text-decoration: none; font-weight: 700; background: var(--lime); color: var(--ink); padding: .85rem 1.5rem; border-radius: 999px; }
.btn:hover { background: var(--paper); }

/* =========================================================
   Suscripción destacada en la home
   ========================================================= */
.nav-sub span {
  font-family: var(--ui); font-size: .65rem; font-weight: 600; vertical-align: .15em;
  background: var(--lime); color: var(--ink); padding: .15rem .4rem; border-radius: 999px; margin-left: .25rem;
}
.sub-promo {
  max-width: var(--max); margin: clamp(2rem, 6vh, 4rem) auto; padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center;
  border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line);
}
.promo-eyebrow { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.2rem; font-family: var(--ui); font-weight: 500; color: var(--muted); font-size: var(--step--1); }
.promo-eyebrow span { background: var(--lime); color: var(--ink); font-weight: 600; padding: .25rem .6rem; border-radius: 999px; }
.sub-promo h2 { font-size: clamp(2.6rem, 1rem + 5.6vw, 7rem); line-height: .9; letter-spacing: -0.05em; font-weight: 800; }
.struck { position: relative; display: inline-block; color: color-mix(in srgb, var(--paper) 45%, transparent); }
.struck svg { position: absolute; left: -4%; width: 108%; top: 34%; height: .42em; overflow: visible; pointer-events: none; }
.struck path {
  fill: none; stroke: var(--lime); stroke-width: 10; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset .8s cubic-bezier(.6, 0, .3, 1) .2s;
}
.sub-promo.is-in .struck path { stroke-dashoffset: 0; }
.promo-lead { font-size: var(--step-1); line-height: 1.45; max-width: 44ch; margin: 1.8rem 0 1.4rem; }
.promo-points { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.promo-points li { font-family: var(--ui); font-size: var(--step--1); color: var(--muted); border: 1.5px solid var(--line); border-radius: 999px; padding: .45rem .9rem; }
.promo-points strong { color: var(--paper); font-weight: 600; }
.promo-ctas { display: flex; flex-wrap: wrap; gap: .7rem; }
.btn-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--ink-2); color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--lime); }

/* Entrada de teatro */
.ticket {
  --notch: 18px;
  display: grid; grid-template-columns: 1fr auto; text-decoration: none; color: var(--ink);
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, .45));
  transform: rotate(-3deg); transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.ticket:hover, .ticket:focus-visible { transform: rotate(0deg) translateY(-6px); }
.ticket:focus-visible { outline: none; }
.ticket:focus-visible .ticket-main { outline: 3px solid var(--paper); outline-offset: 4px; }
.ticket-main, .ticket-stub {
  background: var(--lime);
  /* muescas semicirculares en la línea de corte */
  -webkit-mask: radial-gradient(circle var(--notch) at 100% 0, transparent 98%, #000) top right / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at 100% 100%, transparent 98%, #000) bottom right / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at 100% 0, transparent 98%, #000) top right / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at 100% 100%, transparent 98%, #000) bottom right / 100% 51% no-repeat;
}
.ticket-main { border-radius: 14px 0 0 14px; padding: clamp(1.4rem, 2.6vw, 2.2rem); display: grid; gap: 1rem; }
.ticket-stub {
  border-radius: 0 14px 14px 0; border-left: 2px dashed rgba(26, 27, 29, .45);
  -webkit-mask: radial-gradient(circle var(--notch) at 0 0, transparent 98%, #000) top left / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at 0 100%, transparent 98%, #000) bottom left / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 0, transparent 98%, #000) top left / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at 0 100%, transparent 98%, #000) bottom left / 100% 51% no-repeat;
  writing-mode: vertical-rl;
  display: flex; justify-content: space-between; align-items: center; padding: 1.4rem .9rem;
  font-family: var(--ui); font-size: .75rem; font-weight: 600;
}
.ticket-code { opacity: .6; }
.ticket-top { display: flex; justify-content: space-between; gap: 1rem; margin: 0; font-family: var(--ui); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ticket-top span:first-child { font-family: var(--display); font-size: 1rem; text-transform: none; letter-spacing: -0.01em; font-weight: 800; }
.ticket-title { margin: .6rem 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 1rem + 2.6vw, 3.4rem); line-height: .92; letter-spacing: -0.045em; }
.ticket-price { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 1rem + 2vw, 2.8rem); letter-spacing: -0.04em; line-height: 1; }
.ticket-price small { font-family: var(--ui); font-size: .8rem; font-weight: 600; letter-spacing: 0; opacity: .7; margin: 0 .25rem; }
.ticket-meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .8rem 1.2rem; padding-top: 1rem; border-top: 2px dashed rgba(26, 27, 29, .35); }
.ticket-meta div { display: contents; }
.ticket-meta dt { font-family: var(--ui); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .65; padding-top: .15rem; }
.ticket-meta dd { margin: 0; font-weight: 700; line-height: 1.3; }

@media (max-width: 900px) {
  .sub-promo { grid-template-columns: 1fr; }
  .ticket { max-width: 30rem; transform: rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .struck path { stroke-dashoffset: 0; }
  .ticket { transform: none; }
}

/* Enlaces legales del pie */
.footer-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer-legal a { color: inherit; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--lime); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .services { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .turn-steps { width: 16rem; }
  /* Tablet: 2 columnas; la pieza grande ocupa el ancho completo */
  .collage { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .tile { grid-column: span 1; grid-row: auto; aspect-ratio: 4 / 5; }
  .tile--hero, .tile--full { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .logo-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Móvil y tablet vertical: el personaje ocupa la parte baja y el texto la franja superior */
@media (max-width: 640px), (max-aspect-ratio: 1/1) {
  .turn-stage { background: linear-gradient(to bottom, #606060 0%, #606060 30%, #5D5D5D 60%, #81817C 82%, #9A9F9E 100%); }
  .turn-video {
    top: 30%; height: 70%;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%);
            mask-image: linear-gradient(to bottom, transparent, #000 12%);
  }
  .turn-intro { max-width: none; right: var(--gutter); top: calc(env(safe-area-inset-top, 0px) + 4.6rem); }
  .turn-intro h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
  .turn-steps { top: calc(env(safe-area-inset-top, 0px) + 4.8rem); left: var(--gutter); right: var(--gutter); width: auto; transform: none; }
  .turn-steps li:not(.is-active) { display: none; }
  .turn-readout { display: none; }
  .turn-ruler { display: none; }
}
@media (max-width: 640px) {
  .turn-video { object-position: 27% 50%; }
  .turn-ruler { display: none; }
  .turn-word { font-size: 18vw; }
  .collage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { aspect-ratio: 3 / 4; }
  .tile-tags span:nth-child(n+2) { display: none; }
  .tile-title { display: none; }
  .services { grid-template-columns: 1fr; }
  .logo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reel-video { aspect-ratio: 4 / 5; }
  .reel-overlay { flex-direction: column; align-items: start; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .ribbon-track { flex-wrap: wrap; width: auto; }
}

/* ---------- Página "Agregar proyecto" ---------- */
.tool { max-width: 760px; margin: 0 auto; padding: 6rem var(--gutter) 3rem; }
.tool h1 { font-size: var(--step-2); font-variation-settings: "wdth" 118; margin-bottom: 1rem; }
.tool form { display: grid; gap: 1.1rem; margin: 2rem 0; }
.tool label { display: grid; gap: .35rem; font-weight: 700; }
.tool small { font-weight: 400; color: var(--muted); }
.tool input, .tool select, .tool textarea {
  font: inherit; font-weight: 400; padding: .6rem .8rem;
  border: 1.5px solid var(--line); border-radius: 6px; background: var(--ink-2); color: var(--paper);
}
.tool textarea { min-height: 6rem; resize: vertical; }
.tool pre { background: var(--ink-2); border: 1.5px solid var(--line); padding: 1rem; border-radius: 6px; overflow-x: auto; font-size: .85rem; white-space: pre-wrap; }
.tool button { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: .75rem 1.4rem; cursor: pointer; background: var(--lime); color: var(--ink); justify-self: start; }
.tool code { color: var(--lime); }

/* ===== Intro en vídeo (portada) ===== */
.hero { position: relative; height: 100svh; min-height: 520px; background: var(--ink); overflow: hidden; display: flex; align-items: flex-end; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0) 55%), linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,0) 22%); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; padding: 0 var(--gutter) clamp(2rem, 6vh, 4.5rem); max-width: 60rem; color: var(--paper); }
.hero-copy h1 { margin: 0; font-size: clamp(2.2rem, 1rem + 4.2vw, 5.4rem); line-height: .95; font-weight: 800; font-variation-settings: "wdth" 112; letter-spacing: -0.035em; text-wrap: balance; }
.hero .scroll-cue { color: inherit; text-decoration: none; }

/* Logo con isotipo */
.logo { display: inline-flex; align-items: center; gap: .5rem; }
.logo img { width: 1.6em; height: 1.6em; }

/* Proceso tipo blog dentro del detalle del proyecto */
.dlg-story { margin: 0 0 3rem; display: grid; gap: clamp(2rem, 6vh, 4rem); }
.dlg-story section { max-width: 60ch; }
.dlg-story section.has-media { max-width: none; display: grid; gap: 1.2rem; align-items: center; }
.dlg-story figure { margin: 0; }
.dlg-story figure img, .dlg-story figure video { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; border-radius: 6px; }
@media (min-width: 900px) {
  .dlg-story section.has-media { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
  .dlg-story section.has-media:nth-child(even) .story-text { order: 2; }
}
.dlg-story h3 { margin: 0 0 .4rem; font-size: 1.15rem; font-variation-settings: "wdth" 110; }
.dlg-story p { margin: 0; line-height: 1.6; }

/* Selector de idioma */
.lang-switch { font-weight: 700; letter-spacing: .04em; border: 1.5px solid currentColor; border-radius: 999px; padding: .2rem .6rem; font-size: .8rem; }

/* Proyecto en bloques (estilo Behance) */
.dlg-story.is-blocks { display: block; margin: 0 calc(var(--gutter) * -1) 2.5rem; max-width: none; }
.blk img { display: block; width: 100%; height: auto; }
.blk-pair { display: grid; grid-template-columns: 1fr; }
@media (min-width: 700px) { .blk-pair { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .blk-pair img { height: 100%; object-fit: cover; } }
.blk-band { background: var(--bg); color: var(--fg); padding: clamp(3rem, 9vw, 7rem) var(--gutter); text-align: center; display: grid; justify-items: center; gap: 1.2rem; }
.blk-band .blk-logo { width: clamp(120px, 22vw, 240px); height: auto; }
.blk-band h3 { margin: 0; font-size: clamp(1.6rem, 1rem + 2.5vw, 3rem); font-variation-settings: "wdth" 120; letter-spacing: -0.02em; max-width: 22ch; }
.blk-band p { margin: 0; max-width: 62ch; line-height: 1.6; opacity: .92; }
.blk-palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.blk-palette span { background: var(--c); color: var(--t); padding: 2.5rem 1.2rem 1.2rem; font: 600 .95rem/1.3 var(--ui, inherit); letter-spacing: .04em; }
.blk-palette b { display: block; font-size: .75rem; text-transform: uppercase; opacity: .75; }

.dlg-behance[hidden] { display: none; }

/* Cierre de cada proyecto con el logo de Hamlet */
.dlg-end { display: grid; place-items: center; padding: clamp(3rem, 10vh, 6rem) 0 1rem; margin-top: 2rem; border-top: 1.5px solid var(--line); }
.dlg-end img { width: clamp(48px, 6vw, 72px); height: auto; opacity: .9; }

.blk-band { background-size: cover; background-position: center; }
.blk-text { display: grid; gap: 1rem; justify-items: center; }
.blk-split { text-align: left; }
.blk-split .blk-text { justify-items: start; }
@media (min-width: 800px) {
  .blk-split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-inline: clamp(2rem, 8vw, 8rem); }
  .blk-split .blk-logo { width: 100%; max-width: 300px; justify-self: center; }
}

/* Siluetas decorativas en los laterales de una banda */
.blk-band { position: relative; overflow: hidden; isolation: isolate; }
.blk-side { position: absolute; top: 0; bottom: 0; height: 100%; width: auto; z-index: -1; pointer-events: none; }
.blk-side--l { left: 0; }
.blk-side--r { right: 0; }
@media (max-width: 700px) { .blk-side { opacity: .5; } }
.blk-side--l { aspect-ratio: 148.82 / 206.23; }
.blk-side--r { aspect-ratio: 189.9 / 207.03; }
.blk-side { max-width: 30%; object-fit: cover; }
.blk-side--l { object-position: left center; }
.blk-side--r { object-position: right center; }
.blk-side { object-fit: contain; }
.blk-side--l { object-position: left bottom; }
.blk-side--r { object-position: right bottom; }
.blk-side { max-width: 34%; }
@media (min-width: 1100px) { .blk-side { max-width: 28%; } }
.blk .blk-side { height: 100%; width: auto; }
/* Siluetas: ocupan todo el alto de la banda, como en la maqueta */
.blk .blk-side { height: 100%; width: auto; max-width: 38%; object-fit: cover; }
.blk-side--l { object-position: right top; }
.blk-side--r { object-position: left top; }
/* Textos de las bandas más contenidos */
.blk-band { gap: .9rem; }
.blk-band h3 { font-size: clamp(1.3rem, .9rem + 1.4vw, 2.1rem); }
.blk-band p { font-size: clamp(.9rem, .85rem + .2vw, 1rem); max-width: 54ch; }
.blk-band .blk-logo { width: clamp(110px, 16vw, 190px); }
.blk-split .blk-logo { max-width: 260px; }
@media (max-width: 700px) { .blk .blk-side { max-width: 30%; opacity: .45; } }
@media (max-width: 700px) { .blk .blk-side { display: none; } }

/* Vídeo de Vimeo y vídeos propios dentro del proyecto */
.blk-embed { background: #000; }
.blk-embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.blk-videos { background: var(--bg, #111); }
.blk-videos video { display: block; width: 100%; height: 100%; object-fit: cover; }
.blk-videos video { aspect-ratio: 750 / 720; height: auto; }

/* Vimeo con portada: se ve bien aunque el reproductor no cargue */
.blk-embed { position: relative; aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer; }
.blk-embed > img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); }
.blk-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.blk-play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: clamp(64px, 10vw, 96px); aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--lime, #C8F03C); color: #111; font-size: clamp(1.3rem, 2.4vw, 2rem); cursor: pointer; display: grid; place-items: center; padding-left: .2em; }
.blk-vimeo-link { position: absolute; right: 1rem; bottom: 1rem; color: #fff; font-weight: 600; font-size: .85rem; text-decoration: none; background: rgba(0,0,0,.55); padding: .35rem .7rem; border-radius: 999px; }
.blk-embed.is-playing > img, .blk-embed.is-playing .blk-play { display: none; }

.blk-videos video { aspect-ratio: auto; max-height: 85vh; object-fit: contain; background: #000; }

/* Formulario de contacto */
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; max-width: 46rem !important; margin: 0 0 1.5rem !important; }
.contact-form label { display: grid; gap: .4rem; font-weight: 700; font-size: var(--step--1); }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea { font: inherit; font-weight: 500; color: var(--ink); background: rgba(255,255,255,.55); border: 2px solid var(--ink); border-radius: 10px; padding: .8rem 1rem; }
.contact-form input:focus, .contact-form textarea:focus { outline: 3px solid var(--ink); outline-offset: 2px; background: #fff; }
.contact-form .btn { justify-self: start; background: var(--ink); color: var(--lime); }
.contact-form .form-status { grid-column: 1 / -1; margin: 0; font-weight: 600; min-height: 1.4em; }
.contact-form.is-error .form-status { color: #8a0d1a; }
.contact-alt { margin: 0 0 .3rem; font-weight: 600; opacity: .75; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) { .contact-form { grid-template-columns: 1fr; } }

/* Páginas individuales de proyecto */
a.tile-btn { color: inherit; text-decoration: none; }
.project-page { max-width: var(--max); margin: 0 auto; padding-top: calc(var(--header-h, 72px) + 2rem); }
.project-page .dlg-head h1 { font-size: clamp(2rem, 1rem + 3.5vw, 4.2rem); font-variation-settings: "wdth" 125; max-width: 18ch; letter-spacing: -0.04em; margin: 0; }
.project-page .back { display: inline-block; margin-bottom: 1.5rem; font-weight: 700; text-decoration: none; }
.project-cta { text-align: center; padding: clamp(3rem, 8vh, 5rem) var(--gutter); }
.project-cta h2 { font-size: var(--step-2); margin: 0 0 1.2rem; }
.project-more { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: center; list-style: none; padding: 0; margin: 2rem 0 0; }
