400&family=DM+Sans:wght@300;400&display=swap');

* {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
}


body {
  margin: 0;
  background: #080808;
  color: #d8d8d8;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
}


body.modal-open {
  overflow: hidden;
}


a {
  color: inherit;
  text-decoration: none;
}



/* =========================
   TOPBAR
========================= */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 68px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  padding: 0 48px;

  background: rgba(8, 8, 8, 0.92);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  opacity: 0;
  transform: translateY(-100%);

  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}


.topbar.is-visible {
  opacity: 1;
  transform: translateY(0);
}


.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
}


.topbar-left {
  gap: 42px;
}


.topbar-right {
  justify-content: flex-end;
}


.topbar a {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #aaa;
  transition: color 0.3s ease;
}


.topbar a:hover {
  color: #fff;
}


.topbar-name {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 18px !important;
  font-weight: 300 !important;
  letter-spacing: 0.18em !important;
  color: #d5d5d5 !important;
  white-space: nowrap;
}



/* =========================
   HERO
========================= */

.hero {
  min-height: 100svh;

  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 40px;
}


.hero-content {
  text-align: center;
}


.hero h1 {
  margin: 0;

  font-family: 'Cormorant Garamond', serif;

  font-size: clamp(48px, 7vw, 108px);

  line-height: 0.95;

  font-weight: 300;

  letter-spacing: 0.02em;

  color: #eeeeee;

  white-space: nowrap;

  transition:
    transform 0.7s cubic-bezier(.22,.61,.36,1),
    opacity 0.5s ease;
}


.hero h1.is-scrolled {
  transform: translateY(-45vh);
  opacity: 0;
}


.hero-subtitle {
  margin-top: 28px;

  font-size: 13px;

  letter-spacing: 0.28em;

  color: #858585;
}


.hero-bottom {
  position: absolute;

  bottom: 34px;

  left: 0;
  right: 0;

  text-align: center;
}


.scroll {
  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 12px;

  font-size: 9px;

  letter-spacing: 0.25em;

  color: #777;
}


.scroll span {
  font-size: 18px;

  line-height: 1;
}



/* =========================
   SECCIONES
========================= */

#audiovisual,
#fotografia {
  padding: 110px 48px;
}


section {
  scroll-margin-top: 90px;
}



/* =========================
   CABECERAS
========================= */

.section-header,
.upcoming-header {
  display: flex;

  align-items: center;

  gap: 30px;

  margin-bottom: 42px;
}


.section-header h2,
.upcoming-header h2 {
  margin: 0;

  font-family: 'Cormorant Garamond', serif;

  font-size: clamp(38px, 4vw, 50px);

  line-height: 1;

  font-weight: 300;

  color: #aaa;

  letter-spacing: 0.01em;
}


.section-label {
  display: block;

  margin-top: 9px;

  font-size: 9px;

  text-transform: uppercase;

  letter-spacing: 0.27em;

  color: #777;
}


.section-line {
  width: 90px;

  height: 1px;

  background: #888;

  margin-top: 13px;
}



/* =========================
   PROYECTOS
========================= */

.projects {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 18px;
}


.project {
  display: block;

  width: 100%;

  padding: 0;

  border: 0;

  background: transparent;

  cursor: pointer;

  text-align: left;
}


.project-thumbnail {
  width: 100%;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  background: #111;
}


.project-thumbnail img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  transition:
    transform 0.7s ease,
    filter 0.7s ease;
}


.project:hover .project-thumbnail img {
  transform: scale(1.035);

  filter: brightness(0.84);
}


.project-info {
  padding: 13px 2px 0;

  background: transparent;
}


.project-type {
  display: block;

  margin-bottom: 7px;

  font-size: 8px;

  text-transform: uppercase;

  letter-spacing: 0.25em;

  color: #777;
}


.project h3 {
  margin: 0;

  font-family: 'Cormorant Garamond', serif;

  font-size: 23px;

  line-height: 1.05;

  font-weight: 300;

  color: #ddd;
}


.project-role {
  display: block;

  margin-top: 9px;

  font-size: 9px;

  letter-spacing: 0.11em;

  color: #777;
}



/* =========================
   PRÓXIMAMENTE
========================= */

.upcoming {
  padding: 125px 0 20px;
}


.upcoming-header {
  margin-bottom: 35px;
}


.upcoming-header h2 {
  color: #aaa;
}


.upcoming-project {
  display: block;

  width: 100vw;

  margin-left: -48px;
}


.upcoming-image {
  position: relative;

  width: 100%;

  aspect-ratio: 16 / 5;

  overflow: hidden;

  background: #111;
}


.upcoming-image::after {
  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      90deg,
      rgba(0,0,0,0.48) 0%,
      rgba(0,0,0,0.15) 45%,
      rgba(0,0,0,0.05) 100%
    );

  pointer-events: none;

  z-index: 1;
}


.upcoming-image img {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  transition:
    transform 0.9s ease,
    filter 0.7s ease;
}


.upcoming-film-info {
  position: absolute;

  left: 5vw;

  top: 50%;

  z-index: 2;

  transform: translateY(-50%);

  text-align: left;
}


.upcoming-type {
  display: block;

  margin-bottom: 16px;

  font-size: 9px;

  text-transform: uppercase;

  letter-spacing: 0.3em;

  color: #e1e1e1;
}


.upcoming-film-info h3 {
  margin: 0;

  font-family: 'Cormorant Garamond', serif;

  font-size: clamp(42px, 4vw, 65px);

  line-height: 0.94;

  font-weight: 300;

  color: #f2f2f2;
}


.upcoming-role {
  display: block;

  margin-top: 21px;

  font-size: 10px;

  letter-spacing: 0.15em;

  color: #ddd;
}


.upcoming-cta {
  position: absolute;

  right: 7vw;

  top: 50%;

  z-index: 3;

  transform: translateY(-50%);

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 12px;

  color: #fff;

  text-align: center;

  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}


.upcoming-circle {
  width: 56px;

  height: 56px;

  display: flex;

  align-items: center;

  justify-content: center;

  border: 1px solid rgba(255,255,255,0.9);

  border-radius: 50%;

  font-size: 26px;

  font-weight: 300;

  transition:
    background 0.4s ease,
    transform 0.4s ease;
}


.upcoming-cta span {
  font-size: 8px;

  line-height: 1.55;

  letter-spacing: 0.2em;
}


.upcoming-project:hover .upcoming-image img {
  transform: scale(1.035);

  filter: brightness(0.75);
}


.upcoming-project:hover .upcoming-cta {
  transform:
    translateY(-50%)
    translateX(6px);
}


.upcoming-project:hover .upcoming-circle {
  background: rgba(255,255,255,0.12);

  transform: scale(1.04);
}



/* =========================
   FOTOGRAFÍA
========================= */

.photo-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;
}


.photo-placeholder {
  aspect-ratio: 4 / 3;

  display: flex;

  align-items: flex-end;

  padding: 16px;

  background: #111;

  color: #aaa;

  font-family: 'Cormorant Garamond', serif;

  font-size: 19px;

  transition: background 0.3s ease;
}


.photo-placeholder:hover {
  background: #151515;
}



/* =========================
   CONTACTO
========================= */

.contact {
  min-height: 55vh;

  padding: 120px 48px;

  display: flex;

  flex-direction: column;

  justify-content: center;
}


.contact-link {
  width: fit-content;

  font-family: 'Cormorant Garamond', serif;

  font-size: clamp(30px, 4vw, 52px);

  font-weight: 300;

  color: #aaa;

  border-bottom: 1px solid #333;
}


.contact-link:hover {
  color: #fff;
}



/* =========================
   MODAL
========================= */

.video-modal {
  position: fixed;

  inset: 0;

  z-index: 200;

  display: flex;

  align-items: center;

  justify-content: center;

  opacity: 0;

  visibility: hidden;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}


.video-modal.is-open {
  opacity: 1;

  visibility: visible;
}


.video-modal-backdrop {
  position: absolute;

  inset: 0;

  background: rgba(0,0,0,0.94);
}


.video-modal-content {
  position: relative;

  z-index: 1;

  width: min(1100px, 90vw);
}


.video-frame {
  width: 100%;

  aspect-ratio: 16 / 9;

  background: #000;
}


.video-frame iframe {
  width: 100%;
  height: 100%;

  border: 0;
}


.video-modal-close {
  position: absolute;

  top: -45px;
  right: 0;

  border: 0;

  background: transparent;

  color: #aaa;

  font-size: 32px;

  cursor: pointer;
}



/* =========================
   FOOTER
========================= */

footer {
  padding: 32px 48px;

  display: flex;

  justify-content: space-between;

  border-top: 1px solid rgba(255,255,255,0.08);

  font-size: 10px;

  letter-spacing: 0.08em;

  color: #555;
}



/* =========================
   TABLET
========================= */

@media (max-width: 900px) {

  .projects {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }


}



/* =========================
   MÓVIL
========================= */

@media (max-width: 650px) {

  .topbar {
    height: 58px;

    padding: 0 12px;

    grid-template-columns:
      auto 1fr auto;

    column-gap: 8px;
  }


  .topbar-left {
    gap: 10px;
  }


  .topbar-right {
    justify-content: flex-end;
  }


  .topbar a {
    font-size: 8px;

    letter-spacing: 0.03em;
  }


  .topbar-name {
    width: auto;

    font-size: 9px !important;

    line-height: 1;

    letter-spacing: 0.02em !important;

    white-space: nowrap;

    text-align: center;
  }



  /* HERO */

  .hero {
    padding: 20px;
  }


  .hero h1 {
    width: 100%;

    max-width: 300px;

    margin: 0 auto;

    font-size: 13vw;

    line-height: 0.86;

    white-space: normal;
  }


  .hero-subtitle {
    margin-top: 28px;

    font-size: 9px;

    line-height: 1.8;

    letter-spacing: 0.15em;
  }



  /* SECCIONES */

  #audiovisual,
  #fotografia {
    padding: 90px 20px;
  }


  .section-header,
  .upcoming-header {
    gap: 18px;

    margin-bottom: 30px;
  }


  .section-header h2,
  .upcoming-header h2 {
    font-size: 38px;
  }



  /* PROYECTOS */

  .projects {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 24px 12px;
  }


  .project-thumbnail {
    aspect-ratio: 16 / 9;
  }


  .project-info {
    padding: 9px 1px 0;
  }


  .project-type {
    font-size: 6px;

    margin-bottom: 5px;

    letter-spacing: 0.12em;
  }


  .project h3 {
    font-size: 16px;
  }


  .project-role {
    margin-top: 5px;

    font-size: 6px;

    letter-spacing: 0.03em;
  }



  /* PRÓXIMAMENTE */

  .upcoming {
    padding: 105px 0 15px;
  }


  .upcoming-project {
    width: 100vw;

    margin-left: -20px;
  }


  .upcoming-image {
    aspect-ratio: 16 / 8;
  }


  .upcoming-film-info {
    left: 24px;
  }


  .upcoming-film-info h3 {
    font-size: 8.5vw;

    max-width: 70%;
  }


  .upcoming-cta {
    right: 18px;

    top: auto;

    bottom: 18px;

    transform: none;
  }


  .upcoming-circle {
    width: 42px;

    height: 42px;

    font-size: 19px;
  }


  .upcoming-cta span {
    font-size: 5px;
  }



  /* FOTOGRAFÍA */

  .photo-grid {
    gap: 12px;
  }



  /* CONTACTO */

  .contact {
    padding: 90px 20px;
  }



  /* FOOTER */

  footer {
    padding: 25px 20px;

    flex-direction: column;

    align-items: flex-start;

    gap: 18px;
  }


}



/* =========================================================
   AJUSTES FINALES
========================================================= */

/* TOPBAR */

.topbar {
  opacity: 1;
  transform: translateY(0);
  border-bottom: none;
}


.topbar-name {
  opacity: 0;
  transition: opacity 0.45s ease;
}


.topbar.is-visible .topbar-name {
  opacity: 1;
}



/* HERO */

.hero h1 {
  font-size: clamp(44px, 6.4vw, 98px);
}


.hero-subtitle {
  font-size: 14px;
  letter-spacing: 0.32em;
}


.hero-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}


.hero-socials a {
  display: inline-flex;
  color: #777;
  transition: color 0.3s ease;
}


.hero-socials a:hover {
  color: #fff;
}


.hero-socials svg {
  width: 13px;
  height: 13px;
  display: block;
}



/* FOOTER */

.footer-socials {
  display: flex;
  align-items: center;
  gap: 16px;
}


.footer-socials a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
  letter-spacing: 0.05em;
}


.footer-socials svg {
  width: 15px;
  height: 15px;
  display: block;
}



/* PRÓXIMAMENTE */

.upcoming-header .section-line {
  margin-top: 13px;
}



/* =========================================================
   PÁGINA DE CONTACTO
========================================================= */

.contact-page {
  min-height: calc(100svh - 68px);
  padding: 130px 8vw 80px;
}


.contact-section {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 0.8fr 1.2fr;

  column-gap: 9vw;
  row-gap: 40px;
  align-items: start;
}


.contact-intro {
  padding-top: 4px;
}


.contact-label {
  display: block;
  margin-bottom: 24px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.27em;
  color: #777;
}


.contact-intro h1 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 4.2vw, 62px);
  line-height: 0.95;
  font-weight: 300;
  color: #ddd;
}


.contact-intro p {
  margin: 24px 0 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 300;
  color: #777;
}


.contact-form {
  width: 100%;
}


.contact-field {
  margin-bottom: 27px;
}


.contact-field label {
  display: block;
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #aaa;
}


.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 8px 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #ccc;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  transition: border-color 0.3s ease;
}


.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: #777;
  opacity: 1;
}


.contact-field input:focus,
.contact-field textarea:focus {
  border-bottom-color: #777;
}


.contact-field textarea {
  min-height: 125px;
  resize: vertical;
  line-height: 1.7;
}


.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aaa;
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.2em;
  cursor: pointer;
}


.contact-submit span {
  font-size: 17px;
}


.contact-submit:hover {
  color: #fff;
}


.contact-socials {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 0;
}


.contact-socials a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #666;
  font-size: 9px;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}


.contact-socials a:hover {
  color: #fff;
}


.contact-socials svg {
  width: 13px;
  height: 13px;
  display: block;
}



/* =========================================================
   MÓVIL — AJUSTES FINALES
========================================================= */

@media (max-width: 650px) {

  .topbar {
    border-bottom: none;
  }


  .topbar-name {
    opacity: 0;
  }


  .topbar.is-visible .topbar-name {
    opacity: 1;
  }


  .hero h1 {
    font-size: 12.5vw;
  }


  .hero-subtitle {
    font-size: 9px;
    letter-spacing: 0.17em;
  }


  .hero-socials {
    gap: 16px;
    margin-top: 27px;
  }


  .hero-socials svg {
    width: 12px;
    height: 12px;
  }


  .footer-socials {
    flex-direction: row;
    gap: 14px;
  }


  .footer-socials a {
    font-size: 8px;
  }


  .footer-socials svg {
    width: 13px;
    height: 13px;
  }


  .upcoming-header .section-line {
    margin-top: 11px;
  }


  /* CONTACTO */

  .contact-page {
    min-height: auto;
    padding: 100px 24px 70px;
  }


  .contact-section {
    display: block;
    max-width: none;
  }


  .contact-intro {
    margin-bottom: 65px;
  }


  .contact-label {
    margin-bottom: 22px;
    font-size: 8px;
  }


  .contact-intro h1 {
    font-size: 42px;
  }


  .contact-intro p {
    margin-top: 20px;
    font-size: 21px;
  }


  .contact-field {
    margin-bottom: 25px;
  }


  .contact-field label {
    font-size: 10px;
    font-weight: 400;
    color: #b5b5b5;
    letter-spacing: 0.18em;
  }


  .contact-field input,
  .contact-field textarea {
    font-size: 14px;
    color: #e0e0e0;
  }


  .contact-field input::placeholder,
  .contact-field textarea::placeholder {
    color: #858585;
    opacity: 1;
  }


  .contact-field textarea {
    min-height: 110px;
  }


  .contact-socials {
    margin-top: 45px;
    gap: 20px;
  }


  .contact-socials a {
    font-size: 8px;
  }


  .contact-socials svg {
    width: 12px;
    height: 12px;
  }

}


/* =========================================================
   MÓVIL — CORRECCIÓN FINAL
   Solo afecta a pantallas de hasta 650px.
========================================================= */

@media (max-width: 650px) {

  /* TOPBAR
     Los enlaces permanecen visibles desde el inicio.
     El nombre central aparece únicamente al hacer scroll.
     Sin línea inferior.
  */

  .topbar {
    opacity: 1 !important;
    transform: translateY(0) !important;
    border-bottom: none !important;
  }


  .topbar-name {
    opacity: 0 !important;
    visibility: hidden !important;
    transition:
      opacity 0.45s ease,
      visibility 0s linear 0.45s;
  }


  .topbar.is-visible .topbar-name {
    opacity: 1 !important;
    visibility: visible !important;
    transition:
      opacity 0.45s ease,
      visibility 0s linear 0s;
  }



  /* PROYECTOS / SELECCIÓN / PRÓXIMAMENTE
     Los tres encabezados tienen exactamente el mismo tratamiento.
  */

  .section-header,
  .upcoming-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 30px;
  }


  .section-header h2,
  .upcoming-header h2 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 38px;
    line-height: 1;
    font-weight: 300;
    color: #aaa;
    letter-spacing: 0.01em;
  }


  .section-line {
    width: 90px;
    height: 1px;
    background: #888;
    margin-top: 13px;
  }


  .upcoming-header .section-line {
    margin-top: 13px;
  }

}



/* CORRECCIÓN FINAL — LÍNEAS DE CABECERA
   Proyectos, Selección y Próximamente toman exactamente
   la línea de Próximamente como referencia. */
.section-header .section-line,
.upcoming-header .section-line {
  margin-top: 13px !important;
}


@media (max-width: 650px) {
  .section-header .section-line,
  .upcoming-header .section-line {
    margin-top: 13px !important;
  }

}



/* =========================================================
   AJUSTE FINAL — LÍNEAS IGUALES A PRÓXIMAMENTE
   ========================================================= */

.section-header .section-line,
.upcoming-header .section-line {
  position: relative !important;
  top: 0 !important;
  margin-top: 13px !important;
}


@media (max-width: 650px) {
  .section-header .section-line,
  .upcoming-header .section-line {
    position: relative !important;
    top: 0 !important;
    margin-top: 11px !important;
  }

}



/* =========================================================
   CORRECCIÓN DEFINITIVA — PROYECTOS Y SELECCIÓN
   La línea de PRÓXIMAMENTE es la referencia.
   ========================================================= */

.section-header .section-line {
  transform: translateY(-11px) !important;
}


@media (max-width: 650px) {
  .section-header .section-line {
    transform: translateY(-11px) !important;
  }

}



/* =========================
   COLABORACIONES
========================= */

#colaboraciones {
  padding: 110px 48px;
}


.collaborations-intro {
  max-width: 560px;
  margin: -12px 0 34px;
  color: #888;
  font-size: 13px;
  line-height: 1.8;
}


.collaborations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}


@media (max-width: 900px) {
  .collaborations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}


@media (max-width: 650px) {
  #colaboraciones {
    padding: 90px 20px;
  }


  .collaborations-intro {
    margin-top: -6px;
    font-size: 12px;
  }


  .collaborations-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

}



.collaboration-item {
  min-width: 0;
}


.collaboration-embed {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  overflow: hidden;
}


.collaboration-embed .instagram-media {
  width: 100% !important;
  max-width: 540px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
}


.collaboration-credit {
  margin: 14px 0 0;
  color: #888;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


@media (max-width: 650px) {
  .collaboration-embed {
    max-width: 100%;
  }


  .collaboration-credit {
    font-size: 9px;
  }

}



/* COLABORACIONES — mismas tarjetas que Proyectos */
#colaboraciones .collaborations-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}


#colaboraciones .collaboration-project {
  position: relative;
}


#colaboraciones .collaboration-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}


#colaboraciones .collaboration-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease, filter 0.7s ease;
}


#colaboraciones .collaboration-project:hover .collaboration-thumbnail img {
  transform: scale(1.035);
  filter: brightness(0.78);
}


#colaboraciones .collaboration-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  opacity: 0.9;
  pointer-events: none;
}


@media (max-width: 900px) {
  #colaboraciones .collaborations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}


@media (max-width: 650px) {
  #colaboraciones .collaborations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }


  #colaboraciones .collaboration-play {
    font-size: 16px;
  }

}



/* MODAL VERTICAL PARA REELS — marco propio, sin apariencia de navegador */
.video-modal.is-vertical .video-modal-content {
  width: min(92vw, 420px);
  max-width: 420px;
  background: #080808;
  padding: 0;
  border: 0;
  box-shadow: none;
}


.video-modal.is-vertical .video-frame {
  width: 100%;
  aspect-ratio: 9 / 16;
  height: auto;
  max-height: 88vh;
  background: #000;
}


.video-modal.is-vertical .video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}


.video-modal.is-vertical .video-modal-close {
  z-index: 5;
  top: -38px;
  right: 0;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 30px;
}


.video-modal.is-vertical .video-modal-backdrop {
  background: rgba(0, 0, 0, 0.94);
}


@media (max-width: 500px) {
  .video-modal.is-vertical .video-modal-content {
    width: min(88vw, 380px);
  }

  .video-modal.is-vertical .video-modal-close {
    top: -36px;
  }

}





/* REEL CECIARMY — reproductor más amplio, sin pantalla completa */
.video-modal.is-vertical .video-modal-content {
  width: min(94vw, 480px);
  max-width: 480px;
}

.video-modal.is-vertical .video-frame {
  max-height: 90vh;
}

.video-modal.is-vertical .video-modal-close {
  top: -34px;
}



/* COLABORACIÓN EXTERNA — tarjeta editorial sin modal de Instagram */
#colaboraciones .collaboration-external { display:block; color:inherit; text-decoration:none; }

#colaboraciones .collaboration-external .collaboration-play { font-size:24px; opacity:0; transition:opacity .3s ease; }

#colaboraciones .collaboration-external:hover .collaboration-play { opacity:1; }

#colaboraciones .collaboration-external .collaboration-thumbnail img { object-fit:cover; }



/* AJUSTES DE CALIDAD — portfolio */
#colaboraciones .collaborations-grid {
  grid-template-columns: minmax(0, 560px);
  justify-content: start;
}

.photo-placeholder-pending {
  cursor: default;
  min-height: 220px;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}

.photo-placeholder-pending span {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.photo-placeholder-pending small {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #666;
}

.photo-placeholder-pending:hover { background: #111; }

@media (max-width: 650px) {
  #colaboraciones .collaborations-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .photo-placeholder-pending { min-height: 160px; }

}



/* REEL DE COLABORACIÓN — reproductor integrado y de mayor tamaño */
#colaboraciones .collaboration-embed-trigger {
  appearance: none;
  color: inherit;
  font: inherit;
}

#colaboraciones .collaboration-embed-trigger:focus-visible {
  outline: 1px solid #aaa;
  outline-offset: 5px;
}

.video-modal.is-vertical .video-modal-content {
  width: min(94vw, 560px);
  max-width: 560px;
  padding: 0;
  background: #080808;
  border: 0;
  box-shadow: none;
}

.video-modal.is-vertical .video-frame {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 88vh;
  background: #000;
}

.video-modal.is-vertical .video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.video-modal.is-vertical .video-modal-close {
  top: -38px;
  right: 0;
  z-index: 5;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 30px;
}

@media (max-width: 650px) {
  .video-modal.is-vertical .video-modal-content {
    width: min(94vw, 460px);
  }

}



/* COLABORACIONES — cuadrícula de 4 por fila en escritorio */
#colaboraciones .collaborations-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: stretch;
  gap: 28px 18px;
}

@media (max-width: 1000px) {
  #colaboraciones .collaborations-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  #colaboraciones .collaborations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }

}

@media (max-width: 420px) {
  #colaboraciones .collaborations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 10px;
  }

}



/* Miniatura provisional propia para Army Awards: no reutilizar portadas ajenas */
#colaboraciones .collaboration-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #171717, #080808 65%);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

#colaboraciones .collaboration-placeholder::after {
  content: "ARMY AWARDS 2026";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b7b7b7;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 1.5vw, 22px);
  letter-spacing: 0.12em;
}

@keyframes castPreviewReveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

#external-preview-content .instagram-media{margin-left:auto!important;margin-right:auto!important}



/* Colaboraciones: ocultar los iconos superpuestos de reproducción/enlace en las miniaturas. */
.collaboration-project .collaboration-play{
  display:none!important;
}

@keyframes castArrowNudge{
  0%,100%{transform:translateX(0);opacity:.65}
  50%{transform:translateX(-4px);opacity:1}
}

@keyframes castCardReveal{
  from{opacity:.55;transform:translateX(7px)}
  to{opacity:1;transform:translateX(0)}
}



/* Ajuste de cabecera únicamente en móvil: nombre centrado y enlaces más juntos. */
@media(max-width:650px){
  .topbar{
    position:relative!important;
    grid-template-columns:1fr auto 1fr!important;
    column-gap:0!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }

  .topbar-left{
    justify-self:start!important;
    gap:5px!important;
  }

  .topbar-right{
    justify-self:end!important;
  }

  .topbar-name{
    position:absolute!important;
    left:50%!important;
    transform:translateX(-50%)!important;
    width:max-content!important;
    max-width:42vw!important;
    text-align:center!important;
  }

  .topbar.is-visible .topbar-name{
    transform:translateX(-50%)!important;
  }

}

@keyframes castArrowNudgeMobile{
  0%,100%{transform:translateX(1px);opacity:.55}
  50%{transform:translateX(-6px);opacity:1}
}



/* Cabecera móvil persistente: mantiene la navegación visible al desplazarse y evita solapes. */
@media(max-width:650px){
  .topbar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    z-index:1000!important;
    height:58px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
    align-items:center!important;
    column-gap:6px!important;
    padding:0 10px!important;
    opacity:1!important;
    transform:translateY(0)!important;
    background:rgba(8,8,8,.94)!important;
    -webkit-backdrop-filter:blur(12px)!important;
    backdrop-filter:blur(12px)!important;
  }

  .topbar-left{
    grid-column:1!important;
    justify-self:start!important;
    display:flex!important;
    gap:5px!important;
    min-width:0!important;
    white-space:nowrap!important;
  }

  .topbar-right{
    grid-column:3!important;
    justify-self:end!important;
    display:flex!important;
    min-width:0!important;
    white-space:nowrap!important;
  }

  .topbar a{
    font-size:7.5px!important;
    letter-spacing:.015em!important;
  }

  .topbar-name,
  .topbar.is-visible .topbar-name{
    position:static!important;
    grid-column:2!important;
    justify-self:center!important;
    transform:none!important;
    width:max-content!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    visibility:visible!important;
    opacity:1!important;
    font-size:8.5px!important;
    letter-spacing:0!important;
    line-height:1!important;
    text-align:center!important;
    white-space:nowrap!important;
  }

}



/* GALERÍA FOTOGRÁFICA — mosaico sin pies de foto. */
#fotografia .photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:16px}

#fotografia .photo-item{display:block;width:100%;min-width:0;padding:0;margin:0;border:0;border-radius:0;overflow:hidden;background:transparent;cursor:zoom-in;line-height:0}

#fotografia .photo-item img{display:block;width:100%;height:auto;object-fit:contain;transition:opacity .25s ease,transform .45s ease}

#fotografia .photo-item:hover img{opacity:.82;transform:scale(1.015)}

#fotografia .photo-item:focus-visible{outline:1px solid rgba(255,255,255,.8);outline-offset:4px}

.photo-lightbox{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;padding:56px 76px;background:rgba(0,0,0,.96);opacity:0;visibility:hidden;transition:opacity .25s ease,visibility .25s ease}

.photo-lightbox.is-open{opacity:1;visibility:visible}

.photo-lightbox-image{display:block;max-width:min(100%,1500px);max-height:84vh;width:auto;height:auto;object-fit:contain}

.photo-lightbox-close,.photo-lightbox-arrow{position:absolute;display:flex;align-items:center;justify-content:center;border:0;background:transparent;color:#fff;cursor:pointer;font-family:Arial,sans-serif;font-weight:300}

.photo-lightbox-close{top:18px;right:28px;width:44px;height:44px;font-size:38px}

.photo-lightbox-arrow{top:50%;width:52px;height:70px;margin-top:-35px;font-size:54px;opacity:.78}

.photo-lightbox-arrow:hover,.photo-lightbox-close:hover{opacity:1}

.photo-lightbox-prev{left:14px}
.photo-lightbox-next{right:14px}

.photo-lightbox-counter{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);color:rgba(255,255,255,.65);font:10px 'DM Sans',sans-serif;letter-spacing:.18em}

body.photo-lightbox-open{overflow:hidden}

@media(max-width:850px){#fotografia .photo-grid{gap:12px}
}

@media(max-width:650px){
 #fotografia .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}

 .photo-lightbox{padding:52px 42px}

 .photo-lightbox-image{max-width:100%;max-height:78vh}

 .photo-lightbox-prev{left:0}
.photo-lightbox-next{right:0}

 .photo-lightbox-arrow{width:38px;font-size:42px}

 .photo-lightbox-close{top:8px;right:8px}

}



/* GALERÍA FOTOGRÁFICA — cuatro columnas en escritorio para una selección más compacta. */
@media (min-width: 851px) {
  #fotografia .photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

}

@media (max-width: 850px) and (min-width: 651px) {
  #fotografia .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

}

@media (max-width: 650px) {
  #fotografia .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

}


/* MINIATURAS DE FOTOGRAFÍA — formato uniforme 3:4. */
#fotografia .photo-grid{align-items:start}

#fotografia .photo-item{
  width:100%;
  aspect-ratio:3 / 4;
  overflow:hidden;
}

#fotografia .photo-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

/* Dos horizontales apiladas comparten exactamente una celda vertical 3:4. */
#fotografia .photo-pair{
  width:100%;
  aspect-ratio:3 / 4;
  min-width:0;
  display:grid;
  grid-template-rows:repeat(2,minmax(0,1fr));
  gap:10px;
  background:#080808;
  overflow:hidden;
}

#fotografia .photo-pair .photo-item{
  aspect-ratio:auto;
  min-height:0;
  height:100%;
}

#fotografia .photo-pair .photo-item img{
  width:100%;
  height:100%;
  object-fit:cover;
}



/* CABECERA — mayor legibilidad en móvil, sin alterar escritorio ni la distribución. */
@media (max-width: 650px) {
  .topbar {
    height: 68px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }


  .topbar a:not(.topbar-name) {
    font-size: 9px !important;
  }


  .topbar-left {
    gap: 7px !important;
  }


  .topbar-name,
  .topbar.is-visible .topbar-name {
    font-size: 11px !important;
    letter-spacing: 0.01em !important;
  }

}



/* Categorías de proyectos y colaboraciones: más contraste, solo en móvil. */
@media (max-width: 650px) {
  #audiovisual .project-type,
  #colaboraciones .project-type {
    color: #bdbdbd !important;
  }

}


/* Vistas previas externas: el visitante permanece en el portfolio */
.external-preview-modal{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:24px;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .22s ease,visibility .22s ease}

.external-preview-modal.is-open{opacity:1;visibility:visible;pointer-events:auto}

.external-preview-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.82);backdrop-filter:blur(10px)}

.external-preview-dialog{position:relative;z-index:1;width:min(760px,100%);max-height:min(86vh,900px);overflow:auto;padding:clamp(24px,4vw,48px);background:#151515;color:#eee;border:1px solid rgba(255,255,255,.14);box-shadow:0 30px 100px rgba(0,0,0,.35)}

.external-preview-close{position:absolute;top:12px;right:16px;border:0;background:transparent;color:#eee;font-size:32px;font-weight:200;line-height:1;cursor:pointer}

.external-preview-kicker{margin:0 38px 14px 0;color:#999;font:9px/1.5 Arial,sans-serif;letter-spacing:.18em}

.external-preview-dialog h2{margin:0 40px 24px 0;color:#f2eee8;font-family:'Cormorant Garamond',serif;font-size:clamp(34px,5vw,54px);font-weight:400;line-height:1}

.external-preview-content{min-height:100px}

.external-preview-card{padding:22px 0;border-top:1px solid rgba(255,255,255,.15);border-bottom:1px solid rgba(255,255,255,.15)}

.external-preview-source{color:#aaa;font:10px/1.5 Arial,sans-serif;letter-spacing:.13em;text-transform:uppercase}

.external-preview-description{color:#d0ccc5;font-size:14px;line-height:1.75}

.external-preview-note{color:#8e8a84;font-size:11px;line-height:1.7}

.external-preview-open{display:inline-flex;margin-top:24px;padding:11px 0;border-bottom:1px solid rgba(255,255,255,.45);color:#f2eee8;text-decoration:none;font-size:12px;letter-spacing:.04em}

.external-preview-open:hover{border-color:#fff;color:#fff}

body.external-preview-open{overflow:hidden}

@media(max-width:600px){.external-preview-modal{padding:12px}
.external-preview-dialog{padding:24px 18px;max-height:90vh}
.external-preview-description{font-size:13px}
}


/* CABECERA MÓVIL — mostrar el nombre solo cuando aparece la cabecera al desplazarse,
   igual que en escritorio. La navegación permanece siempre visible. */
@media (max-width: 650px) {
  .topbar-name,
  .topbar.is-visible .topbar-name {
    opacity: 0 !important;
    visibility: hidden !important;
    transition:
      opacity 0.45s ease,
      visibility 0s linear 0.45s;
  }

  .topbar.is-visible .topbar-name {
    opacity: 1 !important;
    visibility: visible !important;
    transition:
      opacity 0.45s ease,
      visibility 0s linear 0s;
  }
}
