:root {
  --black: #0a0a0a;
  --white: #f6f5f2;
  --ink: #555555;
  --pink: #f0569b;
  --img-ratio: 1.7933; /* 1284 / 716 (hero videos) */
  --hero-h: min(100svh, calc(100vw / var(--img-ratio)));
  --gutter: clamp(16px, 4vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: "Montserrat", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Anything with .blend inverts against whatever is under it, so the same
   white text reads on the white typographic base and on the dark textures. */
.blend { color: #fff; mix-blend-mode: difference; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--gutter);
  font-size: 13px; letter-spacing: .02em;
  pointer-events: none;
}
.nav a { pointer-events: auto; }
.nav-logo { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.nav-links { display: flex; gap: clamp(14px, 2.4vw, 32px); }
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: var(--hero-h);
  overflow: hidden;
  background: #fff;
  cursor: crosshair;
  isolation: isolate;
}
.hero-stage { position: absolute; inset: 0; }
.hero-stage .fluid-canvas,
.hero-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: cover;
}
.hero.has-gl .hero-fallback { display: none; }

/* A box with the exact image proportions, cropped like `cover`, so the
   HTML header lands where it sits in the artwork. */
.hero-frame {
  position: absolute; left: 50%; top: 50%;
  width: max(100%, calc(var(--hero-h) * var(--img-ratio)));
  aspect-ratio: 1284 / 716;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-id {
  position: absolute; left: 8.4%; top: 8.4%;
  font-size: clamp(9px, 1.45vw, 26px);
  line-height: 1.25;
  pointer-events: auto;
}
.hero-kicker { font-weight: 400; font-size: .82em; }
.hero-name { font-weight: 400; font-size: 1.12em; letter-spacing: .01em; margin-bottom: .5em; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .45em 1.05em;
  border: 1.5px solid currentColor; border-radius: 999px;
  font-style: italic; font-size: .62em; letter-spacing: .01em;
  transition: background-color .35s, color .35s;
}
.hero-id .pill:hover { background: #fff; color: #000; }

.hero-bottom {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(12px, 2.4vw, 28px);
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-size: 12px; letter-spacing: .04em;
  pointer-events: none;
}
.hero-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-material { display: inline-block; margin-left: .8em; text-transform: lowercase; transition: opacity .3s, transform .3s; }
.hero-material.swap { opacity: 0; transform: translateY(6px); }
.hero-hint { opacity: .8; text-align: right; }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 12vw, 180px) var(--gutter); }
.label { font-size: 13px; letter-spacing: .04em; margin-bottom: clamp(28px, 4vw, 56px); opacity: .7; }

.intro { background: var(--white); color: var(--black); }
.intro-big {
  font-size: clamp(28px, 4.6vw, 76px);
  font-weight: 500; line-height: 1.06; letter-spacing: -.035em;
  max-width: 17ch;
}
.intro-big em { font-style: italic; font-weight: 400; color: var(--pink); }
.intro-cols {
  display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap;
  margin-top: clamp(48px, 7vw, 110px);
}
.intro-cols p { max-width: 34ch; font-size: clamp(15px, 1.3vw, 19px); line-height: 1.45; }
.pill.dark { font-size: 15px; padding: .7em 1.6em; }
.pill.dark:hover { background: var(--black); color: var(--white); }

.cta { background: var(--white); color: var(--black); text-align: left; }
.cta-big {
  font-size: clamp(48px, 11vw, 190px); font-weight: 600; letter-spacing: -.05em; line-height: .9;
  margin-bottom: clamp(36px, 5vw, 72px);
}
.cta-big em { color: var(--pink); font-style: normal; }
.pill.big { font-size: clamp(16px, 1.6vw, 22px); }

.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--gutter);
  font-size: 12px; letter-spacing: .03em; color: rgba(246, 245, 242, .6);
}
.footer a:hover { color: var(--white); }

/* scroll-in */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s, transform .9s cubic-bezier(.2, .7, .1, 1); }
[data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .hero-hint { display: none; }
  .nav-links a:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- mobile hero: header under the nav, artwork at its own ratio ---------- */
@media (max-width: 760px) {
  .hero {
    height: auto;
    padding: 150px 0 56px;
    transition: background-color .6s;
  }
  .hero.is-dark { background: #000; }
  .hero-stage { position: relative; inset: auto; width: 100%; aspect-ratio: 1284 / 716; }
  .hero-frame {
    left: 0; top: 0; transform: none;
    width: 100%; height: 150px; aspect-ratio: auto;
  }
  .hero-id { left: var(--gutter); top: 70px; font-size: 17px; }
  .hero-id .pill { font-size: 12px; }
}

/* ---------- hero header (matches the reference: grey caps, no extras) ---------- */
.hero { --hero-ink: #555; }
.hero.is-dark { --hero-ink: #d9d9d9; }
.hero-header {
  position: absolute; z-index: 2; inset: 0 0 auto 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 5vw 9vw 0 5.75vw;
  color: var(--hero-ink);
  text-transform: uppercase;
  line-height: 1.12;
  transition: color .5s;
  pointer-events: none;
}
.hero-header a { pointer-events: auto; }
.hero-id { display: flex; flex-direction: column; }
.hero-header .hero-kicker { font-size: clamp(12px, 1.6vw, 30px); font-weight: 400; letter-spacing: .01em; }
.hero-header .hero-name { font-size: clamp(14px, 1.95vw, 36px); font-weight: 700; letter-spacing: .01em; margin: 0; }
.hero-nav { display: flex; gap: 5.5vw; font-size: clamp(12px, 1.6vw, 30px); letter-spacing: .01em; }
.hero-nav a { position: relative; }
.hero-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.15em; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}
.hero-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

@media (max-width: 760px) {
  .hero { padding: 96px 0 40px; }
  .hero-header { padding: 24px var(--gutter) 0; }
  .hero-nav { gap: 20px; }
}
.hero-header .hero-id { position: static; font-size: inherit; line-height: 1.12; }
@media (max-width: 760px) { .hero-header .hero-id { position: static; } }

/* ---------- sobre mí ---------- */
.about {
  --ink: #555;
  background: #fff; color: var(--ink);
  padding: clamp(72px, 10vw, 160px) 0 0;
  overflow: hidden;
}
.about-top {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 0 9vw 0 5.75vw; margin-bottom: clamp(28px, 4vw, 56px);
}
.about-top .label { margin: 0; color: var(--ink); }

/* giant headline with media pills */
.about-head {
  padding: 0 5vw 0 5.75vw;
  font-size: clamp(34px, 6.2vw, 120px);
  font-weight: 400; line-height: 1.02; letter-spacing: -.035em;
  text-transform: uppercase;
}
.about-head .line { display: block; overflow: hidden; padding-bottom: .04em; }
.about-head .line:nth-child(2) { padding-left: .9em; }
.about-head .line:nth-child(n+3) { text-align: right; }
@media (min-width: 761px) { .about-head .line { white-space: nowrap; } }
.about-head .accent { font-style: italic; font-weight: 300; color: var(--pink); letter-spacing: -.02em; }
.about-head .in {
  display: inline-block; transform: translateY(105%);
  transition: transform 1.1s cubic-bezier(.2, .8, .1, 1);
}
.about-head .line:nth-child(2) .in { transition-delay: .09s; }
.about-head .line:nth-child(3) .in { transition-delay: .18s; }
.about-head .line:nth-child(4) .in { transition-delay: .27s; }
.about-head.in .in { transform: none; }
.about-head strong { font-weight: 700; }
.outline {
  font-style: normal; font-weight: 700; color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}
/* photo + copy */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 7vw, 120px); align-items: start;
  padding: clamp(56px, 8vw, 130px) 9vw 0 5.75vw;
}
.about-photo { position: relative; margin: 0; }
.about-photo-inner {
  aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: #e9e9e9;
  clip-path: inset(0 0 0 0 round 2px);
}
.about-photo-inner img {
  display: block; width: 100%; height: 118%;
  object-fit: cover; object-position: 50% 80%;
  transform: translateY(var(--py, 0px)); will-change: transform;
}
.about-photo figcaption { margin-top: 14px; font-size: 12px; letter-spacing: .04em; opacity: .7; }
.badge {
  position: absolute; right: -54px; top: -54px;
  width: clamp(110px, 11vw, 168px); height: auto;
  animation: spin 18s linear infinite;
}
.badge-bg { fill: var(--pink); }
.badge-text { fill: #fff; font-size: 16px; font-weight: 600; text-transform: uppercase; }
.badge-mark { fill: #fff; font-size: 46px; font-weight: 700; letter-spacing: -.02em; }
@keyframes spin { to { transform: rotate(360deg); } }

.about-copy { padding-top: clamp(0px, 4vw, 64px); }
.about-lead {
  font-size: clamp(22px, 2.5vw, 40px); line-height: 1.22; letter-spacing: -.02em;
  color: #222; max-width: 26ch; margin-bottom: clamp(20px, 2.4vw, 36px);
}
.hl { position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: -.08em; right: -.08em; bottom: .08em; height: .38em;
  background: var(--pink); opacity: .28; z-index: -1;
  transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.2, .8, .1, 1) .5s;
}
.about-lead.in .hl::after { transform: scaleX(1); }
.about-lead { position: relative; z-index: 0; }
.about-body { font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; max-width: 48ch; color: #555; }
.about-body + .about-body { margin-top: 1em; }

.services { list-style: none; margin-top: clamp(36px, 4.5vw, 72px); border-top: 1.5px solid #222; }
.services li {
  position: relative; display: grid; grid-template-columns: 3.2em 1fr auto 1.4em; align-items: baseline; gap: 12px;
  padding: 18px 0; border-bottom: 1px solid #d6d6d6; color: #222; cursor: default;
  isolation: isolate; overflow: hidden;
}
.services li::before {
  content: ""; position: absolute; inset: 0; background: #111; z-index: -1;
  transform: scaleY(0); transform-origin: bottom; transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}
.services li:hover { color: #fff; }
.services li:hover::before { transform: scaleY(1); }
.services .n { font-size: 12px; letter-spacing: .06em; opacity: .6; padding-left: 8px; }
.services .s { font-size: clamp(18px, 1.8vw, 28px); font-weight: 600; letter-spacing: -.01em; text-transform: uppercase; transition: transform .45s cubic-bezier(.2, .8, .1, 1); }
.services li:hover .s { transform: translateX(10px); }
.services .d { font-size: 12px; letter-spacing: .04em; opacity: .65; text-align: right; }
.services .arr { opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .45s; color: var(--pink); }
.services li:hover .arr { opacity: 1; transform: none; }

/* marquee */
.marquee {
  margin-top: clamp(72px, 10vw, 150px);
  background: #555; color: #fff; overflow: hidden; white-space: nowrap;
  padding: clamp(9px, 1vw, 15px) 0;
  transform: rotate(-1.5deg) scale(1.03);
  margin-bottom: clamp(24px, 3vw, 40px);
}
.marquee-track { display: inline-flex; animation: marquee 26s linear infinite; }
.marquee span { font-size: clamp(18px, 2.3vw, 36px); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; padding-right: .6em; }
.marquee i { font-style: normal; color: var(--pink); margin: 0 .35em; }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 760px) {
  .about-top { padding: 0 var(--gutter); }
  .about-head { padding: 0 var(--gutter); font-size: clamp(30px, 9.6vw, 60px); }
  .about-head .line:nth-child(2) { padding-left: 0; }
  .about-head .line:nth-child(n+3) { text-align: left; }
  .about-grid { grid-template-columns: 1fr; padding: 48px var(--gutter) 0; }
  .about-photo { max-width: 78%; }
  .badge { right: -44px; top: -40px; width: 104px; }
  .services .d { display: none; }
  .services li { grid-template-columns: 2.6em 1fr 1.2em; }
}
@media (prefers-reduced-motion: reduce) {
  .badge, .marquee-track { animation: none; }
  .about-head .in { transform: none; transition: none; }
}

/* "¡Hola!" script title */
.about-hola {
  font-family: "Corinthia", cursive; font-weight: 700;
  text-transform: none; letter-spacing: 0;
  font-size: clamp(120px, 21vw, 360px); line-height: .8;
  color: var(--pink);
}
.about-hola .line { padding: .3em .25em .4em .25em; margin: -.3em 0 -.4em -.25em; }
.about-hola .in { transform: translateY(110%) rotate(-4deg); }
.about-hola.in .in { transform: rotate(-4deg); }
@media (max-width: 760px) { .about-hola { font-size: 34vw; } }

/* ¡Hola! now sits in the right column, above the copy */
.about-copy .about-hola {
  padding: 0; font-size: clamp(96px, 11vw, 200px);
  margin: 0 0 clamp(28px, 3.4vw, 56px) -.1em;
}
.about-grid { padding-top: clamp(24px, 3vw, 48px); }
.about-copy { padding-top: 0; }
@media (max-width: 760px) {
  .about-copy .about-hola { font-size: 30vw; margin-top: 8px; }
}

/* ---------- cómo trabajo ---------- */
.process { background: #0f0f0f; color: #f2f2f2; padding: clamp(80px, 11vw, 170px) 0; }
.process-inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 120px);
  padding: 0 9vw 0 5.75vw;
}
.process-side { position: sticky; top: 14vh; align-self: start; }
.process-side .label { color: #9a9a9a; opacity: 1; }
.process-title {
  font-size: clamp(44px, 6.4vw, 116px); font-weight: 700; line-height: .95;
  letter-spacing: -.035em; text-transform: uppercase;
}
.process-title .script {
  display: block; font-family: "Corinthia", cursive; font-weight: 700;
  text-transform: none; letter-spacing: 0; color: var(--pink);
  font-size: 1.55em; line-height: .7; margin: .02em 0 0 .35em; transform: rotate(-4deg);
}
.process-intro { margin-top: clamp(28px, 3vw, 48px); max-width: 30ch; font-size: clamp(15px, 1.2vw, 19px); line-height: 1.6; color: #b5b5b5; }
.process-count {
  margin-top: clamp(28px, 4vw, 64px); font-size: 13px; letter-spacing: .08em; color: #8a8a8a;
  font-variant-numeric: tabular-nums;
}
.process-count [data-step-now] { color: var(--pink); font-size: 2.2em; font-weight: 700; letter-spacing: -.02em; vertical-align: -.12em; }

.steps { list-style: none; position: relative; padding-left: clamp(28px, 3vw, 48px); }
.steps-rail { position: absolute; left: -.5px; top: 10px; bottom: 10px; width: 2px; background: #2c2c2c; }
.steps-fill { position: absolute; inset: 0; background: var(--pink); transform-origin: top; transform: scaleY(var(--p, 0)); }
.step {
  position: relative; display: grid; grid-template-columns: clamp(64px, 7vw, 120px) 1fr; gap: clamp(12px, 2vw, 32px);
  padding: clamp(36px, 5vw, 72px) 0; border-bottom: 1px solid #222;
  opacity: .32; transition: opacity .6s;
}
.step:first-of-type { padding-top: 0; }
.step::before {
  content: ""; position: absolute; left: calc(-1 * clamp(28px, 3vw, 48px) - 5px); top: calc(clamp(36px, 5vw, 72px) + .9em);
  width: 11px; height: 11px; border-radius: 50%; background: #0f0f0f; border: 1.5px solid #555;
  transition: background .4s, border-color .4s, transform .4s;
}
.step:first-of-type::before { top: .9em; }
.step.is-active, .step.is-done { opacity: 1; }
.step.is-active::before, .step.is-done::before { background: var(--pink); border-color: var(--pink); }
.step.is-active::before { transform: scale(1.35); }
.step-n {
  font-size: clamp(40px, 5vw, 84px); font-weight: 700; line-height: .9; letter-spacing: -.04em;
  color: #3a3a3a; transition: color .5s; font-variant-numeric: tabular-nums;
}
.step.is-active .step-n { color: var(--pink); }
.step-title { font-size: clamp(22px, 2.3vw, 38px); font-weight: 600; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.05; }
.step-text { margin-top: 14px; max-width: 44ch; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; color: #bdbdbd; }
.step-tags { margin-top: 16px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #7d7d7d; }

@media (max-width: 760px) {
  .process-inner { grid-template-columns: 1fr; padding: 0 var(--gutter); }
  .process-side { position: static; }
  .process-count { display: none; }
  .step { grid-template-columns: 52px 1fr; }
}
@media (prefers-reduced-motion: reduce) { .step { opacity: 1; } }

/* ---------- proyectos web ---------- */
.work { background: #fff; color: #555; padding: clamp(56px, 6vw, 96px) 9vw clamp(56px, 6vw, 96px) 5.75vw; }
.work-head {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 24px;
  margin-bottom: clamp(28px, 3.5vw, 56px);
}
.work-head .label { grid-column: 1 / -1; margin: 0 0 clamp(16px, 2vw, 28px); color: #555; }
.work-title {
  font-size: clamp(40px, 5.5vw, 100px); font-weight: 700; line-height: .9;
  letter-spacing: -.04em; text-transform: uppercase;
}
.work-title .script {
  font-family: "Corinthia", cursive; font-weight: 700; text-transform: none; letter-spacing: 0;
  color: var(--pink); font-size: 1.5em; display: inline-block; transform: rotate(-5deg) translateY(.08em);
  margin-left: .08em;
}
.work-count { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; padding-bottom: .6em; }

.work-list { display: grid; gap: clamp(40px, 5vw, 80px); }
.project {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 5vw, 88px); align-items: center;
}
.project.flip { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.project.flip .project-media { order: 2; }
.project-media {
  background: #f0efed; border-radius: 6px; overflow: hidden;
  padding: clamp(10px, 1.6vw, 26px) clamp(8px, 1.2vw, 20px);
  transition: background-color .6s;
}
.project-media img {
  display: block; width: 100%; height: auto;
  mix-blend-mode: multiply; /* the mockups sit on white; let the panel colour show through */
  transition: transform 1s cubic-bezier(.2, .8, .1, 1);
}
.project:hover .project-media { background: #fbe3ee; }
.project:hover .project-media img { transform: translateY(-2%) scale(1.03); }
.project-n { display: block; font-size: clamp(40px, 4.4vw, 76px); font-weight: 700; letter-spacing: -.04em; line-height: 1; color: #d8d8d8; transition: color .5s; }
.project:hover .project-n { color: var(--pink); }
.project-kicker { margin-top: clamp(16px, 2vw, 28px); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.project-name { margin-top: 10px; font-size: clamp(26px, 2.6vw, 44px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; color: #333; }
.project-text { margin-top: 16px; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; max-width: 38ch; }
.project-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(20px, 2.4vw, 32px); }
.project-tags li { border: 1.5px solid currentColor; border-radius: 999px; padding: .4em 1em; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }

@media (max-width: 760px) {
  .work { padding-left: var(--gutter); padding-right: var(--gutter); }
  .work-head { grid-template-columns: 1fr; }
  .project, .project.flip { grid-template-columns: 1fr; }
  .project.flip .project-media { order: 0; }
}

/* ---------- identidad visual ---------- */
.identity { padding-top: 0; }
.id-media {
  display: grid; grid-template-columns: 3fr 3fr 5fr; /* two 4:5 boards + one 4:3 space → equal heights */
  gap: clamp(10px, 1.4vw, 20px);
}
.id-shot { margin: 0; overflow: hidden; border-radius: 6px; background: #0f2a1d; }
.id-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .8, .1, 1); }
.id-poster { aspect-ratio: 1080 / 1350; }
.id-space { height: 100%; }
.id-shot:hover img { transform: scale(1.04); }
.id-info {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(16px, 3vw, 56px); align-items: start;
  margin-top: clamp(24px, 3vw, 44px);
}
.id-info .project-n { line-height: .9; }
.id-info .project-kicker { margin-top: 4px; }
.id-info .project-text { margin-top: 0; max-width: 52ch; }
.id-info .project-tags { grid-column: 3; margin-top: 0; }
.id-project:hover .project-n { color: var(--pink); }

@media (max-width: 760px) {
  .id-media { grid-template-columns: 1fr 1fr; }
  .id-space { grid-column: 1 / -1; }
  .id-info { grid-template-columns: 1fr; }
  .id-info .project-tags { grid-column: auto; }
}
@media (max-width: 760px) { .id-space { aspect-ratio: 1195 / 896; height: auto; } }

/* clean section titles: one line, caps, small counter, hairline below */
.work-head {
  display: block;
  padding-bottom: clamp(18px, 2vw, 28px);
  border-bottom: 1px solid #dcdcdc;
}
.work-head .label { margin-bottom: clamp(12px, 1.4vw, 20px); }
.work-title { font-size: clamp(36px, 5vw, 92px); line-height: 1; letter-spacing: -.035em; }
.work-sup {
  font-size: .2em; font-weight: 500; letter-spacing: .04em;
  vertical-align: top; position: relative; top: .35em; margin-left: .5em;
  color: #9a9a9a;
}

/* ---------- diseño editorial: flipbook ---------- */
.editorial { padding-top: 0; }
.book-stage { padding: clamp(24px, 4vw, 64px) 0 clamp(8px, 1vw, 16px); overflow: hidden; }
.book {
  --page-ratio: 0.7727; /* 1978 / 2560 */
  position: relative; margin: 0 auto;
  width: min(100%, 1060px); aspect-ratio: calc(var(--page-ratio) * 2);
  perspective: 2800px;
  transition: transform .9s cubic-bezier(.645, .045, .355, 1);
}
.book.closed-front { transform: translateX(-25%); }
.book.closed-back { transform: translateX(25%); }
.sheet {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  transform-style: preserve-3d; transform-origin: left center;
  transition: transform .9s cubic-bezier(.645, .045, .355, 1);
}
.sheet.flipped { transform: rotateY(-180deg); }
.face {
  position: absolute; inset: 0; overflow: hidden; background: #fff;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 22px 26px -24px rgba(0, 0, 0, .4);
}
.face.back { transform: rotateY(180deg); }
.face img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
/* spine shading */
.face::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.face.front::after { background: linear-gradient(to right, rgba(0,0,0,.22), rgba(0,0,0,.06) 4%, transparent 10%); }
.face.back::after { background: linear-gradient(to left, rgba(0,0,0,.22), rgba(0,0,0,.06) 4%, transparent 10%); }
.sheet.turning .face::after { animation: turn-shade .9s ease-in-out; }
@keyframes turn-shade { 50% { background-color: rgba(0, 0, 0, .12); } }

/* designed cover / end pages */
.page-cover, .page-back, .page-end { display: flex; flex-direction: column; height: 100%; padding: 9% 9% 8%; }
.page-cover { background: #555; color: #fff; justify-content: space-between; }
.page-cover .pc-top { font-size: clamp(8px, 1vw, 13px); letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.page-cover .pc-title { font-size: clamp(24px, 4.4vw, 62px); font-weight: 700; line-height: .92; letter-spacing: -.035em; text-transform: uppercase; }
.page-cover .pc-script { display: block; font-family: "Corinthia", cursive; text-transform: none; letter-spacing: 0; color: var(--pink); font-size: 1.45em; line-height: .8; margin-left: .25em; transform: rotate(-5deg); }
.page-cover .pc-bottom { display: flex; justify-content: space-between; align-items: end; font-size: clamp(8px, 1vw, 13px); letter-spacing: .06em; text-transform: uppercase; }
.page-cover .pc-hint { color: var(--pink); }
.page-end { background: #fff; color: #888; justify-content: center; align-items: center; font-size: clamp(9px, 1.1vw, 14px); letter-spacing: .1em; text-transform: uppercase; }
.page-back { background: #555; color: #fff; justify-content: center; align-items: center; }
.page-back b { font-size: clamp(28px, 4vw, 56px); letter-spacing: -.03em; }
.page-back b span { color: var(--pink); }

/* page-turn corners */
.corner {
  position: absolute; bottom: 0; z-index: 200; width: 13%; aspect-ratio: 1;
  border: 0; padding: 0; background: none; cursor: pointer;
}
.corner-next { right: 0; }
.corner-prev { left: 0; }
.corner span { position: absolute; inset: auto 0 0 auto; width: 34%; aspect-ratio: 1; transition: width .35s cubic-bezier(.2, .8, .1, 1); }
.corner-prev span { inset: auto auto 0 0; }
.corner-next span { background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,.08) 50%, #f3f3f3 56%, #dcdcdc 100%); box-shadow: -3px -3px 8px -4px rgba(0,0,0,.35); border-top-left-radius: 4px; }
.corner-prev span { background: linear-gradient(225deg, transparent 50%, rgba(0,0,0,.08) 50%, #f3f3f3 56%, #dcdcdc 100%); box-shadow: 3px -3px 8px -4px rgba(0,0,0,.35); border-top-right-radius: 4px; }
.corner:hover span, .corner:focus-visible span { width: 70%; }
.corner-next span { animation: corner-hint 2.6s ease-in-out infinite; }
.corner:hover span { animation: none; }
@keyframes corner-hint { 0%, 70%, 100% { width: 34%; } 82% { width: 48%; } }
.corner[hidden] { display: none; }
.corner:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; }

.book-nav {
  display: flex; justify-content: center; align-items: center; gap: 18px;
  margin-top: clamp(18px, 2.4vw, 32px); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #777;
}
.book-nav button {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #555; background: none; color: #555;
  font-size: 16px; cursor: pointer; transition: background-color .3s, color .3s, opacity .3s;
}
.book-nav button:hover { background: #555; color: #fff; }
.book-nav button:disabled { opacity: .25; pointer-events: none; }
.book-nav span { min-width: 9.5em; text-align: center; font-variant-numeric: tabular-nums; }
.editorial-info { margin-top: clamp(32px, 4vw, 56px); }

@media (max-width: 760px) {
  .book { width: 100%; }
  .corner { width: 22%; }
}
@media (prefers-reduced-motion: reduce) {
  .book, .sheet { transition: none; }
  .corner-next span { animation: none; }
}

/* ---------- diseño editorial: dark background ---------- */
.work.editorial {
  background: #0f0f0f; color: #bdbdbd;
  padding-top: clamp(56px, 6vw, 96px);
}
.editorial .work-head { border-bottom-color: #2a2a2a; }
.editorial .work-head .label { color: #9a9a9a; }
.editorial .work-title { color: #f2f2f2; }
.editorial .work-sup { color: #7a7a7a; }
.editorial .face { box-shadow: 0 24px 40px -22px rgba(0, 0, 0, .9); }
.editorial .book-nav { color: #8a8a8a; }
.editorial .book-nav button { border-color: #f2f2f2; color: #f2f2f2; }
.editorial .book-nav button:hover { background: #f2f2f2; color: #0f0f0f; }
.editorial .project-n { color: #333; }
.editorial .id-info:hover .project-n { color: var(--pink); }
.editorial .project-name { color: #f2f2f2; }
.editorial .project-kicker { color: #9a9a9a; opacity: 1; }
.editorial .project-tags li { color: #bdbdbd; }

/* ---------- identidad: TotalCan ---------- */
.id-project-next { margin-top: clamp(64px, 8vw, 130px); padding-top: clamp(40px, 5vw, 72px); border-top: 1px solid #ececec; }
.tc-vans { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.4vw, 20px); }
.tc-van { background: #4a4a4a; aspect-ratio: 1868 / 872; }
.tc-photo-label { margin: clamp(22px, 2.6vw, 40px) 0 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.tc-photos {
  display: grid; grid-template-columns: 3fr 2fr 3fr 2fr; /* square, 2:3, square, 2:3 → equal heights */
  gap: clamp(10px, 1.4vw, 20px);
}
.tc-photo { aspect-ratio: auto; height: 100%; }
.tc-photos .tc-photo:nth-child(odd) { aspect-ratio: 1; }
@media (max-width: 760px) {
  .tc-vans { grid-template-columns: 1fr; }
  .tc-photos { grid-template-columns: 1fr 1fr; }
  .tc-photos .tc-photo { aspect-ratio: 1; height: auto; }
}

/* TotalCan brand row: logo · mascot · palette */
.tc-brand {
  display: grid; grid-template-columns: 1fr 1fr .62fr; gap: clamp(10px, 1.4vw, 20px);
  margin-bottom: clamp(10px, 1.4vw, 20px);
}
.tc-logo, .tc-mascot { aspect-ratio: 1; display: grid; place-items: center; }
.tc-logo { background: #f4f6f7; }
.tc-mascot { background: #35a8e0; }
.tc-logo img, .tc-mascot img { width: 78%; height: auto; object-fit: contain; }
.tc-mascot img { width: 84%; transform-origin: 40% 60%; }
.tc-mascot:hover img { animation: tc-hop .7s cubic-bezier(.3, .7, .4, 1) 2; }
@keyframes tc-hop { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-9%) rotate(-6deg); } 70% { transform: translateY(2%) rotate(2deg); } }
.tc-palette { display: grid; grid-template-rows: 1fr 1fr .55fr; gap: clamp(10px, 1.4vw, 20px); }
.tc-swatch {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  padding: clamp(10px, 1.2vw, 18px); border-radius: 6px; background: var(--c);
  color: #fff; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
.tc-swatch b { font-size: 13px; font-weight: 600; }
.tc-swatch.light { color: #555; border: 1px solid #e3e3e3; }
@media (max-width: 760px) {
  .tc-brand { grid-template-columns: 1fr 1fr; }
  .tc-palette { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: 1fr 1fr 1fr; }
  .tc-swatch { min-height: 72px; }
}
@media (prefers-reduced-motion: reduce) { .tc-mascot:hover img { animation: none; } }
.tc-mascot img { filter: brightness(0) invert(1); } /* orange mascot → white on the brand blue */

/* ---------- Terra & Forma: same layout as TotalCan ---------- */
.tf-logo { aspect-ratio: 1; background: #012e1a; }
.tf-pattern { aspect-ratio: 1; background: #fff; display: grid; place-items: center; border: 1px solid #ececec; }
.tf-logo img { width: 100%; height: 100%; object-fit: cover; }
.tf-pattern img { width: 82%; height: auto; mix-blend-mode: multiply; transition: transform 1.4s cubic-bezier(.2, .8, .1, 1); }
.tf-pattern:hover img { transform: rotate(45deg) scale(.9); }
.tf-brand .tc-swatch.light { color: #012e1a; border-color: #e0ddc8; }
.tf-banner { aspect-ratio: 1600 / 592; margin-bottom: 0; }
.tf-apps {
  display: grid; grid-template-columns: 4fr 4fr 3.3fr 6.7fr; /* 4:5, 4:5, ~2:3, 4:3 → equal heights */
  gap: clamp(10px, 1.4vw, 20px);
}
.tf-apps .id-shot { height: 100%; aspect-ratio: 4 / 5; }
.tf-apps .id-shot:nth-child(3) { aspect-ratio: 833 / 1300; }
.tf-apps .tf-office { aspect-ratio: 1195 / 896; }
@media (max-width: 760px) {
  .tf-apps { grid-template-columns: 1fr 1fr; }
  .tf-apps .id-shot, .tf-apps .id-shot:nth-child(3) { aspect-ratio: 4 / 5; height: auto; }
  .tf-apps .tf-office { grid-column: 1 / -1; aspect-ratio: 1195 / 896; }
}
/* fix: fixed row height so the four applications always fill the width exactly */
.tf-apps { grid-template-columns: 4fr 4fr 3.2fr 6.4fr; }
.tf-apps .id-shot, .tf-apps .id-shot:nth-child(3), .tf-apps .tf-office { aspect-ratio: auto; height: clamp(200px, 23vw, 360px); }
.tf-pattern img { width: 90%; clip-path: inset(3% 0); }
@media (max-width: 760px) {
  .tf-apps .id-shot { height: auto; aspect-ratio: 4 / 5; }
  .tf-apps .id-shot:nth-child(3) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .tf-apps .tf-office { aspect-ratio: 1195 / 896; }
}
.cta-your {
  font-family: "Corinthia", cursive; font-weight: 700; text-transform: none; letter-spacing: 0;
  color: var(--pink); font-size: 1.45em; line-height: .6;
  display: inline-block; transform: rotate(-5deg) translateY(.06em); margin-right: .08em;
}
.cta-your { margin-left: .18em; }
.cta-big { margin-bottom: clamp(56px, 7vw, 110px); }

/* Terra & Forma: three applications (brand sheet, poster, office) */
.tf-brand { margin-bottom: 0; }
.tf-apps { grid-template-columns: 4fr 4fr 6.67fr; }
.tf-apps .id-shot, .tf-apps .tf-office { height: clamp(220px, 26vw, 400px); }
@media (max-width: 760px) {
  .tf-apps { grid-template-columns: 1fr 1fr; }
  .tf-apps .id-shot { height: auto; aspect-ratio: 4 / 5; }
  .tf-apps .tf-office { grid-column: 1 / -1; aspect-ratio: 1195 / 896; }
}
.tf-apps .id-shot:nth-child(3) { height: clamp(220px, 26vw, 400px); aspect-ratio: auto; grid-column: auto; }
@media (max-width: 760px) { .tf-apps .id-shot:nth-child(3) { height: auto; aspect-ratio: 1195 / 896; grid-column: 1 / -1; } }
@media (max-width: 760px) { .hero-nav { gap: 14px; font-size: 11px; } }
@media (max-width: 760px) {
  .hero-header { flex-direction: column; gap: 14px; }
  .hero-nav { gap: 18px; font-size: 11px; white-space: nowrap; }
  .hero { padding-top: 120px; }
}
/* smaller top-right menu */
@media (min-width: 761px) { .hero-nav { font-size: clamp(11px, 1.05vw, 18px); gap: 3.2vw; letter-spacing: .04em; } }
.label .dot { color: var(--pink); font-weight: 700; font-size: 1.5em; line-height: 0; margin-left: .05em; }

/* ---------- "Últimos proyectos" main title + category subtitles ---------- */
.projects-title {
  font-size: clamp(44px, 7.6vw, 140px); font-weight: 700; line-height: .92;
  letter-spacing: -.045em; text-transform: uppercase; color: #555;
  margin-bottom: clamp(40px, 6vw, 96px);
}
.projects-title .dot { color: var(--pink); }
.work .work-title { font-size: clamp(22px, 2.4vw, 40px); letter-spacing: -.02em; }
.work .work-sup { font-size: .38em; top: .2em; }

/* Terra & Forma: garden photography row */
.tf-gardens { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 20px); }
.tf-gardens .id-shot { aspect-ratio: 6441 / 3541; }
@media (max-width: 760px) {
  .tf-gardens { grid-template-columns: 1fr 1fr; }
  .tf-gardens .id-shot:last-child { grid-column: 1 / -1; }
}

/* Terra & Forma applications: poster + office */
.tf-apps { grid-template-columns: 4fr 6.67fr; }
.tf-apps .id-shot, .tf-apps .tf-office, .tf-apps .id-shot:nth-child(3) { height: clamp(260px, 33vw, 520px); }
@media (max-width: 760px) {
  .tf-apps { grid-template-columns: 1fr; }
  .tf-apps .id-shot, .tf-apps .tf-office, .tf-apps .id-shot:nth-child(3) { height: auto; grid-column: auto; }
  .tf-apps .id-shot:first-child { aspect-ratio: 4 / 5; }
  .tf-apps .tf-office { aspect-ratio: 1195 / 896; }
}
@media (min-width: 761px) {
  .tf-apps { grid-template-columns: 3fr 5fr; } /* 4:5 poster + 4:3 office → equal heights, no crop */
  .tf-apps .id-shot, .tf-apps .tf-office, .tf-apps .id-shot:nth-child(3) { height: auto; }
  .tf-apps .id-shot:first-child { aspect-ratio: 1080 / 1350; }
  .tf-apps .tf-office { aspect-ratio: 1195 / 896; }
}

/* ---------- identidad: con·tacto ---------- */
.ct-logo { aspect-ratio: 1; background: #d0638c; }
.ct-logo img { width: 100%; height: 100%; object-fit: cover; }
.ct-naming {
  aspect-ratio: 1; background: #fcee96; color: #8a3a5a;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(18px, 2.6vw, 40px);
}
.ct-naming-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.ct-word { font-size: clamp(34px, 4.6vw, 76px); line-height: 1; letter-spacing: -.02em; color: #d0638c; font-weight: 400; }
.ct-word span { margin: 0 .06em; }
.ct-word em { font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.ct-naming-text { font-size: clamp(13px, 1.1vw, 17px); line-height: 1.6; }
.ct-naming-text b { color: #d0638c; }
.ct-brand .tc-swatch.light { color: #8a3a5a; border-color: #eadf9a; }
.ct-brand .tc-swatch.light:last-child { border-color: #e6e6e6; }
.ct-apps { aspect-ratio: 1077 / 976; max-width: 760px; margin: 0 auto; }
@media (max-width: 760px) {
  .ct-word { font-size: 11vw; }
}

.ct-naming-img { aspect-ratio: 1; background: #fcee96; }
.ct-naming-img img { width: 100%; height: 100%; object-fit: cover; }
.ct-naming-img { display: grid; place-items: center; }
.ct-naming-img img { width: 74%; height: auto; }

/* con·tacto applications: two images side by side, a bit smaller */
.ct-apps-row {
  display: grid; grid-template-columns: 1.104fr .932fr; /* 1077:976 and 1211:1299 → equal heights */
  gap: clamp(10px, 1.4vw, 20px);
  max-width: 900px; margin: 0 auto;
}
.ct-app-a { aspect-ratio: 1077 / 976; }
.ct-app-b { aspect-ratio: 1211 / 1299; }
@media (max-width: 760px) { .ct-apps-row { grid-template-columns: 1fr 1fr; max-width: none; } .ct-app-a, .ct-app-b { aspect-ratio: 4 / 5; } }
.ct-brand .tc-palette { grid-template-rows: 1fr 1fr; }
@media (max-width: 760px) { .ct-brand .tc-palette { grid-template-rows: none; grid-template-columns: 1fr 1fr; } }

/* ---------- contact: button sits beside the phrase, clear of "your" ---------- */
.cta-row { display: flex; justify-content: space-between; align-items: flex-end; gap: clamp(28px, 4vw, 64px); flex-wrap: wrap; }
.cta-row .cta-big { margin-bottom: 0; }
.cta-btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: 1em 1.8em; border-radius: 999px;
  background: #555; color: #fff;
  font-size: clamp(15px, 1.3vw, 19px); font-weight: 500; letter-spacing: .01em; white-space: nowrap;
  margin-bottom: clamp(10px, 1.4vw, 24px);
  transition: background-color .35s, transform .35s;
}
.cta-btn span { transition: transform .35s cubic-bezier(.2, .8, .1, 1); }
.cta-btn:hover { background: var(--pink); }
.cta-btn:hover span { transform: translateX(5px); }
@media (max-width: 760px) {
  .cta-row { flex-direction: column; align-items: flex-start; }
  .cta-row .cta-big { margin-bottom: 18px; }
}

/* ---------- otros proyectos: carousel ---------- */
.others { padding-left: 0; padding-right: 0; overflow: hidden; }
.others-head { display: flex; justify-content: space-between; align-items: end; padding: 0 9vw clamp(18px, 2vw, 28px) 5.75vw; margin: 0 9vw clamp(28px, 3.5vw, 56px) 5.75vw; padding-left: 0; padding-right: 0; }
.others-nav { display: flex; gap: 10px; }
.others-nav button {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #555; background: none; color: #555;
  font-size: 17px; cursor: pointer; transition: background-color .3s, color .3s, opacity .3s;
}
.others-nav button:hover { background: #555; color: #fff; }
.others-nav button:disabled { opacity: .25; pointer-events: none; }
.others-track {
  display: flex; gap: clamp(12px, 1.6vw, 24px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 0 9vw 8px 5.75vw; scroll-padding-left: 5.75vw;
  scrollbar-width: none; cursor: grab;
}
.others-track::-webkit-scrollbar { display: none; }
.others-track.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.others-track:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; }
.other { flex: 0 0 auto; margin: 0; scroll-snap-align: start; }
.other-img { height: clamp(260px, 30vw, 440px); border-radius: 6px; overflow: hidden; background: #eee; }
.other-img img { height: 100%; width: auto; display: block; user-select: none; transition: transform 1s cubic-bezier(.2, .8, .1, 1); }
.other:hover .other-img img { transform: scale(1.04); }
.other figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: 13px; }
.other figcaption b { font-weight: 600; color: #333; }
.other figcaption span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8a8a8a; padding-top: 2px; }
@media (max-width: 760px) {
  .others-head { margin-left: var(--gutter); margin-right: var(--gutter); }
  .others-track { padding: 0 var(--gutter) 8px; scroll-padding-left: var(--gutter); }
  .other-img { height: 260px; }
}
.other { width: min-content; }
.other-img { width: max-content; }
.other figcaption { width: 100%; }
@media (max-width: 760px) { .other figcaption { flex-direction: column; gap: 2px; } }

/* services rows link to their project sections */
.services li { display: block; padding: 0; cursor: pointer; }
.services li > a {
  display: grid; grid-template-columns: 3.2em 1fr auto 1.4em; align-items: baseline; gap: 12px;
  padding: 18px 0; color: inherit;
}
.services li > a:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; }
@media (max-width: 760px) { .services li > a { grid-template-columns: 2.6em 1fr 1.2em; } }

/* ---------- mobile hero: full screen, title as wide as the column ---------- */
@media (max-width: 760px) {
  .hero {
    min-height: 100svh;
    padding: 120px 0 48px;
    display: flex; flex-direction: column; justify-content: center;
  }
  /* The title spans ~15–92% of the artwork; scale the stage so it spans the
     content column (gutter to gutter) and let the empty sides bleed off. */
  .hero-stage {
    --col: calc(100vw - 2 * var(--gutter));
    width: calc(var(--col) / .77);
    margin-left: calc(var(--gutter) - .15 * var(--col) / .77);
    flex: none;
  }
}

/* The static fallback gets the same zoom as the WebGL frame (FRAME in main.js:
   scale 1.1361 about the point that stays fixed), so nothing jumps when the
   canvas takes over. */
.hero-fallback { transform: scale(1.1361); transform-origin: 127.3% 135.28%; }
