/* ---------- TAKEOFF GATE ---------- */
.gate-seen .takeoff { display: none; }
.gate-open { overflow: hidden; }
.takeoff {
  --p: 0; /* throttle 0→1 while the button is held */
  position: fixed; inset: 0; z-index: 80; /* under grain/scratches so the film texture covers it too */
  overflow: hidden;
  background: var(--black); color: var(--white);
  transition: opacity 0.8s;
  -webkit-user-select: none; user-select: none;
}
/* Ground seen from just above the pad; it falls away when the drone climbs */
.takeoff__ground {
  position: absolute; inset: 0;
  transform: scale(2.2);
  transition: transform 1.9s cubic-bezier(.55, 0, .3, 1), filter 1.9s;
}
.takeoff__ground img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(0.5); }
.takeoff__shadow {
  position: absolute; left: 50%; top: 50%;
  width: 120px; height: 120px;
  translate: calc(-50% + 8px) calc(-50% + 10px);
  border-radius: 50%;
  background: radial-gradient(rgba(0, 0, 0, 0.65), transparent 70%);
}

.drone {
  position: absolute; left: 50%; top: 46%; z-index: 2;
  width: min(54vmin, 330px); translate: -50% -50%;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.6));
  transform: rotate(calc(var(--p) * 2deg));
  transition: transform 1.9s cubic-bezier(.55, 0, .3, 1);
}

.takeoff__clouds { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.takeoff__clouds i {
  position: absolute; top: 110%;
  width: 80vmax; height: 45vmax; border-radius: 50%;
  background: radial-gradient(rgba(245, 242, 236, 0.95), rgba(245, 242, 236, 0) 65%);
  filter: blur(18px); opacity: 0;
}
.takeoff__clouds i:nth-child(1) { left: -30vmax; }
.takeoff__clouds i:nth-child(2) { left: 30%; }
.takeoff__clouds i:nth-child(3) { left: -10vmax; width: 60vmax; }
.takeoff__clouds i:nth-child(4) { left: 55%; width: 55vmax; }

/* HUD reuses the viewfinder corners from the hero */
.takeoff__hud {
  position: absolute; inset: 20px var(--gutter); z-index: 4; pointer-events: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray-3);
}
.takeoff__hud > * { position: absolute; }
.hud-top { top: 10px; left: 44px; right: 44px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; }
.hud-top b { color: var(--white); font-weight: 600; }
.hud-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--white); vertical-align: 1px; animation: led 1.6s steps(2) infinite; }
.hud-side { top: 50%; translate: 0 -50%; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hud-side--l { left: 10px; }
.hud-side--r { right: 10px; }
.hud-side b { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 4vw, 46px); line-height: 1; color: var(--white); font-variation-settings: "wdth" 62; }

.takeoff__ui {
  position: absolute; left: 0; right: 0; bottom: clamp(28px, 7vh, 64px); z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  transition: opacity 0.3s;
}
.takeoff__status { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; }
.takeoff { cursor: pointer; } /* a tap anywhere skips the takeoff */
.takeoff__meter { width: 180px; height: 2px; background: rgba(245, 242, 236, 0.2); }
.takeoff__meter i { display: block; height: 100%; width: 0; background: var(--white); }
.takeoff__skip {
  margin-top: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  background: none; border: 1px solid rgba(245, 242, 236, 0.3); color: var(--gray-3);
  padding: 8px 14px; cursor: pointer;
}
.takeoff__skip:hover, .takeoff__skip:focus-visible { color: var(--white); border-color: var(--white); }
.takeoff__flash { position: absolute; inset: 0; z-index: 6; background: var(--white); opacity: 0; pointer-events: none; }

/* Climb sequence */
.takeoff.is-launch .takeoff__ui { opacity: 0; }
.takeoff.is-launch .takeoff__ground { transform: scale(0.75); filter: blur(2px); }
.takeoff.is-launch .drone { transform: scale(0.8) translateY(-6vh); }
.takeoff.is-launch .takeoff__clouds i { animation: cloud 1.5s 0.45s ease-in forwards; }
.takeoff.is-launch .takeoff__clouds i:nth-child(2) { animation-delay: 0.6s; }
.takeoff.is-launch .takeoff__clouds i:nth-child(3) { animation-delay: 0.8s; }
.takeoff.is-launch .takeoff__clouds i:nth-child(4) { animation-delay: 0.95s; }
@keyframes cloud { 0% { top: 110%; opacity: 0; } 25% { opacity: 0.9; } 100% { top: -70%; opacity: 0.9; } }
.takeoff.is-out { opacity: 0; pointer-events: none; }
.takeoff.is-out .takeoff__flash { animation: whiteout 0.8s ease-out; }
@keyframes whiteout { 0% { opacity: 0; } 25% { opacity: 0.9; } 100% { opacity: 0; } }

@media (max-width: 600px) {
  .hud-top { left: 36px; right: 36px; font-size: 10px; }
  .hud-top span:last-child { display: none; }
  .hud-side { top: 40%; }
  .hud-side--l { left: 0; }
  .hud-side--r { right: 0; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px var(--gutter) 100px;
  overflow: hidden;
  background: var(--char);
}
.hero__media {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 12% 8%, rgba(245, 242, 236, 0.16), transparent 70%),
    radial-gradient(ellipse 50% 60% at 95% 100%, rgba(245, 242, 236, 0.07), transparent 70%),
    var(--char);
}
.hero__media video, .hero__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.32;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.35), #000 60%);
}
.hero__media img { animation: kenburns 30s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12) translate(-2%, 1%); } }

.viewfinder {
  position: absolute; inset: 84px var(--gutter) 28px;
  pointer-events: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--gray-3);
}
.viewfinder > * { position: absolute; }
.vf__c { width: 30px; height: 30px; border: 0 solid var(--gray-3); opacity: 0.7; }
.vf__c--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.vf__c--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.vf__c--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.vf__c--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.vf__info { top: 10px; left: 44px; }
.vf__count { top: 10px; right: 44px; color: var(--white); }
.vf__meter {
  bottom: 10px; left: 50%; translate: -50% 0;
  display: flex; gap: 22px; padding-bottom: 10px;
}
.vf__meter i {
  position: absolute; bottom: 0; left: 50%;
  width: 2px; height: 8px; background: var(--safelight);
  animation: needle 4s ease-in-out infinite alternate;
}
@keyframes needle { 0% { left: 30%; } 40% { left: 55%; } 70% { left: 46%; } 100% { left: 62%; } }

.hero__content { position: relative; z-index: 2; max-width: min(720px, 60%); }
.hero__name {
  font-size: clamp(72px, 14vw, 210px);
  font-variation-settings: "wdth" 62;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}
.hero__name .glitch { display: block; }
.hero__outline { color: transparent; -webkit-text-stroke: 1.5px var(--white); }
.hero__outline.is-glitching::before { -webkit-text-stroke: 0; }
.hero__lema {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--white); margin: 0 0 14px;
}
.hero__intro { max-width: 480px; color: var(--gray-3); margin: 0 0 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Scattered analog objects */
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.deco > * { position: absolute; transform: translateY(var(--py, 0)) rotate(var(--rot, 0deg)); }
.print {
  margin: 0;
  background: var(--white);
  padding: 12px 12px 54px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0, 0, 0, 0.3);
}
.print img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
/* Portraits: keep the head in frame instead of centre-cropping it off */
.print--hero img, .print--about img, .print--negative img { object-position: 50% 6%; }
.print figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  font-family: var(--hand); font-size: clamp(20px, 2vw, 26px); line-height: 1; color: var(--gray-1);
  white-space: nowrap; overflow: hidden;
}
.tape {
  position: absolute; top: -14px; left: 50%; width: 92px; height: 28px;
  translate: -50% 0; rotate: -4deg;
  background: rgba(232, 228, 220, 0.55);
  backdrop-filter: blur(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.tape--b { top: auto; bottom: -12px; left: 82%; rotate: 32deg; width: 70px; }
.print--hero { --rot: 7deg; right: 9vw; top: 16%; width: clamp(190px, 19vw, 270px); animation: sway 7s ease-in-out infinite alternate; }
@keyframes sway { to { rotate: -2deg; } }
.deco__canister { --rot: -16deg; right: 27vw; bottom: 10%; width: clamp(80px, 8vw, 120px); filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.5)); }
.deco__strip { --rot: -9deg; right: -60px; bottom: 6%; width: clamp(300px, 34vw, 480px); filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55)); }

/* ---------- REEL ---------- */
.reel {
  position: relative;
  height: 128px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 8px, var(--paper) 8px 18px, transparent 18px 26px) top 8px left / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 8px, var(--paper) 8px 18px, transparent 18px 26px) bottom 8px left / 100% 12px no-repeat,
    #111;
  border-block: 1px solid var(--line-dark);
}
.reel__track {
  position: absolute; top: 28px; bottom: 28px; left: 0;
  display: flex; gap: 10px;
  animation: reel 40s linear infinite;
}
@keyframes reel { to { transform: translateX(-50%); } }
.reel__frame {
  position: relative;
  width: 112px; flex: none;
  background: linear-gradient(160deg, #3d3b37, #6d6a64);
  background-size: cover; background-position: center 12%;
}
.reel__frame:nth-child(3n) { background: linear-gradient(200deg, #2a2926, #8a867f); }
.reel__frame { filter: grayscale(1) contrast(1.1) brightness(0.85); }
.reel__frame span {
  position: absolute; bottom: -18px; left: 0;
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; color: #b39a6c;
}
.reel:hover .reel__track { animation-play-state: paused; }

/* ---------- Section heads ---------- */
.head { margin-bottom: clamp(48px, 7vw, 80px); }
.head h2 {
  font-size: clamp(64px, 11vw, 150px);
  font-variation-settings: "wdth" 62;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.85;
}
.head p:last-child:not(.eyebrow) { max-width: 520px; color: var(--gray-3); margin: 20px 0 0; }
.head--left { margin-bottom: 28px; }

/* ---------- ROLLS ---------- */
.rolls { border-top: 1px solid var(--line-dark); }
.roll {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(32px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--line-dark);
  text-decoration: none;
}
.roll__gear { position: relative; height: 200px; display: flex; align-items: center; }
.roll__gear .canister { position: relative; z-index: 2; width: 118px; flex: none; transition: transform 0.5s; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.5)); }
.roll__film {
  position: absolute; left: 92px; right: 0; top: 50%; translate: 0 -50%;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s cubic-bezier(.2, .7, .2, 1);
}
.roll__film .strip { width: 100%; min-width: 420px; }
.roll.is-visible .roll__film { clip-path: inset(0 55% 0 0); }
.roll:hover .roll__film { clip-path: inset(0 0 0 0); }
.roll:hover .canister { transform: rotate(-6deg); }
.roll__text h3 {
  font-size: clamp(36px, 5vw, 64px);
  font-variation-settings: "wdth" 70;
  text-transform: uppercase;
  margin-bottom: 14px;
  transition: color 0.2s;
}
.roll__text p:not(.eyebrow) { margin: 0; color: var(--gray-3); max-width: 460px; }
.roll__cta {
  display: inline-block; margin-top: 22px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  border-bottom: 1px solid var(--safelight); padding-bottom: 4px;
}
.roll:hover h3 { color: var(--paper); text-shadow: 3px 0 0 rgba(179, 53, 42, 0.6); }
.roll--sealed { opacity: 0.5; }
.roll--sealed .roll__film { display: none; }

/* Loose prints dropped around sections */
.print--loose { position: absolute; width: 210px; pointer-events: none; z-index: 0; }
.print--loose img { aspect-ratio: 1; }
.print--rolls { top: 110px; right: var(--gutter); rotate: 8deg; }
#vuelos .head, #vuelos .rolls { position: relative; z-index: 1; }

/* ---------- PROJECTION ---------- */
.projection { overflow-x: clip; }
.projector { position: relative; }
.projector__beam {
  position: absolute; left: 50%; top: -140px; width: 130%; height: calc(100% + 40px);
  translate: -50% 0; pointer-events: none;
  background: conic-gradient(from 180deg at 50% 0%, transparent 152deg, rgba(245, 242, 236, 0.07) 168deg, rgba(245, 242, 236, 0.1) 180deg, rgba(245, 242, 236, 0.07) 192deg, transparent 208deg);
  filter: blur(6px);
}
.projector__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px / 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line-dark), 0 0 80px rgba(245, 242, 236, 0.08), 0 40px 80px rgba(0, 0, 0, 0.6);
}
.projector__screen video { width: 100%; height: 100%; object-fit: cover; }
.projector__screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
  box-shadow: inset 0 0 0 10px rgba(0, 0, 0, 0.35);
}
.projector__label {
  position: absolute; left: 22px; bottom: 18px; z-index: 1;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 10px; background: rgba(12, 12, 11, 0.7);
}
.projector__reels {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px;
  margin-top: 28px; padding: 22px 14px;
  background:
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(232, 228, 220, 0.7) 8px 16px, transparent 16px 24px) top 6px left / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(232, 228, 220, 0.7) 8px 16px, transparent 16px 24px) bottom 6px left / 100% 9px no-repeat,
    #111;
}
.projector__reels button {
  position: relative; padding: 0; border: 0; background: #000; color: var(--gray-3);
  cursor: pointer; text-align: left;
}
.projector__reels img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.55; transition: opacity 0.25s; }
.projector__reels span {
  display: block; padding: 6px 2px 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.projector__reels button:hover img { opacity: 0.9; }
.projector__reels button[aria-selected="true"] img { opacity: 1; outline: 2px solid var(--safelight); outline-offset: 2px; }
.projector__reels button[aria-selected="true"] span { color: var(--white); }

/* ---------- CONTACT SHEET ---------- */
.sheet {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 10px;
  padding: 34px 26px 40px;
  background:
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(232, 228, 220, 0.75) 10px 18px, transparent 18px 26px) top 10px left / 100% 10px no-repeat,
    #111;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  rotate: -0.6deg;
}
.sheet__frame {
  position: relative;
  padding: 0; border: 0; background: #000; cursor: zoom-in;
  aspect-ratio: 3 / 2;
}
.sheet__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s, filter 0.35s; }
.sheet__frame:hover { z-index: 2; }
.sheet__frame:hover img { transform: scale(1.18); filter: grayscale(1) contrast(1.2) brightness(1.1); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7); }
.sheet__no {
  position: absolute; left: 0; bottom: -20px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: #b39a6c;
}
.sheet__no i { font-style: normal; margin: 0 4px; }
/* Grease-pencil circle on favourites */
.sheet__frame.is-marked::after {
  content: ""; position: absolute; inset: -9px -12px;
  border: 2.5px solid var(--safelight);
  border-radius: 46% 54% 50% 48% / 55% 45% 55% 45%;
  rotate: -2deg;
  pointer-events: none;
  opacity: 0.9;
}
.sheet.is-visible .sheet__frame.is-marked::after { animation: draw 0.8s 0.4s both; }
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.lightbox { width: min(1200px, calc(100% - 32px)); }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; background: var(--black); }
/* The print develops: bright flash, black and white, then the original colour bleeds in */
.lightbox img.developing { animation: develop-color 2.4s 0.2s ease-in-out both; }
@keyframes develop-color {
  0% { filter: grayscale(1) contrast(1.15) brightness(1.8) blur(2px); }
  30% { filter: grayscale(1) contrast(1.12) brightness(1) blur(0); }
  100% { filter: grayscale(0) contrast(1) brightness(1) blur(0); }
}
.lightbox .modal__body { padding: 16px 24px; }
.lightbox .eyebrow { margin: 0; }

/* ---------- ABOUT (darkroom paper) ---------- */
.section--paper { background: var(--paper); color: var(--ink); }
.section--paper .eyebrow { color: var(--gray-2); }
.section--paper .glitch.is-glitching::after { color: var(--gray-2); }
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 100px); align-items: start; }
.about__prints { position: relative; padding: 30px 20px 40px; }
.print--about { position: relative; rotate: -3deg; transition: rotate 0.4s; }
.print--about:hover { rotate: 0deg; }
.print--negative {
  position: absolute; top: 0; right: -10px; width: 62%;
  rotate: 9deg;
  padding: 8px;
  background: #2b241c;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}
.print--negative img { filter: grayscale(1) invert(1) sepia(0.5) contrast(0.9); opacity: 0.85; }
.about__text p { margin: 0 0 18px; }
.about__text [data-about] p:first-child {
  font-size: clamp(24px, 2.8vw, 32px); line-height: 1.25; font-weight: 600;
  font-variation-settings: "wdth" 85;
}

/* ---------- CONTACT ---------- */
.socials { list-style: none; padding: 0; margin: 0; max-width: 760px; border-top: 1px solid var(--line-dark); }
.socials a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-dark);
  text-decoration: none;
  font-size: clamp(28px, 4.5vw, 48px); font-weight: 800; font-variation-settings: "wdth" 70; text-transform: uppercase;
  transition: padding 0.25s, color 0.25s;
}
.socials a span { font-family: var(--mono); font-size: 12px; font-weight: 400; text-transform: none; color: var(--gray-3); }
.socials a:hover { padding-left: 14px; color: var(--gray-3); }
#contacto { overflow: hidden; }
#contacto .head, .contact { position: relative; z-index: 1; }
.contact-deco { position: absolute; top: 90px; right: var(--gutter); width: 300px; height: 300px; pointer-events: none; }
.contact-deco .print--loose { right: 40px; top: 0; rotate: -7deg; width: 190px; }
.contact-deco__canister { position: absolute; right: 0; top: 170px; width: 84px; rotate: 24deg; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.5)); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .hero { flex-direction: column; align-items: flex-start; justify-content: flex-end; }
  .hero__content { max-width: 100%; }
  .deco { position: relative; inset: auto; height: 300px; width: 100%; margin-top: 40px; order: 2; }
  .print--hero { right: auto; left: 4%; top: 0; width: 170px; }
  .deco__canister { right: 30%; bottom: 10%; width: 80px; }
  .deco__strip { right: -40px; bottom: 0; width: 320px; }
  .roll, .about, .contact { grid-template-columns: 1fr; }
  .print--rolls, .contact-deco { display: none; }
  .sheet { grid-template-columns: repeat(3, 1fr); }
  .projector__reels { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .about__prints { max-width: 400px; }
}
@media (max-width: 560px) {
  .vf__meter, .vf__info { display: none; }
  .deco { height: 250px; }
  .deco__canister { right: 6%; bottom: 34%; }
  .deco__strip { width: 280px; right: -90px; }
  .sheet { grid-template-columns: repeat(2, 1fr); padding: 30px 12px 36px; rotate: 0deg; }
  .roll__gear { height: 150px; }
  .roll__gear .canister { width: 88px; }
  .roll__film { left: 70px; }
}
