/* ===========================
   PORFOLIO PAGE
=========================== */

/* ===========================
   HERO
=========================== */
.pf-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
  overflow: hidden;
  background: var(--black);
}
.pf-hero__bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.pf-hero__logo-bg {
  width: min(65vw, 580px);
  height: min(65vw, 580px);
  color: var(--white);
  opacity: 0.03;
}
.pf-hero__content { position: relative; z-index: 1; max-width: 760px; }
.pf-hero__tag {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 20px;
  border: 1px solid var(--border);
  padding: 6px 18px;
  border-radius: 100px;
}
.pf-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 11vw, 9rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.pf-hero__sub {
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--gray-light);
  line-height: 1.85;
  margin-bottom: 40px;
}

/* Pill nav */
.pf-hero__nav-pills {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.pf-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 24px;
  border: 1px solid var(--border-md);
  border-radius: 100px;
  color: var(--gray-light);
  transition: all 0.25s;
}
.pf-pill:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

/* ===========================
   SECTION WRAPPER
=========================== */
.pf-section {
  padding: 100px 0 60px;
  overflow: hidden;
}
.pf-section--alt {
  background: var(--black-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pf-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 24px;
  flex-wrap: wrap;
}
.pf-section__meta { flex: 1; }
.pf-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.05;
  margin-top: 10px;
}

/* ===========================
   CAROUSEL CONTROLS
=========================== */
.carousel-controls {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.carousel-btn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-md);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  flex-shrink: 0;
}
.carousel-btn:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.carousel-btn:disabled {
  opacity: 0.25;
  pointer-events: none;
}
.carousel-btn svg { width: 20px; height: 20px; }

/* ===========================
   CAROUSEL TRACK
=========================== */
.carousel {
  position: relative;
  overflow: hidden;
  padding: 0 calc((100vw - min(1160px, 100vw - 48px)) / 2);
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}
.carousel:active { cursor: grabbing; }

.carousel__track {
  display: flex;
  gap: 16px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  padding-right: calc((100vw - min(1160px, 100vw - 48px)) / 2 + 24px);
}
/* Durante el arrastre / trackpad el track sigue al dedo sin retardo */
.carousel__track.is-dragging { transition: none; }

/* ===========================
   CAROUSEL SLIDES
=========================== */
.carousel__slide {
  flex-shrink: 0;
  width: calc((min(1160px, 100vw - 48px) - 32px) / 3);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
}
.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.carousel__slide:hover img { transform: scale(1.04); }
/* Portrait slides (flyers) */
.carousel__slide--portrait {
  width: calc((min(1160px, 100vw - 48px) - 48px) / 4);
  aspect-ratio: 9 / 16;
}
.carousel__slide--portrait img {
  object-fit: cover;
}

/* ===========================
   PLACEHOLDERS
=========================== */
.pf-placeholder {
  background: var(--black-3);
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--gray-mid);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.pf-placeholder:hover {
  border-color: rgba(255,255,255,0.3);
  color: var(--gray-light);
  background: var(--black-4);
}
.pf-placeholder svg { width: 36px; height: 36px; opacity: 0.5; }
.pf-placeholder span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Photo format — landscape 4:3 */
.pf-placeholder--photo { aspect-ratio: 4 / 3; }

/* Flyer format — portrait A4-ish */
.pf-placeholder--flyer { aspect-ratio: 2 / 3; }

/* ===========================
   DOTS
=========================== */
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  padding: 0 24px;
}
.carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-mid);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  padding: 0;
}
.carousel__dot.active {
  background: var(--white);
  width: 24px;
  border-radius: 3px;
}

/* ===========================
   REELS GRID
=========================== */
.reels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 40px;
}

.reel-card {
  background: var(--black);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.reel-card--featured { grid-column: unset; }

.reel-card__media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--black-3);
  aspect-ratio: 9 / 16;
}

.reel-card__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: brightness(0.72);
}
.reel-card:hover .reel-card__video {
  transform: scale(1.03);
  filter: brightness(0.88);
}
.reel-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: opacity 0.3s;
}
.reel-card:hover .reel-card__overlay { opacity: 0; }

.reel-card__play {
  width: 72px; height: 72px;
  background: rgba(0,0,0,0.5);
  border: none; border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.25s, background 0.25s;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.reel-card__play svg { width: 48px; height: 48px; }
.reel-card__play:hover { transform: scale(1.1); background: rgba(255,255,255,0.15); }

.reel-card__hover-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px; width: 0%;
  background: var(--white);
  z-index: 3;
  transition: width 0s;
}
.reel-card:hover .reel-card__hover-bar {
  width: 100%;
  transition: width 3s linear;
}

.reel-card__info {
  display: none;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  background: var(--black);
}
.reel-card__num {
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.2em; color: var(--gray-mid); flex-shrink: 0;
}
.reel-card__info > div { flex: 1; min-width: 0; }
.reel-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem; font-weight: 800;
  margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reel-card__desc {
  font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.02em; color: var(--gray);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reel-card__tag {
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray); border: 1px solid var(--border-md);
  padding: 4px 12px; border-radius: 100px; flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s;
}
.reel-card:hover .reel-card__tag { border-color: var(--gray-light); color: var(--white); }

/* ===========================
   CTA
=========================== */
.pf-cta {
  padding: 120px 0;
  background: var(--black-2);
  border-top: 1px solid var(--border);
}
.pf-cta__inner {
  display: flex;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
}
.pf-cta__logo {
  width: 100px; height: 100px;
  color: var(--white); opacity: 0.08; flex-shrink: 0;
}
.pf-cta__text { flex: 1; }
.pf-cta__text h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800; line-height: 1.05; margin-bottom: 12px;
}
.pf-cta__text p {
  font-size: 0.85rem; font-weight: 400;
  letter-spacing: 0.02em; color: var(--gray-light); margin-bottom: 28px;
}

/* NAV active */
.nav__links a.active { color: var(--white); }

/* ===========================
   LIGHTBOX
=========================== */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: all; }
.lightbox__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.lightbox__content {
  position: relative; z-index: 1;
  width: min(90vw, 1100px); max-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0.94);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.lightbox.is-open .lightbox__content { transform: scale(1); }
.lightbox__video {
  width: 100%; max-height: 88vh;
  border-radius: 8px; background: var(--black); outline: none;
}
.lightbox__close {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-md); border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--white); transition: background 0.2s;
}
.lightbox__close:hover { background: rgba(255,255,255,0.2); }
.lightbox__close svg { width: 18px; height: 18px; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .carousel__slide { width: calc((100vw - 48px - 16px) / 2); }
  .carousel__slide--portrait { width: calc((100vw - 48px - 16px) / 3); }
}
@media (max-width: 600px) {
  .reels-grid { grid-template-columns: 1fr; }
  .carousel__slide { width: calc(100vw - 72px); }
  .carousel__slide--portrait { width: calc((100vw - 60px) / 2); }
  .pf-cta__inner { flex-direction: column; text-align: center; }
  .pf-section__header { flex-direction: column; align-items: flex-start; }
}
