/* =====================================================
   Portafolio Sebastian Bustamante — TianCevedo
   Escenario horizontal a pantalla completa + dock fijo
   (personaje + ticket) que se expande como isla dinámica.
   ===================================================== */

:root {
  --ink: #231f1d;          /* tinta del ticket y el personaje */
  --paper: #f3f0eb;        /* papel del ticket */
  --cream: #f3efe8;        /* títulos sobre fotos */
  --orange: #e0773c;       /* acento (personaje, cursivas) */
  --blue: #45a8f5;         /* globos de chat */
  --bg: #161412;
  /* Unidad del dock: 1px en escritorio, se encoge en pantallas angostas
     para que personaje + ticket (675px de diseño) siempre quepan. */
  --u: min(1px, calc((100vw - 28px) / 675));
  --dock-x: max(14px, 2.2vw);
  --dock-y: max(16px, 4.3vh);
  --spring: cubic-bezier(.34, 1.36, .5, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-width: none; }                 /* el scroll vertical mueve el escenario: se oculta la barra */
html::-webkit-scrollbar { display: none; }
body {
  margin: 0; background: var(--bg); color: var(--cream);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ============ RUIDO DE PELÍCULA (toda la página) ============ */
#grain {
  position: fixed; inset: -10%; z-index: 100; pointer-events: none;   /* antes -50%: una capa 4 veces la pantalla ahogaba la memoria del iPhone */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .16;
  animation: grain .9s steps(1) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  12%  { transform: translate(-4%, 3%); }
  25%  { transform: translate(3%, -5%); }
  37%  { transform: translate(-6%, -2%); }
  50%  { transform: translate(5%, 4%); }
  62%  { transform: translate(-2%, 6%); }
  75%  { transform: translate(6%, -3%); }
  87%  { transform: translate(-5%, -6%); }
}

/* ============ ESCENARIO ============ */
#stage { position: fixed; inset: 0; overflow: hidden; background: var(--bg); transition: opacity .28s ease;
  touch-action: none; }            /* el dedo lo maneja main.js: un proyecto por gesto, sin impulso nativo */
#stage.fading { opacity: 0; }
#scroll-space { width: 1px; }

/* Cada proyecto es una capa fija a pantalla completa. Se revela con clip-path:
   la foto nunca se mueve; solo avanza el corte y el título. */
.slide {
  position: absolute; inset: 0;
  visibility: hidden;
  will-change: clip-path;
}
.slide.on { visibility: visible; }
.slide-media, .slide-media img, .slide-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.slide-media img, .slide-media video { will-change: transform; }
/* Sombra leve: solo asegura que el título y el ticket se lean sobre fotos claras */
.slide-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(12,10,8,var(--oscuro, 0)), rgba(12,10,8,var(--oscuro, 0))),
    linear-gradient(270deg, rgba(12,10,8,.32), rgba(12,10,8,0) 50%),
    linear-gradient(0deg, rgba(12,10,8,.38), rgba(12,10,8,0) 32%);
}
.slide-copy {
  position: absolute; top: 7.4vh; right: 4.8vw;
  display: flex; flex-direction: column; align-items: flex-end;
  will-change: transform;
}
.slide-title {
  margin: 0; max-width: 64vw;
  font-family: 'Inter Tight', sans-serif; font-weight: 800;
  font-size: clamp(46px, 9.4vw, 162px);
  line-height: .88; letter-spacing: -.012em;
  text-transform: uppercase; text-align: right; text-wrap: balance;
  color: var(--cream);
}
.keycap {
  margin-top: clamp(18px, 3.4vh, 34px);
  width: clamp(62px, 7.4vw, 102px); height: clamp(62px, 7.4vw, 102px);
  color: var(--cream);
  transition: transform .18s var(--ease-out);
}
.keycap svg { display: block; width: 100%; height: 100%; }
/* Cada tanto la tecla "se presiona" sola para invitar al clic */
.front.on .keycap { animation: keyInvite 5s var(--ease-out) 2.5s infinite; }
@keyframes keyInvite { 0%, 84%, 100% { transform: none; } 88% { transform: translateY(5px) scale(.97); } 93% { transform: translateY(-1px); } }
.front.on .keycap:hover { animation: none; transform: translateY(3px); }
.front.on .keycap:active, .front.on .keycap.pressed { animation: none; transform: translateY(6px) scale(.95); }

/* Blur progresivo en el corte entre proyectos (el mismo de bunkercreators.com):
   5 capas con más desenfoque cuanto más cerca del corte. La intensidad general
   crece mientras el corte avanza hasta la mitad de la pantalla y luego baja (JS). */
#seam-blur {
  --bw: clamp(160px, 26vw, 440px);
  position: absolute; top: 0; bottom: 0; left: 0; width: var(--bw);
  z-index: 3; pointer-events: none;
  will-change: transform;           /* ojo: nada de opacity/filter aquí, rompería el backdrop-filter de las capas */
}
#seam-blur i {
  position: absolute; inset: 0;
  opacity: var(--k, 0);
  -webkit-mask: linear-gradient(90deg, transparent var(--s), #000 50%, transparent calc(100% - var(--s)));
          mask: linear-gradient(90deg, transparent var(--s), #000 50%, transparent calc(100% - var(--s)));
}
#seam-blur i:nth-child(1) { -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); --s: 4%; }
#seam-blur i:nth-child(2) { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); --s: 12%; }
#seam-blur i:nth-child(3) { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); --s: 21%; }
#seam-blur i:nth-child(4) { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); --s: 30%; }
#seam-blur i:nth-child(5) { -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); --s: 39%; }
/* En celular: dos capas de desenfoque en vez de cinco (cada una pesa como una pantalla completa) */
@media (hover: none) and (pointer: coarse) {
  #seam-blur i:nth-child(1), #seam-blur i:nth-child(2), #seam-blur i:nth-child(4) { display: none; }
}

/* ============ CARPETAS: portada de cada proyecto ============ */
#slides { position: absolute; inset: 0; z-index: 1; }
#comps { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
#fronts { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.front { position: absolute; inset: 0; visibility: hidden; }
.front.on { visibility: visible; }
.front .slide-copy { pointer-events: auto; }
.front .slide-title { text-shadow: 0 2px 30px rgba(12,10,8,.35); }
.slide-color { position: absolute; inset: 0; }

.cp { position: absolute; inset: 0; display: none; }       /* oculta de verdad: no ocupa memoria de la tarjeta gráfica */
.cp.on { display: block; }
.cp-box { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cp-it { position: absolute; transform: translate(-50%, -50%); will-change: transform; }
.cp-it img { display: block; width: 100%; height: auto; max-width: none; user-select: none; }

/* Carpeta (provisional dibujada; se reemplaza con CONFIG.accesorios.carpeta) */
.cp-folder { filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)) drop-shadow(0 22px 34px rgba(0,0,0,.5)); }

/* Accesorios */
.cp-prop { position: absolute; pointer-events: none; }

/* Foto impresa: borde blanco, textura de papel fotográfico y brillo */
.cp-photo {
  /* sin marco: la foto sola, con su textura de papel y sombra */
  box-shadow: 0 1px 1px rgba(0,0,0,.3), 0 8px 16px rgba(0,0,0,.32), 0 26px 44px rgba(0,0,0,.2);
}
.cp-photo > img:first-child { filter: contrast(1.04) saturate(.94); background: #1d1b19; }   /* los PNG transparentes se imprimen sobre oscuro */
.ph-tex {
  position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .47  0 0 0 0 .42  0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cp-photo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(118deg, rgba(255,255,255,.2), rgba(255,255,255,0) 38%, rgba(255,255,255,0) 70%, rgba(255,255,255,.08));
}

/* Video en iPad (horizontal) o iPhone (vertical): tus mockups encima, el video en la pantalla */
.cp-video { filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)) drop-shadow(0 22px 34px rgba(0,0,0,.35)); }
.dv { position: relative; aspect-ratio: 1252 / 963; }
.cp-video.is-phone .dv { aspect-ratio: 470 / 964; }
.dv-frame { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.cp-it .dv-frame.f-phone, .cp-video.is-phone .dv-frame.f-tablet { display: none; }
.cp-video.is-phone .dv-frame.f-phone { display: block; }
.dv-screen { position: absolute; left: 2.96%; top: 3.84%; right: 3.19%; bottom: 4.05%; overflow: hidden; background: #000; border-radius: 2%; }
.cp-video.is-phone .dv-screen { left: 4.89%; top: 1.87%; right: 4.04%; bottom: 1.87%; border-radius: 11% / 5.3%; }
.dv-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dv-screen::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.12), rgba(255,255,255,0) 35%); pointer-events: none; }

/* Recibo con la ficha del proyecto */
.cp-receipt { filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)) drop-shadow(0 16px 22px rgba(0,0,0,.3)); }
.rc-paper {
  background: #f7f4ee; color: #2b2926; padding: 18px 18px 30px;
  font: 500 12.5px/1.5 'IBM Plex Mono', ui-monospace, monospace; text-transform: uppercase;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 7px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 7px repeat-x;
}
.rc-head { text-align: center; font-weight: 600; font-size: 15px; letter-spacing: .08em; }
.rc-head small { font-size: 9.5px; letter-spacing: .14em; font-weight: 500; }
.rc-sep { border-top: 1.5px dashed rgba(43,41,38,.55); margin: 9px 0; }
.rc-row { display: flex; justify-content: space-between; gap: 10px; }
.rc-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.rc-small { font-size: 11px; line-height: 1.4; opacity: .85; }
.rc-label { font-size: 9.5px; opacity: .55; margin-top: 6px; letter-spacing: .1em; }
.rc-foot { text-align: center; font-size: 10.5px; margin-top: 4px; }
.rc-bar { height: 34px; margin-top: 10px; background: repeating-linear-gradient(90deg, #2b2926 0 2px, transparent 2px 4px, #2b2926 4px 5px, transparent 5px 8px, #2b2926 8px 11px, transparent 11px 13px); }

/* Nota escrita a mano en una tarjeta rayada */
.cp-note {
  padding: 32px 22px 22px 34px; color: #2c2a27;
  font: italic 21px/28px 'Instrument Serif', serif;
  background:
    linear-gradient(90deg, transparent 24px, rgba(214,82,62,.4) 24px 25px, transparent 25px),
    repeating-linear-gradient(transparent 0 27px, rgba(70,110,170,.22) 27px 28px) 0 4px,
    #fbf8f1;
  box-shadow: 0 1px 1px rgba(0,0,0,.25), 0 10px 18px rgba(0,0,0,.28);
}
.cp-note p { margin: 0; }

/* Etiqueta kraft con número de archivo */
.cp-tag {
  aspect-ratio: 1 / 1.75; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: #d7b684; color: #2b2926; border-radius: 16px 16px 5px 5px; text-align: center;
  font: 600 22px 'Inter Tight', sans-serif; text-transform: uppercase;
  box-shadow: 0 1px 1px rgba(0,0,0,.25), 0 10px 16px rgba(0,0,0,.3);
}
.cp-tag small { font: 500 11px 'IBM Plex Mono', monospace; letter-spacing: .12em; }
.tg-hole { width: 16px; height: 16px; border-radius: 50%; background: rgba(22,20,18,.85); box-shadow: 0 0 0 5px #efe3cc; margin-bottom: 18%; }

/* Objetos (libro, ramen…) con la misma sombra cenital de antes */
.cp-object {
  --lx: calc(var(--alto) * 8px); --ly: calc(var(--alto) * 16px);
  filter:
    drop-shadow(calc(var(--lx) * .12) calc(var(--ly) * .12) calc(var(--alto) * 2px) rgba(0,0,0,.6))
    drop-shadow(calc(var(--lx) * .5) calc(var(--ly) * .5) calc(var(--alto) * 12px) rgba(0,0,0,.4))
    drop-shadow(var(--lx) calc(var(--ly) * 1.8) calc(var(--alto) * 40px) rgba(0,0,0,.38));
}

/* Objetos sueltos entre proyectos (versión anterior; ya no se usan) */
#interludes { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.interlude {
  --alto: 1;
  --lx: calc(var(--alto) * .5vw);       /* luz cenital, un poco desde arriba a la izquierda */
  --ly: calc(var(--alto) * 1vw);
  position: absolute; left: 0;
  will-change: transform;
  /* Sombra realista en capas: contacto (pegada y oscura) + media + ambiente (amplia y suave) */
  filter:
    drop-shadow(calc(var(--lx) * .12) calc(var(--ly) * .12) calc(var(--alto) * .15vw) rgba(0,0,0,.6))
    drop-shadow(calc(var(--lx) * .5) calc(var(--ly) * .5) calc(var(--alto) * .8vw) rgba(0,0,0,.4))
    drop-shadow(var(--lx) calc(var(--ly) * 1.8) calc(var(--alto) * 2.8vw) rgba(0,0,0,.38));
}
.interlude img { display: block; width: 100%; height: auto; }
/* Altura por donde pasa cada objeto (la propiedad translate se suma al transform del JS) */
.interlude.pos-arriba { top: 6vh; }
.interlude.pos-centro { top: 50vh; translate: 0 -50%; }
.interlude.pos-abajo  { top: 94vh; translate: 0 -100%; }
.interlude.frame img { background: #f5f2ec; padding: 10px 10px 34px; }

/* ============ DOCK: personaje + ticket ============ */
#dock {
  position: fixed; z-index: 60;
  left: var(--dock-x); bottom: var(--dock-y);
  width: calc(var(--u) * 675); height: calc(var(--u) * 245);
  pointer-events: none;                 /* solo sus piezas reciben clics */
}
#dock > * { pointer-events: auto; }
#dock { transition: transform .5s var(--ease-out), opacity .35s ease; }
#dock.tucked { transform: translateY(calc(100% + var(--dock-y) + 24px)); opacity: 0; pointer-events: none; }
#dock.tucked > * { pointer-events: none; }

#character {
  position: absolute; left: 0; bottom: 0; z-index: 4;
  width: calc(var(--u) * 250);
  transition: transform .35s var(--spring);
  touch-action: manipulation;
}
#character svg {
  width: 100%; height: auto; display: block; overflow: visible;
}
#character:hover { transform: rotate(-3deg) scale(1.03); }
#character:active { transform: scale(.95); }
#character:focus-visible { outline-offset: -6px; border-radius: 50%; }

/* --- Ticket --- */
#ticket {
  position: absolute; left: 0; right: 0; bottom: calc(var(--u) * 12);
  height: calc(var(--u) * 96);
  color: var(--ink);
}
/* Muescas del troquel: dos medias lunas transparentes en el corte */
#ticket-main {
  --notch: calc(var(--u) * 7);
  position: absolute; bottom: 0;
  right: calc(var(--u) * 116);
  width: calc(var(--u) * 426); height: 100%;   /* mismo ancho que la isla abierta */
  background: var(--paper);
  cursor: pointer;
  /* Troquel: medias perforaciones y muescas en el borde derecho (fijas abajo, a la altura del talón)
     + muescas en las dos esquinas de arriba (se ven al desplegar la ficha) */
  -webkit-mask: radial-gradient(circle at 0 0, transparent calc(var(--u) * 9), #000 calc(var(--u) * 9 + .5px)) left top / calc(100% - var(--u) * 9.5) 100% no-repeat, radial-gradient(circle at 100% 0, transparent calc(var(--u) * 9), #000 calc(var(--u) * 9 + .5px)) right top / calc(var(--u) * 10) calc((100% - var(--u) * 96) / 2 + 1px) no-repeat, radial-gradient(circle at 100% 100%, transparent calc(var(--u) * 9), #000 calc(var(--u) * 9 + .5px)) right 0 bottom calc(var(--u) * 96) / calc(var(--u) * 10) calc((100% - var(--u) * 96) / 2 + 1px) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 96' preserveAspectRatio='none'%3E%3Cmask id='m'%3E%3Crect width='10' height='96' fill='white'/%3E%3Cg fill='black'%3E%3Ccircle cx='10' cy='0' r='9'/%3E%3Ccircle cx='10' cy='96' r='9'/%3E%3Ccircle cx='10' cy='8.7' r='4.3'/%3E%3Ccircle cx='10' cy='24.4' r='4.3'/%3E%3Ccircle cx='10' cy='40.1' r='4.3'/%3E%3Ccircle cx='10' cy='55.8' r='4.3'/%3E%3Ccircle cx='10' cy='71.5' r='4.3'/%3E%3Ccircle cx='10' cy='87.2' r='4.3'/%3E%3C/g%3E%3C/mask%3E%3Crect width='10' height='96' fill='white' mask='url(%23m)'/%3E%3C/svg%3E") right bottom / calc(var(--u) * 10) calc(var(--u) * 96) no-repeat;
          mask: radial-gradient(circle at 0 0, transparent calc(var(--u) * 9), #000 calc(var(--u) * 9 + .5px)) left top / calc(100% - var(--u) * 9.5) 100% no-repeat, radial-gradient(circle at 100% 0, transparent calc(var(--u) * 9), #000 calc(var(--u) * 9 + .5px)) right top / calc(var(--u) * 10) calc((100% - var(--u) * 96) / 2 + 1px) no-repeat, radial-gradient(circle at 100% 100%, transparent calc(var(--u) * 9), #000 calc(var(--u) * 9 + .5px)) right 0 bottom calc(var(--u) * 96) / calc(var(--u) * 10) calc((100% - var(--u) * 96) / 2 + 1px) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 96' preserveAspectRatio='none'%3E%3Cmask id='m'%3E%3Crect width='10' height='96' fill='white'/%3E%3Cg fill='black'%3E%3Ccircle cx='10' cy='0' r='9'/%3E%3Ccircle cx='10' cy='96' r='9'/%3E%3Ccircle cx='10' cy='8.7' r='4.3'/%3E%3Ccircle cx='10' cy='24.4' r='4.3'/%3E%3Ccircle cx='10' cy='40.1' r='4.3'/%3E%3Ccircle cx='10' cy='55.8' r='4.3'/%3E%3Ccircle cx='10' cy='71.5' r='4.3'/%3E%3Ccircle cx='10' cy='87.2' r='4.3'/%3E%3C/g%3E%3C/mask%3E%3Crect width='10' height='96' fill='white' mask='url(%23m)'/%3E%3C/svg%3E") right bottom / calc(var(--u) * 10) calc(var(--u) * 96) no-repeat;
  /* Al cerrar: se encoge sin rebote, justo después de que se va el contenido */
  transition:
    width .42s cubic-bezier(.4, 0, .2, 1) .1s,
    right .42s cubic-bezier(.4, 0, .2, 1) .1s,
    height .46s cubic-bezier(.4, 0, .2, 1) .1s;
}
.ticket-brand {
  /* Medidas tomadas del mockup (ticket de 96u de alto) */
  position: absolute; right: calc(var(--u) * 21); bottom: 0; height: calc(var(--u) * 96);
  width: calc(var(--u) * 262);
}
.brand {
  margin: 0; white-space: nowrap;
  font-size: calc(var(--u) * 45); line-height: 1;
  margin-top: calc(var(--u) * 9.5);
  padding-bottom: calc(var(--u) * 5.7);
  /* línea de puntos redondos */
  background: radial-gradient(circle, var(--ink) calc(var(--u) * .95), transparent calc(var(--u) * .95 + .6px))
              0 100% / calc(var(--u) * 4) calc(var(--u) * 2.4) repeat-x;
}
.brand strong { font-family: 'Inter Tight', sans-serif; font-weight: 800; }
.brand em {
  font-family: 'Instrument Serif', serif; font-style: italic; font-size: 1em;
  letter-spacing: .12em; margin-right: -.12em;
}
.role {
  margin: calc(var(--u) * 9.2) 0 0; white-space: nowrap; line-height: 1;
  font-size: max(7.5px, calc(var(--u) * 15)); font-weight: 400;
  letter-spacing: .085em; margin-right: -.085em; text-transform: uppercase;
}

/* --- Talón: Diseño / Video --- */
#ticket-stub {
  position: absolute; right: 0; bottom: 0;
  width: calc(var(--u) * 116); height: 100%;
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 calc(var(--u) * 14) 0 calc(var(--u) * 14.5);
  /* troquel: muescas, perforaciones y borde festoneado de estampilla */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 116 96' preserveAspectRatio='none'%3E%3Cmask id='m'%3E%3Crect width='116' height='96' fill='white'/%3E%3Cg fill='black'%3E%3Ccircle cx='0' cy='0' r='9'/%3E%3Ccircle cx='0' cy='96' r='9'/%3E%3Ccircle cx='0' cy='8.7' r='4.3'/%3E%3Ccircle cx='0' cy='24.4' r='4.3'/%3E%3Ccircle cx='0' cy='40.1' r='4.3'/%3E%3Ccircle cx='0' cy='55.8' r='4.3'/%3E%3Ccircle cx='0' cy='71.5' r='4.3'/%3E%3Ccircle cx='0' cy='87.2' r='4.3'/%3E%3Ccircle cx='116' cy='8.7' r='4.5'/%3E%3Ccircle cx='116' cy='24.4' r='4.5'/%3E%3Ccircle cx='116' cy='40.1' r='4.5'/%3E%3Ccircle cx='116' cy='55.8' r='4.5'/%3E%3Ccircle cx='116' cy='71.5' r='4.5'/%3E%3Ccircle cx='116' cy='87.2' r='4.5'/%3E%3Ccircle cx='116' cy='96' r='9'/%3E%3Ccircle cx='116' cy='0' r='9'/%3E%3C/g%3E%3C/mask%3E%3Crect width='116' height='96' fill='white' mask='url(%23m)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 116 96' preserveAspectRatio='none'%3E%3Cmask id='m'%3E%3Crect width='116' height='96' fill='white'/%3E%3Cg fill='black'%3E%3Ccircle cx='0' cy='0' r='9'/%3E%3Ccircle cx='0' cy='96' r='9'/%3E%3Ccircle cx='0' cy='8.7' r='4.3'/%3E%3Ccircle cx='0' cy='24.4' r='4.3'/%3E%3Ccircle cx='0' cy='40.1' r='4.3'/%3E%3Ccircle cx='0' cy='55.8' r='4.3'/%3E%3Ccircle cx='0' cy='71.5' r='4.3'/%3E%3Ccircle cx='0' cy='87.2' r='4.3'/%3E%3Ccircle cx='116' cy='8.7' r='4.5'/%3E%3Ccircle cx='116' cy='24.4' r='4.5'/%3E%3Ccircle cx='116' cy='40.1' r='4.5'/%3E%3Ccircle cx='116' cy='55.8' r='4.5'/%3E%3Ccircle cx='116' cy='71.5' r='4.5'/%3E%3Ccircle cx='116' cy='87.2' r='4.5'/%3E%3Ccircle cx='116' cy='96' r='9'/%3E%3Ccircle cx='116' cy='0' r='9'/%3E%3C/g%3E%3C/mask%3E%3Crect width='116' height='96' fill='white' mask='url(%23m)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transition: opacity .3s ease;
}
#ticket-stub::before {               /* hilo de la línea de corte entre perforaciones */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  border-left: 1px solid rgba(35,31,29,.45);
}
.stub-btn {
  position: relative;
  height: calc(var(--u) * 31.5); min-height: 22px;
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: max(9px, calc(var(--u) * 14.5)); letter-spacing: .11em; padding-left: .11em; text-transform: uppercase;
  color: var(--ink); background: var(--paper);
  transition: background .25s ease, color .25s ease;
}
.stub-btn + .stub-btn { margin-top: -2px; }
.stub-btn em { font-style: normal; }
/* La opción activa se invierte y pasa a la cursiva serif en mayúsculas (como en el mockup) */
.stub-btn[aria-pressed="true"] {
  background: var(--ink); color: var(--paper);
  font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400;
  font-size: max(10px, calc(var(--u) * 15)); letter-spacing: .16em; padding-left: .16em;
}
.stub-btn:not([aria-pressed="true"]):hover { background: #e6e1d8; }

/* --- Isla dinámica: el ticket crece hacia arriba y a la izquierda --- */
#island {
  position: absolute; left: 0; right: 0; top: 0;
  bottom: calc(var(--u) * 96);
  padding: calc(var(--u) * 22) calc(var(--u) * 20) 0;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .2s;
}
#dock.open #ticket-main {
  height: min(calc(var(--u) * 650), calc(100dvh - var(--dock-y) - 24px));
  cursor: default;
  /* Al abrir: crece con rebote, como la isla dinámica del iPhone */
  transition: width .6s var(--spring), right .6s var(--spring), height .66s var(--spring);
}
#dock.open #island { opacity: 1; visibility: visible; transition: opacity .01s, visibility 0s; }

/* El contenido entra en cascada cuando la isla ya casi terminó de crecer
   y sale todo junto (y rápido) al cerrar */
#island > * {
  opacity: 0; transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease;
}
#dock.open #island > * {
  opacity: 1; transform: none;
  transition: opacity .38s ease, transform .5s var(--ease-out);
}
#dock.open #island > :nth-child(1) { transition-delay: .26s; }
#dock.open #island > :nth-child(2) { transition-delay: .34s; }
#dock.open #island > :nth-child(3) { transition-delay: .42s; }

.isl-top { display: flex; gap: calc(var(--u) * 12); }
.isl-photo {
  width: 45%; aspect-ratio: 1; object-fit: cover; object-position: center 25%;
  background: var(--ink);
}
.isl-id { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.isl-name {
  margin: 0; font-family: 'Inter Tight', sans-serif; font-weight: 800;
  font-size: clamp(16px, calc(var(--u) * 27), 27px); line-height: 1.02; letter-spacing: -.01em;
  color: var(--ink);
}
.isl-name em {
  font-family: 'Instrument Serif', serif; font-weight: 400; font-style: italic;
  font-size: 1.14em; color: var(--orange); letter-spacing: 0;
}
.isl-meta {
  display: flex; align-items: stretch;
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
}
.isl-city { flex: 1; padding: 6px 8px 5px 0; display: flex; flex-direction: column; line-height: 1; }
.isl-city span { font-size: 7px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.isl-city strong { font-size: clamp(13px, calc(var(--u) * 18), 18px); font-weight: 500; letter-spacing: .02em; text-transform: uppercase; margin-top: 3px; }
.isl-ico {
  width: clamp(30px, calc(var(--u) * 38), 38px);
  display: grid; place-items: center;
  border-left: 1.5px solid var(--ink);
  color: var(--ink);
  transition: background .2s ease, color .2s ease;
}
.isl-ico svg { width: 60%; height: auto; }
.isl-ico:hover { background: var(--ink); color: var(--paper); }
.isl-ico:hover path[fill="#f3f0eb"], .isl-ico:hover path[stroke="#f3f0eb"] { fill: var(--ink); stroke: var(--ink); }

.isl-tabs { display: flex; margin-top: calc(var(--u) * 12); }
.isl-tabs button {
  flex: 1; padding: 5px 4px;
  border: 1.5px solid var(--ink); margin-left: -1.5px;
  font-size: clamp(9px, calc(var(--u) * 13), 13px); font-weight: 500; letter-spacing: .03em; text-transform: uppercase;
  color: var(--ink);
  transition: background .2s ease, color .2s ease;
}
.isl-tabs button:first-child { margin-left: 0; }
.isl-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.isl-tabs button:not([aria-selected="true"]):hover { background: #e6e1d8; }

.isl-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  border: 1.5px solid var(--ink); border-top: 0;
  /* margen inferior amplio: el personaje tapa la esquina, así el último
     contenido puede subirse por encima de él */
  padding: 14px 14px calc(var(--u) * 130 + 18px);
  color: var(--ink);
  scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
}
.isl-body::-webkit-scrollbar { width: 6px; }
.isl-body::-webkit-scrollbar-thumb { background: var(--ink); }
.isl-body:focus-visible { outline-offset: -3px; }

.entry + .entry { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(35,31,29,.4); }
.entry-years { font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: 15px; }
.entry-place { margin-top: 2px; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.entry-role { margin-top: 3px; font-family: 'Instrument Serif', serif; font-style: italic; font-size: 17px; color: var(--orange); }
.entry-desc { margin: 5px 0 0; font-size: 12.5px; line-height: 1.5; color: rgba(35,31,29,.8); }

.skill + .skill { margin-top: 11px; }
.skill-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; }
.skill-bar { height: 7px; margin-top: 5px; border: 1.5px solid var(--ink); }
.skill-bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chips span { padding: 4px 9px; border: 1.5px solid var(--ink); font-size: 11px; font-weight: 600; }

/* --- Globos de chat --- */
#bubbles {
  position: absolute; left: calc(var(--u) * 258); bottom: calc(var(--u) * 138);
  width: max-content;               /* no heredar el ancho del dock: cada globo en una línea */
  display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--u) * 12);
  pointer-events: none;
}
.bubble {
  --r: calc(var(--u) * 33);            /* medio alto del globo: forma de píldora */
  display: none; position: relative; isolation: isolate;
  margin: 0; max-width: calc(100vw - var(--dock-x) - var(--u) * 258 - 16px);
  padding: max(9px, calc(var(--u) * 17)) max(16px, calc(var(--u) * 38));
  line-height: 1.25;
  color: #111;
  font-weight: 700; font-size: max(13px, calc(var(--u) * 26)); letter-spacing: -.01em;
  transform-origin: 0% 100%;
}
.bubble.show { display: block; animation: bubbleIn .55s var(--spring) both; }
/* Cuerpo del globo (detrás del texto) */
.bubble::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--blue); border-radius: var(--r);
  transition: border-bottom-left-radius .3s ease;
}
/* Colita estilo chat: solo en el último globo. Al llegar otro debajo, se retrae */
.bubble::before {
  content: ''; position: absolute; z-index: -1;
  left: calc(var(--u) * -4); bottom: 0;
  width: calc(var(--u) * 38); height: calc(var(--u) * 16);
  background: var(--blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 16' preserveAspectRatio='none'%3E%3Cpath d='M4 0H38V16C30 16 24 11.5 16 11.5C10 11.5 6 16 0 16C3 13 4 10 4 6Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 16' preserveAspectRatio='none'%3E%3Cpath d='M4 0H38V16C30 16 24 11.5 16 11.5C10 11.5 6 16 0 16C3 13 4 10 4 6Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  opacity: 0; transform: scale(.4); transform-origin: 10% 100%;
  transition: opacity .2s ease, transform .3s ease;
}
.bubble.tail::after { border-bottom-left-radius: 0; }
.bubble.tail::before { opacity: 1; transform: none; }
/* "Escribiendo…" */
.bubble.typing { padding-top: 0; padding-bottom: 0; height: calc(1.25em + 2 * max(9px, calc(var(--u) * 17))); align-items: center; gap: .32em; }
.bubble.typing.show { display: flex; }
.bubble.typing i {
  width: .42em; height: .42em; border-radius: 50%; background: #111; opacity: .35;
  animation: typingDot 1s ease-in-out infinite;
}
.bubble.typing i:nth-child(2) { animation-delay: .15s; }
.bubble.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 30% { opacity: .9; transform: translateY(-3px); } 60% { opacity: .35; transform: none; } }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(10px) scale(.55); } to { opacity: 1; transform: none; } }
#bubbles.gone .bubble { animation: bubbleOut .25s ease-in both; }
@keyframes bubbleOut { to { opacity: 0; transform: translateY(6px) scale(.85); } }

/* ============ DETALLE DEL PROYECTO ============ */
#detail {
  position: fixed; inset: 0; z-index: 40;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg);
  opacity: 0; transition: opacity .35s ease;
  scrollbar-width: thin; scrollbar-color: rgba(243,239,232,.3) transparent;
}
#detail.open { opacity: 1; }
.dt-cat, .dt-down { opacity: 0; transform: translateY(8px); transition: opacity .4s ease .25s, transform .5s var(--ease-out) .25s; }
#detail.open .dt-cat, #detail.open .dt-down { opacity: 1; transform: none; }
.dt-hero { position: relative; height: 100dvh; overflow: hidden; }
.dt-media, .dt-media img, .dt-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dt-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, var(--bg), rgba(22,20,18,0) 40%), linear-gradient(270deg, rgba(12,10,8,.5), rgba(12,10,8,0) 55%);
}
.dt-head { position: absolute; z-index: 1; top: 7.4vh; right: 4.8vw; text-align: right; }   /* misma posición que en el escenario */
.dt-cat { margin: clamp(18px, 3.4vh, 34px) 0 0; font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: rgba(243,239,232,.8); }
.dt-title {
  margin: 0; max-width: 70vw; margin-left: auto;
  font-family: 'Inter Tight', sans-serif; font-weight: 800;
  font-size: clamp(46px, 9.4vw, 162px); line-height: .88; letter-spacing: -.012em;
  text-transform: uppercase; text-wrap: balance;
}
.dt-down {
  margin: 10px 0 0;
  font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(243,239,232,.75);
}
.dt-down span { display: inline-block; animation: downNudge 1.6s ease-in-out infinite; }
@keyframes downNudge { 50% { transform: translateY(4px); } }
.dt-body {
  max-width: 900px; margin: 0 auto;
  padding: 8vh 6vw 45vh;
}
.dt-desc { margin: 0; font-size: clamp(18px, 1.7vw, 23px); line-height: 1.55; color: rgba(243,239,232,.9); max-width: 760px; }
.dt-meta { display: flex; flex-wrap: wrap; gap: 20px 60px; margin: 36px 0 0; }
.dt-meta dt { font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: rgba(243,239,232,.5); }
.dt-meta dd { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 15px; }
.dt-meta dd span { padding: 5px 11px; border: 1px solid rgba(243,239,232,.3); font-size: 12px; }

#detail-content { margin-top: 30px; }
/* Siguiente proyecto: cierra la página con un enlace grande al próximo */
.dt-next {
  display: block; margin-top: 18vh; padding-top: 28px; border-top: 1px solid rgba(243,239,232,.2);
  color: var(--cream); text-decoration: none;
}
.dt-next span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: rgba(243,239,232,.5); }
.dt-next strong {
  display: block; margin-top: 12px;
  font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: clamp(38px, 7vw, 120px); line-height: .9;
  text-transform: uppercase; letter-spacing: -.012em; transition: color .25s ease, transform .4s var(--ease-out);
}
.dt-next strong::after { content: '\00a0→'; }
.dt-next:hover strong, .dt-next:focus-visible strong { color: var(--orange); transform: translateX(10px); }
.dt-next:focus-visible { outline: none; }
.msec-label {
  margin: 56px 0 0;
  font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: clamp(22px, 2.4vw, 32px);
  text-transform: uppercase; letter-spacing: -.005em;
}
.msec-text { margin: 18px 0 0; font-size: 16px; line-height: 1.65; color: rgba(243,239,232,.78); max-width: 720px; }
.msec-img { width: 100%; height: auto; margin: 18px auto 0; }
.msec-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.msec-grid img { flex: 0 1 var(--gw, 230px); max-width: var(--gw, 230px); height: auto; }
/* Columnas (imagen / texto / video lado a lado; el ancho sale del editor) */
.msec-cols { display: grid; grid-template-columns: var(--cols, 1fr 1fr); gap: clamp(16px, 3vw, 40px); margin-top: 18px; align-items: start; }
.msec-cols.is-center { align-items: center; }
.msec-col { min-width: 0; }
.msec-col > img, .msec-col > video { display: block; width: 100%; height: auto; }
.msec-col > .msec-label, .msec-col > .msec-text { margin-top: 0; }
/* ---------- Diagramación del proyecto en PC: grilla editorial de 12 columnas ---------- */
@media (min-width: 1000px) {
  .dt-body {
    max-width: min(1440px, 92vw); padding: 12vh 4vw 30vh;
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 2.2vw, 40px);
    align-items: start;
  }
  /* Inicio: rol y herramientas a la izquierda, descripción grande a la derecha */
  .dt-meta { grid-column: 1 / 5; grid-row: 1; flex-direction: column; gap: 28px; margin: 6px 0 0; }
  .dt-desc { grid-column: 5 / 13; grid-row: 1; max-width: 30em; font-size: clamp(22px, 1.9vw, 32px); line-height: 1.4; letter-spacing: -.01em; }
  #detail-content, .dt-body > .tiktoks {
    grid-column: 1 / -1; margin-top: 11vh;
    display: grid; grid-template-columns: subgrid; align-items: start;
  }
  .dt-body > .tiktoks { display: flex; }
  #detail-content > * { grid-column: 1 / -1; }
  .dt-next { grid-column: 1 / -1; }
  .msec { margin-top: clamp(20px, 2.2vw, 36px); }
  .msec > .msec-label, .msec > .msec-text, .msec > .msec-img,
  .msec > .msec-grid, .msec > .msec-cols { margin-top: 0; }
  /* Título corto a la izquierda; el texto que le sigue queda a su lado, en la misma fila */
  #detail-content > .msec.is-label { grid-column: 1 / 5; margin-top: clamp(64px, 7vw, 120px); }
  #detail-content > .msec.is-text { grid-column: 5 / 13; }
  #detail-content > .msec.is-label + .msec.is-text { margin-top: clamp(64px, 7vw, 120px); }
  .msec.is-label .msec-label { font-size: clamp(22px, 1.8vw, 30px); line-height: 1.05; padding-top: .15em; }
  .msec.is-text .msec-text { max-width: 36em; font-size: 17px; line-height: 1.7; }
  /* Grillas: piezas más grandes que en celular */
  .msec > .msec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(var(--gw, 230px) * 1.45), calc(var(--gw, 230px) * 1.7))); justify-content: center; gap: clamp(12px, 1.4vw, 24px); }
  .msec > .msec-grid img { max-width: 100%; width: 100%; }
  .msec > .msec-img { display: block; margin-left: auto; margin-right: auto; }
}

.tiktoks { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 40px; }
.tiktoks .tiktok-embed { margin: 0 !important; }

#detail-close {
  position: fixed; z-index: 45; top: max(16px, 3vh); left: max(16px, 2.2vw);
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 1.5px solid rgba(243,239,232,.5); border-radius: 50%;
  background: rgba(22,20,18,.55); backdrop-filter: blur(6px);
  color: var(--cream);
  opacity: 0; transition: opacity .3s ease .15s, background .2s ease, transform .2s ease;
}
#detail.open #detail-close { opacity: 1; }
#detail-close svg { width: 20px; }
#detail-close:hover { background: var(--cream); color: var(--bg); transform: rotate(90deg); }

/* ============ MÓVIL ============ */
@media (max-width: 600px) {
  .slide-copy, .dt-head { top: 5vh; right: 6vw; }
  .slide-title, .dt-title { max-width: 88vw; }
  .msec-cols { grid-template-columns: 1fr; }            /* en celular las columnas se apilan */
  /* La isla abierta usa todo el ancho del dock y tapa el talón */
  #dock.open #ticket-main { right: 0; width: 100%; height: min(600px, calc(100dvh - var(--dock-y) - 36px)); }
  #dock.open #ticket-stub { opacity: 0; pointer-events: none; }
  .isl-photo { width: 38%; }
  #dock.open #ticket-main {
    -webkit-mask: radial-gradient(circle at 0 0, transparent calc(var(--u) * 9), #000 calc(var(--u) * 9 + .5px)) left top / 51% 51% no-repeat, radial-gradient(circle at 100% 0, transparent calc(var(--u) * 9), #000 calc(var(--u) * 9 + .5px)) right top / 51% 51% no-repeat, linear-gradient(#000,#000) bottom / 100% 50% no-repeat;
            mask: radial-gradient(circle at 0 0, transparent calc(var(--u) * 9), #000 calc(var(--u) * 9 + .5px)) left top / 51% 51% no-repeat, radial-gradient(circle at 100% 0, transparent calc(var(--u) * 9), #000 calc(var(--u) * 9 + .5px)) right top / 51% 51% no-repeat, linear-gradient(#000,#000) bottom / 100% 50% no-repeat;
  }
  .bubble { font-size: 13px; --r: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- Kit de papelería (cintas, gancho, papeles, texturas) ---------- */
/* Arrugas y dobleces sobre la foto (textura gris en modo superposición) */
.ph-fold { position: absolute; inset: 0; pointer-events: none; background: center / cover no-repeat; mix-blend-mode: overlay; opacity: .7; }
.ph-tex { opacity: .35; }
/* Papeles sueltos */
.cp-paper { filter: drop-shadow(0 2px 2px rgba(0,0,0,.28)) drop-shadow(0 14px 22px rgba(0,0,0,.3)); }
/* Recibo sobre papel con textura */
.rc-paper { background-color: #f4f0e8; background-size: cover; background-position: center; background-blend-mode: multiply; }
/* Nota escrita a mano sobre una tarjeta perforada o una libreta */
.cp-note { padding: 0; background: none; box-shadow: none; font-size: calc(var(--w) * .047px); line-height: 1.25;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)) drop-shadow(0 12px 20px rgba(0,0,0,.28)); }
.nt-card { display: block; width: 100%; height: auto; }
/* Etiqueta: la tarjeta blanca con hueco */
.cp-tag { aspect-ratio: auto; display: block; padding: 0; background: none; border-radius: 0; box-shadow: none;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)) drop-shadow(0 12px 18px rgba(0,0,0,.28)); }
.tg-card { display: block; width: 100%; height: auto; }
.tg-text { position: absolute; left: 12%; right: 12%; top: 40%; display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: #2b2926; font: 600 calc(var(--w) * .16px) 'Inter Tight', sans-serif; text-transform: uppercase; text-align: center; }
.tg-text small { font: 500 calc(var(--w) * .07px) 'IBM Plex Mono', monospace; letter-spacing: .1em; }
/* Sticker con el número de archivo pegado en la carpeta */
.fd-sticker { position: absolute; left: 6%; top: 38%; width: 30%; transform: rotate(-3deg); filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.fd-sticker img { display: block; width: 100%; height: auto; }
.fd-sticker span { position: absolute; inset: 18% 9%; display: flex; flex-direction: column; justify-content: center;
  color: #2b2926; font: 600 calc(var(--w) * .028px) 'IBM Plex Mono', monospace; letter-spacing: .06em; line-height: 1.2; }
.fd-sticker small { font-size: .72em; font-weight: 500; opacity: .75; text-transform: uppercase; }

/* ---------- Carpetas de color (modelos blancos teñidos sin perder textura) ---------- */
.fd-kit { position: relative; }
.fd-kit img { display: block; width: 100%; height: auto; }
.fd-tint {
  position: absolute; inset: 0; background: var(--fd); mix-blend-mode: multiply; pointer-events: none;
  -webkit-mask: center / 100% 100% no-repeat; mask: center / 100% 100% no-repeat;
}
.fd-kit .fd-relief { position: absolute; inset: 0; height: 100%; mix-blend-mode: overlay; opacity: .4; pointer-events: none; }

/* Collage: ganchos arriba y abajo de la carpeta (más pequeños porque la carpeta creció) */
.cp-paper .fd-kit { filter: none; }


/* ---------- Accesorios editables (cintas, clips, ganchos) ---------- */
.cp-it .cp-pr { position: absolute; z-index: 3; height: auto; pointer-events: none; }
/* Cinta: mezcla normal aclarada (en modo Trama desaparecía sobre blanco puro) */
.cp-it .cp-pr.is-cinta { opacity: .82; filter: brightness(1.45) contrast(.85) drop-shadow(0 1px 1.5px rgba(0,0,0,.25)); }
.cp-it .cp-pr.is-clip { filter: drop-shadow(1px 3px 2px rgba(0,0,0,.4)); }
.cp-it .cp-pr.is-gancho { filter: drop-shadow(0 5px 5px rgba(0,0,0,.45)); }

/* ---------- Nota: a máquina + a mano, centrada y lejos de los huecos ---------- */
.cp-note .nt-text {
  position: absolute; margin: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: .35em;
  font: 500 calc(var(--w) * .068px) / 1.1 'Caveat', 'Instrument Serif', cursive; font-style: normal; color: #24407e;
}
.nt-text small { font: 500 calc(var(--w) * .026px) 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: #3b3835; opacity: .75; }
.nt-text p { margin: 0; }
.cp-note .nt-text.is-left { inset: 14% 9% 13% 18%; }
.cp-note .nt-text.is-top { inset: 26% 10% 11% 10%; }
/* Libreta (papel-40): la hoja ocupa solo el 84% izquierdo de la imagen; el texto va centrado en la hoja */
.cp-note .nt-text.is-pad { inset: 19% 25% 12% 9%; font-size: calc(var(--w) * .078px); }

/* ---------- Etiqueta colgante con el número del proyecto ---------- */
.cp-tag .fd-kit img { display: block; width: 100%; height: auto; }
.tg-cord { position: absolute; left: 51%; top: 7%; width: 34%; transform: translate(-50%, -100%); overflow: visible; z-index: 2; }
.tg-cord path { fill: none; stroke: #b8412c; stroke-width: 3.2; stroke-linecap: round; filter: drop-shadow(0 2px 1px rgba(0,0,0,.3)); }
.tg-body {
  position: absolute; inset: 15% 11% 9%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #2b2926; text-align: center; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase;
}
.tg-arch { font-size: calc(var(--w) * .07px); letter-spacing: .28em; margin-bottom: 6%; }
.tg-no { font-size: calc(var(--w) * .1px); font-weight: 600; letter-spacing: .06em; }
.tg-num { font: italic 400 calc(var(--w) * .5px) / .9 'Instrument Serif', serif; margin: 0 0 4%; }
.tg-rule { width: 70%; border-top: 1.5px dashed rgba(43,41,38,.5); margin: 2% 0 7%; }
.tg-cat { font-size: calc(var(--w) * .075px); font-weight: 600; letter-spacing: .16em; }
.tg-year { font-size: calc(var(--w) * .07px); letter-spacing: .2em; opacity: .7; margin-top: 3%; }

/* Documentos impresos sobre las hojas de la carpeta */
.cp-doc { filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)) drop-shadow(0 8px 14px rgba(0,0,0,.22)); }
.cp-doc img { display: block; width: 100%; height: auto; }

/* Cinta suelta agregada desde el editor */
.cp-tape img { display: block; width: 100%; height: auto; opacity: .82; filter: brightness(1.45) contrast(.85) drop-shadow(0 1px 1.5px rgba(0,0,0,.25)); }
