body {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: "Lato", sans-serif;
  overflow-x: hidden;
  color: #333333;
  background-image: url("../01-img/Backgrounds/background-02.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* añadido */
  height: 100dvh;
  overflow: hidden;
  /* evita scroll en el body */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

img,
video {
  width: 100%;
  -o-object-fit: cover;
  object-fit: cover;
}

h1 {
  font-size: 30px;
  font-family: "Outfit", serif;
  line-height: 1.1;
  text-transform: uppercase;
  padding-left: 2em;
  padding-bottom: 1em;
  text-wrap: balance;
}

h2 {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-family: "Outfit", serif;
  font-weight: 500;
}

h3 {
  font-size: 16px;
  font-family: "Outfit", serif;
  font-weight: 400;
  line-height: 1.1;
}

p {
  font-family: "Lato", sans-serif;
  padding-left: 2em;
  font-size: 15px;
}

div b {
  color: #8589c4;
  font-weight: 600;
}

.link-text a {
  color: #eb4f72;
  font-size: 14px;
  font-weight: 400;
}

.disciplinas {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.disciplinas .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  margin-right: 2.5px;
  margin-left: 5px;
}

/* =========================
   Header lateral fijo
========================= */

#logo {
  width: 50%;
  padding-top: 1em;
  padding-bottom: 1em;
}

#s1 {
  position: fixed;
  width: 32%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  text-align: right;
  padding-right: 2%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  -ms-overflow-style: none;
}

/* #s1::-webkit-scrollbar {
  display: none;
} */

/* =========================
   Contacto
========================= */

.contact-info {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1em;
  margin-top: 1em;
  margin-bottom: 1em;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(51, 51, 51, 0.75);
  padding-top: 1em;
}

.contact-info a {
  color: inherit;
  text-decoration: none;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
}

.contact-info a:hover {
  opacity: 0.6;
}

.contact-info span {
  opacity: 0.4;
}

/* =========================
   Menú
========================= */

#s1 nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 420px;
  padding-bottom: 1em;
}

#s1 nav a {
  text-decoration: none;
  color: white;
  font-weight: 900;
  font-size: 16px;
  font-family: "Outfit", sans-serif;
  display: inline-block;
  padding: 3px 9px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

#s1 .btn-orange {
  background-color: #f4a028;
}

#s1 .btn-orange:hover {
  background-color: transparent;
  border-color: #333333;
  color: #333333;
}

/* lila */

#s1 .btn-purple {
  background-color: #8589c4;
}

#s1 .btn-purple:hover {
  background-color: transparent;
  border-color: #333333;
  color: #333333;
}

/* azul */

#s1 .btn-blue {
  background-color: #4e97d1;
}

#s1 .btn-blue:hover {
  background-color: transparent;
  border-color: #333333;
  color: #333333;
}

/* rosa */

#s1 .btn-pink {
  background-color: #eb4f72;
}

#s1 .btn-pink:hover {
  background-color: transparent;
  border-color: #333333;
  color: #333333;
}

/* rojo */

#s1 .btn-red {
  animation: redBlink 4s infinite;
  border-color: #ff0000;
  background-color: #ff0000;
  color: #ffffff;
}

/* Safari */
@-webkit-keyframes redBlink {
  0%,
  80%,
  100% {
    background-color: #ff0000;
    color: #ffffff;
  }

  /* Primer flash */
  84%,
  87% {
    background-color: transparent;
    color: #ff0000;
  }

  /* Vuelta a rojo */
  88%,
  91% {
    background-color: #ff0000;
    color: #ffffff;
  }

  /* Segundo flash */
  92%,
  95% {
    background-color: transparent;
    color: #ff0000;
  }
}

/* Resto de navegadores */
@keyframes redBlink {
  0%,
  80%,
  100% {
    background-color: #ff0000;
    color: #ffffff;
  }

  /* Primer flash */
  84%,
  87% {
    background-color: transparent;
    color: #ff0000;
  }

  /* Vuelta a rojo */
  88%,
  91% {
    background-color: #ff0000;
    color: #ffffff;
  }

  /* Segundo flash */
  92%,
  95% {
    background-color: transparent;
    color: #ff0000;
  }
}

#s1 .btn-red:hover {
  animation: none;
  background-color: transparent;
  border-color: #333333;
  color: #333333;
}

#s1 .legal-link {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-top: 0.3em;
  font-size: 0.75em;
  color: #666;
  font-weight: 700;
  text-decoration: underline;
}

/* =========================
       Nav Proyectos
========================= */

.project-nav {
  position: fixed;
  top: 0;
  left: 32%;
  width: 68%;
  height: 3.5em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 2em;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(0.8em);
  backdrop-filter: blur(0.8em);
  border-left: 1px solid #333333;
  border-bottom: 1px solid rgba(51, 51, 51, 0.12);
  z-index: 1000;
}

.project-nav a {
  text-decoration: none;
  color: #333333;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
  position: relative;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

/* hover general */
.project-nav a:hover {
  opacity: 0.55;
  transform: translateY(-1px);
}

/* línea inferior animada */
.project-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2em;
  width: 0%;
  height: 1px;
  background: #333333;
  transition: width 0.25s ease;
}

.project-nav a:hover::after {
  width: 100%;
}

/* botón cerrar */
.project-nav .close {
  font-size: 1.1rem;
  opacity: 0.55;
}

/* hover cerrar */
.project-nav .close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* =========================
      Proyectos  (Main)
========================= */

#work {
  margin-left: 32%;
  width: 68%;
  height: 100dvh;
  border-left: 1px solid #333333;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 3.5em;
}

.sinMenu {
  padding-top: 0 !important;
}

#work img {
  width: 100%;
  height: 100dvh;
}

#work video {
  width: auto;
  height: 100dvh;
  max-width: none;
  max-height: none;
  flex-shrink: 0;
  -o-object-fit: contain;
  object-fit: contain;
}

.media {
  display: flex;
  align-items: center;
  justify-content: center;
}

#work .img-fullscreen {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-responsive {
  display: none;
}

/* =========================
   Gallery Project
========================= */

.gallery-project {
  padding-top: 3.5em;
  margin-left: 32%;
  width: 68%;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
}

/* cada bloque */

.gallery-project .media {
  width: 50%;
  aspect-ratio: 1/1;
  overflow-y: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CONTRADICCIÓN TOTAL */

.gallery-project img,
.gallery-project video {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  -o-object-fit: cover !important;
  object-fit: cover !important;
  flex-shrink: 1 !important;
}

/* =========================
Gallery Project horizontal
========================= */

.gallery-project .media-horizontal {
  width: 100%;
  overflow-y: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* =========================
    ABAUT ME (Foto)
========================= */

.face-hover {
  position: relative;
  cursor: pointer;
  color: #eb4f72;
}

.face-hover img {
  position: absolute;
  bottom: 140%;
  right: 0;
  width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) rotate(-2deg);
  transition: all 0.25s ease;
  pointer-events: none;
  border: 1px solid rgba(51, 51, 51, 0.15);
}

.face-hover:hover img {
  opacity: 1;
  visibility: visible;

  transform: translateY(0px) rotate(0deg);
}

/* =========================
      CONTACT FORM
========================= */

#contact-form {
  width: 100%;
  padding-left: 4rem;
}

#contact-form form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#contact-form label {
  font-family: "Outfit", sans-serif;
  font-size: 18px;
  font-weight: 500;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(51, 51, 51, 0.15);
  background: transparent;
  padding: 12px 0;
  font-family: "Lato", sans-serif;
  font-size: 16px;
  outline: none;
}

#contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

#contact-form button {
  align-self: flex-start;
  border: 2px solid #333333;
  background: transparent;
  padding: 8px 14px;
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

#contact-form button:hover {
  background: #333333;
  color: white;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: rgba(51, 51, 51, 0.35);
}

/* =========================
  CONTACT FORM (Servicios)
========================= */

.services-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-option {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  border: 1px solid;
  transition: all 0.25s ease;
}

.service-option input {
  display: none;
}

/* Diseño gráfico */

.service-option:nth-child(1) {
  color: #f4a028;
  border-color: #f4a028;
}

.service-option:nth-child(1):has(input:checked) {
  background: #f4a028;
  color: white;
}

/* Diseño editorial */

.service-option:nth-child(2) {
  color: #eb4f72;
  border-color: #eb4f72;
}

.service-option:nth-child(2):has(input:checked) {
  background: #eb4f72;
  color: white;
}

/* Diseño web */

.service-option:nth-child(3) {
  color: #333333;
  border-color: #333333;
}

.service-option:nth-child(3):has(input:checked) {
  background: #333333;
  color: white;
}

/* Vídeo / motion */

.service-option:nth-child(4) {
  color: #8589c4;
  border-color: #8589c4;
}

.service-option:nth-child(4):has(input:checked) {
  background: #8589c4;
  color: white;
}

/* Otro */

.service-option:nth-child(5) {
  color: #4e97d1;
  border-color: #4e97d1;
}

.service-option:nth-child(5):has(input:checked) {
  background: #4e97d1;
  color: white;
}

/* =========================
  CONTACT FORM (Validación)
========================= */

#contact-form input:required:not(:placeholder-shown):valid,
#contact-form textarea:required:not(:placeholder-shown):valid {
  border-bottom-color: #4e97d1;
}

#contact-form input:required:not(:placeholder-shown):invalid,
#contact-form textarea:required:not(:placeholder-shown):invalid {
  border-bottom-color: #eb4f72;
}

/* =========================
  CONTACT FORM (JS)
========================= */

#contact-form button.ready {
  background: #4e97d1;
  border-color: #4e97d1;
  color: white;
}

#contact-form button.ready:hover {
  opacity: 0.9;
}

/* =========================
    ABAUT ME (Audio icon)
========================= */

#audio-toggle {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

#audio-toggle:hover {
  transform: scale(1.08);
  background: rgba(0, 0, 0, 0.9);
}

/* =========================
          LEGAL
========================= */

#work.legal-content {
  display: flex;

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

  overflow-y: auto;

  min-height: 100vh;
}

.legal-section {
  width: 80%;

  flex-shrink: 0;

  margin: auto 0;
}

.legal-section h2 {
  font-size: 2.2em;
  line-height: 1.1;

  margin-bottom: 5%;
}

.legal-section p {
  padding-left: 0;
  line-height: 1.7;
}

/* =========================
PORTÁTL ESTRECHO RESPONSIVE
========================= */

@media screen and (max-width: 1400px) {
  #logo {
    width: 40%;
  }

  h1 {
    font-size: 26px;
  }

  p {
    font-size: 14px;
  }
}

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

@media screen and (max-width: 1100px) {
  /* HEADER */

  #s1 {
    width: 50%;
    height: 100dvb;
    padding-right: 1.5rem;
  }

  #logo {
    width: 40%;
  }

  .contact-info {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
  }

  .contact-info span {
    display: none;
  }

  /* NAV PROYECTOS */

  .project-nav {
    left: 50%;
    width: 50%;

    padding-inline: 1rem;
    gap: 1rem;
  }

  .project-nav a {
    font-size: 0.72rem;
    line-height: 1.1;
  }

  /* anterior */

  .project-nav a:first-child {
    max-width: 90px;
  }

  /* siguiente */

  .project-nav a:last-child {
    max-width: 90px;
    text-align: right;
  }
  /* PROYECTOS */

  #work {
    margin-left: 50%;
    width: 50%;
  }

  /* GALLERY */

  .gallery-project {
    margin-left: 50%;
    width: 50%;
  }

  /* SINGLE IMAGE */

  #work img {
    -o-object-fit: contain;
    object-fit: contain;
  }

  /* GALLERY GRID */

  .gallery-project .media {
    width: 100%;
    aspect-ratio: auto;
  }

  .gallery-project img,
  .gallery-project video {
    aspect-ratio: auto;
    height: auto !important;
  }

  .project-social-video .media:last-child {
    display: none !important;
  }

  .project-social-video video {
    width: 100% !important;
    height: auto !important;

    max-height: calc(100dvh - 3.5em);

    -o-object-fit: contain !important;

    object-fit: contain !important;
  }

  .img-fullscreen {
    display: none;
  }

  #work .img-responsive {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    display: block;
  }
}

/* =========================
   MOBILE RESPONSIVE
========================= */

#toggle-menu {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  right: -5px;
  width: 40px;
  height: 80px;
  border: none;
  background: transparent;
  color: #333333;
  font-size: 42px;
  font-weight: 700;
  cursor: pointer;
  z-index: 9999;
  padding: 0;
  line-height: 1;
  -webkit-animation: menuHint 4s infinite;
  animation: menuHint 4s infinite;
}

@media screen and (max-width: 768px) {
  /* NAV PROYECTOS */

  .project-nav {
    position: fixed;
    top: 0;
    left: 30px;
    width: calc(100% - 30px);
    height: 3.5em;
    padding-inline: 1rem;
    border-left: none;
    z-index: 900;
  }

  .project-nav a {
    font-size: 0.72rem;
  }

  /* FLECHA */

  #toggle-menu {
    display: flex;
  }

  body {
    overflow: hidden;
  }

  /* HEADER */

  #s1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    padding: 1.5rem 3rem 1.5rem 1.5rem;
    background-image: url("../01-img/Backgrounds/background-02.jpg");
    z-index: 1000;
    transition: transform 0.4s ease;

    overscroll-behavior-y: contain;
  }

  /* HEADER OCULTO */

  #s1.closed {
    transform: translateX(calc(-100vw + 30px));
  }

  /* MAIN */

  #work {
    margin-left: 0;
    width: 100%;
    height: 100dvh;
    border-left: none;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;

    overscroll-behavior-y: contain;
  }

  /* PROYECTOS DE IMAGEN ÚNICA */

  .img-responsive {
    display: block;
    width: 100%;
    height: calc(100dvh - 3.5em) !important;
    -o-object-fit: cover;
    object-fit: cover;
  }

  /* PROYECTO VÍDEO */

  #videoMobile {
    display: block;
    width: 100%;
    height: 100dvh !important;
    -o-object-fit: cover;
    object-fit: cover;
  }

  .project-social-video {
    overflow: hidden !important;
  }

  .project-social-video .media:last-child {
    display: none !important;
  }

  .project-social-video video {
    width: 100% !important;
    height: auto !important;
    max-height: calc(100dvh - 3.5em);
    -o-object-fit: contain !important;
    object-fit: contain !important;
  }

  #work article {
    width: 100%;
  }

  /* QUITAR LÍNEA VERTICAL */

  #work article:nth-child(odd) .work-info::after {
    display: none;
  }

  /* AJUSTES VISUALES */

  /* #logo {
    width: 55%;
  } */

  h1 {
    font-size: 20px;
  }

  p {
    font-size: 14px;
  }

  .words {
    min-width: 220px;
  }

  .dragonfly {
    width: 50%;
  }

  .contact-info {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
  }

  .contact-info span {
    display: none;
  }
}

/* =========================
          LEGAL MOBILE
========================= */

@media screen and (max-width: 768px) {
  #work.legal-content {
    padding-inline: 10%;
    box-sizing: border-box;
  }

  .legal-section {
    width: 100%;
  }
}

/* =========================
   ANIMACIÓN FLECHA
========================= */

@-webkit-keyframes menuHint {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }

  50% {
    transform: translateY(-50%) translateX(8px);
  }
}

@keyframes menuHint {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }

  50% {
    transform: translateY(-50%) translateX(8px);
  }
}
