/* ==========================================================================
   V2 · movimiento con intención: escaparate, frase narrativa, Sobre mí, carrusel
   ========================================================================== */

/* ---------- Transición suave entre la portada y el archivo ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.45s; animation-timing-function: var(--ease-out); }

/* ---------- 01 · Escaparate de proyectos ---------- */
.showcase { position: relative; background: var(--ink); color: #fff; padding-top: clamp(4rem, 9vw, 7.5rem); }
.showcase ::selection { background: #fff; color: var(--ink); }
.showcase :focus-visible { outline-color: #fff; }
.showcase__head { padding: 0 var(--gutter-r) 0 var(--gutter); margin-bottom: clamp(2rem, 5vw, 4rem); }
.showcase__head .kicker { color: rgb(255 255 255 / 0.75); }
.showcase__title { font-size: clamp(2.6rem, 1rem + 6vw, 8rem); font-weight: 800; letter-spacing: var(--track-display); line-height: 0.9; max-width: 14ch; }
.showcase__title em { color: var(--halo); }
@media (min-width: 1100px) {
  .showcase__title { max-width: none; font-size: min(clamp(2.6rem, 1rem + 6vw, 8rem), 6.6vw); }
  .showcase__title > span { display: block; white-space: nowrap; }
}

/* Sin JS o con movimiento reducido: los proyectos uno debajo de otro */
.showcase__stage { display: grid; gap: clamp(10px, 1vw, 16px); padding: 0 var(--gutter-r) 0 var(--gutter); }
.slide { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.slide__media { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; cursor: pointer; background: #000; }
.slide__media img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(8 10 16 / 0.78), rgb(8 10 16 / 0.15) 48%, transparent 70%); pointer-events: none; }
.slide__text { position: absolute; left: clamp(1rem, 4vw, 3.5rem); right: clamp(1rem, 4vw, 3.5rem); bottom: clamp(1.2rem, 5vh, 3.5rem); z-index: 2; display: grid; gap: 0.5rem; justify-items: start; }
.slide__index { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.8); }
.slide__name { font-size: clamp(2.6rem, 1rem + 7.4vw, 10rem); font-weight: 800; letter-spacing: -0.06em; line-height: 0.86; }
.slide__type { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.2rem, 0.9rem + 1.1vw, 2.1rem); line-height: 1.1; color: rgb(255 255 255 / 0.92); }
.showcase__ring, .showcase__dots { display: none; }

/* Con JS: escena fija; cada proyecto se abre en un círculo hasta ocupar la pantalla */
.showcase.is-live .showcase__track { height: calc((var(--n, 4) - 1) * 88vh + 135vh); height: calc((var(--n, 4) - 1) * 88svh + 135svh); }
.showcase.is-live .showcase__stage { position: sticky; top: 0; display: block; height: 100vh; height: 100svh; height: 100dvh; padding: 0; overflow: hidden; }   /* dvh: ocupa siempre la pantalla visible, aunque la barra del navegador móvil se esconda */
.showcase.is-live .slide { position: absolute; inset: 0; aspect-ratio: auto; clip-path: circle(calc(var(--a, 0) * 72%) at 50% var(--cy, 50%)); }
.showcase.is-live .slide__media img { transform: scale(calc(1.16 - var(--a, 0) * 0.16)); }
.showcase.is-live .slide__text > * { opacity: 0; translate: 0 26px; transition: opacity 0.6s var(--ease-out), translate 0.8s var(--ease-out); }
.showcase.is-live .slide.is-open .slide__text > * { opacity: 1; translate: 0 0; }
.showcase.is-live .slide.is-leaving .slide__text > * { opacity: 0; translate: 0 -16px; transition-duration: 0.3s; transition-delay: 0s; }
.showcase.is-live .slide.is-open .slide__text > :nth-child(2) { transition-delay: 0.06s; }
.showcase.is-live .slide.is-open .slide__text > :nth-child(3) { transition-delay: 0.14s; }
.showcase.is-live .slide.is-open .slide__text > :nth-child(4) { transition-delay: 0.22s; }
.showcase.is-live .showcase__ring {
  display: block; position: absolute; left: 50%; top: var(--cy, 50%); z-index: 5;
  width: calc(var(--r, 0px) * 2); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; border: 1.5px solid rgb(255 255 255 / 0.85); pointer-events: none;
}
.showcase.is-live .showcase__ring::after { content: ""; position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px rgb(255 255 255 / 0.6); }
.showcase.is-live .showcase__dots { display: grid; gap: 10px; position: absolute; right: var(--gutter-r); top: 50%; translate: 0 -50%; z-index: 6; margin: 0; padding: 0; list-style: none; }
.showcase__dots li { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid rgb(255 255 255 / 0.8); transition: background-color 0.3s ease, scale 0.3s ease; }
.showcase__dots li.is-on { background: #fff; scale: 1.25; }
.showcase__more { display: flex; justify-content: center; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter-r) clamp(2.5rem, 6vw, 4.5rem) var(--gutter); }
.more-btn {
  display: inline-flex; align-items: center; gap: 0.9em;
  min-height: 60px; padding: 0 2.2em; border-radius: 999px;
  background: #fff; color: var(--blue);
  font-size: clamp(0.85rem, 0.8rem + 0.25vw, 1rem); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.more-btn .more-link__arrow { width: 2.2em; height: 0.75em; transition: transform 0.4s var(--ease-out); }
.more-btn:hover, .more-btn:focus-visible { background: var(--ink); color: #fff; }
.more-btn:hover .more-link__arrow { transform: translateX(5px); }
.showcase .more-link { color: #fff; text-decoration-color: rgb(255 255 255 / 0.4); }
.showcase .more-link:hover { color: var(--halo); }
@media (max-width: 699px) {
  .slide__name { font-size: clamp(2.4rem, 12vw, 4.4rem); }
  .showcase.is-live .showcase__dots { right: 10px; }
}

/* ---------- Entrada de la sección 2: frase que se enciende ---------- */
.manifesto { position: relative; background: var(--ink); color: #fff; }
.manifesto ::selection { background: #fff; color: var(--ink); }
.manifesto__stage { display: grid; align-content: center; justify-items: start; gap: clamp(1.2rem, 2.6vw, 2.2rem); padding: clamp(5rem, 16vh, 10rem) var(--gutter-r) clamp(5rem, 16vh, 10rem) var(--gutter); }
.manifesto__kicker { color: #fff; }
.manifesto__text { font-size: min(clamp(2.4rem, 1rem + 6.4vw, 8.6rem), 10.5vw); font-weight: 800; letter-spacing: -0.058em; line-height: 0.9; }
.manifesto__text > span, .manifesto__text > em, .manifesto__sub > span { display: block; }
.manifesto__text > span, .manifesto__text > em { white-space: nowrap; }
.manifesto__text em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--halo); }
.manifesto__sub { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.4rem, 1rem + 1.5vw, 2.6rem); line-height: 1.08; color: rgb(255 255 255 / 0.9); }
.manifesto .mw { opacity: var(--o, 1); transition: opacity 0.25s linear; }
.manifesto.is-live { height: 230vh; height: 230svh; }
.manifesto.is-live .manifesto__stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: 0; }
/* la sección 2 empieza directamente con su texto y el acordeón */
.areas { padding-top: clamp(1rem, 3vw, 2.5rem); }
.areas__head .areas__lead { grid-column: 1 / 8; }
@media (max-width: 899px) { .areas__head .areas__lead { grid-column: 1 / -1; } }

/* ---------- Titulares palabra a palabra ---------- */
.is-split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.02em 0.12em; margin: -0.04em -0.02em -0.12em; }
.is-split .wi { display: inline-block; transform: translateY(108%); transition: transform 1.05s var(--ease-out); transition-delay: var(--wd, 0s); }
.is-split.is-in .wi { transform: none; }

/* ---------- Botones magnéticos ---------- */
.is-magnetic { transition: translate 0.5s var(--ease-out), background-color 0.35s, color 0.35s, transform 0.35s var(--ease-out); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .is-split .wi { transform: none; transition: none; }
}

/* ---------- 01 · Escaparate dentro del azul de la portada ---------- */
.flow .showcase { display: flow-root; background: transparent; padding-top: 0; }
.flow .showcase.is-live .showcase__track { margin-top: -100vh; margin-top: -100svh; height: calc(100vh + 90vh + (var(--n, 4) - 1) * 88vh + 31vh); height: calc(100svh + 90svh + (var(--n, 4) - 1) * 88svh + 31svh); }
.flow .showcase.is-live .showcase__stage { pointer-events: none; }
.flow .showcase.is-live .slide { pointer-events: auto; }
.showcase__anchor { position: absolute; left: 0; top: calc(90vh + var(--header-h)); top: calc(90svh + var(--header-h)); width: 1px; height: 1px; }
.flow .showcase:not(.is-live) .showcase__anchor { top: 0; }
.flow .showcase:not(.is-live) { padding-top: clamp(2rem, 5vw, 4rem); }
/* la portada cede el paso mientras el primer proyecto se abre */
.hero > * { transition: opacity 0.2s linear; }
.hero { --open: 0; }
.hero__top, .hero__bottom, .hero__title { opacity: calc(1 - var(--open) * 1.6); }

/* ---------- 03 · Sobre mí: las órbitas se despliegan al llegar y la foto se abre en un círculo ---------- */
.about__photo { position: relative; }
.about__photo img { clip-path: circle(calc(6% + var(--in-photo, 1) * 66%) at 50% 50%); scale: calc(0.82 + var(--in-photo, 1) * 0.18); rotate: calc((1 - var(--in-photo, 1)) * -6deg); }
.about__ring { position: absolute; inset: -9%; width: 118%; height: auto; aspect-ratio: 1; pointer-events: none; overflow: visible; }
.about__ring circle { fill: none; stroke: rgb(255 255 255 / 0.85); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--in-photo, 1)); opacity: calc(1 - max(0, var(--in-photo, 1) - 0.82) * 5.5); }
.about__ring .about__ring-dot { fill: #fff; stroke: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .about__photo img { clip-path: none; scale: none; rotate: none; }
  .about__ring { display: none; }
}

/* ---------- 02 · Lo que hago: fondo azul liso y cada bloque en una pastilla negra ---------- */
.manifesto, .areas { background-color: var(--blue); }
.manifesto ::selection, .areas ::selection { background: #fff; color: var(--blue); }
.areas { padding-bottom: clamp(4rem, 9vw, 8rem); }
.areas__lead { color: rgb(255 255 255 / 0.88); }
.areas__list { display: grid; gap: clamp(10px, 1vw, 16px); margin-inline: 0; }
.area {
  border-top: 0;
  padding-inline: clamp(1.1rem, 3vw, 3.2rem);
  border-radius: clamp(28px, 4.5vw, 72px);
  background: var(--ink);
  background-image: none;
  box-shadow: 0 0 0 0 rgb(255 255 255 / 0);
  transition: background-color 0.45s var(--ease-x), box-shadow 0.45s var(--ease-x), transform 0.6s var(--ease-x);
}
.area.is-open {
  background: #0B0D11;
  background-image: none;
  box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.55), 0 30px 60px -30px rgb(0 0 0 / 0.6);
}
.area:not(.is-open):hover { transform: translateY(-2px); }
@media (max-width: 899px) { .area { border-radius: 26px; } }

/* V2: la sección 2 ya es azul, así que «Sobre mí» continúa sin degradado oscuro arriba */

/* ---------- V2 · ajustes (ronda 3) ---------- */
/* proyectos: la imagen entera es el enlace; el texto no tapa el clic */
.slide__text { pointer-events: none; }
.slide__media:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }

/* sección 2: sin etiqueta, frase más grande y el párrafo pegado al subtítulo */
.manifesto__stage { gap: clamp(1rem, 2.2vw, 1.8rem); }
.manifesto__text { font-size: min(13.2vw, 21vh, 13rem); line-height: 0.88; }
.manifesto__lead { max-width: 38rem; margin-top: clamp(0.4rem, 1.4vw, 1.2rem); font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.25rem); line-height: 1.4; color: rgb(255 255 255 / 0.88); }
.areas { padding-top: 0; }

/* sección 3: foto pequeña y redonda tras «[ 03 ] Sobre mí»; aparece como una bolita que se expande */
.flow .about { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.flow .about__body { grid-column: 1 / 9; }
@media (max-width: 899px) { .flow .about__body { grid-column: 1 / -1; } }
.about__photo { justify-self: start; width: clamp(110px, 11vw, 170px); padding: 0; margin: 0.4rem 0 0.6rem; grid-column: auto; align-self: auto; }
.about__photo img { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.55);
  clip-path: circle(calc(4% + var(--in-photo, 1) * 46%) at 50% 50%); scale: calc(0.35 + var(--in-photo, 1) * 0.65); rotate: none; }
.about__photo::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; translate: -50% -50%; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 5px rgb(255 255 255 / 0.18), 0 0 14px 2px rgb(255 255 255 / 0.5); opacity: calc(1 - var(--in-photo, 1) * 3); z-index: 2; pointer-events: none; }
.about__ring { inset: -12%; width: 124%; }
@media (prefers-reduced-motion: reduce) { .about__photo img { clip-path: none; scale: none; } .about__photo::before { display: none; } }
/* la frase siempre cabe bajo la cabecera, también en pantallas bajas */
.manifesto.is-live .manifesto__stage { padding-top: var(--header-h); }
.manifesto__text { font-size: min(13.2vw, 17.5vh, 13rem); }

/* ==========================================================================
   03 · Sobre mí sobre un eje vertical (V2)
   La bola blanca baja por el eje con el scroll y enciende cada nodo:
   foto (derecha) → titular (izquierda) → párrafo (derecha) → CV (sobre el eje)
   ========================================================================== */
.about.about--axis {
  --gap: clamp(3.5rem, 9vw, 9rem);
  display: block; position: relative;
  padding: clamp(5rem, 14vh, 10rem) var(--gutter-r) clamp(5rem, 14vh, 9rem) var(--gutter);
}
.axis { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; z-index: 0; pointer-events: none; }
.axis__line { position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: linear-gradient(to bottom, transparent, rgb(255 255 255 / 0.32) 7%, rgb(255 255 255 / 0.32) 93%, transparent); }
.axis__fill { position: absolute; top: 0; left: -1px; width: 2px; height: calc(var(--p, 1) * 100%); background: linear-gradient(to bottom, transparent, #fff 7%); }
.axis__ball {
  position: absolute; left: 0; top: calc(var(--p, 1) * 100%); width: 12px; height: 12px; translate: -50% -50%;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgb(255 255 255 / 0.16), 0 0 18px 4px rgb(255 255 255 / 0.5);
}
.axis__node { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gap); align-items: start; margin-top: clamp(2.5rem, 7vh, 5rem); }
.axis + .axis__node { margin-top: 0; }
.axis__node--right > :not(.axis__dot) { grid-column: 2; justify-self: start; }
.axis__node--left > :not(.axis__dot) { grid-column: 1; justify-self: end; text-align: right; }
.axis__node--center > :not(.axis__dot) { grid-column: 1 / -1; justify-self: center; padding-top: 2.2rem; }
.axis__node--cv { margin-top: clamp(4rem, 12vh, 8rem); }

/* bola de cada nodo, sobre el eje, con un trazo que la une a su contenido */
.axis__dot {
  position: absolute; left: 50%; top: var(--dot-y, 1rem); width: 10px; height: 10px; translate: -50% -50%;
  border-radius: 50%; background: rgb(255 255 255 / 0.35);
  transition: background-color 0.5s ease, box-shadow 0.5s ease, scale 0.5s var(--ease-out);
}
.axis__dot::after { content: ""; position: absolute; top: 50%; height: 1px; width: calc(var(--gap) / 2 - 14px); background: rgb(255 255 255 / 0.55); transform: scaleX(0); transition: transform 0.7s var(--ease-out) 0.1s; }
.axis__node--right .axis__dot::after { left: 14px; transform-origin: left; }
.axis__node--left .axis__dot::after { right: 14px; transform-origin: right; }
.axis__node--center .axis__dot::after { display: none; }
.axis__node.is-reached .axis__dot { background: #fff; scale: 1.15; box-shadow: 0 0 0 5px rgb(255 255 255 / 0.18), 0 0 14px 2px rgb(255 255 255 / 0.45); }
.axis__node.is-reached .axis__dot::after { transform: scaleX(1); }
.axis__node--photo { --dot-y: 50%; }
.axis__node--title { --dot-y: 0.62em; font-size: clamp(2.4rem, 1.2rem + 4.2vw, 6rem); }
.axis__node--title .about__title { font-size: 1em; max-width: 11ch; }
.axis__node--text { --dot-y: 0.9em; }
.axis__node--cv { --dot-y: 0; }

/* contenido: entra desde el eje cuando la bola llega a su nodo */
.js .about--axis .axis__node > :not(.axis__dot) { opacity: 0; translate: var(--from, 0) 0; transition: opacity 0.8s var(--ease-out), translate 1s var(--ease-out); }
.js .about--axis .axis__node--right { --from: -28px; }
.js .about--axis .axis__node--left { --from: 28px; }
.js .about--axis .axis__node--center > :not(.axis__dot) { translate: 0 18px; }
.js .about--axis .axis__node.is-reached > :not(.axis__dot) { opacity: 1; translate: 0 0; }

/* foto: algo más presente en este esquema; se abre desde una bolita */
.about--axis .about__photo { width: clamp(150px, 16vw, 240px); margin: 0; }
.about--axis .about__text { max-width: 36rem; }
.about--axis .cv-btn { background: #fff; color: var(--blue); border-color: #fff; }

/* móvil: el eje pasa a la izquierda y todo cuelga a su derecha */
@media (max-width: 799px) {
  .about.about--axis { --gap: 2.2rem; padding-left: calc(var(--gutter) + 2.4rem); }
  .axis { left: calc(var(--gutter) + 6px); }
  .axis__node { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .axis__node > :not(.axis__dot), .axis__node--left > :not(.axis__dot), .axis__node--center > :not(.axis__dot) { grid-column: 1; justify-self: start; text-align: left; padding-top: 0; }
  .axis__dot { left: calc(-2.4rem + 6px); }
  .axis__node--left .axis__dot::after { right: auto; left: 14px; transform-origin: left; }
  .axis__node .axis__dot::after { width: calc(2.4rem - 22px); }
  .axis__node--center .axis__dot::after { display: block; }
  .js .about--axis .axis__node--left { --from: -28px; }
  .axis__node--title .about__title { max-width: none; }
  .about--axis .about__photo { width: 150px; }
  .axis__node--cv { --dot-y: 50%; margin-top: 3rem; }
}
@media (prefers-reduced-motion: reduce) { .axis__ball { display: none; } }

/* ==========================================================================
   Un solo fondo azul con órbitas de la portada a «Sobre mí» (ronda 5)
   ========================================================================== */
/* las órbitas ya no se desplazan con el scroll: siguen girando solas y, a partir de la
   sección 2, se hacen más pequeñas y sutiles (--calm lo escribe v2.js) */
.flow { --calm: 0; --calm-scale: 0.5; }
.flow__orbits svg { transform: scale(calc(1 - var(--calm) * (1 - var(--calm-scale)))); opacity: calc(1 - var(--calm) * 0.5); }
@media (max-width: 899px) { .flow { --calm-scale: 0.38; } }
.flow__orbits .sat { transition: none; }

/* sección 2: aire entre el párrafo y la primera pastilla */
.areas { padding-top: clamp(2.5rem, 7vh, 5rem); }

/* el eje no se desvanece al final: continúa hacia «[ 04 ] Más allá del diseño» */
.axis__line { background: linear-gradient(to bottom, transparent, rgb(255 255 255 / 0.32) 7%); }
.about.about--axis { padding-bottom: clamp(3rem, 8vh, 6rem); }
.axis-link { position: absolute; left: 0; top: 0; width: 100%; height: var(--link-h, 0px); overflow: visible; pointer-events: none; z-index: 0; }
.axis-link path { fill: none; stroke-linecap: round; }
.axis-link__base { stroke: rgb(255 255 255 / 0.28); stroke-width: 1; }
.axis-link__fill { stroke: #fff; stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--q, 1)); }
.axis-link__ball { fill: #fff; filter: drop-shadow(0 0 6px rgb(255 255 255 / 0.85)) drop-shadow(0 0 2px #fff); opacity: var(--q-on, 1); }
.beyond__head { position: relative; z-index: 1; }
.axis__ball { transition: opacity 0.2s linear; }

/* ==========================================================================
   02 · Lo que hago: cinco tarjetas 3:4 en dos columnas escalonadas (ronda 6)
   Derecha: 01 · 03 · 05 — izquierda (media tarjeta más abajo): 02 · 04.
   Se leen en zigzag; cada columna se desplaza a su ritmo con el scroll.
   ========================================================================== */
.tiles {
  --cw: min(30vw, 400px);           /* ancho de tarjeta */
  --g: clamp(14px, 1.6vw, 24px);    /* separación */
  display: grid;
  grid-template-columns: var(--cw) var(--cw);
  grid-auto-rows: calc((var(--cw) * 4 / 3 - var(--g)) / 2);
  gap: var(--g) calc(var(--g) * 1.4);
  justify-content: center;
  margin: 0; padding: 0; list-style: none;
}
.tile:nth-child(1) { grid-column: 2; grid-row: 1 / span 2; }
.tile:nth-child(2) { grid-column: 1; grid-row: 2 / span 2; }
.tile:nth-child(3) { grid-column: 2; grid-row: 3 / span 2; }
.tile:nth-child(4) { grid-column: 1; grid-row: 4 / span 2; }
.tile:nth-child(5) { grid-column: 2; grid-row: 5 / span 2; }
.tile:nth-child(odd) { translate: 0 var(--shift-r, 0px); }
.tile:nth-child(even) { translate: 0 var(--shift-l, 0px); }

.tile {
  position: relative; display: flex; flex-direction: column; gap: clamp(0.6rem, 1vw, 0.9rem);
  padding: clamp(1.2rem, 2.2vw, 2rem);
  border-radius: clamp(20px, 2.4vw, 32px);
  background: var(--ink); color: #fff;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 40px 70px -40px rgb(0 0 0 / 0.7);
  overflow: hidden;
  transition: box-shadow 0.5s var(--ease-out), background-color 0.5s var(--ease-out);
}
.tile__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: auto; }
.tile__n { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; display: flex; align-items: center; gap: 0.6rem; }
.tile__n::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / 0.16), 0 0 12px 2px rgb(255 255 255 / 0.45); }
.tile__g { width: clamp(64px, 8vw, 120px); height: auto; aspect-ratio: 1; color: rgb(255 255 255 / 0.85); transition: transform 1.2s var(--ease-out); }
.tile__t { font-size: clamp(1.5rem, 0.6rem + 2.3vw, 2.9rem); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; }
.tile__t em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--halo); }
.tile__p { font-size: clamp(0.9rem, 0.82rem + 0.25vw, 1.05rem); line-height: 1.4; color: rgb(255 255 255 / 0.78); max-width: 30ch; }
@media (hover: hover) {
  .tile:hover { background: #0B0D11; box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.55), 0 40px 70px -40px rgb(0 0 0 / 0.8); }
  .tile:hover .tile__g { transform: rotate(180deg) scale(1.06); }
}

/* entrada: cada tarjeta sube y su icono se dibuja al llegar */
.js .tile { opacity: 0; transition: opacity 0.9s var(--ease-out), box-shadow 0.5s var(--ease-out), background-color 0.5s var(--ease-out); }
.js .tile.is-in { opacity: 1; }
.js .tile .tile__g * { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.8s var(--ease-out) 0.2s; }
.js .tile.is-in .tile__g * { stroke-dashoffset: 0; }
.js .tile .tile__g .g-spin { stroke-dasharray: none; stroke-dashoffset: 0; }

/* tablet (700–1099 px): tarjetas más anchas y altura según el texto, para que nunca se corte */
@media (min-width: 700px) and (max-width: 1099px) {
  .tiles { --cw: min(43vw, 400px); grid-auto-rows: minmax(calc((var(--cw) * 4 / 3 - var(--g)) / 2), auto); }
  .tile__p { max-width: none; }
}

/* móvil: una columna en zigzag (cada tarjeta se apoya a un lado) */
@media (max-width: 699px) {
  .tiles { --cw: 78vw; grid-template-columns: 1fr; grid-auto-rows: auto; gap: 14px; justify-content: stretch; }
  .tile:nth-child(n) { grid-column: 1; grid-row: auto; width: var(--cw); aspect-ratio: auto; min-height: 15rem; translate: none; }
  .tile:nth-child(odd) { justify-self: end; }
  .tile:nth-child(even) { justify-self: start; }
  .tile__g { width: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile { translate: none !important; }
  .js .tile { opacity: 1; }
  .js .tile .tile__g * { stroke-dashoffset: 0; transition: none; }
}

/* ==========================================================================
   Fondo de las secciones 2 y 3 (ronda 7): ejes, perpendiculares y órbitas
   en línea negra fina, repartidos por el fondo y desplazándose con el contenido.
   Las órbitas grandes de la portada se apagan al dejarla.
   ========================================================================== */
.flow__orbits svg { opacity: calc(1 - var(--calm, 0)); }
.bgfield { position: absolute; left: 0; right: 0; top: var(--field-top, 0px); height: var(--field-h, 0px); z-index: 0; pointer-events: none; overflow: hidden; }
.bgfield svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bgfield .ln { fill: none; stroke: rgb(255 255 255 / 0.34); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bgfield .ln--soft { stroke: rgb(255 255 255 / 0.22); }
.bgfield .ln--dash { stroke-dasharray: 2 6; }
.bgfield .dot { fill: rgb(255 255 255 / 0.7); }
.bgfield .spin { transform-box: view-box; animation: field-spin var(--d, 160s) linear infinite; animation-direction: var(--dir, normal); }
@keyframes field-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .bgfield .spin { animation: none; } }

/* móvil: sección 2 completamente vertical, una tarjeta debajo de otra */
@media (max-width: 699px) {
  .tile:nth-child(n), .tile:nth-child(odd), .tile:nth-child(even) { width: 100%; justify-self: stretch; }
}

/* ==========================================================================
   Final de Proyectos → «Ver más proyectos» → sección 2 (ronda 8)
   Singrid se recoge en un círculo (como se abrió), el botón aparece bajo él
   y del botón baja el hilo blanco hasta «De la idea a la pieza final».
   ========================================================================== */
.flow .showcase.is-live .showcase__track { height: calc(100vh + 90vh + (var(--n, 4) - 1) * 88vh + 31vh + 90vh); height: calc(100svh + 90svh + (var(--n, 4) - 1) * 88svh + 31svh + 90svh); }
.showcase.is-live .showcase__more {
  position: absolute; left: 0; right: 0; top: var(--more-top, 80%); z-index: 6; padding: 0;
  opacity: var(--more-o, 0); translate: 0 calc((1 - var(--more-o, 0)) * 18px);
  pointer-events: none;
}
.showcase.is-live .showcase__more.is-on { pointer-events: auto; }
.showcase.is-live .showcase__ring.is-planet { opacity: 1 !important; }
.showcase__thread { position: relative; height: clamp(9rem, 26vh, 16rem); pointer-events: none; }
.showcase:not(.is-live) .showcase__thread { display: none; }
.showcase__thread svg { position: absolute; left: 0; top: var(--t-y0, 0px); width: 100%; height: var(--t-h, 100%); overflow: visible; }
.thread__base { fill: none; stroke: rgb(255 255 255 / 0.28); stroke-width: 1; }
.thread__fill { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--q, 0)); }
.thread__ball { fill: #fff; filter: drop-shadow(0 0 6px rgb(255 255 255 / 0.85)) drop-shadow(0 0 2px #fff); opacity: var(--q-on, 0); }
.thread__end { fill: rgb(255 255 255 / 0.45); }
/* al recogerse, la imagen baja un poco para que el círculo encuadre la cara */
/* pantalla horizontal: la foto se reencuadra hacia arriba (sin dejar huecos) */
/* (Triptrek: el monograma ya está centrado, no hace falta reencuadrar) */
/* pantalla vertical: se acerca a la cara mientras el círculo se recoge */
@media (max-aspect-ratio: 1/1) {
  .showcase.is-live .slide.is-last .slide__media img { transform-origin: 50% 50%; transform: scale(calc(1.16 - var(--a, 0) * 0.16 + var(--c, 0) * 0.6)); }
}

/* Órbita final: fondo de ejes y órbitas finas, como en el resto de la web */
.bgfield--pause { top: 0; height: 100%; }
.pause__canvas { z-index: 1; }
.pause__copy, .pause__tip { z-index: 2; }

/* ==========================================================================
   Ajustes de móvil (ronda 9)
   ========================================================================== */
@media (max-width: 699px) {
  /* hilo más corto entre «Ver más proyectos» y la frase */
  .showcase__thread { height: 4.5rem; }
  /* la frase aparece antes, arriba, y se queda poco tiempo fija antes de las tarjetas */
  .manifesto.is-live { height: 135vh; height: 135svh; }
  .manifesto.is-live .manifesto__stage { align-content: start; padding-top: calc(var(--header-h) + 3.5rem); }
  .areas { padding-top: 1.5rem; }
  /* tarjetas: titular más grande y descripción a todo el ancho */
  .tile__t { font-size: clamp(1.85rem, 8.6vw, 2.5rem); line-height: 0.98; }
  .tile__p { max-width: none; font-size: 0.98rem; }
  .tile { min-height: 0; }
  /* sobre mí: menos aire arriba */
  .about.about--axis { padding-top: 2.5rem; }
}
@media (max-width: 699px) {
  .manifesto.is-live .manifesto__stage { height: auto; padding-bottom: 2rem; }
  .areas { padding-top: 0.5rem; }
}
@media (max-width: 699px) {
  .showcase__thread { height: 2rem; }
  .manifesto.is-live .manifesto__stage { padding-top: calc(var(--header-h) + 2rem); padding-bottom: 0.5rem; }
  .areas { padding-top: 0; }
  /* el último proyecto, centrado en el círculo aunque este baje */
  .showcase.is-live .slide.is-last .slide__media img { translate: 0 var(--drop, 0px); }
}
@media (max-width: 699px) {
  /* el hilo y la frase suben hasta justo debajo del botón (sin azul vacío) */
  .showcase__thread { margin-top: calc(-35svh + 7rem); height: 2.5rem; }
  /* aire entre el párrafo y la primera tarjeta */
  .areas { padding-top: 2.75rem; }
}
@media (max-width: 699px) {
  /* la frase no se queda fija: sube con el resto (sin movimiento extra) */
  .manifesto.is-live { height: auto; }
  .manifesto.is-live .manifesto__stage { position: static; height: auto; }
  .areas { padding-top: 3.5rem; }
  /* el círculo sube al recogerse: el hilo y la frase suben con él */
}
@media (max-width: 699px) {
  /* tramo extra para que, ya cerrado, el círculo suba antes de soltar la escena */
  .flow .showcase.is-live .showcase__track { height: calc(100svh + 90svh + (var(--n, 4) - 1) * 88svh + 37svh); }
}
/* tramo del hilo que nace bajo «Ver más proyectos» mientras el proyecto se cierra */
.showcase__stem { display: none; }
.showcase.is-live .showcase__stem { display: block; position: absolute; left: 50%; width: 2px; translate: -50% 0; z-index: 6; background: #fff; border-radius: 2px; opacity: 0; pointer-events: none; }
.showcase__stem i { position: absolute; left: 50%; bottom: 0; width: 12px; height: 12px; translate: -50% 50%; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px rgb(255 255 255 / 0.75); }
.showcase__stem i { transition: opacity 0.3s ease; } .showcase__stem.is-joined i { opacity: 0; }

/* textos del proyecto a pantalla completa: el nombre y su tipo ya no se pisan */
.slide__text { gap: 0.7rem; }
.slide__name { line-height: 0.92; padding-bottom: 0.06em; }
.slide__type { margin-top: 0.35rem; }
/* ejes y órbitas detrás del último proyecto, al recogerse */
.bgfield--showcase { top: 0; height: 100%; z-index: 0; opacity: 0; transition: opacity 0.3s linear; }
.showcase:not(.is-live) .bgfield--showcase { display: none; }

/* ---------- Ajustes de escritorio (ronda 10) ---------- */
/* icono de la tarjeta 01: la aguja gira sobre el centro exacto del círculo */
.tile__g .g-spin { transform-box: view-box; transform-origin: 50% 50%; }
/* sobre mí: la foto empieza más arriba, donde aparece la bola */
@media (min-width: 800px) { .about.about--axis { padding-top: clamp(1.5rem, 4vh, 3rem); } }
/* pantalla grande: «De la idea a la pieza final, / sin perder el hilo.» en dos líneas */
@media (min-width: 1100px) {
  .manifesto__text { font-size: min(7.8vw, 17vh, 12rem); }
  .manifesto__text > span { display: inline; }
}

/* ---------- Contacto (ronda 11) ---------- */
/* «Si tu marca necesita criterio, / hablemos.» en dos líneas en escritorio */
@media (min-width: 900px) {
  .contact__title { white-space: normal; font-size: min(6.6rem, 7.4vw); }
  .contact__last { display: block; }
}
/* categorías: 4 arriba y 3 abajo en escritorio */
.chips__break { display: none; }
@media (min-width: 900px) {
  .chips__break { display: block; flex-basis: 100%; height: 0; margin-top: -0.4rem; }
}
/* la escena de proyectos se superpone a la portada: no debe tapar sus botones */
.flow .showcase.is-live .showcase__track { pointer-events: none; }
.flow .showcase.is-live .slide.is-open, .flow .showcase.is-live .showcase__more.is-on { pointer-events: auto; }
.flow .showcase.is-live .slide:not(.is-open) { pointer-events: none; }


/* imágenes a pantalla completa con versión de ordenador y de móvil */
.slide__media picture, .archive__btn picture { display: block; width: 100%; height: 100%; }
/* órbita final (escritorio): las líneas se desvanecen bajo el titular para no pisarlo */
@media (min-width: 700px) {
  .pause__canvas {
    -webkit-mask-image: linear-gradient(to bottom, transparent var(--fade-a, 0px), #000 var(--fade-b, 0px));
            mask-image: linear-gradient(to bottom, transparent var(--fade-a, 0px), #000 var(--fade-b, 0px));
  }
}

/* ---------- Pantallas bajas (móvil en horizontal): la frase no se queda fija ni se esconde bajo la cabecera ---------- */
@media (min-width: 700px) and (max-height: 559px) {
  .manifesto.is-live { height: auto; }
  .manifesto.is-live .manifesto__stage { position: static; height: auto; align-content: start; padding-top: calc(var(--header-h) + 2rem); padding-bottom: 1rem; }
  .manifesto__text { font-size: min(7.4vw, 4.4rem); }
  .manifesto__text > span { display: inline; }
  .areas { padding-top: 3rem; }
}
