/* HOME — una sola página en escenas fijas (sticky).
   El scroll vertical es el hilo: el punto rojo abre, el manifiesto se enciende,
   las capacidades se suceden, las cuatro piezas se juntan y el trabajo desfila
   en horizontal. Sin JS o con movimiento reducido, todo se ve como una página normal. */
@font-face {
  font-family: Clash;
  src: url("../fonts/ClashDisplay-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Clash;
  src: url("../fonts/ClashDisplay-Semibold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}
:root {
  --paper: #f5f4ef;
  --ink: #191918;
  --red: #c62a1d;
  --stone: #e6e4dd;
  --mute-on-ink: #a3a29b;
  --mute-on-paper: #64645e;
  --line-on-ink: #333331;
  --line-on-paper: #d4d3cc;
  --f-display: Clash, Arial, sans-serif;
  --f-body: Arial, Helvetica, sans-serif;
  --t-hero: min(15vw, 25vh, 236px);
  --t-h1: clamp(40px, min(7.6vw, 13vh), 116px);
  --t-h2: clamp(30px, min(5vw, 9vh), 72px);
  --t-lead: clamp(17px, 1.5vw, 22px);
  --gut: max(clamp(20px, 4.2vw, 80px), env(safe-area-inset-left, 0px));
  --gut-r: max(clamp(20px, 4.2vw, 80px), env(safe-area-inset-right, 0px));
}
* {
  box-sizing: border-box;
}
html {
  background: var(--ink);
  scroll-padding-top: 0;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: inherit;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
::selection {
  background: var(--red);
  color: #fff;
}
h1,
h2,
h3 {
  font-family: var(--f-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  line-height: 0.9;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 40;
  top: 8px;
  left: 8px;
  padding: 15px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.dot {
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  background: var(--red);
  margin-left: 0.04em;
}
.label,
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow {
  color: var(--mute);
  display: flex;
  gap: 0.9em;
  align-items: center;
}
.eyebrow b {
  color: var(--red);
  font-weight: 600;
}
.lead {
  font-size: var(--t-lead);
  line-height: 1.45;
  max-width: 38ch;
}

/* ---------- escenas ---------- */
.ch {
  position: relative;
  --p: 0;
}
.ch.dark {
  background: var(--ink);
  color: var(--paper);
  --mute: var(--mute-on-ink);
  --line: var(--line-on-ink);
}
.ch.light {
  background: var(--paper);
  color: var(--ink);
  --mute: var(--mute-on-paper);
  --line: var(--line-on-paper);
}
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}
.wrap {
  max-width: 1680px;
  margin: 0 auto;
  padding-left: var(--gut);
  padding-right: var(--gut-r);
  padding-block: 104px 112px;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 3vw, 40px);
}

/* ---------- HUD ---------- */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 31;
  pointer-events: none;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--red);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
/* El tono (claro/oscuro) lo marca la escena que hay debajo: data-tone en <html> */
.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  color: var(--ink);
}
[data-tone="dark"] .hud {
  color: var(--paper);
}
[data-tone="dark"] .hud-num {
  -webkit-text-stroke-color: var(--paper);
}
.hud span {
  transition: opacity 0.3s;
}
:root:not(.js) .hud-num,
[data-last] .hud-num,
[data-last] .hud-claim {
  opacity: 0;
}
.hud-chap {
  position: absolute;
  top: calc(30px + env(safe-area-inset-top, 0px));
  left: calc(var(--gut) + 150px);
}
.hud-num {
  position: absolute;
  right: var(--gut-r);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(56px, 11vw, 170px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
}
.hud-claim {
  position: absolute;
  left: var(--gut);
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  opacity: 0.7;
}
.brand {
  position: fixed;
  z-index: 25;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: var(--gut);
  display: block;
  padding: 4px 0;
}
.brand img {
  display: block;
  width: 112px;
  height: auto;
}
.brand .on-dark,
[data-tone="dark"] .brand .on-light {
  display: none;
}
[data-tone="dark"] .brand .on-dark {
  display: block;
}

/* ---------- navegación ---------- */
.nav {
  position: fixed;
  z-index: 30;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: var(--gut-r);
  display: flex;
  gap: 2px;
  padding: 4px;
  background: rgba(25, 25, 24, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--paper);
}
.nav-links {
  display: flex;
  gap: 2px;
  align-items: stretch;
}
.nav a,
.nav button {
  font: 600 11px/1 var(--f-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: none;
  border: 0;
  padding: 10px 12px;
  min-height: 38px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.nav a:hover,
.nav a.cur,
.nav button:hover {
  background: #2e2e2c;
}
.nav a.cta {
  background: var(--red);
}
.nav .langs {
  display: flex;
  align-items: center;
  margin-left: 6px;
  color: var(--mute-on-ink);
}
.nav .lang-btn {
  padding: 10px 6px;
  color: var(--mute-on-ink);
}
.nav .lang-btn.active {
  color: var(--paper);
}
.menu-toggle {
  display: none !important;
}

/* ---------- 00 hero ---------- */
.hero .wrap {
  align-items: flex-start;
}
.hero h1 {
  font-size: var(--t-hero);
  line-height: 0.86;
  position: relative;
  z-index: 2;
}
.hero h1 .ln {
  display: block;
  opacity: calc(1 - var(--p) * 2.4);
}
.hero .big-dot {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  background: var(--red);
  margin-left: 0.04em;
  position: relative;
  z-index: 3;
  transform: scale(calc(1 + var(--p) * var(--p) * 160));
  transform-origin: 50% 50%;
  will-change: transform;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
  opacity: calc(1 - var(--p) * 3);
}
.cue {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: calc(1 - var(--p) * 4);
  text-decoration: none;
}
.cue i {
  display: block;
  width: 1px;
  height: 42px;
  background: currentColor;
  animation: cue 1.8s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue {
  0% {
    transform: scaleY(0);
  }
  50% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}
.hero-photo {
  position: absolute;
  z-index: 1;
  margin: 0;
  right: var(--gut-r);
  top: 50%;
  width: min(24vw, 42vh, 380px);
  aspect-ratio: 2 / 3;
  transform: translate3d(0, calc(-50% - var(--p) * 30vh), 0);
  opacity: calc(1 - var(--p) * 2.2);
}
.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}
.hero-photo figcaption {
  margin-top: 10px;
  color: var(--mute);
}

/* ---------- 01 manifiesto ---------- */
.pillars {
  display: flex;
  flex-direction: column;
}
.pillar {
  font-family: var(--f-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.98;
  font-size: clamp(28px, min(4.8vw, 7.4vh), 84px);
  padding: 0.1em 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}
.pillar small {
  font: 600 11px/1 var(--f-body);
  letter-spacing: 0.14em;
  color: var(--mute);
  flex: none;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 40px;
}
.link {
  font: 600 12px/1 var(--f-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-bottom: 1px solid currentColor;
}
.link:hover {
  color: var(--red);
}

/* ---------- 02 capacidades ---------- */
.caps-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
}
.caps-grid > * {
  min-width: 0;
}
.caps-index {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.caps-index span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--mute);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.caps-index span.on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.cap-stack {
  display: grid;
  gap: 48px;
}
.cap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
}
.cap > * {
  min-width: 0;
}
.cap .num {
  color: var(--red);
  display: block;
  margin-bottom: 14px;
}
.cap h3 {
  font-size: clamp(44px, min(9.4vw, 17vh), 150px);
  letter-spacing: -0.04em;
  line-height: 0.86;
}
.cap h3.long {
  font-size: clamp(38px, min(6.4vw, 12vh), 104px);
}
.cap .desc {
  margin-bottom: 18px;
  color: var(--mute);
  max-width: 40ch;
}
.cap ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}
.cap li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(16px, 1.4vw, 20px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.cap li::after {
  content: "→";
  color: var(--mute);
}

/* ---------- 03 working together ---------- */
.conv .wrap {
  align-items: center;
  text-align: center;
}
.conv {
  --q: min(1, calc(var(--p) * 1.75));
}
.pieces {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25em 0.45em;
  font-family: var(--f-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  font-size: clamp(34px, min(7vw, 12vh), 110px);
  line-height: 0.95;
}
.pieces span {
  display: inline-block;
}
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.intro h2 {
  font-size: var(--t-h2);
}
.intro .lead {
  margin: 0 auto;
  max-width: 46ch;
}
.one {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.2em;
}
.one::before,
.one::after {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--red);
}

/* ---------- 04 trabajo ---------- */
.work .wrap {
  max-width: none;
  padding-right: 0;
}
.work-head {
  max-width: calc(1680px - var(--gut) - var(--gut-r));
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px 40px;
  padding-right: var(--gut-r);
}
.work-head h2 {
  font-size: clamp(36px, min(6vw, 9.5vh), 100px);
}
.work-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.track {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 1.6vw, 20px);
  padding-right: var(--gut-r);
}
.case {
  width: min(28vw, 380px, 44vh);
  min-width: 250px;
  aspect-ratio: 4 / 5;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 22px 24px;
  background: var(--stone);
  color: var(--ink);
  position: relative;
  overflow: hidden;
  max-width: 100%;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.case.ink {
  background: var(--ink);
  color: var(--paper);
}
.case.own {
  background: var(--red);
  color: #fff;
}
.case:hover {
  transform: translateY(-6px);
}
article.case:hover {
  transform: none;
}
.case:focus-visible {
  outline-offset: -4px;
  outline-color: currentColor;
}
.case .top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.case h3 {
  font-size: clamp(30px, min(3.4vw, 6vh), 52px);
  letter-spacing: -0.035em;
  line-height: 0.9;
  position: relative;
  z-index: 1;
}
.case .bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.case .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.case .tags span {
  font-size: 10px;
  padding: 6px 8px;
  border: 1px solid currentColor;
  opacity: 0.8;
}
.case .arrow {
  font-size: 22px;
  line-height: 1;
}
.case .ghost {
  position: absolute;
  right: -0.05em;
  bottom: 0.55em;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: min(18vw, 260px, 30vh);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px currentColor;
  opacity: 0.16;
  pointer-events: none;
}

/* ---------- 05 contacto ---------- */
.contact .wrap {
  gap: 34px;
}
.contact h2 {
  font-size: min(13vw, 22vh, 210px);
  line-height: 0.86;
}
.contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-on-ink);
}
.links a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px 20px 0;
  text-decoration: none;
  min-width: 0;
}
.links a + a {
  padding-left: 18px;
  border-left: 1px solid var(--line-on-ink);
}
.links a span {
  color: var(--mute-on-ink);
}
.links a strong {
  font-weight: 400;
  font-size: clamp(16px, 1.6vw, 21px);
  overflow-wrap: anywhere;
}
.links a:hover strong {
  color: var(--red);
}
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--mute-on-ink);
}
.foot nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--paper);
}

/* ====== capa de movimiento (solo con JS y sin movimiento reducido) ====== */
.js .ch.pin {
  height: calc(var(--len) * 100vh);
  height: calc(var(--len) * 100svh);
}
.js .ch.pin .stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
}
.js .ch.pin .wrap {
  height: 100%;
  min-height: 0;
}
.js .rv {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .rv.on {
  opacity: 1;
  transform: none;
}
.js .pillar.rv {
  transform: none;
  opacity: 0.16;
}
.js .pillar.rv.on {
  opacity: 1;
}
.js .pillar.rv.on small {
  color: var(--red);
}
.js .cap-stack {
  position: relative;
  display: block;
  min-height: var(--cap-h, 420px);
}
.js .cap-stack .cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}
.js .cap.rv {
  transform: translate3d(0, 40px, 0);
}
.js .cap.rv.on {
  transform: none;
}
.js .pieces span {
  transform: translate3d(
      calc(var(--dx) * (1 - var(--q))),
      calc(var(--dy) * (1 - var(--q))),
      0
    )
    rotate(calc(var(--r) * (1 - var(--q))));
  opacity: calc(0.25 + var(--q) * 0.75);
}
.js .pieces span:nth-child(1) {
  --dx: -28vw;
  --dy: -26vh;
  --r: -10deg;
}
.js .pieces span:nth-child(2) {
  --dx: 26vw;
  --dy: -30vh;
  --r: 8deg;
}
.js .pieces span:nth-child(3) {
  --dx: -24vw;
  --dy: 30vh;
  --r: 7deg;
}
.js .pieces span:nth-child(4) {
  --dx: 22vw;
  --dy: 26vh;
  --r: -6deg;
}
.js .track {
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero-photo {
    display: none;
  }
}
@media (max-width: 860px) {
  .hud-chap,
  .hud-claim {
    display: none;
  }
  .brand img {
    width: 92px;
  }
  .menu-toggle {
    display: flex !important;
    gap: 10px;
  }
  .nav {
    flex-direction: column;
    align-items: flex-end;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    min-width: 200px;
    padding-top: 4px;
  }
  .nav.is-open .nav-links {
    display: flex;
  }
  .nav-links a {
    min-height: 46px;
    font-size: 12px;
  }
  .nav .langs {
    margin: 4px 0 0;
    padding-left: 6px;
  }
  .work-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .work-side .lead {
    display: none;
  }
  .caps-grid,
  .cap {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .cap .desc {
    display: none;
  }
  .cap li {
    padding: 9px 0;
    font-size: 15px;
  }
  .links {
    grid-template-columns: minmax(0, 1fr);
  }
  .links a + a {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line-on-ink);
  }
  .wrap {
    padding-block: 88px 92px;
  }
  .case {
    width: min(76vw, 340px);
  }
  .pillar small {
    display: none;
  }
  .pillar {
    font-size: clamp(28px, 9vw, 44px);
  }
  .hero h1 {
    font-size: min(17.5vw, 25vh);
  }
  .hud-num {
    font-size: 56px;
  }
  .js .pieces span:nth-child(1) {
    --dx: -20vw;
    --dy: -22vh;
  }
  .js .pieces span:nth-child(2) {
    --dx: 18vw;
    --dy: -26vh;
  }
  .js .pieces span:nth-child(3) {
    --dx: -16vw;
    --dy: 24vh;
  }
  .js .pieces span:nth-child(4) {
    --dx: 14vw;
    --dy: 20vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cue i {
    animation: none;
  }
  .case {
    transition: none;
  }
}
