/* =========================================================
   JORDI MARCH — PORTFOLIO 2026
   Identidad: Geist · #0C0C0C · #FBFBFB
   ========================================================= */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #0C0C0C;
  --white: #FBFBFB;
  --muted: rgba(251, 251, 251, 0.56);
  --faint: rgba(251, 251, 251, 0.32);
  --line: rgba(251, 251, 251, 0.14);
  --panel: #151515;

  --font: "Geist", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(16px, 2.2vw, 32px);       /* margen lateral */
  --gap: clamp(12px, 1.4vw, 20px);       /* gutter de la grilla */
  --section: clamp(96px, 14vw, 200px);   /* espacio entre secciones */
  --header-h: 64px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--white); color: var(--black); }

:focus-visible { outline: 1px solid var(--white); outline-offset: 4px; }

.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;
}

/* ---------- Tipografía ---------- */
.label {
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 400;
}
.muted { color: var(--muted); }

.display {
  font-weight: 500;
  font-size: clamp(40px, 12.4vw, 240px);
  line-height: 0.86;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  margin: 0;
}
.h2 {
  font-weight: 400;
  font-size: clamp(36px, 5.6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0;
}
.lead {
  font-size: clamp(22px, 2.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 0;
}
.body-l { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; }

.wrap { padding-inline: var(--pad); }
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  padding-inline: var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  mix-blend-mode: difference;   /* se lee sobre fondos claros y oscuros */
  color: var(--white);
  transition: transform 0.6s var(--ease-out);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__id { display: flex; gap: 18px; align-items: baseline; }
.site-header__id span:last-child { color: var(--muted); }
.site-header__logo { width: 18px; justify-self: center; }
.site-header__logo svg { width: 100%; height: auto; fill: currentColor; }
.site-nav { justify-self: end; display: flex; gap: clamp(20px, 2.6vw, 40px); }
.site-nav a, .menu-toggle { position: relative; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; justify-self: end; }

/* Menú mobile */
.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--black);
  padding: calc(var(--header-h) + 24px) var(--pad) var(--pad);
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease-in-out);
  visibility: hidden;
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  font-size: clamp(48px, 15vw, 96px); line-height: 1; letter-spacing: -0.05em;
  text-transform: uppercase; font-weight: 500;
  padding-block: 8px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.mobile-menu nav a small { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); font-weight: 400; }

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header__id span:last-child { display: none; }
  .site-header__logo { display: none; }
  .site-nav { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--black);
  display: grid; place-items: center;
  transition: clip-path 1s var(--ease-in-out);
  clip-path: inset(0 0 0 0);
}
.loader.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.loader__logo { width: 64px; overflow: visible; fill: var(--white); }
.loader__logo .piece-j { transform-box: fill-box; animation: j-in 0.9s var(--ease-out) both; }
.loader__logo .piece-sq { transform-box: fill-box; animation: sq-in 0.7s 0.45s var(--ease-out) both; }
.loader__count {
  position: absolute; left: var(--pad); bottom: var(--pad);
  font-size: clamp(56px, 10vw, 160px); line-height: 0.8; letter-spacing: -0.05em; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.loader__meta { position: absolute; right: var(--pad); bottom: var(--pad); text-align: right; }
@keyframes j-in { from { transform: translateY(-40%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sq-in { from { transform: translateX(-160%); opacity: 0; } to { transform: none; opacity: 1; } }
.no-loader .loader { display: none; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.line-mask { display: block; overflow: hidden; padding-top: 0.14em; margin-top: -0.14em; padding-bottom: 0.04em; }
.line-mask > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); }
.is-in .line-mask > span, .line-mask.is-in > span { transform: none; }
.line-mask:nth-child(2) > span { transition-delay: 0.08s; }
.line-mask:nth-child(3) > span { transition-delay: 0.16s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .line-mask > span { opacity: 1 !important; transform: none !important; transition: none !important; }
  .loader { display: none; }
}

/* ---------- Hero (home) ---------- */
.hero { padding-top: calc(var(--header-h) + clamp(32px, 7vw, 120px)); }
.hero__name { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--gap); }
.hero__name .display { font-size: clamp(56px, 15.2vw, 300px); }
@media (max-width: 760px) {
  .hero__name { flex-direction: column; align-items: flex-start; gap: 0; }
  .hero__name .display { font-size: 27vw; }
}
.hero__meta {
  margin-top: clamp(20px, 2.4vw, 36px);
  padding-block: 14px;
  align-items: start;
}
.hero__meta > :nth-child(1) { grid-column: 1 / span 3; }
.hero__meta > :nth-child(2) { grid-column: 4 / span 5; }
.hero__meta > :nth-child(3) { grid-column: 9 / span 4; justify-self: end; text-align: right; }
@media (max-width: 760px) {
  .hero__meta { row-gap: 10px; }
  .hero__meta > :nth-child(n) { grid-column: 1 / -1; justify-self: start; text-align: left; }
}

.status { display: inline-flex; align-items: center; gap: 8px; }
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--white); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* Reel */
.reel {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel);
  cursor: none;
}
.reel video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); }
.reel__ui {
  position: absolute; inset: auto 0 0 0; padding: clamp(12px, 1.6vw, 24px);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  color: var(--white); pointer-events: none;
}
.reel__play {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(12, 12, 12, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  pointer-events: auto; cursor: pointer;
}
.reel__play svg { width: 10px; height: 10px; fill: currentColor; }
@media (hover: none) { .reel { cursor: pointer; } }

/* ---------- Secciones ---------- */
.section { padding-top: var(--section); }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: var(--gap);
  padding-bottom: clamp(20px, 2.4vw, 36px);
  margin-bottom: clamp(24px, 3vw, 48px);
}
.section-head .h2 sup { font-size: 0.24em; letter-spacing: 0; vertical-align: top; margin-left: 0.3em; position: relative; top: 0.5em; font-weight: 400; color: var(--muted); }

/* Intro statement */
.intro { align-items: start; row-gap: 24px; }
.intro > .label { grid-column: 1 / span 3; }
.intro > .lead { grid-column: 4 / -1; max-width: 22ch; text-indent: 0; }
@media (min-width: 1100px) { .intro > .lead { max-width: 26ch; } }
@media (max-width: 760px) { .intro > .label, .intro > .lead { grid-column: 1 / -1; } }

/* ---------- Proyectos ---------- */
.projects { display: flex; flex-direction: column; gap: clamp(64px, 8vw, 128px); }
.project-card { display: block; }
.project-card__media {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel);
  cursor: none;
}
.project-card__media img,
.project-card__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s var(--ease-out), opacity 0.4s ease;
}
.project-card__media video { opacity: 0; }
.project-card.is-playing .project-card__media video { opacity: 1; }
.project-card:hover .project-card__media img,
.project-card:hover .project-card__media video { transform: scale(1.025); }
@media (hover: none) { .project-card__media { cursor: pointer; } }

.project-card__info {
  padding-top: 16px; align-items: start; row-gap: 4px;
}
.project-card__num { grid-column: 1 / span 1; color: var(--muted); }
.project-card__title {
  grid-column: 2 / span 5; margin: 0;
  font-size: clamp(20px, 1.9vw, 28px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; text-transform: uppercase;
}
.project-card__type { grid-column: 7 / span 3; }
.project-card__tools { grid-column: 10 / span 2; }
.project-card__arrow { grid-column: 12 / span 1; justify-self: end; transition: transform 0.5s var(--ease-out); }
.project-card:hover .project-card__arrow { transform: translateX(6px); }
@media (max-width: 760px) {
  .project-card__num { grid-column: 1 / span 2; }
  .project-card__title { grid-column: 3 / span 9; }
  .project-card__arrow { grid-column: 12 / span 1; grid-row: 1; }
  .project-card__type { grid-column: 3 / -1; }
  .project-card__tools { grid-column: 3 / -1; }
}

/* Cursor que sigue al mouse sobre videos */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 60;
  pointer-events: none;
  padding: 10px 14px; border-radius: 999px;
  background: var(--white); color: var(--black);
  transform: translate3d(-50%, -50%, 0) scale(0);
  transition: transform 0.35s var(--ease-out);
  white-space: nowrap;
}
.cursor.is-visible { transform: translate3d(-50%, -50%, 0) scale(1); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- Sobre mí (bloque home) ---------- */
.about { align-items: start; row-gap: 32px; }
.about__text { grid-column: 1 / span 6; display: flex; flex-direction: column; gap: 28px; }
.about__photo { grid-column: 9 / span 4; }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1); background: var(--panel); }
.about__photo figcaption { margin-top: 10px; display: flex; justify-content: space-between; }
.about__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.about__cols ul { list-style: none; margin: 10px 0 0; padding: 0; }
.about__cols li { padding-block: 6px; }
@media (max-width: 860px) {
  .about__text, .about__photo { grid-column: 1 / -1; }
  .about__photo { max-width: 420px; }
}

/* Links tipo botón */
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 0; width: fit-content;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease-out), opacity 0.3s ease;
}
.link-arrow:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  margin-top: var(--section);
  padding-block: clamp(80px, 12vw, 180px) clamp(40px, 5vw, 72px);
  overflow: hidden;
}
/* Grilla de cruces: guiño al "Starting" del reel */
.contact__crosses {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M14 9.5v9M9.5 14h9' stroke='%23FBFBFB' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
}
.contact__inner { position: relative; z-index: 1; }
.contact__title { margin-bottom: clamp(32px, 5vw, 72px); }
.contact__email {
  display: inline-block;
  font-size: clamp(30px, 6.4vw, 124px); line-height: 1; letter-spacing: -0.05em; font-weight: 500;
  word-break: break-all;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.7s var(--ease-out);
  padding-bottom: 6px;
}
.contact__email:hover { background-size: 100% 2px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 28px var(--pad); }
.site-footer .grid { align-items: end; row-gap: 20px; }
.site-footer__brand { grid-column: 1 / span 4; display: flex; align-items: center; gap: 16px; }
.site-footer__brand svg { width: 14px; height: auto; fill: currentColor; }
.site-footer__time { grid-column: 5 / span 3; font-variant-numeric: tabular-nums; }
.site-footer__social { grid-column: 8 / span 4; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer__social a, .site-footer__top { transition: color 0.3s ease; }
.site-footer__social a:hover, .site-footer__top:hover { color: var(--muted); }
.site-footer__top { grid-column: 12 / span 1; justify-self: end; }
@media (max-width: 860px) {
  .site-footer__brand, .site-footer__time, .site-footer__social { grid-column: 1 / -1; }
  .site-footer__top { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- Modal del reel ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(12, 12, 12, 0.96);
  display: grid; place-items: center;
  padding: calc(var(--header-h)) var(--pad) var(--pad);
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal video { width: min(100%, calc((100vh - var(--header-h) * 2) * 16 / 9)); aspect-ratio: 16/9; background: #000; }
.modal__close { position: absolute; top: 20px; right: var(--pad); }

/* =========================================================
   PÁGINAS INTERNAS
   ========================================================= */
.page-hero { padding-top: calc(var(--header-h) + clamp(48px, 9vw, 160px)); }
.page-hero__kicker { display: flex; justify-content: space-between; gap: var(--gap); margin-bottom: clamp(16px, 2vw, 28px); }
.page-hero .display { font-size: clamp(48px, 11.5vw, 220px); }

.meta-grid {
  margin-top: clamp(32px, 5vw, 72px);
  padding-top: 14px; row-gap: 20px;
}
.meta-grid > div { grid-column: span 3; display: flex; flex-direction: column; gap: 6px; }
.meta-grid dt { color: var(--muted); }
.meta-grid dd { margin: 0; }
@media (max-width: 760px) { .meta-grid > div { grid-column: span 6; } }

.media-full { margin-top: clamp(32px, 5vw, 72px); }
.media-full video, .media-full img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--panel); }

.text-block { padding-top: clamp(72px, 10vw, 160px); align-items: start; row-gap: 16px; }
.text-block > .label { grid-column: 1 / span 3; }
.text-block > .text-block__body { grid-column: 4 / span 7; display: flex; flex-direction: column; gap: 1em; }
.text-block p { margin: 0; }
@media (max-width: 760px) {
  .text-block > .label, .text-block > .text-block__body { grid-column: 1 / -1; }
}

.gallery { padding-top: clamp(72px, 10vw, 160px); display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.gallery figure { margin: 0; }
.gallery figure:first-child { grid-column: 1 / -1; }
.gallery img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--panel); }
.gallery figcaption { margin-top: 8px; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }

.disclaimer { padding-top: 28px; max-width: 60ch; }

.next-project {
  display: block; margin-top: var(--section);
  padding-block: clamp(40px, 6vw, 96px);
}
.next-project__row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--gap); }
.next-project .display { font-size: clamp(44px, 10vw, 190px); transition: transform 0.8s var(--ease-out); }
.next-project:hover .display { transform: translateX(clamp(8px, 1.5vw, 24px)); }
.next-project__thumb { width: clamp(120px, 20vw, 320px); aspect-ratio: 16/9; object-fit: cover; flex-shrink: 0; }
@media (max-width: 760px) { .next-project__thumb { display: none; } }

/* Sobre mí (página) */
.about-hero__grid { align-items: end; row-gap: 32px; margin-top: clamp(40px, 6vw, 96px); }
.about-hero__grid figure { grid-column: 1 / span 4; margin: 0; }
.about-hero__grid figure img { width: 100%; aspect-ratio: 4/5; object-fit: cover; filter: grayscale(1); }
.about-hero__grid .lead { grid-column: 6 / -1; }
@media (max-width: 860px) {
  .about-hero__grid figure { grid-column: 1 / span 8; }
  .about-hero__grid .lead { grid-column: 1 / -1; }
}

.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 6px;
  padding-block: clamp(16px, 2vw, 28px); align-items: baseline;
}
.list-rows__num { grid-column: 1 / span 1; color: var(--muted); }
.list-rows__title { grid-column: 2 / span 5; font-size: clamp(20px, 2.2vw, 34px); letter-spacing: -0.03em; line-height: 1.05; text-transform: uppercase; font-weight: 500; }
.list-rows__desc { grid-column: 7 / span 5; color: var(--muted); }
.list-rows__side { grid-column: 12 / span 1; justify-self: end; color: var(--muted); }
@media (max-width: 760px) {
  .list-rows__num { grid-column: 1 / span 2; }
  .list-rows__title { grid-column: 3 / -1; }
  .list-rows__desc { grid-column: 3 / -1; }
  .list-rows__side { grid-column: 3 / -1; justify-self: start; }
}

.tools { display: flex; flex-wrap: wrap; gap: 10px; }
.tools li { list-style: none; }
.tools { padding: 0; margin: 0; }

/* =========================================================
   BLOQUES DE PROYECTO
   ========================================================= */
.block { padding-top: clamp(56px, 7vw, 112px); }
.page-hero + .block { padding-top: clamp(32px, 5vw, 72px); }
.block-head {
  display: flex; justify-content: space-between; gap: var(--gap);
  margin-bottom: 16px;
}
.text-block + .block { padding-top: clamp(40px, 5vw, 72px); }
.text-block .lead + .body-l { margin-top: 0.4em; }

/* Grillas de medios */
.m-grid { display: grid; gap: var(--gap); }
.m-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m-item { margin: 0; min-width: 0; }
.m-item > video, .m-item > img, .pair__media {
  width: 100%; object-fit: cover; background: var(--panel); display: block;
}
.r-16x9 .m-item > video, .r-16x9 .m-item > img, .r-16x9 .pair__media { aspect-ratio: 16 / 9; }
.r-4x5  .m-item > video, .r-4x5  .m-item > img { aspect-ratio: 4 / 5; }
.r-9x16 .m-item > video, .r-9x16 .m-item > img { aspect-ratio: 9 / 16; }
.m-item figcaption { margin-top: 8px; }

/* 4:5 de a dos en desktop se ven gigantes: los limitamos */
.m-grid--2.r-4x5 { max-width: 1100px; }


@media (max-width: 760px) {
  .m-grid--2.r-16x9 { grid-template-columns: 1fr; }
  /* En celular, las grillas de 3 y las 4:5 pasan a carrusel horizontal */
  .m-grid--3, .m-grid--2.r-4x5 {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad);
    scroll-padding-inline: var(--pad);
    scrollbar-width: none;
  }
  .m-grid--3::-webkit-scrollbar, .m-grid--2.r-4x5::-webkit-scrollbar { display: none; }
  .m-grid--3 > .m-item, .m-grid--2.r-4x5 > .m-item { flex: 0 0 74%; scroll-snap-align: start; }
  .m-grid--3.r-9x16 > .m-item { flex-basis: 62%; }
}

/* Styleframe -> animado */
.pair__media { position: relative; overflow: hidden; }
.pair__media img, .pair__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pair__media video { opacity: 0; transition: opacity 0.35s ease; }
.pair.is-playing .pair__media video { opacity: 1; }
.pair__badge {
  position: absolute; left: 12px; bottom: 12px; z-index: 1;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(12, 12, 12, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}
.pair.is-playing .pair__badge { opacity: 0; }
[data-hover-play] { cursor: none; }
@media (hover: none) { [data-hover-play] { cursor: auto; } }

/* Tiras de logo (formato 10:1, a sangre) */
.strips__list { display: flex; flex-direction: column; gap: 2px; }
.strips__list video { width: 100%; aspect-ratio: 10 / 1; object-fit: cover; background: var(--panel); }

/* Logos */
.logo-tile { position: relative; aspect-ratio: 4 / 3; }
.logo-tile img { position: absolute; inset: 22% 18%; width: 64%; height: 56%; object-fit: contain; }
.logo-tile--light { background: #E0E0E0; }
.logo-tile--green { background: #6CE311; }
@media (max-width: 760px) { .logo-tile { aspect-ratio: 1; } }

/* Paleta */
.palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.swatch__chip { aspect-ratio: 16 / 9; }
.swatch .label { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fonts { list-style: none; margin: clamp(24px, 3vw, 40px) 0 0; padding: 0; }
.fonts li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 16px; }
@media (max-width: 760px) { .palette { grid-template-columns: 1fr; } .swatch__chip { aspect-ratio: 4 / 1; } }

/* Brand guidelines: carrusel horizontal */
.guidelines { padding-top: var(--section); }
.guidelines__track {
  display: flex; gap: var(--gap); overflow-x: auto;
  padding-inline: var(--pad); scroll-snap-type: x proximity; scroll-padding-inline: var(--pad);
  scrollbar-width: thin; scrollbar-color: var(--faint) transparent;
  cursor: grab; -webkit-overflow-scrolling: touch;
}
.guidelines__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.guidelines__track.is-dragging img { pointer-events: none; }
.guidelines__track img {
  flex: 0 0 min(72vw, 880px); aspect-ratio: 16 / 9; object-fit: cover;
  scroll-snap-align: start; background: var(--panel); user-select: none; -webkit-user-drag: none;
}
@media (max-width: 760px) { .guidelines__track img { flex-basis: 86vw; } }

.disclaimer { padding-top: clamp(48px, 6vw, 80px); max-width: 70ch; }


/* =========================================================
   LIMPIEZA: sin líneas, separación por espacio y tipografía
   ========================================================= */
.hero__role { margin: clamp(16px, 2vw, 28px) 0 clamp(20px, 2.4vw, 36px); }
.section-head { padding-bottom: 0; }
.meta-grid { padding-top: 0; }
.about__cols li { padding-block: 3px; }
.contact__actions { gap: 28px; }
.site-footer { padding-top: clamp(40px, 5vw, 64px); }
.mobile-menu nav a { padding-block: 6px; }
.fonts li { padding-block: 10px; }

/* Sobre mí — juego tipográfico */
.statement {
  margin: 0; font-weight: 400; text-transform: none;
  font-size: clamp(34px, 5.6vw, 96px); line-height: 1.02; letter-spacing: -0.045em;
  text-indent: 18%; max-width: 15.5em;
}
.statement .muted { display: inline; }
.inline-photo {
  display: inline-block; vertical-align: middle;
  width: 1.5em; height: 0.9em; margin: -0.12em 0.22em 0;
  border-radius: 999px; overflow: hidden; position: relative; top: -0.04em;
}
.inline-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1); }

.index-row { align-items: start; row-gap: 14px; }
.index-row > .label { grid-column: 1 / span 3; padding-top: 0.5em; }
.index-row__body { grid-column: 4 / -1; margin: 0; }
.about-page .index-row { margin-top: clamp(64px, 9vw, 140px); }
.about-page .index-row__body { max-width: none; display: flex; flex-direction: column; gap: 1em; }
.about-page .index-row__body p { margin: 0; }
@media (max-width: 760px) {
  .statement { text-indent: 0; }
  .index-row > .label, .index-row__body { grid-column: 1 / -1; }
}

.services { list-style: none; padding: 0; }
.services li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--gap); transition: opacity 0.4s ease; }
.services__name {
  font-size: clamp(38px, 5.6vw, 104px); line-height: 0.95; letter-spacing: -0.055em;
  font-weight: 500; text-transform: uppercase;
}

@media (hover: hover) {
  .services:hover li { opacity: 0.28; }
  .services li:hover { opacity: 1; }
}

.tools-line span:not(:last-child)::after { content: ", "; color: var(--muted); }

.edu { list-style: none; padding: 0; display: flex; flex-direction: column; gap: clamp(20px, 2.4vw, 32px); }
.edu li { display: grid; grid-template-columns: 1fr auto; column-gap: var(--gap); row-gap: 4px; align-items: baseline; }
.edu__title { font-size: clamp(22px, 2.6vw, 40px); line-height: 1.1; letter-spacing: -0.03em; }
.edu__where { grid-column: 1; }
.edu__year { grid-column: 2; grid-row: 1; }


/* Sobre mí (página): repartir el peso a lo ancho */
.statement { max-width: none; text-indent: 25%; }
.bio-row__a { grid-column: 4 / span 4; margin: 0; }
.bio-row__b { grid-column: 9 / span 4; margin: 0; }
.tools-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2em 0.8em; }
.tools-line span:not(:last-child)::after { content: none; }
@media (max-width: 760px) {
  .statement { text-indent: 0; }
  .bio-row__a, .bio-row__b { grid-column: 1 / -1; }
  .tools-line { justify-content: flex-start; }
  .tools-line span:not(:last-child)::after { content: ","; color: var(--muted); }
}

/* Home — Sobre mí tipográfico en escalera */
.home-about__top { display: flex; justify-content: space-between; margin-bottom: clamp(24px, 3vw, 48px); }
.stagger {
  margin: 0; font-weight: 500; text-transform: uppercase;
  font-size: clamp(40px, 8.6vw, 168px); line-height: 0.9; letter-spacing: -0.055em;
}
.stagger > .line-mask { display: block; }
.stagger--r { text-align: right; }
.stagger em { font-style: normal; font-weight: 300; }
.stagger .inline-photo { width: 1.6em; height: 0.78em; margin: 0 0 0 0.18em; top: -0.06em; }
.home-about__grid { margin-top: clamp(48px, 6vw, 96px); align-items: start; row-gap: 32px; }
.home-about__bio { grid-column: 1 / span 5; margin: 0; }
.home-about__list { grid-column: 8 / span 3; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.home-about__list li { display: flex; gap: 14px; }
.home-about__more { grid-column: 11 / span 2; justify-self: end; }
@media (max-width: 860px) {
  .home-about__bio, .home-about__list { grid-column: 1 / -1; }
  .home-about__more { grid-column: 1 / -1; justify-self: start; }
  .stagger { font-size: 10.6vw; }
  .stagger > .line-mask > span { white-space: nowrap; }
}


/* Foto completa (sin recorte) */
.inline-frame {
  display: inline-block; vertical-align: top; margin-left: 0.18em;
  height: 0.86em; aspect-ratio: 380 / 462; overflow: hidden; position: relative; top: 0.02em;
}
.inline-frame img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1); }

.about-intro { align-items: start; row-gap: 28px; }
.about-intro__photo { grid-column: 1 / span 3; margin: 0; }
.about-intro__photo img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; filter: grayscale(1); }
.about-intro .statement { grid-column: 4 / -1; text-indent: 0; }
@media (max-width: 760px) {
  .about-intro__photo { grid-column: 1 / span 7; }
  .about-intro .statement { grid-column: 1 / -1; }
}


/* Bloque dividido: texto a la izquierda, piezas a la derecha */
.split { align-items: start; row-gap: 20px; }
.split__text { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--header-h) + 24px); }
.split__text p { margin: 0; max-width: 34ch; }
.split__media { grid-column: 5 / -1; }
.m-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .split__text, .split__media { grid-column: 1 / -1; position: static; }
  .split__media { margin-inline: 0; }
  .m-grid--5 {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad);
    scrollbar-width: none;
  }
  .m-grid--5::-webkit-scrollbar { display: none; }
  .m-grid--5 > .m-item { flex: 0 0 62%; scroll-snap-align: start; }
}

/* =========================================================
   ANIMACIÓN DE ENTRADA — HERO
   ========================================================= */
.hero .line-mask > span { transform: none; transition: none; white-space: nowrap; }
.hero .char {
  display: inline-block;
  transform: translate3d(0, 130%, 0) rotate(7deg);
  transform-origin: 0% 100%;
  transition: transform 1.25s var(--ease-out);
  transition-delay: calc(var(--i) * 55ms + 0.1s);
}
.hero.is-in .char { transform: none; }
.hero__role { opacity: 0; transform: translateY(14px); transition: opacity 0.8s ease 0.8s, transform 1s var(--ease-out) 0.8s; }
.hero.is-in .hero__role { opacity: 1; transform: none; }
.hero .reel { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease-in-out) 0.55s; }
.hero.is-in .reel { clip-path: inset(0 0 0 0); }
.hero .reel video { transform: scale(1.18); transition: transform 2s var(--ease-out) 0.55s; }
.hero.is-in .reel video { transform: scale(1.001); }

/* =========================================================
   SOBRE MÍ (HOME) — composición tipográfica animada
   ========================================================= */
.stagger { position: relative; }
.st-row { display: block; }
.st-row--r { position: relative; display: flex; justify-content: flex-end; align-items: flex-end; }
.st-row--r .line-mask { flex: 0 0 auto; }

/* textos chicos que se acoplan a los huecos de la escalera */
.st-note {
  position: absolute; left: 0; margin: 0;
  font-size: 13px; line-height: 1.5; letter-spacing: 0; text-transform: none; font-weight: 400;
  color: var(--muted); width: min(30%, 34ch);
}
.st-note--list { bottom: 0.9em; list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; color: var(--white); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.st-note--list li { display: flex; gap: 14px; }
.st-note--bio { top: 0.9em; font-size: 14px; }
.st-row--r .st-note--list { bottom: calc(0.08 * 1em); }
.home-about__foot { display: flex; justify-content: flex-end; margin-top: clamp(40px, 5vw, 72px); }

/* el cuadrado del isologo como "punto" tipográfico */
.st-square {
  display: inline-block; width: 0.16em; height: 0.16em; margin-left: 0.1em;
  background: var(--white); vertical-align: baseline;
  transform: scale(0) rotate(-90deg); transition: transform 0.9s var(--ease-out) 0.75s;
}
.stagger.is-in .st-square { transform: none; }

/* coreografía: impares suben, pares entran desde la derecha */
.stagger .st-row:not(.st-row--r) .line-mask > span { transform: translateY(130%); }
.stagger .st-row--r .line-mask > span { transform: translateX(105%); }
.stagger.is-in .st-row .line-mask > span, .stagger.is-in .st-row:not(.st-row--r) .line-mask > span { transform: none; }
.stagger .st-row:nth-child(1) .line-mask > span { transition-delay: 0s; }
.stagger .st-row:nth-child(2) .line-mask > span { transition-delay: 0.12s; }
.stagger .st-row:nth-child(3) .line-mask > span { transition-delay: 0.24s; }
.stagger .st-row:nth-child(4) .line-mask > span { transition-delay: 0.36s; }

.st-y { display: inline-block; font-style: normal; font-weight: 300; color: var(--muted);
  transform: rotate(-90deg) scale(0.3); opacity: 0; transition: transform 1s var(--ease-out) 0.85s, opacity 0.4s ease 0.85s; }
.stagger.is-in .st-y { transform: none; opacity: 1; }

.st-note { opacity: 0; transform: translateY(12px); transition: opacity 0.8s ease, transform 1s var(--ease-out); }
.stagger.is-in .st-note--list { opacity: 1; transform: none; transition-delay: 0.9s; }
.stagger.is-in .st-note--bio { opacity: 1; transform: none; transition-delay: 1.1s; }

/* foto: círculo -> cuadrado -> barrido que revela la imagen */
.inline-frame::before {
  content: ""; position: absolute; inset: 0; z-index: 2; background: var(--white);
  border-radius: 50%; transform: scale(0);
}
.inline-frame img { opacity: 0; transition: opacity 0.01s linear 1.7s; }
.stagger.is-in .inline-frame::before { animation: frame-morph 1.7s var(--ease-in-out) 0.55s forwards; }
.stagger.is-in .inline-frame img { opacity: 1; }
@keyframes frame-morph {
  0%   { transform: scale(0);    border-radius: 50%; clip-path: inset(0 0 0 0); }
  35%  { transform: scale(0.62); border-radius: 50%; clip-path: inset(0 0 0 0); }
  58%  { transform: scale(1);    border-radius: 0;   clip-path: inset(0 0 0 0); }
  70%  { transform: scale(1);    border-radius: 0;   clip-path: inset(0 0 0 0); }
  100% { transform: scale(1);    border-radius: 0;   clip-path: inset(0 0 0 100%); }
}

@media (max-width: 1100px) {
  .stagger { display: flex; flex-direction: column; }
  .st-row--r { display: contents; }
  .st-row--r .line-mask { align-self: flex-end; }
  .st-note { position: static; width: auto; max-width: 46ch; order: 10; }
  .st-note--list { margin-top: 36px; order: 10; }
  .st-note--bio { margin-top: 20px; order: 11; font-size: 15px; }
}
@media (max-width: 860px) {
  .stagger .line-mask > span { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .char, .hero__role, .stagger .line-mask > span, .st-y, .st-note, .st-square { transform: none !important; opacity: 1 !important; transition: none !important; }
  .hero .reel { clip-path: none !important; transition: none !important; }
  .hero .reel video { transform: none !important; }
  .inline-frame::before { display: none; }
  .inline-frame img { opacity: 1 !important; transition: none !important; }
}


/* Sobre mí (home): habilidades en el hueco de la última línea, bio debajo */
.st-row--r .st-note--list { top: 0.9em; bottom: auto; }
.stagger.is-in .st-note--list { transition-delay: 1s; }
.home-about__bio { margin-top: clamp(72px, 9vw, 140px); align-items: start; row-gap: 20px; }
.home-about__bio > .label { grid-column: 1 / span 3; padding-top: 0.6em; }
.home-about__bio > .lead { grid-column: 4 / span 8; margin: 0; max-width: 30ch; }
.home-about__bio > .link-arrow { grid-column: 4 / span 4; }
@media (min-width: 1100px) { .home-about__bio > .lead { grid-column: 5 / -1; } .home-about__bio > .link-arrow { grid-column: 5 / span 4; } }
@media (max-width: 760px) { .home-about__bio > * { grid-column: 1 / -1 !important; } }

/* que las O (y cualquier letra) no se corten en la máscara */
.stagger .line-mask { padding: 0.14em 0.08em 0.1em; margin: -0.14em -0.08em -0.1em; }

/* lista de skills centrada en la altura de "Y ESTILO PROPIO" */
.stagger { --st-fs: clamp(40px, 8.6vw, 168px); }
@media (min-width: 1101px) {
  /* la última línea de la lista apoya en la misma línea base que "Y ESTILO PROPIO" */
  .st-row--r .st-note--list { top: auto; bottom: calc(var(--st-fs) * 0.1 - 18px); justify-content: flex-end; }
}

/* Máscaras de texto: margen extra para que no se corten signos como ¿ ni las curvas */
.line-mask { padding: 0.14em 0.1em 0.22em; margin: -0.14em -0.1em -0.22em; }
.stagger .line-mask { padding: 0.14em 0.1em 0.22em; margin: -0.14em -0.1em -0.22em; }

/* Sobre mí (página): foto más chica, acompañando la frase */
.about-intro__photo { grid-column: 1 / span 2; max-width: 220px; }
.about-intro .statement { grid-column: 4 / -1; }
@media (max-width: 760px) {
  .about-intro__photo { grid-column: 1 / span 5; max-width: 160px; }
  .about-intro .statement { grid-column: 1 / -1; }
}

/* =========================================================
   CELULAR — mismo lenguaje limpio que desktop
   ritmo de espacios constante, menos ruido, jerarquías claras
   ========================================================= */
@media (max-width: 760px) {
  :root { --section: 96px; --pad: 18px; --gap: 12px; }

  /* Hero */
  .hero { padding-top: calc(var(--header-h) + 36px); }
  .hero__name .display { font-size: 25.5vw; line-height: 0.84; }
  .hero__role { margin: 18px 0 20px; }
  .reel__ui { padding: 10px; }
  .reel__ui > span:first-child { display: none; }
  .reel__ui { justify-content: flex-end; }
  .reel__play { padding: 8px 12px; font-size: 11px; }

  /* Intro */
  .intro { row-gap: 14px; }
  .intro > .lead { font-size: 24px; line-height: 1.15; }

  /* Encabezados de sección */
  .section-head { margin-bottom: 20px; align-items: baseline; }
  .h2 { font-size: 40px; }

  /* Tarjetas de proyecto: número + título + flecha, y una sola línea de categoría */
  .projects { gap: 56px; }
  .project-card__info { padding-top: 12px; row-gap: 4px; }
  .project-card__num { grid-column: 1 / span 1; }
  .project-card__title { grid-column: 2 / span 10; font-size: 20px; }
  .project-card__arrow { grid-column: 12 / span 1; grid-row: 1; }
  .project-card__type { grid-column: 2 / -1; }
  .project-card__tools { display: none; }

  /* Sobre mí (home) */
  .home-about__top { margin-bottom: 20px; }
  .stagger { line-height: 0.94; }
  .st-note--list { margin-top: 32px; gap: 8px; }
  .home-about__bio { margin-top: 48px; row-gap: 14px; }
  .home-about__bio > .lead { font-size: 22px; line-height: 1.2; }

  /* Contacto y footer */
  .contact { margin-top: var(--section); padding-block: 72px 40px; }
  .contact__title { margin-bottom: 28px; }
  .contact__email { font-size: 8.4vw; }
  .contact__actions { margin-top: 20px; }
  .site-footer { padding-top: 32px; }
  .site-footer .grid { row-gap: 14px; }

  /* Páginas internas */
  .page-hero { padding-top: calc(var(--header-h) + 40px); }
  .page-hero .display { font-size: 15vw; }
  .page-hero .lead { font-size: 21px; line-height: 1.2; }
  .meta-grid { margin-top: 32px; row-gap: 16px; }
  .text-block { padding-top: 64px; row-gap: 10px; }
  .text-block .lead { font-size: 21px; line-height: 1.2; }
  .block { padding-top: 40px; }
  .text-block + .block { padding-top: 32px; }
  .block-head { margin-bottom: 12px; }
  .split { row-gap: 16px; }
  .split__text p { max-width: none; }
  .guidelines { padding-top: 80px; }
  .next-project { margin-top: 80px; padding-block: 32px; }
  .next-project .display { font-size: 15vw; }

  /* Sobre mí (página) */
  .statement { font-size: 32px; line-height: 1.05; }
  .about-page .index-row { margin-top: 56px; }
  .index-row { row-gap: 12px; }
  .index-row > .label { padding-top: 0; }
  .services__name { font-size: 11vw; }
  .tools-line { gap: 0 0.3em; font-size: 22px; }
  .edu__title { font-size: 21px; }
  .edu__where { font-size: 14px; }
}
/* En pantallas táctiles no hay "pasar el mouse": sin pista ni etiquetas sobre la imagen */
@media (hover: none), (max-width: 760px) {
  .hover-hint, .pair__badge { display: none; }
}
@media (max-width: 760px) {
  .m-grid--2.r-16x9 { row-gap: 20px; }
}

/* Celular: el isologo reemplaza al nombre en el header (el nombre ya está en grande en el hero) */
@media (max-width: 760px) {
  .site-header__id { display: none; }
  .site-header__logo { display: block; justify-self: start; width: 20px; }
}

/* =========================================================
   ZTRAFE — construcción animada del logo
   ========================================================= */
@font-face { font-family: "Heebo"; src: url("../fonts/Heebo-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

.construct__stage { position: relative; background: #1D1D1D; overflow: hidden; }
.construct__stage svg { display: block; width: 100%; height: auto; }
.construct svg * { transition: opacity 0.6s ease, transform 1.1s var(--ease-in-out), stroke-dashoffset 0.9s var(--ease-in-out); }
.construct .c-top, .construct .c-bottom { transform-box: view-box; }
.c-tag { font-family: var(--font); font-size: 18px; letter-spacing: 0.12em; opacity: 0; }

/* paso 1: Z entera */
.construct .c-top { transform: translate(-333.26px, 0); }
.construct .c-bottom { transform: translate(333.26px, 0); }
.construct .c-cut { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.construct .c-arrows { opacity: 0; }
.construct .c-logo { opacity: 0; }
.construct .c-box { opacity: 0.5; }

/* paso 2: corte — la línea se dibuja y las partes se abren apenas */
.construct[data-step="2"] .c-cut { stroke-dashoffset: 0; opacity: 1; }
.construct[data-step="2"] .c-top { transform: translate(-333.26px, -46px); }
.construct[data-step="2"] .c-bottom { transform: translate(333.26px, 46px); }
.construct[data-step="2"] .c-tag--cut { opacity: 0.8; }
.construct[data-step="2"] .c-box { opacity: 0.2; }

/* paso 3: strafe — las partes se deslizan en sentidos opuestos */
.construct[data-step="3"] .c-top, .construct[data-step="3"] .c-bottom { transform: none; }
.construct[data-step="3"] .c-arrows { opacity: 0.85; }
.construct[data-step="3"] .c-tag--strafe { opacity: 0.8; }
.construct[data-step="3"] .c-box { opacity: 0; }

/* paso 4: resultado */
.construct[data-step="4"] .c-pieces { opacity: 0; }
.construct[data-step="4"] .c-logo { opacity: 1; }
.construct[data-step="4"] .c-box { opacity: 0; }

.construct__ui { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 16px; margin-top: 18px; align-items: start; }
.construct__steps { grid-column: 1 / span 7; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.construct__steps button { display: inline-flex; gap: 10px; padding: 4px 0; opacity: 0.4; transition: opacity 0.3s ease;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: opacity .3s ease, background-size .6s var(--ease-out); }
.construct__steps button:hover { opacity: 0.75; }
.construct__steps button.is-active { opacity: 1; background-size: 100% 1px; }
.construct__desc { grid-column: 8 / -1; position: relative; min-height: 3.2em; }
.construct__desc p { margin: 0; position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .6s var(--ease-out); }
.construct__desc p.is-active { opacity: 1; transform: none; position: relative; }
@media (max-width: 760px) {
  .construct__steps, .construct__desc { grid-column: 1 / -1; }
  .construct__steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .construct__desc { min-height: 5em; }
}

/* Tiras de logo con más aire */
.strips__list { gap: clamp(24px, 3.4vw, 56px); }

/* =========================================================
   ZTRAFE — paleta interactiva
   ========================================================= */
.palette2 { display: flex; gap: var(--gap); height: clamp(280px, 30vw, 440px); }
.pal {
  flex: 1 1 0; min-width: 0; position: relative; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(14px, 1.6vw, 24px); background: var(--c); color: var(--t);
  transition: flex-grow 0.8s var(--ease-out), transform 0.9s var(--ease-out), clip-path 1.1s var(--ease-in-out);
  clip-path: inset(100% 0 0 0);
}
.palette2.is-in .pal { clip-path: inset(0 0 0 0); }
.palette2.is-in .pal:nth-child(2) { transition-delay: 0s, 0s, .12s; }
.palette2.is-in .pal:nth-child(3) { transition-delay: 0s, 0s, .24s; }
.palette2:hover .pal { flex-grow: 0.8; }
.palette2 .pal:hover, .palette2 .pal:focus-visible { flex-grow: 2.2; }
.pal__top { display: flex; justify-content: space-between; gap: 10px; }
.pal__hint { opacity: 0; transition: opacity .3s ease; }
.pal:hover .pal__hint, .pal.is-copied .pal__hint { opacity: 1; }
.pal__hex { font-size: clamp(30px, 4.4vw, 76px); letter-spacing: -0.04em; line-height: 0.9; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pal__rgb { opacity: 0.7; }
@media (max-width: 760px) {
  .palette2 { flex-direction: column; height: auto; }
  .pal { min-height: 120px; }
  .palette2:hover .pal, .palette2 .pal:hover { flex-grow: 1; }
  .pal__hint { opacity: .7; }
}

/* =========================================================
   ZTRAFE — tipografía animada
   ========================================================= */
.typo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.typo__card { background: #1D1D1D; padding: clamp(16px, 2vw, 28px); display: flex; flex-direction: column; gap: 20px; min-height: clamp(340px, 30vw, 460px); overflow: hidden; }
.typo__head { display: flex; justify-content: space-between; }

.typo__stage { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6%; }
.typo__word { width: 66%; fill: #6CE311; clip-path: inset(0 100% 0 0); transition: clip-path 1.4s var(--ease-in-out) .2s; }
.typo__iso { width: 16%; fill: #6CE311; order: -1; transform: translateX(-30%) rotate(-90deg); opacity: 0; transition: transform 1.2s var(--ease-out), opacity .5s ease; }
.typo__card--nippo.is-in .typo__word { clip-path: inset(0 0 0 0); }
.typo__card--nippo.is-in .typo__iso { transform: none; opacity: 1; }
.typo__weights { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.typo__weights li { opacity: 0.35; transition: opacity .4s ease, color .4s ease; }
.typo__weights li.is-on { opacity: 1; color: #6CE311; }

.typo__card--heebo { font-family: "Heebo", var(--font); }
.tester {
  flex: 1; margin: 0; outline: none; display: flex; align-items: center;
  font-family: "Heebo", sans-serif; font-size: clamp(40px, 4.8vw, 84px); line-height: 1; letter-spacing: -0.02em;
  font-variation-settings: "wght" 400; color: var(--white); caret-color: #6CE311; word-break: break-word;
}
.tester:focus { color: #6CE311; }
.tester__controls { display: flex; align-items: center; gap: 14px; }
.tester__controls input { flex: 1; accent-color: #6CE311; }
.tester__val { min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; color: #6CE311; }
.tester__abc { margin: 0; font-family: "Heebo", sans-serif; font-size: 18px; color: var(--muted); }
.tester__hint { margin: 0; }
@media (max-width: 860px) { .typo { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .pal { clip-path: none !important; }
  .typo__word { clip-path: none !important; }
  .typo__iso { transform: none !important; opacity: 1 !important; }
}
@media (max-width: 760px) {
  .construct__stage { aspect-ratio: 4 / 3; }
  .construct__stage svg { height: 100%; }
  .c-tag { font-size: 24px; }
}

/* Ztrafe: logo de la marca */
.brand-logo { background: #6CE311; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.brand-logo svg { width: 58%; height: auto; }
@media (max-width: 760px) { .brand-logo { aspect-ratio: 4 / 3; } .brand-logo svg { width: 78%; } }

/* Imagen fija con movimiento sutil (para piezas sin versión animada) */
.kb { overflow: hidden; background: var(--panel); }
.r-9x16 .kb { aspect-ratio: 9 / 16; }
.kb img { width: 100%; height: 100%; object-fit: cover; display: block; animation: kb 9s ease-in-out infinite alternate; transform-origin: 50% 40%; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.08) translateY(-1.5%); } }
@media (prefers-reduced-motion: reduce) { .kb img { animation: none; } }

/* Sin palabras viudas: reparto de líneas más parejo (además del espacio duro en el HTML) */
p, li, dd, figcaption, .lead, .body-l { text-wrap: pretty; }
h1, h2, h3, .statement, .contact__title { text-wrap: balance; }
@media (max-width: 760px) { .tester { font-size: 7vw; word-break: normal; } }
.link-arrow { white-space: nowrap; }
