/* ==========================================================================
   MATEO ROJAS — ECHO EDITION PORTFOLIO (2026)
   Monocromo editorial con coreografía guiada por el scroll, calcado del video de referencia:
   carga con anillo ondulado, hero con silueta, portal "About me" sobre una noche estrellada,
   experiencia horizontal, cinta ondulada, tambor 3D, servicios y "Let's talk".
   ========================================================================== */

:root {
  --bg-light: #efefed;
  --bg-light-elev: #ffffff;
  --bg-dark: #09090b;
  --bg-dark-elev: #121216;
  --text-dark: #111113;
  --text-muted-light: #6b6b72;
  --text-light: #f5f5f7;
  --text-muted-dark: #8e8e98;
  --border-light: rgba(17, 17, 19, 0.1);
  --border-dark: rgba(255, 255, 255, 0.12);
  --accent-glow: rgba(255, 255, 255, 0.85);
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --pad-x: clamp(1.25rem, 3.6vw, 3.4rem);
}

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

html {
  background-color: var(--bg-light);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* mientras corre la carga no se puede bajar */
html.is-loading,
html.is-loading body {
  overflow: hidden;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  overflow-x: clip;
}

::selection {
  background: #111113;
  color: #f3f2ee;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   1. CARGA: el punto de "MATEO." se despega y dibuja un anillo ondulado
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #0a0b0f;
  color: #ffffff;
  transition: opacity 0.9s ease 0.15s, visibility 0s linear 1.1s;
}

/* la firma: el contorno real de la letra, destapado por una máscara que sigue cada trazo con su
   largo real (echo.js), así la "lapicera" va a velocidad pareja y respeta los gruesos y finos */
.preloader-sign {
  position: relative;
  z-index: 1;
  width: min(78vw, 900px);
  /* lugar para la bajada: la máscara de la salida recorta lo que queda fuera de la caja */
  padding-bottom: 2.4rem;
}

/* color de la luz de la lapicera (cola y chispas), en R G B; la letra queda siempre blanca */
.preloader {
  --sign-tint: 255 255 255;
}

@media (max-width: 640px) {
  .preloader-sign {
    width: 90vw;
  }
}

.sign-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.22));
}

.sign-ink path {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.sign-fill {
  fill: #f6f6f4;
}

/* al terminar, la letra completa aparece encima y cubre las puntitas que la máscara no alcanza */
.sign-fill-full {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.sign-svg.is-inked .sign-fill-full {
  opacity: 1;
}

/* chispas, cola de luz y polvo de la salida */
.sign-sparks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.sign-caption {
  position: absolute;
  right: 3%;
  bottom: 0.5rem;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(0.56rem, 1vw, 0.78rem);
  letter-spacing: 0.55em;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.sign-caption span {
  display: inline-block;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(4px);
  transition: opacity 0.45s ease, filter 0.45s ease, transform 0.45s ease;
}

.sign-caption span.is-in {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* la salida: una barrida de izquierda a derecha borra la firma mientras se deshace en polvo */
.preloader-sign.is-dissolving {
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 60%);
  mask-image: linear-gradient(90deg, transparent 40%, #000 60%);
  -webkit-mask-size: 250% 100%;
  mask-size: 250% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: signWipe var(--wipe, 0.65s) linear forwards;
}

@keyframes signWipe {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==========================================================================
   2. CABECERA: transparente arriba; se esconde al bajar y vuelve al subir
   ========================================================================== */
.echo-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 1.15rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.55s var(--ease-out-expo), background-color 0.35s ease, color 0.35s ease;
}

.echo-header.is-hidden {
  transform: translateY(-110%);
}

.echo-header.is-scrolled {
  background: rgba(239, 239, 237, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.echo-header.is-dark-mode {
  color: var(--text-light);
}

.echo-header.is-scrolled.is-dark-mode {
  background: rgba(9, 9, 11, 0.8);
}

/* el contorno de la firma vive acá (lo usan la carga y el logo); no ocupa lugar */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* el logo es la firma de la carga, del color del navbar */
.brand-logo {
  display: inline-flex;
  align-items: center;
}

.brand-sign {
  display: block;
  height: 34px;
  width: auto;
  aspect-ratio: 2004 / 526;
  fill: currentColor;
  overflow: visible;
}

/* mientras se escribe (echo.js) se ve solo lo que destapa la lapicera; al terminar, la letra
   completa aparece encima y cubre las puntitas que la máscara no alcanza */
.brand-full {
  transition: opacity 0.4s ease;
}

html.is-signing .brand-full {
  opacity: 0;
}

/* el menú: solo en tablet y celular, donde los botones del navbar no entran */
.menu-btn {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.32rem 0.7rem;
  margin-right: 0.3rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.nav-sheet {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem var(--pad-x) 3rem;
  background: #0a0b0f;
  color: #ffffff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.nav-sheet.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease;
}

.nav-sheet-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-sheet-links a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2rem, 9vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out-expo);
}

.nav-sheet-links a span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  opacity: 0.5;
}

.nav-sheet.is-open .nav-sheet-links a {
  opacity: 1;
  transform: none;
}

.nav-sheet.is-open .nav-sheet-links a:nth-child(2) { transition-delay: 0.04s; }
.nav-sheet.is-open .nav-sheet-links a:nth-child(3) { transition-delay: 0.08s; }
.nav-sheet.is-open .nav-sheet-links a:nth-child(4) { transition-delay: 0.12s; }
.nav-sheet.is-open .nav-sheet-links a:nth-child(5) { transition-delay: 0.16s; }
.nav-sheet.is-open .nav-sheet-links a:nth-child(6) { transition-delay: 0.2s; }

.nav-sheet-close {
  position: absolute;
  top: 1.3rem;
  right: var(--pad-x);
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.nav-pills {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.26rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(17, 17, 19, 0.07);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.echo-header.is-dark-mode .nav-pills {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-pill {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  color: var(--text-muted-light);
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.echo-header.is-dark-mode .nav-pill {
  color: rgba(255, 255, 255, 0.62);
}

.nav-pill:hover,
.nav-pill.is-active {
  color: var(--text-dark);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.echo-header.is-dark-mode .nav-pill:hover,
.echo-header.is-dark-mode .nav-pill.is-active {
  color: #09090b;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* contactar, siempre a la vista en el navbar (en tablet y celular está el botón flotante) */
.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.85rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: #111113;
  color: #ffffff;
  transition: transform 0.2s var(--ease-out-expo), opacity 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  opacity: 0.88;
}

.echo-header.is-dark-mode .nav-cta {
  background: #ffffff;
  color: #111113;
}

/* el botón flotante: abre WhatsApp, el formulario o copia el email */
.contact-fab {
  position: fixed;
  right: clamp(1rem, 2.4vw, 1.75rem);
  bottom: clamp(1rem, 3vh, 1.75rem);
  z-index: 450;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out-expo);
}

.contact-fab.is-shown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  background: #111113;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  transition: transform 0.25s var(--ease-out-expo);
}

.fab-btn:hover {
  transform: translateY(-2px);
}


.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  padding: 0.4rem;
  border-radius: 16px;
  background: #111113;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: 100% 100%;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out-expo), visibility 0s linear 0.25s;
}

.contact-fab.is-open .fab-menu {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out-expo);
}

.fab-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-align: left;
  transition: background 0.2s;
}

.fab-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.fab-option i {
  font-size: 0.95rem;
}

.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.32rem 0.6rem;
  margin-right: 0.3rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lang-switch:hover {
  opacity: 1;
}

.social-icon-link {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  opacity: 0.72;
  transition: opacity 0.2s, transform 0.2s;
}

.social-icon-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* ==========================================================================
   3. HERO: "EXPLORE MY PORTFOLIO" y, debajo, una ventana chica en arco que deja ver la noche
      estrellada del "About me". Al bajar crece hasta llenar la pantalla y se entra al "About me".
   ========================================================================== */
.hero-section {
  /* queda fijo debajo: el "About me" sube por encima como un telón (ver la transición más abajo) */
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: radial-gradient(60% 70% at 50% 62%, #fbfbfa 0%, #f1f1ef 45%, #e6e6e3 100%);
}

.hero-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 2;
  translate: 0 -62%;
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(3.4rem, 11.2vw, 13.5rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
  /* blanco en "diferencia": sobre el gris claro queda casi negro, sobre la noche queda blanco */
  mix-blend-mode: difference;
}

.hero-title-line1,
.hero-title-line2 {
  display: block;
  color: #ffffff;
}

/* la ventana ocupa todo el hero y se recorta en arco; adentro, la noche queda quieta y del
   mismo tamaño que en el "About me" (así, cuando el arco llena la pantalla, ya es esa escena).
   --out (0 a 1, al bajar) agranda el arco; --in (0 a 1) lo hace subir al terminar la carga. */
@property --in {
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}

.hero-window {
  /* chica, asomando debajo del título; --win-shift baja la noche mientras es chica, para que adentro se
     vean las estrellas y no solo el agua (al llenar la pantalla vuelve a 0: es la del "About me") */
  --win-top: 50%;
  --win-side: 42vw;
  --win-r: 8vw;
  --win-shift: 42vh;
  --k: calc(1 - var(--out, 0));
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #050506;
  pointer-events: none;
  clip-path: inset(calc(100% - (100% - var(--k) * var(--win-top)) * var(--in)) calc(var(--k) * var(--win-side)) 0 round calc(var(--k) * var(--win-r)) calc(var(--k) * var(--win-r)) 0 0);
  transition: --in 1.5s var(--ease-out-expo);
}

html.is-loading .hero-window {
  --in: 0;
}

.hero-window-sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 30% 50%;
  /* igual que .about-sky al empezar; el corrimiento (mouse o deriva) se apaga al llenar la pantalla */
  transform: translate3d(calc(var(--px, 0) * var(--k) * 1px), calc(var(--py, 0) * var(--k) * 1px + var(--k) * var(--win-shift, 0px)), 0) scale(1.08);
}

/* la noche que se mueve (echo.js, 3·b2): va encima de su imagen y aparece cuando ya dibujó */
.night-gl {
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.night-gl.is-on {
  opacity: 1;
}

.hero-meta-left,
.hero-meta-right {
  position: absolute;
  z-index: 4;
  bottom: clamp(1.5rem, 5vh, 3rem);
}

.hero-meta-left {
  left: var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
}

.hero-est {
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a4a50;
}

.hero-scroll-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(17, 17, 19, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #111113;
  transition: transform 0.3s var(--ease-out-expo), background 0.3s, color 0.3s;
}

.hero-scroll-btn:hover {
  transform: translate(3px, 3px);
  background: #111113;
  color: #ffffff;
}

.hero-meta-right {
  right: var(--pad-x);
  width: min(300px, 32vw);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.hero-bio-snippet {
  font-size: 0.64rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a4a50;
}

.hero-roles {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2a2a2e;
}

/* la entrada: después de la carga el hero se enfoca (venía desenfocado desde atrás de la carga) */
.hero-title,
.hero-meta-left,
.hero-meta-right {
  transition: filter 1.2s ease, opacity 1.2s ease;
}

html.is-loading .hero-title,
html.is-loading .hero-meta-left,
html.is-loading .hero-meta-right {
  filter: blur(16px);
  opacity: 0.5;
}

/* los textos chicos se escriben letra por letra al terminar la carga (echo.js) */
.tw-ch {
  position: relative;
  visibility: hidden;
}

.tw-ch.is-in {
  visibility: visible;
}

.tw-ch.is-at::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 0.1em;
  bottom: 0.1em;
  width: 0.55em;
  margin-left: 0.08em;
  background: currentColor;
}

/* lo nuevo en el hero: Órbita, arriba de "DEVELOPER EST." */
.hero-news {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 19, 0.14);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #1a1a1d;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease-out-expo);
}

.hero-news:hover {
  background: #111113;
  color: #ffffff;
  transform: translateY(-2px);
}

.hero-news-tag {
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #111113;
  color: #ffffff;
  font-size: 0.56rem;
  letter-spacing: 0.14em;
}

.hero-news:hover .hero-news-tag {
  background: #ffffff;
  color: #111113;
}

/* --------------------------------------------------------------------------
   Transición hero → about: al bajar, el arco del hero se agranda hasta llenar la pantalla con
   la noche estrellada; recién ahí aparece el "About me", que empieza con esa misma imagen.
   echo.js pone --out (0 a 1) en el hero y .is-flat en el about cuando llega arriba.
   -------------------------------------------------------------------------- */
main > section:not(.hero-section) {
  position: relative;
  z-index: 1;
}

.hero-title-line1,
.hero-title-line2,
.hero-meta-left > *,
.hero-meta-right > * {
  will-change: transform;
}

/* mientras sube no se ve: lo que se ve es el arco del hero creciendo */
.about-portal:not(.is-flat) {
  clip-path: inset(0 0 100% 0);
}

/* al llegar, la noche ya está (es la del arco); la tarjeta y "ABOUT ME" aparecen encima */
.about-card,
.about-words {
  transition: opacity 0.7s ease, filter 0.7s ease;
}

.about-portal:not(.is-flat) .about-card,
.about-portal:not(.is-flat) .about-words {
  opacity: 0;
  filter: blur(10px);
  transition: none;
}

/* ==========================================================================
   4. ABOUT ME: portal fijo sobre la noche estrellada. "ABOUT" y "ME" se separan,
      la tarjeta crece hasta ocupar la pantalla y adentro aparece el texto.
      El avance (0 a 1) lo pone echo.js en --p.
   ========================================================================== */
.about-portal {
  --p: 0;
  position: relative;
  height: 230vh;
  background: #050506;
  color: #ffffff;
}

.about-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.about-sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 50%;
  transform: scale(calc(1.08 - var(--grow, 0) * 0.08));
}

/* el cielo se oscurece a medida que la tarjeta crece */
.about-pin::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #040405;
  opacity: calc(var(--grow, 0) * 0.85);
  pointer-events: none;
}

.about-card {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 92vw;
  height: 88vh;
  margin: -44vh 0 0 -46vw;
  border-radius: 18px;
  overflow: hidden;
  background: #060607;
  /* se recorta con clip-path: así la imagen de adentro no se deforma mientras crece */
  clip-path: inset(var(--ci-y, 22vh) var(--ci-x, 35.5vw) round 14px);
  outline: 1px solid rgba(255, 255, 255, 0.14);
  outline-offset: -1px;
}

.about-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  transform: scale(calc(1.18 - var(--grow, 0) * 0.18));
}

/* mientras la tarjeta es chica, una capa oscura con brillo (como el vidrio de la tarjeta del video) */
.about-card-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 50% 30%, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0) 70%), rgba(6, 6, 7, 0.86);
  opacity: calc(1 - var(--grow, 0) * 1.6);
}

.about-words {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(3rem, 6.6vw, 7.6rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  pointer-events: none;
}

.about-words span {
  display: block;
  color: #ffffff;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.35), calc(var(--v, 0) * -26px) 0 calc(4px + var(--v, 0) * 6px) rgba(255, 255, 255, calc(var(--v, 0) * 0.5));
  will-change: transform;
}

.about-card-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: clamp(1.25rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: var(--content, 0);
  filter: blur(calc((1 - var(--content, 0)) * 8px));
  transform: translateY(calc((1 - var(--content, 0)) * 14px));
  pointer-events: none;
}

.about-portal.is-open .about-card-content {
  pointer-events: auto;
}

.about-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.about-headline {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(0.8rem, 1.2vw, 1.05rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  max-width: 46ch;
}

.about-loc {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}


.about-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.about-craft {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.about-craft b {
  font-family: var(--font-sans);
  font-weight: 700;
  color: #ffffff;
}

.about-craft .line {
  width: 36px;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.about-desc {
  max-width: 64ch;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(0.66rem, 0.9vw, 0.8rem);
  line-height: 1.55;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.about-ctas {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.68rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease-out-expo), background 0.25s, color 0.25s, box-shadow 0.25s;
}

.pill-btn:hover {
  transform: translateY(-2px);
}

.pill-btn.light {
  background: #ffffff;
  color: #09090b;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.35);
}

.pill-btn.outline-dark {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
}

.pill-btn.outline-dark:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   5. EXPERIENCE — "WHERE I'VE BEEN" HORIZONTAL TIMELINE (00:08 - 00:11)
   ========================================================================== */
.experience-section {
  --v: 0;
  position: relative;
  height: 470vh; /* seis etapas */
  background: var(--bg-dark);
  color: var(--text-light);
}

.exp-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 3.5vh, 2.5rem) 0;
  overflow: hidden;
}

.exp-topbar {
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.exp-chapter-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffff;
}

.exp-progress-track {
  width: min(220px, 38vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.14);
  position: relative;
  overflow: hidden;
}

.exp-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 33.33%;
  background: #ffffff;
  transition: width 0.35s var(--ease-out-expo);
}

.exp-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.exp-bg-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 0;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  opacity: 0.07;
}

.watermark-line {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(4.5rem, 13vw, 11.5rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #ffffff;
  width: max-content;
  will-change: transform;
}

.wm-dot {
  display: inline-block;
  margin: 0 0.32em;
  opacity: 0.5;
}

.exp-horizontal-viewport {
  position: relative;
  z-index: 2;
  width: 100%;
  overflow: hidden;
}

.exp-horizontal-viewport::-webkit-scrollbar {
  display: none;
}

.exp-horizontal-viewport:active {
  cursor: grabbing;
}

.exp-horizontal-track {
  display: flex;
  align-items: stretch;
  width: max-content;
  /* a la derecha sobra lugar para que la última etapa (Órbita) llegue a acomodarse como las otras */
  padding: 1rem 34vw 1rem var(--pad-x);
  gap: clamp(3rem, 7vw, 7rem);
  will-change: transform;
}

/* al moverse, los títulos dejan una estela, como en el video (--v es la velocidad, de 0 a 1) */
.exp-main-heading,
.exp-slide-role {
  text-shadow:
    calc(var(--v) * 22px) 0 calc(2px + var(--v) * 8px) rgba(255, 255, 255, calc(var(--v) * 0.55)),
    calc(var(--v) * -14px) 0 calc(2px + var(--v) * 6px) rgba(255, 255, 255, calc(var(--v) * 0.35)),
    0 0 18px rgba(255, 255, 255, 0.18);
}

.exp-intro-panel {
  width: clamp(290px, 40vw, 560px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.exp-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
  margin-bottom: 1rem;
}

.exp-main-heading {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.8rem, 6.6vw, 6.4rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.exp-intro-sub {
  font-size: 0.88rem;
  color: var(--text-muted-dark);
  max-width: 36ch;
  line-height: 1.6;
}

.exp-slide-card {
  width: clamp(320px, 58vw, 820px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 0;
}

.exp-slide-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1rem;
}

.exp-slide-meta a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  transition: color 0.2s, border-color 0.2s;
}

.exp-slide-meta a:hover {
  color: #ffffff;
  border-color: #ffffff;
}

/* la etapa nueva (Órbita) lleva una marca */
.exp-new {
  display: inline-block;
  vertical-align: 0.9em;
  margin-left: 0.4rem;
  padding: 0.35em 0.6em;
  border-radius: 999px;
  background: #ffffff;
  color: #09090b;
  font-size: 0.16em;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-shadow: none;
}


.exp-slide-meta .line {
  width: 42px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.exp-slide-role {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.2vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.exp-slide-summary {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 58ch;
  margin-bottom: 2.25rem;
}

.exp-milestones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.milestone-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.milestone-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
}

.milestone-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
}

.exp-bottombar {
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.exp-tabs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.exp-tab-btn {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  color: var(--text-muted-dark);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.exp-tab-btn.is-active,
.exp-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   GITHUB — cuatro escenas con las contribuciones reales (echo.js dibuja el canvas)
   ========================================================================== */
.github-section {
  position: relative;
  height: 330vh;
  background: var(--bg-light);
  color: var(--text-dark);
}

.gh-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vh, 1.75rem);
  padding: clamp(2.5rem, 7vh, 4.5rem) var(--pad-x) clamp(1.5rem, 4vh, 2.5rem);
  overflow: hidden;
}

.gh-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.gh-top-side {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* aparece solo si los datos llegaron en vivo desde api/github.php */
.gh-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: #111113;
}

.gh-live[hidden] {
  display: none;
}

.gh-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #111113;
  animation: ghPulse 1.8s ease-out infinite;
}

@keyframes ghPulse {
  0% { box-shadow: 0 0 0 0 rgba(17, 17, 19, 0.35); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(17, 17, 19, 0); }
}

.gh-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  white-space: nowrap;
  letter-spacing: 0.12em;
  color: var(--text-muted-light);
  border-bottom: 1px solid rgba(17, 17, 19, 0.2);
  transition: color 0.2s, border-color 0.2s;
}

.gh-link:hover {
  color: #111113;
  border-color: #111113;
}

.gh-card {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 19, 0.08);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.25);
  padding: clamp(1.1rem, 2.5vw, 2rem);
}

.gh-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.gh-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--text-muted-light);
}

.gh-number {
  margin: 0.35rem 0 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.gh-number small {
  font-size: 0.26em;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted-light);
}

.gh-note {
  max-width: 34ch;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #55555c;
  text-align: right;
}

.gh-canvas {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: block;
}

.gh-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.gh-stats {
  display: flex;
  gap: clamp(1rem, 2.6vw, 2.4rem);
  margin: 0;
}

/* el número arriba y el nombre abajo (en el HTML va primero el nombre, como pide <dl>) */
.gh-stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.2rem;
}

.gh-stats dd {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.gh-stats dt {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  color: var(--text-muted-light);
}

.gh-steps {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
}

.gh-steps span {
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  color: #9a9aa0;
  transition: background 0.3s, color 0.3s;
}

.gh-steps span.is-on {
  background: #111113;
  color: #ffffff;
}

@media (max-width: 768px) {
  .gh-card-head {
    flex-direction: column;
    gap: 0.5rem;
  }

  .gh-note {
    text-align: left;
  }

  .gh-steps span:not(.is-on) {
    display: none;
  }

  .gh-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
  }

  .gh-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem 1rem;
  }

  .gh-top-side {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
  }
}

/* ==========================================================================
   6. PROYECTOS — la cinta ondulada con algunos (el resto, en el archivo): al bajar pasa uno por uno;
      la última pantalla es la que tapa la hoja de los destacados
   ========================================================================== */
.landings-section {
  position: relative;
  height: 380vh;
  background: var(--bg-light);
  color: var(--text-dark);
}

.landings-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2.5rem, 7vh, 4.5rem) 0 clamp(1.5rem, 4vh, 2.5rem);
  overflow: hidden;
}

.landings-header-row {
  padding: 0 var(--pad-x);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-huge-label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 3.25rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
  color: #141416;
}

.wave-ribbon-stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  cursor: grab;
  user-select: none;
}

.wave-ribbon-stage:active {
  cursor: grabbing;
}

#waveRibbonCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wave-active-caption {
  text-align: center;
  margin-top: 0.5rem;
  padding: 0 1.5rem;
  min-height: 4.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.wave-project-title {
  font-weight: 500;
  font-size: 0.95rem;
  color: #111113;
}

.wave-project-sub {
  font-size: 0.85rem;
  color: var(--text-muted-light);
}

.wave-project-meta {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #55555d;
}

.wave-project-link {
  font-weight: 600;
  color: #111113;
  border-bottom: 1px solid #111113;
  padding-bottom: 1px;
  transition: opacity 0.2s;
}

.wave-project-link:hover {
  opacity: 0.65;
}

.landings-footer-row {
  padding: 1rem var(--pad-x) 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wave-hint {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: #6b6b72;
}

/* en el celular la pista sobra (se recorre bajando) y el botón de contacto la tapaba */
.wave-hint-touch { display: none; }

/* ---- celulares y tablets táctiles (.is-flow, echo.js): scroll normal, nada queda fijo ----
   la cinta ocupa una pantalla y se desliza de costado; los destacados van uno debajo del otro */
.is-flow .landings-section { height: auto; }
.is-flow .landings-pin {
  position: relative;
  height: 100svh;
  max-height: 920px;
  transform: none;
}
.is-flow .landings-pin::after { display: none; }
.is-flow #waveRibbonCanvas { touch-action: pan-y; } /* lo vertical scrollea; lo horizontal mueve la cinta */
/* la pista va arriba de la cinta: abajo la tapaba el botón de contacto */
.is-flow .landings-footer-row { order: 1; padding: 0 var(--pad-x); justify-content: flex-start; }
.is-flow .landings-header-row { order: 0; margin-bottom: 0.6rem; }
.is-flow .wave-ribbon-stage { order: 2; }
.is-flow .wave-active-caption { order: 3; padding-bottom: 4.5rem; }
.is-flow .wave-hint { display: none; }
.is-flow .wave-hint-touch { display: inline; }

.is-flow .featured-section { height: auto; margin-top: 0; }
.is-flow .featured-pin {
  position: relative;
  height: auto;
  overflow: visible;
  background: #060607;
  will-change: auto;
}
.is-flow .feat-curtain,
.is-flow .roulette,
.is-flow .feat-hud { display: none; }
.is-flow .feat-slide {
  position: relative;
  inset: auto;
  height: 100svh;
  min-height: 560px;
  max-height: 960px;
  clip-path: none;
}
.is-flow .feat-media { transform: none; }

/* los proyectos sin web pública no tienen enlace */
.wave-project-meta.no-link .wave-project-sep,
.wave-project-meta.no-link .wave-project-link {
  display: none;
}

/* ==========================================================================
   7. PROYECTOS DESTACADOS — entra por encima de la cinta como la carga: cinco columnas del negro de
      la firma suben escalonadas, tapan la cinta y se retiran hacia arriba destapando la ruleta
      (empieza 100vh antes de que termine la de proyectos; echo.js recorta las columnas). Adentro: la ruleta, que gira con el scroll y frena en un proyecto al
      azar; esa tarjeta crece hasta llenar la pantalla y siguen los demás a pantalla completa (el
      siguiente sube por un arco, como el del hero, y el de atrás se oscurece). echo.js pone en cada
      uno --t (cuánto subió), --dim (cuánto lo tapó el siguiente), --info (su texto) y --shade.
   ========================================================================== */
.featured-section {
  position: relative;
  height: 340vh;
  margin-top: -100vh;
  color: var(--text-dark);
}

/* las columnas negras de la entrada (fijas en la pantalla; echo.js les da la forma) */
.feat-curtain {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: #0a0b0f;
  pointer-events: none;
  visibility: hidden;
}

.feat-curtain span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.85);
}

/* mientras entra, la escena queda quieta en la pantalla y se ve solo lo que destapan las columnas */
.featured-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--bg-light);
  will-change: transform, clip-path;
}

/* la cinta de proyectos, mientras la tapan las columnas: se achica un poco y se apaga (--cover, echo.js) */
.landings-pin {
  transform: scale(calc(1 - var(--cover, 0) * 0.06));
  transform-origin: 50% 30%;
}

.landings-pin::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #060607;
  opacity: calc(var(--cover, 0) * 0.45);
  pointer-events: none;
}

/* ---- la ruleta ---- */
.roulette {
  position: absolute;
  inset: 0;
  opacity: var(--ring, 1);
}

.roulette-label {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  z-index: 1;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.2vw, 1.85rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #111113;
  opacity: var(--label, 1);
  pointer-events: none;
}

.roulette-pointer {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 3;
  width: 0;
  height: 0;
  margin-left: -7px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid #111113;
  opacity: var(--label, 1);
}

.roulette-rig {
  position: absolute;
  inset: 0;
}

.roulette-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(200px, 25vw, 380px);
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 19, 0.12);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  will-change: transform, opacity;
}

.roulette-card.is-chosen {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.roulette-bar {
  height: 22px;
  background: #f0efeb;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  padding: 0 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: #666666;
}

.roulette-dots {
  display: flex;
  gap: 4px;
}

.roulette-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
}

.roulette-card img {
  display: block;
  width: 100%;
  height: calc(100% - 22px);
  max-width: none;
  object-fit: cover;
  object-position: top center;
  background: #18181b;
}

.roulette-index {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: var(--pad-x);
  translate: 0 -50%;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  opacity: var(--label, 1);
}

.roulette-index li {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: #a0a0a8;
  padding: 0.2rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.roulette-index li.is-on {
  color: #111113;
  font-weight: 700;
  border-bottom-color: #111113;
  transform: translateX(-4px);
}

.roulette-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(1.25rem, 4vh, 2.25rem);
  translate: -50% 0;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 19, 0.12);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  white-space: nowrap;
  color: #333338;
  /* aparece cuando la ruleta frenó */
  opacity: calc(var(--label, 1) * var(--hint, 0));
}

.feat-slide {
  --t: 1;
  --dim: 0;
  --info: 1;
  --shade: 1;
  --k: calc(1 - var(--t));
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  color: #ffffff;
  background: #060607;
  clip-path: inset(calc(var(--k) * 100%) calc(var(--k) * 35vw) 0 round calc(var(--k) * 15vw) calc(var(--k) * 15vw) 0 0);
}

.feat-media {
  position: absolute;
  inset: 0;
  transform: scale(calc(1.04 + var(--k) * 0.12 - var(--dim) * 0.04));
}

/* el que sale de la ruleta: echo.js lo recorta al tamaño de la tarjeta y lo agranda (--grow) */
.feat-slide.is-growing .feat-media {
  transform: translate(var(--gx, 0px), var(--gy, 0px)) scale(var(--gs, 1));
}

.feat-poster,
.feat-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* el video aparece cuando ya está andando (hasta ahí se ve la imagen) */
.feat-video {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.feat-video.is-on {
  opacity: 1;
}

/* oscurecido solo abajo, donde va el texto: el video se ve casi limpio (el de atrás, más oscuro) */
.feat-media::after {
  content: '';
  position: absolute;
  inset: 0 0 -6px; /* pasa unos píxeles el borde del video: en uno claro quedaba una línea */
  background:
    linear-gradient(0deg, rgb(6, 6, 7) 0%, rgba(6, 6, 7, 0.78) 20%, rgba(6, 6, 7, 0.3) 38%, rgba(6, 6, 7, 0) 52%),
    rgba(6, 6, 7, calc(var(--dim) * 0.7));
  opacity: var(--shade);
}

.feat-info {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.1rem;
  padding: 6.5rem var(--pad-x) clamp(2rem, 6vh, 3.5rem);
  opacity: var(--info);
  transform: translateY(calc((1 - var(--info)) * 28px));
}

.feat-top {
  display: flex;
  gap: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.7);
}

.feat-num {
  color: #ffffff;
}

.feat-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.8rem, 6.4vw, 7.2rem); /* más grande tapaba el centro del video */
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  /* el degradé pinta solo dentro de la caja: sin este aire arriba se perdía la tilde de ÓRBITA */
  padding-top: 0.16em;
  margin-top: -0.06em; /* casi todo ese aire queda: la tilde no pisa la línea de arriba */
  background: linear-gradient(180deg, #ffffff 0%, #d4d4d8 70%, #9a9aa2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.feat-body {
  display: grid;
  grid-template-columns: minmax(0, 30rem) minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.5rem 3.5rem;
}

.feat-desc {
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.feat-facts {
  display: grid;
  gap: 0.7rem;
}

.feat-facts div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.feat-facts dt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.55);
}

.feat-facts dd {
  font-size: 0.82rem;
  color: #ffffff;
}

.feat-cta {
  justify-self: end;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: #ffffff;
  color: #111113;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out-expo), opacity 0.2s;
}

.feat-cta:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* a la derecha: el nombre de la sección y en cuál vas */
.feat-hud {
  position: absolute;
  z-index: 5;
  opacity: var(--hud, 1);
  top: 50%;
  right: var(--pad-x);
  translate: 0 -50%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  pointer-events: none;
}

.feat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
  writing-mode: vertical-rl;
}

.feat-dots {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.feat-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transition: background 0.3s, transform 0.3s;
}

.feat-dots span.is-on {
  background: #ffffff;
  transform: scale(1.35);
}

.all-projects-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: #111113;
  color: #ffffff;
  transition: transform 0.2s, opacity 0.2s;
}

.all-projects-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* después de los destacados: una llamada a contactar a pantalla casi completa */
.cta-band {
  position: relative;
  z-index: 1;
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  padding: 5rem var(--pad-x);
  text-align: center;
  background: #060607;
  color: #ffffff;
}

.cta-eyebrow,
.cta-note {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.6);
}

.cta-title {
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.2rem, 7.2vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #d4d4d8 65%, #8e8e96 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  transition: transform 0.25s var(--ease-out-expo), background 0.2s, color 0.2s;
}

.cta-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.cta-btn.is-primary {
  background: #ffffff;
  color: #111113;
  border-color: #ffffff;
}

.cta-btn.is-primary:hover {
  background: #e9e9e7;
}

.cta-btn i {
  font-size: 1rem;
}

/* ==========================================================================
   8. THE SERVICES WE PROVIDE — ACCORDION CARDS (00:26)
   ========================================================================== */
.services-section {
  position: relative;
  background: var(--bg-light);
  color: var(--text-dark);
  padding: clamp(4.5rem, 8vw, 7.5rem) clamp(1.5rem, 4.5vw, 4.5rem);
  border-top: 1px solid var(--border-light);
}

.services-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.services-heading {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #121215;
  margin-bottom: 0.75rem;
}

.services-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.65;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted-light);
}

.services-accordion {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-item {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 17, 19, 0.1);
  overflow: hidden;
  transition: background 0.4s var(--ease-out-expo), color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

.service-item:hover {
  border-color: rgba(17, 17, 19, 0.25);
}

.service-item.is-open {
  background: #0a0a0d;
  color: #ffffff;
  border-color: #0a0a0d;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.service-trigger {
  width: 100%;
  padding: 1.45rem 2rem;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  text-align: center;
}

.service-num {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted-light);
  text-align: left;
}

.service-item.is-open .service-num {
  color: rgba(255, 255, 255, 0.55);
}

.service-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(0.88rem, 1.35vw, 1.08rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.service-chevron {
  justify-self: end;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: transform 0.35s var(--ease-out-expo);
}

.service-item.is-open .service-chevron {
  transform: rotate(180deg);
}

.service-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease-out-expo);
}

.service-item.is-open .service-panel {
  max-height: 320px;
}

.service-panel-inner {
  padding: 0 2rem 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.service-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 68ch;
}

.service-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.service-deliverables {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.service-inquire-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  border-bottom: 1px solid #ffffff;
  padding-bottom: 2px;
}

/* ==========================================================================
   9. FOOTER — "LET'S TALK" CLIMAX CTA (00:27 - 00:28)
   ========================================================================== */
.echo-footer {
  position: relative;
  background: #101014;
  color: #ffffff;
  min-height: 78vh;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 4.5vw, 4.5rem) 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.footer-ambient-glow {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(850px, 90vw);
  height: 320px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.08) 0%, rgba(16, 16, 20, 0) 70%);
  pointer-events: none;
}

.footer-center-stage {
  position: relative;
  z-index: 2;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.75rem;
}

.lets-talk-heading {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(3.6rem, 13.5vw, 12.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #d4d4d8 65%, #8e8e96 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 35px rgba(255, 255, 255, 0.14));
  cursor: pointer;
  transition: transform 0.35s var(--ease-out-expo), filter 0.35s ease;
}

.lets-talk-heading:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 0 48px rgba(255, 255, 255, 0.28));
}

.footer-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.footer-pill {
  padding: 0.72rem 1.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  transition: all 0.25s var(--ease-out-expo);
}

.footer-pill:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.footer-pill.primary {
  background: #ffffff;
  color: #09090b;
  border-color: #ffffff;
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.4);
}

.footer-pill.primary:hover {
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.65);
}

.footer-bottom-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   10. MODALS (ALL PROJECTS, ARTICLES, GALLERY & CONTACT FORM)
   ========================================================================== */
.echo-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(9, 9, 11, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.echo-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.echo-modal-box {
  width: min(1040px, 100%);
  max-height: 88vh;
  background: #121216;
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.echo-modal-head {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.echo-modal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.echo-modal-close {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: background 0.2s, color 0.2s;
}

.echo-modal-close:hover {
  background: #ffffff;
  color: #09090b;
}

.echo-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
}

/* Catalog Grid inside Modal */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.catalog-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s;
}

.catalog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
}

.catalog-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.catalog-card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.catalog-card-kind {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
}

.catalog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.catalog-card-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  flex: 1;
}

.catalog-card-link {
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
}

/* Contact Form inside Modal */
.contact-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.contact-field input,
.contact-field textarea {
  padding: 0.75rem 0.95rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: #ffffff;
}

.toast-notification {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 3000;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: #ffffff;
  color: #09090b;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s ease;
}

.toast-notification.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-pills {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .nav-cta {
    display: none;
  }

  .feat-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .feat-cta {
    justify-self: start;
  }

  .about-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .brand-sign {
    height: 28px;
  }

  .hero-title {
    top: 44%;
    font-size: clamp(3rem, 15vw, 6rem);
  }

  .feat-title {
    font-size: clamp(2.3rem, 11.5vw, 5rem);
  }

  .roulette-card {
    width: 40vw;
  }

  .roulette-index {
    display: none;
  }

  .feat-body {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feat-desc {
    font-size: 0.82rem;
  }

  .feat-hud {
    top: 5.5rem;
    translate: none;
  }

  .feat-label {
    display: none;
  }

  .landings-header-row .all-projects-btn {
    font-size: 0.58rem;
    padding: 0.45rem 0.8rem;
  }

  .hero-window {
    --win-top: 47%;
    --win-side: 30vw;
    --win-r: 20vw;
    --win-shift: 36vh;
  }

  /* abajo a la izquierda quedan encima del arco: fondo blanco lleno para que se lean */
  .hero-news,
  .hero-scroll-btn {
    background: #ffffff;
  }

  .hero-est {
    display: none;
  }

  .hero-meta-right {
    display: none;
  }

  .about-words {
    font-size: clamp(2.6rem, 13vw, 4.4rem);
  }

  .about-card {
    width: 94vw;
    height: 86vh;
    margin: -43vh 0 0 -47vw;
  }

  .about-top {
    flex-direction: column;
    gap: 0.6rem;
  }

  .about-desc {
    font-size: 0.66rem;
  }

  .exp-milestones-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .exp-intro-panel,
  .exp-slide-card {
    width: 84vw;
  }

  .service-trigger {
    padding: 1.15rem 1.25rem;
    grid-template-columns: 32px 1fr 28px;
  }

  .contact-modal-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================================
   CASO DE ESTUDIO (Paperflix / MiPaperlux, sin enlace público)
   La cortina sube en columnas escalonadas, como la entrada de Destacados;
   el caso entra encima y al cerrar las columnas se van hacia arriba.
   ===================================================================== */
button.catalog-card-link { background: none; border: 0; padding: 0; cursor: pointer; }

.case-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
  visibility: hidden;
  pointer-events: none;
  color: var(--text-light);
}
.case-overlay.is-open,
.case-overlay.is-closing { visibility: visible; }
.case-overlay.is-open { pointer-events: auto; }

.case-cols { position: absolute; inset: 0; display: flex; }
.case-cols i {
  flex: 1;
  margin-right: -1px; /* sin rendijas entre columnas */
  background: var(--bg-dark);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.55s var(--ease-in-out) calc(var(--i) * 45ms);
}
.case-overlay.is-open .case-cols i { transform: scaleY(1); }
.case-overlay.is-closing .case-cols i {
  transform-origin: 50% 0;
  transition-delay: calc((7 - var(--i)) * 45ms + 0.2s);
}

.case-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.case-overlay.is-open .case-scroll {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease 0.45s, transform 0.8s var(--ease-out-expo) 0.45s;
}

.case-top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem var(--pad-x);
  background: var(--bg-dark);
}
/* lo que pasa por debajo se esfuma en vez de cortarse */
.case-top::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 28px;
  background: linear-gradient(var(--bg-dark), transparent);
  pointer-events: none;
}
.case-kicker,
.case-kind,
.case-row h3,
.case-gallery h3,
.case-meta dt,
.case-num,
.case-next span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--text-muted-dark);
  font-weight: 500;
}
.case-close {
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border-dark);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.case-close:hover { background: #fff; color: #111113; border-color: #fff; }

.case-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 1.5rem var(--pad-x) 6rem;
}
.case-title {
  margin: 0.6rem 0 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 11vw, 9.5rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  padding-top: 0.16em;
  margin-top: 0.44rem;
  background: linear-gradient(180deg, #ffffff 30%, #b9b9c2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.case-lead {
  max-width: 46rem;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: #d8d8de;
}
.case-video {
  margin: 2.6rem 0 2rem;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  aspect-ratio: 16 / 9;
  background: var(--bg-dark-elev);
}
.case-video video { display: block; width: 100%; height: 100%; object-fit: cover; }

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 1.6rem 0 2.2rem;
  border-bottom: 1px solid var(--border-dark);
}
.case-meta dd { margin-top: 0.5rem; font-size: 0.98rem; line-height: 1.45; }

.case-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2rem;
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--border-dark);
}
.case-row h3 { padding-top: 0.35rem; }
.case-row > p { max-width: 48rem; font-size: 1.12rem; line-height: 1.65; color: #d8d8de; }

.case-decisions { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.case-decisions li {
  padding: 1.4rem 1.3rem 1.5rem;
  border-radius: 16px;
  background: var(--bg-dark-elev);
  border: 1px solid var(--border-dark);
}
.case-decisions b { display: block; margin: 0.9rem 0 0.6rem; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.case-decisions p { font-size: 0.94rem; line-height: 1.55; color: var(--text-muted-dark); }

.case-results { display: flex; flex-wrap: wrap; gap: 1rem 3.5rem; }
.case-results strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.case-results span { display: block; margin-top: 0.5rem; color: var(--text-muted-dark); }

.case-gallery { padding: 2.4rem 0 1rem; }
.case-gallery-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.case-arrows { display: flex; gap: 0.5rem; }
.case-arrows button {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--border-dark);
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.case-arrows button:hover { background: #fff; color: #111113; }
.case-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.4rem;
}
.case-strip::-webkit-scrollbar { display: none; }
.case-shot {
  flex: 0 0 auto;
  height: clamp(220px, 36vw, 440px);
  padding: 0;
  border: 1px solid var(--border-dark);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-dark-elev);
  scroll-snap-align: start;
  cursor: zoom-in;
}
.case-shot img { display: block; height: 100%; width: auto; transition: transform 0.6s var(--ease-out-expo); }
.case-shot:hover img { transform: scale(1.03); }

.case-next {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  margin-top: 3rem;
  padding: 2.4rem 0 0;
  border: 0;
  border-top: 1px solid var(--border-dark);
  background: none;
  color: var(--text-light);
  text-align: left;
  cursor: pointer;
}
.case-next b {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  transition: transform 0.4s var(--ease-out-expo);
}
.case-next:hover b { transform: translateX(12px); }

.case-zoom {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(9, 9, 11, 0.92);
  cursor: zoom-out;
}
.case-zoom[hidden] { display: none; }
.case-zoom img { max-width: 100%; max-height: 100%; border-radius: 12px; }

@media (max-width: 900px) {
  .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-row { grid-template-columns: 1fr; gap: 1rem; }
  .case-decisions { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .case-meta { grid-template-columns: 1fr; gap: 1rem; }
  .case-shot { height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .case-cols i, .case-scroll, .case-overlay.is-open .case-scroll { transition: none; }
}

/* Destacados en pantallas verticales: los videos son 16:9 y a pantalla completa se recortaban hasta
   quedar un pedazo del medio. Ahí el video va entero arriba, como una pantalla, y el texto abajo. */
@media (max-aspect-ratio: 4/5) {
  .feat-media {
    background: radial-gradient(120% 60% at 50% 22%, #1a1a20 0%, #060607 70%);
  }

  .feat-poster,
  .feat-video {
    top: clamp(5.5rem, 15vh, 9rem);
    left: 4vw;
    width: 92vw;
    height: calc(92vw * 9 / 16);
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  /* el oscurecido ya no tapa el video: solo la parte de abajo, donde va el texto */
  .feat-media::after {
    background:
      linear-gradient(0deg, rgba(6, 6, 7, 0.9) 0%, rgba(6, 6, 7, 0) 45%),
      rgba(6, 6, 7, calc(var(--dim) * 0.7));
  }
}

/* =====================================================================
   ARTÍCULOS: la tarjeta crece hasta llenar la pantalla y se vuelve el artículo.
   echo.js anima el recorte (clip-path) desde la tarjeta; el contenido entra después (.is-in).
   ===================================================================== */
.catalog-card.is-article { cursor: pointer; transition: transform 0.35s var(--ease-out-expo), border-color 0.2s; }
.catalog-card.is-article:hover { transform: translateY(-3px); }

.art-view {
  position: fixed;
  inset: 0;
  z-index: 2700;
  background: var(--bg-dark);
  color: var(--text-light);
  visibility: hidden;
  pointer-events: none;
  transition: clip-path 0.75s var(--ease-out-expo);
}
.art-view.is-open { visibility: visible; pointer-events: auto; }
.art-view.is-closing { pointer-events: none; transition: clip-path 0.7s var(--ease-in-out); }

.art-progress { position: absolute; top: 0; left: 0; right: 0; z-index: 4; height: 2px; }
.art-progress i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }

.art-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }

/* lo de adentro aparece cuando la hoja ya llenó la pantalla */
.art-top,
.art-hero-in,
.art-body,
.art-next {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.art-view.is-in .art-top,
.art-view.is-in .art-hero-in,
.art-view.is-in .art-body,
.art-view.is-in .art-next {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.9s var(--ease-out-expo);
}
.art-view.is-in .art-hero-in { transition-delay: 0.06s; }
.art-view.is-in .art-body { transition-delay: 0.16s; }
.art-view.is-in .art-next { transition-delay: 0.22s; }

.art-top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem var(--pad-x);
  background: linear-gradient(rgba(9, 9, 11, 0.85), rgba(9, 9, 11, 0));
  transition: background-color 0.3s ease;
}
.art-view.is-reading .art-top { background: var(--bg-dark); }
.art-view.is-reading .art-top::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 28px;
  background: linear-gradient(var(--bg-dark), transparent);
  pointer-events: none;
}
.art-kicker,
.art-meta {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); /* sobre el cielo, que se lea */
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

/* portada: un pedazo del cielo estrellado distinto para cada artículo */
.art-hero {
  position: relative;
  margin-top: -4.4rem; /* la barra de arriba flota sobre la portada */
  min-height: min(82vh, 780px);
  display: flex;
  align-items: flex-end;
  padding: 7rem var(--pad-x) clamp(2.5rem, 7vh, 4.5rem);
  background:
    linear-gradient(180deg, rgba(9, 9, 11, 0.35) 0%, rgba(9, 9, 11, 0.2) 40%, var(--bg-dark) 100%),
    url('../img/echo/starry-night.webp') var(--sky, 50% 20%) / 260% auto no-repeat,
    var(--bg-dark);
}
.art-hero-in { width: min(1100px, 100%); margin: 0 auto; }
.art-title {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 6.2vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 15ch;
  text-wrap: balance;
}

/* el texto: columna cómoda, secciones numeradas, código prolijo */
.art-body {
  counter-reset: art;
  width: min(44rem, 100% - 2 * var(--pad-x));
  margin: 0 auto;
  padding: 1rem 0 4rem;
  font-size: 1.12rem;
  line-height: 1.8;
  color: #cfcfd6;
}
.art-body > p:first-child {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.55;
  color: #fff;
  margin-bottom: 2rem;
}
.art-body p + p { margin-top: 1.1rem; }
.art-body h5,
.art-body h6 {
  counter-increment: art;
  margin: 3.2rem 0 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border-dark);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}
.art-body h5::before,
.art-body h6::before {
  content: counter(art, decimal-leading-zero);
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--text-muted-dark);
}
.art-body strong { color: #fff; font-weight: 600; }
.art-body a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.art-body ul,
.art-body ol { margin: 1rem 0 1rem 1.2rem; }
.art-body li + li { margin-top: 0.45rem; }
.art-body li::marker { color: var(--text-muted-dark); }
.art-body code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.art-body pre {
  margin: 1.6rem 0;
  padding: 1.3rem 1.4rem;
  border-radius: 14px;
  border: 1px solid var(--border-dark);
  background: var(--bg-dark-elev);
  overflow-x: auto;
  line-height: 1.6;
}
.art-body pre code { padding: 0; background: none; font-size: 0.88rem; color: #e6e6ec; }
.art-body blockquote {
  margin: 2rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid #fff;
  font-size: 1.35rem;
  line-height: 1.5;
  color: #fff;
}

.art-next {
  width: min(44rem, 100% - 2 * var(--pad-x));
  margin: 0 auto 6rem;
}
.art-next b { font-size: clamp(1.6rem, 4vw, 2.8rem); text-transform: none; line-height: 1.1; }

@media (prefers-reduced-motion: reduce) {
  .art-view, .art-top, .art-hero-in, .art-body, .art-next { transition: none !important; }
}

/* en compu el video termina un poco antes del borde de abajo: su contenido (siempre al centro) sube y
   no cae debajo del título; lo de abajo es el mismo negro del fondo, sin corte */
@media (min-aspect-ratio: 4/5) {
  html:not(.is-flow) .feat-media { bottom: 14vh; }
}

/* los socios de Órbita, con link a sus sitios */
.person-link {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  white-space: nowrap;
  transition: text-decoration-color 0.2s ease;
}
.person-link::after {
  content: '↗';
  display: inline-block;
  margin-left: 0.15em;
  font-size: 0.8em;
  transition: transform 0.25s var(--ease-out-expo);
}
.person-link:hover { text-decoration-color: #ffffff; }
.person-link:hover::after { transform: translate(2px, -2px); }
