/* ==========================================================================
   HOTRODRIK — design tokens
   ========================================================================== */
:root{
  --paper:      #F3ECDD;
  --paper-dim:  #E7DDC6;
  --ink:        #17170F;
  --ink-soft:   #2B2A20;
  --terracotta: #C24E2A;
  --terracotta-dk:#9E3B1C;
  --teal:       #1E5C53;
  --teal-dk:    #123E38;
  --mustard:    #E7A73B;
  --rose:       #B5495B;

  --font-display: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  --font-body: "Space Grotesk", sans-serif;

  --radius: 18px;
  --edge: 3px solid var(--ink);
  --shadow-hard: 8px 8px 0 var(--ink);
  --shadow-hard-sm: 5px 5px 0 var(--ink);

  --container: min(1200px, 92vw);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,p{ margin: 0; }
button{ font: inherit; background: none; border: none; cursor: pointer; }
canvas{ display: block; }

::selection{ background: var(--terracotta); color: var(--paper); }

/* ==========================================================================
   Type
   ========================================================================== */
.display{
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.98;
  color: var(--ink);
}
.display--light{ color: var(--paper); }
.display--xl{ font-size: clamp(2.6rem, 8vw, 6.4rem); font-weight: 800; }
.display--lg{ font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 800; }
.display--md{ font-size: clamp(1.9rem, 4.6vw, 3.4rem); }

.eyebrow{
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--paper);
  opacity: 0.85;
  margin-bottom: 1rem;
}
.lead{
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 44ch;
  color: var(--paper);
  opacity: 0.92;
}
.hl{ position: relative; white-space: nowrap; }
.hl--terracotta{ color: var(--terracotta); }
.hl--mustard{ color: var(--mustard); }

.tag{
  display: inline-block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  padding: 0.4em 0.9em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  margin-bottom: 1.1rem;
  transform: rotate(-2deg);
}
.tag--light{ border-color: var(--paper); color: var(--paper); }

.section__sub{
  max-width: 52ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--ink-soft);
}
.section__sub--light{ color: var(--paper); opacity: 0.85; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.9em 1.6em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border: var(--edge);
  border-radius: 999px;
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1.3), box-shadow 0.25s ease, background 0.2s ease;
  box-shadow: var(--shadow-hard-sm);
  background: var(--paper);
  color: var(--ink);
}
.btn:hover{ transform: translate(-3px,-3px); box-shadow: 8px 8px 0 var(--ink); }
.btn:active{ transform: translate(0,0); box-shadow: 2px 2px 0 var(--ink); }
.btn--primary{ background: var(--terracotta); color: var(--paper); border-color: var(--ink); }
.btn--ghost{ background: transparent; }
.btn--on-dark{ background: var(--paper); color: var(--ink); }
.btn--cta{ background: var(--mustard); }
.btn--lg{ font-size: clamp(1rem, 1.6vw, 1.25rem); padding: 1.1em 2em; margin-top: 2.5rem; }

/* ==========================================================================
   Loader
   ========================================================================== */
.loader{
  position: fixed; inset: 0; z-index: 999;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.4rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.is-hidden{ opacity: 0; visibility: hidden; pointer-events: none; }
.loader__mark{ width: 64px; animation: pulse 1.6s ease-in-out infinite; filter: invert(1); }
.loader__bar{ width: min(220px, 60vw); height: 6px; border-radius: 999px; background: var(--ink-soft); overflow: hidden; }
.loader__bar span{ display: block; height: 100%; width: 0%; background: var(--terracotta); transition: width 0.2s ease; }
.loader__label{ color: var(--paper); font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
@keyframes pulse{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.08); } }

/* ==========================================================================
   Scene wipe — three staggered, angled color panels (flag-stripe) that
   sweep across the screen to mask the hard cut between two pinned video
   scenes, carrying a couple of abstract shapes along for the ride.
   ========================================================================== */
.scene-wipe{ position: fixed; inset: 0; z-index: 450; pointer-events: none; overflow: hidden; }
.scene-wipe__panel{
  position: absolute; top: -20%; height: 140%; width: 122%; left: -11%;
  transform: translateX(-165%) skewX(-14deg);
  will-change: transform;
}
.scene-wipe__panel--mustard{ background: var(--mustard); }
.scene-wipe__panel--back{ background: var(--terracotta); }
.scene-wipe__panel--front{ background: var(--ink); overflow: hidden; }
.scene-wipe__mark{
  position: absolute; top: 50%; left: 50%; width: 56px; z-index: 1;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0; filter: invert(1);
}
.scene-wipe__shape{ position: absolute; opacity: 0.95; transform: skewX(14deg); }
.scene-wipe__shape--circle{ width: 160px; height: 160px; border-radius: 50%; background: var(--rose); top: 14%; left: 56%; }
.scene-wipe__shape--rect{ width: 200px; height: 124px; border-radius: 14px; background: var(--teal); top: 58%; left: 12%; transform: skewX(14deg) rotate(-10deg); }
.scene-wipe__shape--tri{
  width: 0; height: 0; background: none;
  border-left: 90px solid transparent; border-right: 90px solid transparent;
  border-bottom: 130px solid var(--mustard);
  top: 4%; left: 20%;
}
.scene-wipe__shape--dot{ width: 64px; height: 64px; border-radius: 50%; background: var(--paper); top: 70%; left: 58%; }

/* film grain overlay for texture, no gradients/neon — just noise */
.grain{
  position: fixed; inset: 0; z-index: 900; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ==========================================================================
   Nav
   ========================================================================== */
.site-nav{
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
.site-nav.is-scrolled{
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  padding-block: 0.7rem;
}
.brand{
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--paper);
  transition: color 0.35s ease;
}
.site-nav.is-scrolled .brand{ color: var(--ink); }
.brand__mark{ width: 30px; height: auto; }
.nav-links{ display: flex; gap: 2rem; }
.nav-links a{
  font-weight: 600; font-size: 0.95rem; color: var(--paper);
  position: relative; padding-bottom: 3px; transition: color 0.35s ease;
}
.site-nav.is-scrolled .nav-links a{ color: var(--ink); }
.nav-links a::after{
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--terracotta); transition: width 0.25s ease;
}
.nav-links a:hover::after, .nav-links a.is-active::after{ width: 100%; }
.nav-cta{ padding: 0.6em 1.3em; font-size: 0.9rem; }
.nav-toggle{ display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span{ width: 24px; height: 2px; background: var(--paper); transition: 0.3s ease; }
.site-nav.is-scrolled .nav-toggle span{ background: var(--ink); }

/* ==========================================================================
   Scene (full-bleed scroll-scrubbed video sections)
   ========================================================================== */
.scene{ position: relative; height: 100dvh; background: var(--ink); overflow: clip; }
.scene.is-scroll-active{ z-index: 2; }
.scene__pin{ position: relative; height: 100dvh; width: 100%; overflow: hidden; }
.scene__canvas{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ScrollTrigger's pin spacer includes the scene's own viewport height after
   the scrub distance. Pull that residual viewport out of document flow so
   the next section starts exactly when the pinned animation ends. */
.pin-spacer-scene-inicio,
.pin-spacer-scene-universo,
.pin-spacer-scene-reel{ margin-bottom: -100dvh !important; }
.scene__scrim{
  position: absolute; inset: 0;
  background: var(--ink);
  opacity: 0.34;
}
.scene__scrim--soft{ opacity: 0.28; }
.scene__scrim--dark{ opacity: 0.52; }

.shape-field{ position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shape{
  position: absolute;
  background: var(--c, var(--terracotta));
  will-change: transform;
  transform: rotate(var(--a, 0deg));
}
.shape--rect{ width: 22vw; max-width: 260px; height: 14vw; max-height: 160px; border-radius: 10px; top: 62%; left: 8%; }
.shape--thin{ width: 8vw; max-width: 90px; height: 40vw; max-height: 420px; top: -10%; left: 78%; }
.shape--circle{ width: 16vw; max-width: 190px; height: 16vw; max-width: 190px; border-radius: 50%; top: 12%; left: 74%; }
.shape--circle.shape--sm{ width: 8vw; max-width: 100px; height: 8vw; max-height: 100px; top: 70%; left: 60%; }
.shape--tri{
  width: 0; height: 0; background: none !important;
  border-left: 11vw solid transparent; border-right: 11vw solid transparent;
  border-bottom: 18vw solid var(--c, var(--teal));
  max-width: 140px; top: 8%; left: 14%;
}
.shape--tri.shape--lg{ border-left-width: 16vw; border-right-width: 16vw; border-bottom-width: 26vw; max-width: 220px; top: 55%; left: 68%; }

.hero__content{
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(1.2rem, 6vw, 6vw);
  max-width: 900px;
}
.hero__actions{ display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2.2rem; }

.scroll-cue{
  position: absolute; left: 50%; bottom: clamp(1.2rem, 4vh, 2.4rem); transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--paper); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700;
  opacity: 0.85;
}
.scroll-cue__pill{ width: 26px; height: 42px; border: 2px solid var(--paper); border-radius: 999px; display: flex; justify-content: center; padding-top: 6px; }
.scroll-cue__dot{ width: 5px; height: 5px; border-radius: 50%; background: var(--paper); animation: scrollDot 1.6s ease-in-out infinite; }
@keyframes scrollDot{ 0%{ transform: translateY(0); opacity: 1; } 70%{ transform: translateY(16px); opacity: 0; } 100%{ opacity: 0; } }

.transition__content{
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 6vw;
}
.transition__content p{ color: var(--paper); opacity: 0.85; max-width: 46ch; margin-top: 1.1rem; font-size: clamp(1rem, 1.6vw, 1.2rem); }

/* ---- narrative "beats": secondary text synced to video-scrub progress ---- */
.beat-detail{
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 6vw clamp(3rem, 10vh, 6rem);
  text-align: center; opacity: 0;
}
.beat-detail--tunnel{ align-items: center; padding-bottom: 0; }
.beat-detail__text{
  font-family: var(--font-display); font-weight: 800; color: var(--paper);
  font-size: clamp(1.4rem, 3.4vw, 2.6rem); letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}
.beat-detail__text--lg{ font-size: clamp(1.8rem, 5vw, 3.6rem); }

/* ==========================================================================
   Facts strip (marquee)
   ========================================================================== */
.strip{
  position: relative; z-index: 3;
  background: var(--ink); border-block: var(--edge);
  overflow: hidden; padding: 1.1rem 0;
}
.strip__track{
  display: flex; gap: 0; width: max-content;
  animation: marquee 26s linear infinite;
}
.chip{
  color: var(--paper); font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  padding: 0 2.2rem; white-space: nowrap;
  border-right: 2px solid var(--terracotta);
}
@keyframes marquee{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce){ .strip__track{ animation: none; } }

/* ==========================================================================
   Content sections
   ========================================================================== */
.section{
  position: relative;
  padding: clamp(4.5rem, 10vw, 8rem) clamp(1.2rem, 6vw, 6vw);
  overflow: clip;
}
.section--paper{ background: var(--paper); }
.section--teal{ background: var(--teal); }
.section--teal .art-card figcaption{ color: var(--paper); }
.section--ink{ background: var(--ink); }

/* Only the two post-scene handoffs use a cover parallax. Their incoming
   content must sit above the still-pinned canvas while it rises through the
   final viewport of the scrub; otherwise the canvas hides the sections and
   only the decorative seam leaks through. */
#portfolio-fondos,
#portfolio-personajes,
#galeria{ z-index: 3; }
.section__head{ max-width: var(--container); margin: 0 auto clamp(2.5rem, 6vw, 4rem); }
.section__head--center{ text-align: center; margin-inline: auto; }
.section__head--center .tag{ transform: none; }

/* ---- art scatter gallery ---- */
.art-scatter{
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
}
.art-card{ margin: 0; }
.art-card--1{ transform: rotate(-8deg) translate(0, 0.6rem); }
.art-card--2{ transform: rotate(6deg) translate(0.4rem, -1rem); margin-top: 3.4rem; position: relative; z-index: 1; }
.art-card--3{ transform: rotate(-5deg) translate(-0.3rem, 1.4rem); }
.art-scatter--alt .art-card--1{ transform: rotate(5deg) translate(-0.3rem, -0.4rem); margin-top: 2.8rem; }
.art-scatter--alt .art-card--2{ transform: rotate(-7deg) translate(0.3rem, 1rem); margin-top: 0; }
.art-scatter--alt .art-card--3{ transform: rotate(4deg) translate(-0.2rem, -0.8rem); margin-top: 2rem; }
.art-card__frame{
  border: var(--edge); border-radius: var(--radius);
  box-shadow: var(--shadow-hard); overflow: hidden;
  background: var(--paper);
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1.2), box-shadow 0.35s ease;
}
.art-card__frame img{ width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.art-card:hover .art-card__frame{ transform: translate(-6px,-6px) rotate(0deg); box-shadow: 11px 11px 0 var(--ink); }
.art-card figcaption{
  margin-top: 0.9rem; font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; text-align: center;
}

/* ---- reel section (video content over pinned canvas) ---- */
.reel__content{
  position: absolute; inset: 0; z-index: 2; overflow-y: auto;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 6rem clamp(1.2rem, 5vw, 4vw) 3rem;
}
#beatReelHead, #beatReelGrid{
  opacity: 0;
  transform-origin: center center;
  will-change: transform, opacity;
}
.reel-grid{
  margin-top: 2.4rem; width: 100%; max-width: 980px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem;
}
.reel-card{
  position: relative; display: block; border: var(--edge); border-radius: 14px;
  overflow: hidden; background: var(--ink); box-shadow: var(--shadow-hard-sm);
  transition: transform 0.3s cubic-bezier(.2,.9,.3,1.2), box-shadow 0.3s ease;
}
.reel-card:nth-child(1){ transform: rotate(-2.5deg); }
.reel-card:nth-child(2){ transform: rotate(3.5deg); }
.reel-card:nth-child(3){ transform: rotate(-3.5deg); }
.reel-card:nth-child(4){ transform: rotate(2.5deg); }
.reel-card:hover{ transform: translateY(-6px) rotate(0deg); box-shadow: 7px 7px 0 var(--mustard); }
.reel-card img{ width: 100%; aspect-ratio: 4/3; object-fit: cover; opacity: 0.85; }
.reel-card__play{
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-70%);
  width: 40px; height: 40px; border-radius: 50%; background: var(--terracotta);
  border: 2px solid var(--paper);
}
.reel-card__play::after{
  content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%,-50%);
  border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--paper);
}
.reel-card__title{
  display: block; padding: 0.6rem 0.7rem 0.7rem; font-weight: 700; font-size: 0.82rem;
  color: var(--paper); background: var(--ink); text-align: left;
}

/* ---- bonus masonry gallery ---- */
.masonry{
  max-width: var(--container); margin: 0 auto;
  columns: 4 220px; column-gap: clamp(1.2rem, 3vw, 2rem);
}
.m-card{
  margin: 0 0 clamp(1.2rem, 3vw, 2rem); break-inside: avoid;
  border: var(--edge); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1.2), box-shadow 0.35s ease;
}
.m-card--r1{ transform: rotate(-5deg); }
.m-card--r2{ transform: rotate(4deg); }
.m-card--r3{ transform: rotate(-3deg); }
.m-card:hover{ transform: translateY(-6px) rotate(0deg) scale(1.02); box-shadow: 8px 8px 0 var(--terracotta); }
.m-card img{ width: 100%; height: auto; display: block; }

/* ---- about ---- */
.section--about{
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  background: var(--paper);
}
.about__visual{ position: relative; display: flex; justify-content: center; }
.about__frame{
  width: min(320px, 70vw); aspect-ratio: 1/1; border-radius: 50%;
  border: var(--edge); background: var(--ink); box-shadow: var(--shadow-hard);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.about__frame img{ width: 55%; }
.about__deco{ position: absolute; z-index: -1; }
.about__deco:not(.about__deco--2){ width: 90px; height: 90px; border-radius: 50%; top: -10px; right: 6%; }
.about__deco--2{ width: 110px; height: 70px; border-radius: 10px; bottom: 0; left: 2%; }
.about__lead{ font-size: clamp(1.1rem, 1.8vw, 1.35rem); margin: 1.2rem 0 1rem; }
.about__body p{ color: var(--ink-soft); margin-bottom: 1rem; }
.skill-tags{ display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.6rem 0 2rem; }
.skill-tags li{
  font-weight: 700; font-size: 0.85rem; padding: 0.5em 1em;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--paper);
}
.skill-tags li:nth-child(3n+1){ background: var(--mustard); }
.skill-tags li:nth-child(3n+2){ background: var(--rose); color: var(--paper); border-color: var(--rose); }
.skill-tags li:nth-child(3n){ background: var(--paper); }

/* ---- contact ---- */
.section--contact{ background: var(--ink); text-align: center; }
.contact-grid{
  max-width: 760px; margin: 0 auto; display: grid; gap: 1rem;
}
.contact-row{
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.6rem; border: 2px solid var(--paper); border-radius: 14px;
  color: var(--paper); text-align: left;
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1.2), background 0.25s ease, color 0.25s ease;
}
.contact-row:nth-child(odd){ transform: rotate(-0.6deg); }
.contact-row:nth-child(even){ transform: rotate(0.6deg); }
.contact-row:hover{ background: var(--terracotta); border-color: var(--terracotta); transform: translateX(6px) rotate(0deg); }
.contact-row__label{ font-family: var(--font-display); font-weight: 700; opacity: 0.6; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.contact-row__value{ font-weight: 600; font-size: 1.05rem; }

/* ==========================================================================
   Reveal-on-scroll base state (animated via JS/ScrollTrigger.batch)
   ========================================================================== */
[data-reveal]{ opacity: 0; transform: translateY(40px); }
@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1; transform: none; }
}

/* ==========================================================================
   Seams — jagged, uneven dividers between flat-color sections so the
   page never reads as a stack of straight symmetric bands.
   ========================================================================== */
/* Sits between two sections; the next section overlaps up into it (negative
   margin), so the seam must be filled with the PREVIOUS section's color and
   clipped solid-top/jagged-bottom — the cut-away gaps then reveal the next
   section's color underneath, which is what actually draws the zigzag. */
.seam{ position: relative; height: 64px; margin-top: -2px; margin-bottom: -64px; z-index: 3; pointer-events: none; }
.seam--a{ clip-path: polygon(0 -2px, 100% -2px, 100% 22px, 88% 4px, 74% 48px, 60% 12px, 46% 40px, 32% 6px, 18% 46px, 4% 10px, 0 32px); }
.seam--b{ clip-path: polygon(0 -2px, 100% -2px, 100% 30px, 86% 8px, 70% 44px, 54% 6px, 40% 38px, 24% 4px, 10% 42px, 0 14px); }
.seam--teal{ background: var(--teal); }
.seam--paper{ background: var(--paper); }
.seam--ink{ background: var(--ink); }

/* ==========================================================================
   Lightbox triggers (buttons wrapping gallery images)
   ========================================================================== */
.lightbox-trigger{
  display: block; width: 100%; padding: 0; font: inherit; text-align: inherit; cursor: zoom-in;
  position: relative;
}
.masonry .lightbox-trigger{ border: none; background: none; position: relative; overflow: hidden; }
.masonry .lightbox-trigger::after{
  content: "Ver"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--paper); background: var(--terracotta);
  opacity: 0; transition: opacity 0.25s ease;
}
.masonry .lightbox-trigger:hover::after,
.masonry .lightbox-trigger:focus-visible::after{ opacity: 0.86; }

/* ==========================================================================
   Lightbox (full-size viewer)
   ========================================================================== */
.lightbox{
  position: fixed; inset: 0; z-index: 700;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.2rem, 6vw, 4rem);
}
.lightbox[hidden]{ display: none; }
.lightbox__figure{ margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lightbox__figure img{
  max-width: min(88vw, 1100px); max-height: 78vh; width: auto; height: auto;
  border: var(--edge); border-radius: 14px; box-shadow: var(--shadow-hard);
  background: var(--paper);
}
.lightbox__figure figcaption{
  margin-top: 1.1rem; color: var(--paper); font-family: var(--font-display);
  font-weight: 700; font-size: 1.05rem;
}
.lightbox__close, .lightbox__nav{
  position: fixed; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--paper); background: var(--ink); color: var(--paper);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.lightbox__close:hover, .lightbox__nav:hover{ background: var(--terracotta); transform: scale(1.08); }
.lightbox__close{ top: clamp(1rem, 4vw, 2rem); right: clamp(1rem, 4vw, 2rem); }
.lightbox__nav--prev{ left: clamp(0.6rem, 3vw, 2rem); top: 50%; transform: translateY(-50%); }
.lightbox__nav--next{ right: clamp(0.6rem, 3vw, 2rem); top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev:hover{ transform: translateY(-50%) scale(1.08); }
.lightbox__nav--next:hover{ transform: translateY(-50%) scale(1.08); }

@media (max-width: 640px){
  .lightbox__nav{ width: 40px; height: 40px; font-size: 1.3rem; }
  .lightbox__close{ width: 40px; height: 40px; font-size: 1.3rem; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  background: var(--ink); color: var(--paper);
  padding: 3rem clamp(1.2rem, 6vw, 6vw) 2.4rem;
  display: flex; flex-wrap: wrap; gap: 1.2rem;
  align-items: center; justify-content: space-between;
  border-top: var(--edge);
}
.brand--footer{ color: var(--paper); }
.site-footer p{ font-size: 0.85rem; opacity: 0.65; text-align: center; flex: 1 1 260px; }
.to-top{ font-weight: 700; font-size: 0.85rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px){
  .nav-links{
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px); height: 100svh;
    background: var(--paper); flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 1.6rem; padding: 2rem clamp(1.4rem, 6vw, 2.4rem);
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(.2,.9,.3,1.1);
    border-left: var(--edge); z-index: 400;
  }
  .nav-links a{ color: var(--ink); font-size: 1.3rem; }
  .nav-links.is-open{ transform: translateX(0); }
  .nav-cta{ display: none; }
  .nav-toggle{ display: flex; }

  .art-scatter{ grid-template-columns: 1fr; max-width: 380px; }
  .art-card--1, .art-scatter--alt .art-card--1{ transform: rotate(-4deg); margin-top: 0; }
  .art-card--2, .art-scatter--alt .art-card--2{ transform: rotate(3deg); margin-top: 1.6rem; }
  .art-card--3, .art-scatter--alt .art-card--3{ transform: rotate(-2.5deg); margin-top: 1.6rem; }

  .section--about{ grid-template-columns: 1fr; text-align: center; }
  .about__body p{ text-align: left; }
  .skill-tags{ justify-content: center; }

  .reel-grid{ grid-template-columns: repeat(2, 1fr); }
  .masonry{ columns: 2 160px; }
}

@media (max-width: 700px), (pointer: coarse){
  .scene, .scene__pin{ height: 100svh; }
  .pin-spacer-scene-inicio,
  .pin-spacer-scene-universo,
  .pin-spacer-scene-reel{ margin-bottom: -100svh !important; }
}

@media (max-width: 560px){
  .display--xl{ font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .hero__content{ padding-top: 5rem; }
  .reel-grid{ grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .reel__content{ padding-top: 5.5rem; }
  .contact-row{ flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .shape--thin, .shape--tri.shape--lg{ opacity: 0.6; }
}

@media (min-width: 1400px){
  .display--xl{ font-size: 7rem; }
}

/* Respect reduced motion preference globally */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .btn, .art-card__frame, .m-card, .contact-row, .reel-card{ transition: none; }
}
