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

/* Custom cursor */
* { cursor: none !important; }

/* ── Click explosion ────────────────────────────────────────────────────────── */
.click-ring {
  position: fixed; pointer-events: none; z-index: 99998;
  width: 0; height: 0;
  transform: translate(-50%, -50%);
}
.click-ring::before, .click-ring::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7);
  transform: translate(-50%, -50%);
  animation: clickRing 0.65s ease-out forwards;
}
.click-ring::after {
  border-color: rgba(255,255,255,0.3);
  animation-delay: 0.08s;
  animation-duration: 0.7s;
}
@keyframes clickRing {
  from { width: 0;     height: 0;     opacity: 1; }
  to   { width: 180px; height: 180px; opacity: 0; }
}

.click-thread {
  position: fixed; pointer-events: none; z-index: 99997;
  width: 1px; height: 18px;
  background: rgba(255,255,255,0.85);
  transform-origin: center center;
  transform: translate(-50%, -50%) rotate(var(--rot));
  animation: clickThread ease-out forwards;
}
@keyframes clickThread {
  0%   { transform: translate(-50%,-50%) translate(0,0) rotate(var(--rot)); opacity: 1; }
  100% { transform: translate(-50%,-50%) translate(var(--dx),var(--dy)) rotate(calc(var(--rot) + 180deg)); opacity: 0; }
}

#cursor {
  position: fixed; z-index: 99999;
  width: 90px;
  pointer-events: none;
  transform: translate(-55%, -4%);
  opacity: 1;
  transition: opacity 0.3s ease;
  will-change: left, top;
}
#cursor img {
  width: 100%; height: auto; display: block;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform 0.15s ease;
}
#cursor.clicking img { transform: scale(0.88) rotate(-8deg); }
#cursor.hidden { opacity: 0; }
:root {
  --black: #000;
  --off: #080808;
  --grey: #888;
  --light: #f0ede8;
  --serif: 'Playfair Display','EB Garamond',Georgia,serif;
  --serif2: 'EB Garamond','Playfair Display',Georgia,serif;
}
html { scroll-behavior: smooth; }
body { background: var(--black); color: var(--light); font-family: var(--serif2); overflow-x: hidden; }

/* Camera video — sits behind Three.js canvas; shows through transparent areas */
#cam-video {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  filter: grayscale(1) brightness(0.55) contrast(1.3);
  z-index: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
  pointer-events: none;
}
#cam-video.cam-bg-active { opacity: 1; }
#cam-video.cam-bg-faded  { opacity: 0; }

/* Canvas — alpha:true renderer, transparent where no 3D content */
#canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 1;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
#canvas.faded { opacity: 0; }

/* Grain */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 1;
  pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain 0.6s steps(1) infinite;
}
@keyframes grain {
  0%   { background-position:   0    0;   }
  25%  { background-position: -40px 30px; }
  50%  { background-position:  20px -40px;}
  75%  { background-position: -60px 20px; }
  100% { background-position:  30px -20px;}
}

#page { position: relative; z-index: 10; }

/* ══ HERO ══ */
#hero {
  height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; background: transparent;
  cursor: grab; pointer-events: all;
}
#hero.dragging { cursor: grabbing; }
.hero-text {
  text-align: center; pointer-events: none;
  user-select: none;
}
.hero-name {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(3rem, 12vw, 9rem);
  letter-spacing: 0.18em; text-transform: uppercase;
  line-height: 1; color: #fff;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0 0.22em;
}
/* each word clips chars from below — clip-path preserves horizontal serifs */
.hero-word {
  display: inline-flex;
  clip-path: inset(0 -0.6em 0 -0.6em);
  line-height: 1.05;
}
.hero-char {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  text-shadow: none;
  transition: transform 0.75s cubic-bezier(0.16,1,0.3,1),
              opacity   0.55s ease,
              text-shadow 1.4s ease;
}
.hero-name.entered .hero-char {
  transform: translateY(0);
  opacity: 1;
  text-shadow:
    0 0 8px rgba(255,120,180,0.5),
    0 0 25px rgba(255,80,160,0.25);
}

@keyframes neonBreathe {
  0%, 100% {
    text-shadow:
      0 0 8px  rgba(255,120,180,0.5),
      0 0 25px rgba(255,80,160,0.25);
  }
  50% {
    text-shadow:
      0 0 10px rgba(255,130,185,0.65),
      0 0 35px rgba(255,80,160,0.32);
  }
  88% { opacity: 0.88; }
  89% { opacity: 1; }
}

.hero-rule {
  width: 0; height: 1px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255,110,170,0.4);
  margin: 1.4rem auto;
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
}
.hero-rule.entered {
  width: clamp(50px,10vw,100px);
}

.hero-tagline {
  font-family: var(--serif2); font-style: italic;
  font-size: clamp(0.85rem,1.9vw,1.15rem);
  letter-spacing: 0.32em; color: rgba(255,255,255,0.55);
  opacity: 0;
  filter: blur(8px);
  transition: opacity 1s ease 0.1s, filter 1s ease 0.1s;
}
.hero-tagline.entered {
  opacity: 1;
  filter: blur(0);
}

/* ── Font selector ──────────────────────────────────────────────────────────── */
.font-selector {
  position: absolute; bottom: 5.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 0.6rem;
  opacity: 0; transition: opacity 0.8s ease 1.6s;
  pointer-events: all;
}
.font-selector.entered { opacity: 1; }

.font-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.7rem 1.1rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.3);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  backdrop-filter: blur(4px);
}
.font-btn:hover {
  border-color: rgba(255,255,255,0.45);
  color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.5);
}
.font-btn.active {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  background: rgba(0,0,0,0.55);
}
.font-btn-num {
  font-family: var(--serif2); font-size: 0.52rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  opacity: 0.5;
}
.font-btn-name {
  font-size: 0.6rem; letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Option 0 — Playfair Display (current default) */
/* Option 1 — Cormorant Garamond: ultra thin, luxury editorial */
#hero.fopt-1 .hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 200;
  letter-spacing: 0.24em;
  font-size: clamp(3rem, 12vw, 9.5rem);
}
#hero.fopt-1 .font-btn-name { font-family: 'Cormorant Garamond', serif; }

/* Option 2 — Josefin Sans: geometric, clean, fashion editorial */
#hero.fopt-2 .hero-name {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 100;
  letter-spacing: 0.38em;
  font-size: clamp(2.2rem, 9vw, 7rem);
}
#hero.fopt-2 .font-btn-name { font-family: 'Josefin Sans', sans-serif; }

/* Option 3 — Bodoni Moda: high-contrast, iconic fashion */
#hero.fopt-3 .hero-name {
  font-family: 'Bodoni Moda', serif;
  font-weight: 400;
  letter-spacing: 0.14em;
  font-size: clamp(2.6rem, 10vw, 8rem);
}
#hero.fopt-3 .font-btn-name { font-family: 'Bodoni Moda', serif; }

.scroll-arrow {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.scroll-arrow.entered { opacity: 1; }
.scroll-arrow {
  position: absolute; bottom: 2rem;
  left: 50%; transform: translateX(-50%);
}
.scroll-arrow {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.4rem;
  animation: arrowbob 2s ease-in-out infinite;
}
.scroll-line {
  display: block; width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.45));
}
.scroll-chevron {
  display: block; width: 10px; height: 10px;
  border-right: 1px solid rgba(255,255,255,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.55);
  transform: rotate(45deg);
  margin-top: -6px;
}
@keyframes arrowbob {
  0%, 100% { transform: translate(-50%, 0);   opacity: 0.55; }
  50%      { transform: translate(-50%, 9px); opacity: 1;    }
}
.corner {
  position: fixed; z-index: 20; pointer-events: none;
  font-family: var(--serif2); font-size: 0.6rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.18); line-height: 1.7;
}
.corner-tl { top: 2rem; left: 2rem; }
.corner-tr { top: 2rem; right: 2rem; text-align: right; }

#logo-tl {
  pointer-events: all;
  font-family: var(--serif2); font-size: 0.52rem;
  letter-spacing: 0.45em; color: rgba(255,255,255,0.35);
  transition: color 0.3s ease;
  white-space: nowrap; text-transform: uppercase;
}
#logo-tl:hover { color: rgba(255,255,255,0.75); }

/* ── Float animations ──────────────────────────────────────────────────────── */
@keyframes floatItem {
  0%, 100% { transform: translateY(0px);  }
  50%       { transform: translateY(-9px); }
}
@keyframes floatA {
  0%, 100% { transform: scale(1.07) translate(0%,    0%   ); }
  30%       { transform: scale(1.07) translate(1.2%, -1.4%); }
  65%       { transform: scale(1.07) translate(-0.8%, 1.1%); }
}
@keyframes floatB {
  0%, 100% { transform: scale(1.07) translate(0%,    0%   ); }
  35%       { transform: scale(1.07) translate(-1.1%, -0.9%); }
  70%       { transform: scale(1.07) translate(0.7%,  1.3%); }
}
@keyframes floatC {
  0%, 100% { transform: scale(1.07) translate(0%,    0%   ); }
  50%       { transform: scale(1.07) translate(0.5%, -1.6%); }
}
@keyframes bgDrift {
  0%, 100% { transform: scale(1.06) translate(0%,    0%  ); }
  33%       { transform: scale(1.06) translate(1.2%, -1% ); }
  66%       { transform: scale(1.06) translate(-1%,  1.2%); }
}

/* ══ SECCIONES ══ */
section:not(#hero) { background: var(--off); position: relative; }

/* Manifiesto — sección simple centrada */
#manifesto {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  padding: clamp(6rem,14vh,10rem) clamp(2rem,8vw,10rem);
  position: relative; overflow: hidden;
}
#manifesto::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: url('../img/identidad.jpg') center center / cover no-repeat;
  filter: grayscale(0.3) brightness(0.4);
}
#manifesto::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(to top, rgba(8,8,8,0.85), rgba(8,8,8,0.55));
  pointer-events: none;
}
.manifesto-inner { max-width: 820px; width: 100%; margin: 0 auto; position: relative; z-index: 1; }
.manifesto-inner .section-label { margin-bottom: 3rem; }
.manifesto-inner .manifesto-quote {
  font-size: clamp(2rem,5vw,3.8rem); line-height: 1.25;
  margin-bottom: 3rem;
}
.manifesto-inner .manifesto-body {
  font-family: var(--serif2);
  font-size: clamp(1rem,1.5vw,1.2rem); line-height: 1.9;
  color: rgba(240,237,232,0.65); max-width: 540px;
}
.manifesto-inner .manifesto-body p + p { margin-top: 1.3em; }
.manifesto-inner .manifesto-body em { font-style: italic; color: rgba(240,237,232,0.45); }

.manifesto-panel {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.manifesto-panel::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--bg);
  background-size: cover; background-position: center;
  filter: grayscale(0.25) brightness(0.55);
  z-index: 0;
  animation: bgDrift 20s ease-in-out infinite;
}
.manifesto-panel:nth-child(2)::before { animation-duration: 25s; animation-delay: -8s; }
.manifesto-panel:nth-child(3)::before { animation-duration: 17s; animation-delay: -14s; }
.manifesto-panel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
  z-index: 1; pointer-events: none;
}
.manifesto-panel-inner {
  position: relative; z-index: 2;
  padding: clamp(3rem,6vw,6rem) clamp(2rem,8vw,10rem);
  max-width: 900px;
}
.section-label {
  font-family: var(--serif2); font-size: 0.62rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); margin-bottom: 2rem; display: block;
}
.manifesto-quote {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem,6vw,5rem); line-height: 1.15;
  color: var(--light);
}
.manifesto-quote em { font-style: italic; color: rgba(240,237,232,0.55); }
.manifesto-body {
  font-family: var(--serif2);
  font-size: clamp(1.1rem,2vw,1.5rem); line-height: 1.8;
  color: rgba(240,237,232,0.75); max-width: 580px;
}
/* Manifesto button */
.btn-manifesto {
  display: inline-block; margin-top: 2.5rem;
  padding: 0.55em 1.6em;
  border: 1px solid rgba(255,255,255,0.55);
  background: transparent;
  font-family: var(--serif2); font-size: 0.62rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.btn-manifesto:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.9);
  color: #fff;
}

/* Client names */
.client-names {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 2rem;
}
.client-name {
  padding: 0.4em 1.1em;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  font-family: var(--serif2); font-style: italic;
  font-size: 0.78rem; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.client-name:hover {
  background: rgba(255,63,160,0.15);
  border-color: rgba(255,63,160,0.5);
  color: #fff;
}

/* Juan popup */
#juan-popup {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s ease;
}
#juan-popup.open { opacity: 1; pointer-events: all; }

.jp-inner {
  position: relative;
  max-width: 560px; width: 90%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(8,8,8,0.95);
  padding: clamp(2.5rem,6vw,4rem);
}
.jp-close {
  position: absolute; top: 1.4rem; right: 1.4rem;
  background: none; border: none;
  font-family: var(--serif2); font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  transition: color 0.25s;
}
.jp-close:hover { color: rgba(255,255,255,0.8); }

.jp-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.8rem,4vw,2.8rem); line-height: 1.2;
  color: var(--light); margin: 1.2rem 0 2rem;
}
.jp-title em { font-style: italic; color: rgba(240,237,232,0.45); }

.jp-body {
  font-family: var(--serif2);
  font-size: clamp(0.9rem,1.3vw,1rem); line-height: 1.9;
  color: rgba(240,237,232,0.52);
}
.jp-body p + p { margin-top: 1.1em; }

.jp-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: var(--serif2); font-size: 0.58rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}

/* Testimony panel — full B&W, color revealed on hover */
.panel-testimony::before {
  filter: grayscale(1) brightness(0.55);
}
.testimony-src {
  display: none;
}
.testimony-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 3; pointer-events: all;
}
.panel-testimony .manifesto-panel-inner {
  z-index: 4; pointer-events: none;
}

.manifesto-sold {
  display: inline-block; margin-top: 2.5rem;
  padding: 0.55em 1.6em;
  border: 1px solid rgba(255,255,255,0.35);
  font-family: var(--serif2); font-size: 0.62rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  pointer-events: none;
}

/* Trabajo */
#trabajo { padding: clamp(4rem,8vw,7rem) clamp(2rem,6vw,8rem); }
.trabajo-header {
  display: flex; align-items: baseline;
  justify-content: space-between; margin-bottom: 3rem;
  flex-wrap: wrap; gap: 1rem;
}
.trabajo-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.8rem,4vw,3rem); letter-spacing: 0.05em;
}
.trabajo-sub {
  font-family: var(--serif2); font-style: italic;
  font-size: 0.85rem; color: var(--grey); letter-spacing: 0.1em;
}
.grid { display: grid; grid-template-columns: repeat(12,1fr); gap: 1.2rem; }
/* Fila 1: tres — Fila 2: dos — Fila 3: tres */
.grid-item:nth-child(1) { grid-column: span 4; }
.grid-item:nth-child(2) { grid-column: span 4; }
.grid-item:nth-child(3) { grid-column: span 4; }
.grid-item:nth-child(4) { grid-column: span 7; }
.grid-item:nth-child(5) { grid-column: span 5; }
.grid-item:nth-child(6) { grid-column: span 4; }
.grid-item:nth-child(7) { grid-column: span 4; }
.grid-item:nth-child(8) { grid-column: span 4; }
.grid-placeholder {
  width: 100%; aspect-ratio: 3/4; background: #111;
  display: flex; align-items: flex-end; padding: 1.2rem;
  position: relative; overflow: hidden;
}
.grid-item:nth-child(4) .grid-placeholder { aspect-ratio: 4/3; }
.grid-placeholder img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.8);
  z-index: 0;
}
.grid-item { animation: floatItem 11s ease-in-out infinite; }
.grid-item:nth-child(2) { animation-duration: 14s; animation-delay: -5s; }
.grid-item:nth-child(3) { animation-duration:  9s; animation-delay: -2s; }
.grid-item:nth-child(4) { animation-duration: 13s; animation-delay: -8s; }
.grid-item:nth-child(5) { animation-duration: 16s; animation-delay: -3s; }
.paint-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: all;
}
.paint-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1; cursor: crosshair;
  pointer-events: all;
}
.grid-placeholder::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.1) 55%, transparent 100%);
  pointer-events: none;
}
.grid-caption {
  font-family: var(--serif2); font-size: 0.72rem;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.3);
  position: relative; z-index: 3;
  pointer-events: none;
}
.grid-caption .gc-num {
  display: block;
  font-size: 0.6rem; letter-spacing: 0.3em;
  color: rgba(255,255,255,0.4); margin-bottom: 0.55rem;
}
.grid-caption strong {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-size: 1.4rem; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9); margin-bottom: 0.35rem;
}
.grid-caption .gc-q {
  display: block;
  font-style: italic; font-size: 0.82rem;
  line-height: 1.4; color: rgba(255,255,255,0.5);
  max-width: 22ch;
}

/* ── Taller / El testigo ─────────────────────────────────────────────────────── */
#taller {
  padding: clamp(4rem,9vw,8rem) clamp(2rem,6vw,8rem);
  background: #000;
}
.taller-head { max-width: 720px; margin: 0 auto clamp(3rem,6vw,5rem); text-align: center; }
.taller-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2rem,5vw,3.6rem); line-height: 1.2;
  color: #fff; margin: 1.4rem 0 1.8rem;
}
.taller-title em { font-style: italic; color: rgba(240,237,232,0.45); }
.taller-text {
  font-family: var(--serif2);
  font-size: clamp(0.95rem,1.3vw,1.1rem); line-height: 1.9;
  color: rgba(240,237,232,0.5); max-width: 560px; margin: 0 auto;
}
.taller-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.taller-item { position: relative; overflow: hidden; aspect-ratio: 3/4; background: #111; cursor: pointer; }
.taller-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(45%) brightness(0.92);
  transition: filter 0.5s ease, transform 0.6s ease;
}
.taller-item:hover img { filter: grayscale(0%) brightness(1); transform: scale(1.04); }
@media (max-width: 768px) {
  .taller-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
}

/* Colección II — grid inverso */
#trabajo2 { padding: clamp(4rem,8vw,7rem) clamp(2rem,6vw,8rem); }
.grid-b .grid-item:nth-child(1) { grid-column: span 4; }
.grid-b .grid-item:nth-child(2) { grid-column: span 4; }
.grid-b .grid-item:nth-child(3) { grid-column: span 4; }
.grid-b .grid-item:nth-child(4) { grid-column: span 7; }
.grid-b .grid-item:nth-child(5) { grid-column: span 5; }
.gp-wide { aspect-ratio: 4/3 !important; }

#trabajo3 { padding: clamp(4rem,8vw,7rem) clamp(2rem,6vw,8rem); }
.grid-c .grid-item:nth-child(1) { grid-column: span 4; }
.grid-c .grid-item:nth-child(2) { grid-column: span 4; }
.grid-c .grid-item:nth-child(3) { grid-column: span 4; }
.grid-c .grid-item:nth-child(4) { grid-column: span 6; }
.grid-c .grid-item:nth-child(5) { grid-column: span 6; }

/* Tira horizontal */
.strip-wrap {
  overflow-x: auto; overflow-y: hidden; width: 100%;
  padding: 2rem 0; background: var(--off);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.strip-wrap::-webkit-scrollbar { display: none; }
.strip {
  display: flex; gap: 1rem; align-items: stretch;
  width: max-content;
}
.strip img {
  height: 180px; width: auto;
  object-fit: cover; display: block;
  filter: grayscale(30%);
  transition: filter 0.4s ease, transform 0.4s ease;
  -webkit-user-drag: none; user-select: none;
}
.strip img:hover { filter: grayscale(0%); transform: scale(1.03); }

/* ── Lightbox ──────────────────────────────────────────────────────────────── */
#lightbox {
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.94);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
#lightbox.open { opacity: 1; pointer-events: all; }
#lightbox img {
  max-width: 92vw; max-height: 86vh;
  object-fit: contain; display: block;
  box-shadow: 0 10px 60px rgba(0,0,0,0.8);
}
#lb-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  font-family: var(--serif2); font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  transition: color 0.25s, border-color 0.25s;
}
#lb-close:hover { color: #fff; border-color: rgba(255,255,255,0.7); }

/* ── Pack Berghain ─────────────────────────────────────────────────────────── */
#berghain {
  position: relative;
  background: #000;
  padding: clamp(5rem,10vw,9rem) clamp(2rem,6vw,8rem);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(3rem,6vw,6rem);
  align-items: start;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.berghain-stamp {
  font-family: var(--serif2); font-weight: 500;
  font-size: clamp(1rem,3.5vw,2.4rem);
  line-height: 1.05; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000; background: #fff;
  padding: 1.1em 0.9em;
  text-align: center;
  outline: 3px solid #fff;
  outline-offset: 6px;
  transform: rotate(-4deg);
  align-self: center;
  flex-shrink: 0;
}

.berghain-content { display: flex; flex-direction: column; gap: 2rem; }

.berghain-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem,7vw,6rem);
  line-height: 1.0; color: var(--light);
  margin-top: 0.8rem;
}
.berghain-title em { font-style: italic; color: rgba(240,237,232,0.5); }

.berghain-tagline {
  font-family: var(--serif2); font-size: clamp(1rem,1.6vw,1.15rem);
  line-height: 1.8; color: rgba(240,237,232,0.65);
}

.berghain-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 0.7rem;
  font-family: var(--serif2); font-size: clamp(0.9rem,1.3vw,1.05rem);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
}
.berghain-list li { display: flex; align-items: baseline; gap: 0.8rem; }
.berghain-list li::before { font-size: 0.9em; flex-shrink: 0; }
.berghain-list li.ok { color: rgba(240,237,232,0.8); }
.berghain-list li.ok::before { content: '✓'; color: rgba(255,255,255,0.4); }
.berghain-list li.no { color: rgba(240,237,232,0.35); margin-top: 0.4rem; font-size: 0.9em; }
.berghain-list li.no::before { content: '✗'; color: rgba(255,80,80,0.5); }
.berghain-list li.no em { font-style: italic; }

.berghain-fine {
  font-family: var(--serif2); font-size: 0.72rem;
  letter-spacing: 0.08em; line-height: 1.8;
  color: rgba(240,237,232,0.22);
}

.btn-berghain {
  display: inline-flex; align-items: center; gap: 0.9rem;
  align-self: flex-start;
  padding: 1.1em 2.8em;
  border: 1px solid rgba(255,255,255,0.4);
  font-family: var(--serif2); font-size: 0.82rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--light); text-decoration: none;
  transition: background .3s, color .3s, border-color .3s;
}
.btn-berghain svg { width: 13px; height: 13px; transition: transform .3s; }
.btn-berghain:hover { background: var(--light); color: #000; border-color: var(--light); }
.btn-berghain:hover svg { transform: translateX(4px); }

@media (max-width: 680px) {
  #berghain { grid-template-columns: 1fr; }
  .berghain-stamp { transform: rotate(-2deg); align-self: flex-start; }
}

/* Proceso */
#proceso { min-height: 80vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.proceso-text { padding: clamp(4rem,8vw,7rem) clamp(2rem,6vw,7rem); }
.proceso-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2rem,4.5vw,3.4rem); line-height: 1.2; margin-bottom: 2rem;
  color: #fff;
}
.proceso-body {
  font-family: var(--serif2); font-size: clamp(0.95rem,1.3vw,1.1rem);
  line-height: 1.9; color: rgba(240,237,232,0.48);
}
.proceso-body p + p { margin-top: 1.2em; }
.proceso-steps {
  list-style: none; display: flex; flex-wrap: wrap;
  align-items: center; gap: 0.5rem 0.9rem;
  margin-top: 2.5rem;
}
.proceso-steps li {
  font-family: var(--serif2); font-size: 0.62rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.proceso-steps li:not(:last-child)::after {
  content: '→'; margin-left: 0.9rem;
  color: rgba(255,255,255,0.25);
}
.proceso-image {
  height: 100%; min-height: 500px; background: #111; position: relative; overflow: hidden;
}
.proceso-image img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: floatB 18s ease-in-out infinite;
  animation-delay: -6s;
}

/* Visita */
#visita {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: clamp(4rem,8vw,7rem) 2rem; text-align: center; background: #000;
}
.visita-eyebrow {
  font-family: var(--serif2); font-size: 0.62rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--grey); margin-bottom: 2.5rem;
}
.visita-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem,6vw,5rem); line-height: 1.15;
  max-width: 700px; margin-bottom: 1.5rem;
}
.visita-title em { font-style: italic; color: rgba(240,237,232,0.45); }
.visita-text {
  font-family: var(--serif2); font-size: clamp(0.95rem,1.3vw,1.05rem);
  line-height: 1.9; color: rgba(240,237,232,0.42);
  max-width: 420px; margin-bottom: 3.5rem;
}
.btn-agendar {
  display: inline-flex; align-items: center; gap: 0.8rem;
  padding: 1.1em 2.8em; border: 1px solid rgba(255,255,255,0.25);
  background: transparent; color: var(--light);
  font-family: var(--serif2); font-size: clamp(0.85rem,1.4vw,1rem);
  letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .3s, border-color .3s, color .3s, transform .15s;
}
.btn-agendar:hover { background: var(--light); color: #000; border-color: var(--light); transform: translateY(-2px); }
.btn-agendar:active { transform: translateY(0); }
.btn-agendar svg { width: 14px; height: 14px; transition: transform .3s; }
.btn-agendar:hover svg { transform: translateX(4px); }

footer {
  background: #000; border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2.5rem clamp(2rem,6vw,7rem);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-brand { font-family: var(--serif); font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(255,255,255,0.22); }
.footer-copy  { font-family: var(--serif2); font-size: 0.62rem; letter-spacing: 0.15em; color: rgba(255,255,255,0.14); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Code entry ─────────────────────────────────────────────────────────────── */
#code-entry {
  position: fixed; inset: 0; z-index: 500;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #000 url('../img/fondo.jpg') center center / cover no-repeat;
  transition: opacity 0.9s ease;
}
@media (max-width: 768px) {
  #code-entry {
    background-image: url('../img/fondom.jpg');
  }
}
#code-entry::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.15);
  pointer-events: none;
}
#code-entry.ce-hidden { opacity: 0; pointer-events: none; }

.ce-body { position: relative; z-index: 1; }

.ce-corners {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 1;
  display: flex; justify-content: space-between;
  padding: 2rem 2rem;
  font-family: var(--serif2); font-size: 0.6rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); line-height: 1.7;
}

.ce-body {
  display: flex; flex-direction: column; align-items: center; gap: 2.5rem;
}

.ce-label {
  font-family: var(--serif2); font-size: 0.6rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-top: 30px;
}

.ce-slots {
  display: flex; gap: 0.85rem; align-items: flex-end;
}

.ce-slot {
  width: 1.8rem; height: 2.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  transition: border-color 0.2s, color 0.2s;
}
.ce-slot.filled { border-color: rgba(255,255,255,0.8); }

.ce-hint {
  font-family: var(--serif2); font-size: 0.6rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  transition: color 0.3s;
  min-height: 1.2em;
}

#ce-input {
  position: fixed; left: -9999px; top: -9999px;
  width: 1px; height: 1px; opacity: 0;
}

#code-entry.ce-error .ce-slot  { border-color: rgba(255,70,70,0.45); }
#code-entry.ce-error .ce-hint  { color: rgba(255,70,70,0.55); }
#code-entry.ce-success .ce-slot { border-color: rgba(210,175,100,0.9); }
#code-entry.ce-success .ce-hint { color: rgba(195,160,90,0.5); }

/* ── Easter egg: basura ─────────────────────────────────────────────────────── */
#audio-btn {
  position: fixed; bottom: 1.2rem; left: 1.2rem; z-index: 50;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%; cursor: pointer; padding: 1rem;
  color: rgba(255,255,255,0.35);
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
#audio-btn:hover {
  color: #fff;
  background: rgba(255,63,160,0.25);
  border-color: rgba(255,63,160,0.6);
  transform: scale(1.12);
}
#audio-btn svg { width: 16px; height: 16px; display: block; }
#audio-btn.playing { color: rgba(255,255,255,0.6); }

#mail-btn {
  position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 50;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%; cursor: pointer; padding: 1rem;
  color: rgba(255,255,255,0.35);
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
#mail-btn:hover {
  color: #fff;
  background: rgba(255,63,160,0.25);
  border-color: rgba(255,63,160,0.6);
  transform: rotate(-8deg) scale(1.12);
}
#mail-btn svg { width: 18px; height: 18px; display: block; }

#trash-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
  backdrop-filter: blur(4px);
}
#trash-modal.open { opacity: 1; pointer-events: all; }

#trash-close {
  position: absolute; top: 2rem; right: 2rem;
  background: transparent; border: none; cursor: pointer;
  color: rgba(255,255,255,0.3); font-size: 1rem;
  font-family: var(--serif2); letter-spacing: 0.1em;
  transition: color .3s;
}
#trash-close:hover { color: rgba(255,255,255,0.7); }

.trash-title {
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(1rem,2.5vw,1.4rem);
  color: rgba(240,237,232,0.35); letter-spacing: 0.08em;
  margin-bottom: 2.5rem; text-align: center;
}

.trash-pile {
  position: relative; width: min(520px, 88vw); height: min(340px, 55vw);
  margin-bottom: 2.5rem;
}
.trash-card {
  position: absolute; inset: 0;
  transform: rotate(var(--r)) translate(var(--tx), var(--ty));
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), z-index 0s;
  cursor: default;
}
.trash-card:hover {
  transform: rotate(0deg) translate(0,0) scale(1.04);
  z-index: 10;
}
.trash-card img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: grayscale(60%) brightness(0.7);
  transition: filter 0.4s ease;
}
.trash-card:hover img { filter: grayscale(0%) brightness(0.9); }
.trash-card span {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0.7rem 1rem;
  font-family: var(--serif2); font-style: italic;
  font-size: 0.72rem; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.trash-footer {
  font-family: var(--serif2); font-size: 0.6rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: rgba(255,255,255,0.18); text-align: center;
}

#cam-video, #cam-canvas {
  position: fixed; inset: 0; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; visibility: hidden;
}

/* Loader */
#loader {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem; transition: opacity 1.2s ease;
}
#loader.done { opacity: 0; pointer-events: none; }
.loader-name { font-family: var(--serif); font-weight: 300; font-size: 0.9rem; letter-spacing: 0.4em; text-transform: uppercase; color: rgba(255,255,255,0.3); }
.loader-track { width: 100px; height: 1px; background: rgba(255,255,255,0.1); overflow: hidden; }
.loader-fill  { height: 100%; background: rgba(255,255,255,0.5); width: 0%; transition: width .4s ease; }

/* ══ RESPONSIVE ══ */

/* Touch: hide custom cursor, restore system cursor */
@media (hover: none), (pointer: coarse) {
  #cursor { display: none !important; }
  * { cursor: auto !important; }
}

@media (max-width: 768px) {
  /* Galería: 2 columnas → 4 filas, proporción uniforme */
  .grid { gap: 0.6rem; }
  .grid-item { grid-column: span 6 !important; }
  .grid-placeholder,
  .grid-item:nth-child(4) .grid-placeholder { aspect-ratio: 3/4 !important; }

  /* Foto de fondo "Vestir identidades": el modelo está a la derecha */
  #manifesto::before { background-position: right center; }

  #trabajo2, #trabajo3 { padding: 3rem 1.2rem; }

  /* Proceso: imagen más alta, sin cortar la cabeza */
  #proceso { grid-template-columns: 1fr; }
  .proceso-image { min-height: 68svh; }
  .proceso-image img { object-position: center 12%; }

  /* Strip: sin scroll suave para que no tiemble en iOS */
  .strip-wrap { padding: 1.2rem 0; scroll-behavior: auto; }
  .strip img { height: 130px; }

  .manifesto-panel { min-height: 75svh; }
}

@media (max-width: 480px) {
  .corner { display: none; }

  /* Hero */
  #hero { height: 100svh; }
  .hero-name { letter-spacing: 0.06em; font-size: clamp(2rem, 11vw, 3.2rem); }
  .hero-tagline { font-size: 0.85rem; letter-spacing: 0.2em; }

  /* Manifesto */
  .manifesto-panel { min-height: 60svh; }
  .manifesto-panel-inner { padding: 2.5rem 1.4rem; }
  .manifesto-quote { font-size: clamp(1.7rem, 8vw, 2.6rem); }
  .manifesto-body { font-size: 1rem; }
  .manifesto-sold { font-size: 0.55rem; letter-spacing: 0.28em; margin-top: 1.4rem; }

  /* Work sections */
  #trabajo, #trabajo2, #trabajo3 { padding: 3rem 1.2rem; }
  .trabajo-header { margin-bottom: 1.5rem; flex-direction: column; gap: 0.4rem; }
  .trabajo-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }

  /* Process */
  .proceso-text { padding: 2.5rem 1.4rem; }
  .proceso-title { font-size: clamp(1.6rem, 6vw, 2.4rem); }

  /* Strip */
  .strip img { height: 110px; }

  /* Visit */
  #visita { padding: 4rem 1.4rem; min-height: 80svh; }
  .visita-eyebrow { margin-bottom: 1.5rem; }
  .visita-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .visita-text { font-size: 0.95rem; margin-bottom: 2rem; }
  .btn-agendar { width: 100%; justify-content: center; padding: 1.1em 1.2em; font-size: 0.8rem; }

  /* Buttons */
  #audio-btn, #mail-btn { padding: 0.85rem; bottom: 0.9rem; }
  #audio-btn { left: 0.9rem; }
  #mail-btn { right: 0.9rem; }

  /* Code entry */
  .ce-slots { gap: 0.5rem; }
  .ce-slot { width: 1.3rem; height: 2rem; font-size: 0.9rem; }

  /* Trash modal */
  .trash-pile { width: 90vw; height: 52vw; }

  /* Footer */
  footer { justify-content: center; text-align: center; flex-direction: column; gap: 0.5rem; }
}
