/* DM Estudio | Corte & Relieve. Direction: type and nothing else (taste-skill seed 835938722).
   The brand's own colours: paper, ink and the red of the M in its logo. The cover cuts the name in two. */
:root {
  --bg: #f4f4f2;
  --surface: #e7e6e2;
  --ink: #0d0d0d;
  --muted: #4a4a48;
  --accent: #d71920;
  --accent-deep: #b3141a;
  --on-accent: #ffffff;
  --margin: clamp(1rem, 2vw, 1.75rem);
  --font: "General Sans", system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(4.5rem, 11vw, 11rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h2, h3 { font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* On the red fields the focus ring turns white so it stays visible. */
.pie :focus-visible, .renglon-saludo :focus-visible, .nombre :focus-visible, .pestanas [aria-selected="true"]:focus-visible { outline-color: var(--on-accent); }
/* Without script the stage controls would do nothing, so they are not shown. */
html:not(.js) .pestanas, html:not(.js) .control { display: none; }
@media print { .js [data-reveal] { opacity: 1 !important; transform: none !important; } }
::selection { background: var(--accent); color: var(--on-accent); }
.sr-titulo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.boton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.4rem;
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 500; font-size: var(--step-small);
  transition: background-color 160ms ease, transform 120ms var(--ease-out);
}
.boton:hover { background: var(--accent-deep); }
.boton:active { transform: scale(0.97); }

.marca { font-weight: 700; font-size: var(--step-body); text-decoration: none; letter-spacing: -0.01em; }
.marca-d { color: var(--ink); }
.marca-m { color: var(--accent); }

/* ---------- Cover: two fields, the seam cuts the second line ---------- */
.portada { position: relative; height: 100svh; min-height: 34rem; overflow: hidden; background: var(--bg); }
.portada::after { content: ""; position: absolute; inset: 50% 0 0; background: var(--accent); z-index: 0; }
.portada-barra { position: absolute; z-index: 3; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 1.75rem var(--margin); }
/* The real headline is whole and black; a decorative white copy, cut to the lower field, lies over it. */
.capa { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.capa-arriba { color: var(--ink); }
.capa-abajo { z-index: 3; clip-path: inset(50% 0 0 0); color: var(--on-accent); }
.capa-abajo [data-t]::before { content: attr(data-t); }
.titular {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-80%);
  font-size: var(--step-display); font-weight: 700; line-height: 0.86; letter-spacing: -0.02em; text-transform: uppercase; text-align: center;
}
.linea { display: block; overflow: hidden; padding-bottom: 0.04em; }
.linea > span { display: inline-block; }
/* The sentence sits right under the cut headline, so the name and what it means are read together. */
.portada-sub {
  position: absolute; z-index: 3; left: 50%; top: calc(75% + 0.18 * var(--step-display)); transform: translate(-50%, -50%); width: min(44rem, calc(100% - 2 * var(--margin)));
  color: var(--on-accent); font-size: var(--step-lead); line-height: 1.3; text-align: center;
}

/* ---------- Projects: the quiet ledger ---------- */
.proyectos { position: relative; padding: clamp(6rem, 12vw, 10rem) var(--margin); min-height: 70svh; }
.libro { width: min(35rem, 100%); margin-left: 22vw; }
.libro-titulo { font-size: var(--step-lead); margin-bottom: 2rem; }
.fila {
  display: grid; grid-template-columns: 1fr 0.8fr auto; align-items: baseline; gap: 1rem; min-height: 2.75rem; padding: 0.55rem 0;
  text-decoration: none; transition: color 150ms ease;
}
.fila-nombre { font-weight: 500; }
.fila-tipo { font-size: var(--step-small); color: var(--muted); }
.fila-anio { font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.filas:hover .fila, .filas:focus-within .fila { color: var(--muted); }
.filas .fila:hover, .filas .fila:focus-visible { color: var(--ink); }
.vista { position: absolute; width: clamp(14rem, 22vw, 20rem); aspect-ratio: 4 / 5; right: calc(var(--margin) + 4vw); top: 0; opacity: 0; transition: opacity 150ms ease, transform 300ms var(--ease-out); pointer-events: none; overflow: hidden; background: var(--surface); }
.vista img { width: 100%; height: 100%; object-fit: cover; }
.vista.is-on { opacity: 1; }

/* ---------- From the workshop to the event ---------- */
.taller { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; align-items: center; padding: clamp(6rem, 10vw, 9rem) var(--margin); background: var(--ink); color: var(--bg); }
.taller-texto { grid-column: 1 / 6; }
.taller h2 { font-size: var(--step-head); }
.taller-texto > p { margin-top: 1.25rem; max-width: 32ch; font-size: var(--step-lead); line-height: 1.3; }
.pestanas { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; }
.pestanas button { min-height: 44px; padding: 0 1rem; border: 0; background: #262626; cursor: pointer; font-size: var(--step-small); transition: background-color 150ms ease, color 150ms ease; }
.pestanas button:hover { background: #3a3a3a; }
.pestanas button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.control { margin-top: 2.5rem; }
.control input[type="range"] { width: 100%; height: 44px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.etapas { display: flex; justify-content: space-between; font-size: var(--step-small); color: #c9c9c6; }
.etapa-texto { margin-top: 1.5rem; min-height: 3em; }
.taller-foto { grid-column: 7 / 13; position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #1a1a1a; }
.taller-foto img { width: 100%; height: 100%; object-fit: cover; transition: opacity 260ms ease, transform 700ms var(--ease-out); }
.taller-foto img.is-swapping { opacity: 0; transform: scale(1.03); }

/* ---------- What we do: a wall of words ---------- */
.hacemos { padding: clamp(6rem, 10vw, 9rem) var(--margin); }
.hacemos h2 { font-size: var(--step-lead); margin-bottom: 2.5rem; }
.servicios li { font-size: var(--step-head); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; padding: 0.1em 0; }
.servicios li:nth-child(even) { padding-left: 22vw; }
/* Each service opens WhatsApp with that service already named. */
.servicios a { display: inline-block; text-decoration: none; transition: color 180ms ease, transform 300ms var(--ease-out); }
.servicios a:hover, .servicios a:focus-visible { color: var(--accent); transform: translateX(0.4rem); }
@media (hover: none) { .servicios a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; } }

/* ---------- The band ---------- */
.banda { position: relative; overflow: hidden; background: var(--ink); }
.banda img { width: 100%; height: min(90svh, 56vw); object-fit: cover; animation: deriva 22s ease-in-out infinite alternate; }
.banda figcaption { position: absolute; left: var(--margin); bottom: var(--margin); max-width: 40ch; padding: 0.6rem 0.9rem; background: var(--bg); font-size: var(--step-small); }
@keyframes deriva { from { transform: scale(1); } to { transform: scale(1.06); } }

/* ---------- Corte / Relieve, compared ---------- */
.nombre { padding: clamp(6rem, 10vw, 9rem) var(--margin) 0; background: var(--accent); color: var(--on-accent); }
.nombre-cabeza { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; align-items: start; }
.nombre h2 { grid-column: 1 / 6; font-size: var(--step-head); }
.nombre-cabeza p { grid-column: 7 / 13; max-width: 46ch; }
.especimenes { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; margin-top: 12vh; height: clamp(12rem, 22vw, 20rem); overflow: hidden; }
.especimen-palabra { font-size: var(--step-display); font-weight: 700; line-height: 0.8; letter-spacing: -0.03em; }
/* Corte: only the cut line. Relieve: the same word raised off the surface, its side drawn in ink. */
.palabra-corte { color: transparent; -webkit-text-stroke: 2px var(--on-accent); }
.palabra-relieve { position: relative; display: grid; }
.palabra-relieve span { grid-area: 1 / 1; }
.palabra-relieve .capa-1::before { content: attr(data-t); color: var(--ink); }
.palabra-relieve .capa-1 { transform: translate(0.05em, 0.05em); }
.palabra-relieve .capa-3 { color: var(--on-accent); position: relative; }

/* ---------- How we work: the slip ---------- */
.proceso { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; padding: clamp(6rem, 10vw, 9rem) var(--margin); background: var(--surface); }
.proceso-texto { grid-column: 1 / 6; }
.proceso h2 { font-size: var(--step-head); }
.proceso-texto > p { margin-top: 1.25rem; max-width: 30ch; font-size: var(--step-lead); line-height: 1.3; }
.proceso-fotos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 2.5rem; }
.proceso-fotos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.boleta {
  grid-column: 7 / 12; align-self: start; max-width: 30rem; width: 100%; background: var(--bg); padding: 0.75rem 2rem 4rem; font-variant-numeric: tabular-nums;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 95.833% calc(100% - 14px), 91.667% 100%, 87.5% calc(100% - 14px), 83.333% 100%, 79.167% calc(100% - 14px), 75% 100%, 70.833% calc(100% - 14px), 66.667% 100%, 62.5% calc(100% - 14px), 58.333% 100%, 54.167% calc(100% - 14px), 50% 100%, 45.833% calc(100% - 14px), 41.667% 100%, 37.5% calc(100% - 14px), 33.333% 100%, 29.167% calc(100% - 14px), 25% 100%, 20.833% calc(100% - 14px), 16.667% 100%, 12.5% calc(100% - 14px), 8.333% 100%, 4.167% calc(100% - 14px), 0% 100%);
}
.boleta h3 { font-size: var(--step-body); font-weight: 700; margin: 1.75rem 0 0.5rem; letter-spacing: 0; }
.paso { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.3rem 0; }
.paso > span:first-child { flex: 0 1 auto; }
.paso > span:last-child { flex: none; white-space: nowrap; }
.puntos { flex: 1 1 1.5rem; min-width: 1.5rem; overflow: hidden; white-space: nowrap; color: var(--muted); }
.puntos::before { content: "· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·"; letter-spacing: 1px; }
.paso-final { justify-content: space-between; align-items: center; min-height: 44px; margin: 2rem -2rem 0; padding: 0.5rem 2rem; background: var(--ink); color: var(--bg); }

/* ---------- About: side facts, wide paragraph ---------- */
.sobre { padding: clamp(6rem, 10vw, 9rem) var(--margin); }
.sobre-fila { display: grid; grid-template-columns: 34vw 1fr; column-gap: 0; }
.datos { display: grid; gap: 1.25rem; align-content: start; font-size: var(--step-body); }
.datos dt { color: var(--muted); }
.sobre-p { font-size: var(--step-lead); line-height: 1.35; max-width: 52ch; }
.sobre-registro { margin-top: 7.5rem; grid-template-columns: 34vw 1fr 1fr; column-gap: 4rem; }
.registro-palabra { font-size: var(--step-body); font-weight: 500; }
.registro { font-size: var(--step-body); }
.registro li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; }
.registro li span:last-child { color: var(--muted); }

/* ---------- Questions, as reading text ---------- */
.preguntas { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; padding: clamp(6rem, 10vw, 9rem) var(--margin); background: var(--surface); }
.preguntas h2 { grid-column: 1 / 4; font-size: var(--step-lead); }
.respuestas { grid-column: 5 / 13; columns: 2; column-gap: 3.5rem; line-height: 1.55; }
/* Each question is a heading set as a run-in: it opens the paragraph of its answer. */
.respuestas .item { break-inside: avoid; margin-bottom: 1.25rem; }
.respuestas h3 { display: inline; font-size: inherit; font-weight: 500; line-height: inherit; letter-spacing: 0; }
.respuestas .item p { display: inline; }

/* ---------- Contact rows ---------- */
.contacto { background: var(--ink); color: var(--bg); }
.renglon { display: flex; align-items: flex-end; gap: 1.5rem; min-height: clamp(5.5rem, 10vw, 9.5rem); padding: 0 var(--margin) 1.2rem; font-size: var(--step-head); line-height: 1; letter-spacing: -0.02em; text-decoration: none; }
.renglon-alt { background: #1c1c1c; }
a.renglon:hover { color: var(--accent); }
.renglon-primero { justify-content: space-between; align-items: center; padding-top: 1.2rem; }
.renglon-foto { flex: none; width: clamp(4.5rem, 8vw, 7.5rem); aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.renglon-saludo { background: var(--accent); color: var(--on-accent); align-items: center; padding-top: 1.2rem; }
.flecha { display: inline-grid; place-items: center; width: 0.95em; height: 0.95em; border-radius: 50%; background: var(--on-accent); color: var(--accent); transition: transform 200ms var(--ease-out); }
.flecha svg { width: 50%; height: 50%; }
a.renglon-saludo:hover { color: var(--on-accent); }
a.renglon-saludo:hover .flecha { transform: translateX(0.15em); }
.datos a, .respuestas a { text-underline-offset: 0.18em; }

/* ---------- Footer: the number is the headline ---------- */
.pie { min-height: 72svh; display: grid; grid-template-rows: auto 1fr auto; padding: 2.5rem var(--margin) 1.5rem; background: var(--accent); color: var(--on-accent); }
.pie-arriba { display: grid; grid-template-columns: 2fr 1fr auto; gap: 2rem; font-size: var(--step-small); }
.marca-pie { font-weight: 700; font-size: var(--step-lead); }
.marca-pie .marca-d { color: var(--on-accent); }
.marca-pie .marca-m { color: var(--ink); }
.pie-arriba-link { align-self: start; }
.pie-numero { align-self: end; font-size: var(--step-display); font-weight: 700; line-height: 0.9; letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; }
.pie-numero:hover { color: var(--ink); }
.pie-abajo { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; font-size: var(--step-small); }
.pie a { text-underline-offset: 0.2em; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .titular .linea > span { transform: translateY(105%); animation: subir 900ms var(--ease-out) forwards; }
  .titular .linea:nth-child(2) > span { animation-delay: 110ms; }
  .portada-barra { opacity: 0; animation: aparecer 500ms ease 450ms forwards; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@keyframes subir { to { transform: none; } }
@keyframes aparecer { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .banda img { animation: none; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}

/* The phone's quote bar: hidden on desktop, shown on phones between the red sections. */
.barra-wa { display: none; }

/* Narrow desktops: pull the ledger left so the preview never covers the years. */
@media (max-width: 74.99rem) { .libro { margin-left: 6vw; } }

/* ---------- Tablet ---------- */
@media (max-width: 63.99rem) {
  .libro { margin-left: 0; }
  .vista { display: none; }
  .taller, .proceso, .preguntas, .nombre-cabeza { grid-template-columns: 1fr; }
  .taller-texto, .taller-foto, .proceso-texto, .boleta, .preguntas h2, .respuestas, .nombre h2, .nombre-cabeza p { grid-column: 1; }
  .taller-foto { margin-top: 3rem; max-width: 36rem; }
  .boleta { margin-top: 3rem; }
  .nombre-cabeza p { margin-top: 1.25rem; }
  .respuestas { margin-top: 2rem; }
  .servicios li:nth-child(even) { padding-left: 12vw; }
  .sobre-fila { grid-template-columns: 1fr; row-gap: 2rem; }
  .sobre-registro { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .registro-palabra { grid-column: 1 / -1; }
  .pie { min-height: 0; row-gap: 4rem; }
  .proyectos { min-height: 0; }
}

/* ---------- Phone ---------- */
@media (max-width: 47.99rem) {
  .portada::after { inset: 46% 0 0; }
  .titular { transform: translateY(-80%); }
  .capa-abajo { clip-path: inset(46% 0 0 0); }
  .titular { top: 46%; font-size: 15.5vw; }
  .portada-barra { padding: 1rem var(--margin); }
  .portada-barra .boton { min-height: 44px; padding: 0 0.9rem; }
  .portada-sub { left: var(--margin); transform: translateY(-50%); text-align: left; font-size: var(--step-lead); top: calc(73% + 0.18 * 15.5vw); }
  .barra-wa {
    position: fixed; z-index: 10; inset: auto 0 0; display: flex; align-items: center; justify-content: center; min-height: 56px;
    padding-bottom: env(safe-area-inset-bottom); background: var(--accent); color: var(--on-accent); font-weight: 500; text-decoration: none;
    transform: translateY(100%); transition: transform 200ms var(--ease-out);
  }
  .barra-wa.is-on { transform: none; }
  .barra-wa:focus-visible { outline-color: var(--on-accent); outline-offset: -4px; }
  html { scroll-padding-bottom: 72px; }
  .proyectos, .taller, .hacemos, .proceso, .sobre, .preguntas { padding-block: 4rem; }
  .nombre { padding-top: 4rem; padding-bottom: 3rem; }
  .sobre-registro { margin-top: 3.5rem; }
  .fila { row-gap: 0.15rem; padding: 0.75rem 0; }
  .paso:not(.paso-final) { row-gap: 0; padding: 0.5rem 0; }
  .pestanas, .control { margin-top: 1.5rem; }
  .etapa-texto { margin-top: 1rem; }
  .taller-foto { aspect-ratio: 4 / 3; margin-top: 1.5rem; }
  .fila { grid-template-columns: 1fr auto; min-height: 3.25rem; }
  .fila-tipo { grid-column: 1; grid-row: 2; }
  .fila-anio { grid-column: 2; grid-row: 1; }
  .servicios li { font-size: 9vw; line-height: 1; padding: 0.22em 0; text-wrap: balance; }
  .servicios li:nth-child(even) { padding-left: 0; }
  .banda img { height: auto; aspect-ratio: 4 / 5; }
  .especimenes { grid-template-columns: 1fr; height: auto; overflow: visible; margin-top: 3rem; row-gap: 1.5rem; }
  .especimen { height: auto; max-height: none; overflow: visible; }
  .especimen-palabra { font-size: 26vw; }
  .proceso-fotos { grid-template-columns: 1fr 1fr; }
  .boleta { padding: 0.5rem 1.25rem 3.5rem; }
  .paso:not(.paso-final) { flex-wrap: wrap; }
  .paso:not(.paso-final) > span:first-child { flex: 1 1 100%; }
  .puntos { display: none; }
  .paso:not(.paso-final) > span:last-child { color: var(--muted); font-size: var(--step-small); }
  .paso-final { margin: 1.75rem -1.25rem 0; padding: 0.5rem 1.25rem; }
  .respuestas { columns: 1; }
  .sobre-registro { grid-template-columns: 1fr; row-gap: 1.5rem; }
  .renglon { font-size: 8.6vw; min-height: 5.25rem; }
  .pie-arriba { grid-template-columns: 1fr; gap: 1rem; }
  .pie-numero { font-size: 13.5vw; }
  .pie-abajo { flex-direction: column; gap: 0.5rem; }
  .js [data-reveal] { opacity: 1; }
}
