@font-face {
    font-family: 'CharlieDontSurf'; 
    src: url('fonts/Charliedontsurf.woff2') format('woff2'),
         url('fonts/Charliedontsurf.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: optional;
}

:root {
  /*--font-display: "Poppins", sans-serif;*/
  --font-display: "DM Sans", sans-serif;
  --font-ui: "Elms Sans", sans-serif;
  --font-charlie: 'CharlieDontSurf', sans-serif; 
}

/* ==================================================== */
/* HEADER FIJO & MENÚ TICKET */
/* ==================================================== */
.site-header {
  position: fixed;
  top: 2dvw;
  left: 2dvw;
  right: 2dvw;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 100;
  pointer-events: none;
}

.ticket-menu {
  pointer-events: auto;
  display: flex;
  background-color: var(--ticket-bg);
  color: var(--text-ticket);
  border-radius: 8px;
  mask-image: radial-gradient(circle at top, transparent 6px, black 7px),
    radial-gradient(circle at bottom, transparent 6px, black 7px);
  mask-size: 100% 51%;
  mask-repeat: no-repeat;
  mask-position: top, bottom;
  padding-left: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: none;
}

.ticket-content {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 1rem 0.5rem 0;
  border-right: 1px dashed rgba(0, 0, 0, 0.2);
  width: 200px;
}

.ticket-dropdown {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 600;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  width: 100%;
}

.ticket-title {
  flex: 1; /* Ocupa el ancho restante empujando la flechita (v) a la derecha */
  font-weight: 700;
  text-transform: uppercase;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-thumb {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

.ticket-meta {
  display: flex;
  gap: 15px;
  font-size: 0.55rem;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

.ticket-hamburger {
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.menu-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-right: 15px;
}

.burger-lines {
  position: relative;
  width: 30px;
  height: 10px;
  gap: 5px;
}

.burger-lines span {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--text-ticket);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  transform-origin: center;
}

.burger-lines span:nth-child(1) {
  top: 0px;
}

.burger-lines span:nth-child(2) {
  bottom: 0px;
}

.ticket-hamburger.is-open .burger-lines span:nth-child(1) {
  top: 4px;
  transform: rotate(45deg);
}

.ticket-hamburger.is-open .burger-lines span:nth-child(2) {
  bottom: 4px;
  transform: rotate(-45deg);
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -1px;
  /*text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);*/
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* ==================================================== */
/* MENU DROPDOWN (LISTADO DE OBRAS) */
/* ==================================================== */
.works-dropdown-external {
  position: fixed;
  background-color: var(--ticket-bg);
  color: var(--text-ticket);
  z-index: 1;
  border-radius: 0 0 8px 8px;
  padding-bottom: 0.5rem;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-20px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5);
  cursor: none;
  pointer-events: auto;
  mask-image: radial-gradient(
      circle at bottom left,
      transparent 6px,
      black 7px
    ),
    radial-gradient(circle at bottom right, transparent 6px, black 7px),
    linear-gradient(black, black);
  mask-size:
    51% 100%,
    51% 100%,
    100% calc(100% - 12px);
  mask-repeat: no-repeat;
  mask-position:
    bottom left,
    bottom right,
    top center;
}

.works-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.work-item {
  display: flex;
  align-items: center;
  padding: 12px 1rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.2);
  cursor: none;
  transition: background-color 0.2s ease;
}

.work-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.work-item img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  margin-right: 12px;
}

.work-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-grow: 1;
  letter-spacing: 0.5px;
}

.work-dot {
  width: 6px;
  height: 6px;
  background-color: #000;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-left: 15px;
}

.work-item.is-active .work-dot {
  opacity: 1;
}

/* ==================================================== */
/* OVERLAY MENÚ (EL TICKET GIGANTE) */
/* ==================================================== */
.menu-overlay {
  position: fixed;
  top: calc(2dvw + 92px);
  right: 2dvw;
  width: 350px;
  max-width: calc(100% - 4dvw);
  background-color: var(--ticket-bg);
  color: var(--text-ticket);
  z-index: 99999;
  border-radius: 8px;
  padding: 2rem 3rem 2rem 2rem;
  mask-image: radial-gradient(circle at top, transparent 6px, black 7px),
    radial-gradient(circle at bottom, transparent 6px, black 7px);
  mask-size: 100% 51%;
  mask-repeat: no-repeat;
  mask-position: top, bottom;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
}

.menu-overlay.is-active {
  pointer-events: auto;
  cursor: auto;
}

.menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-ticket);
  cursor: pointer;
}

.menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
  padding-bottom: 2rem;
}

.menu-link-item {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: var(--text-ticket);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 2.5rem;
  letter-spacing: -2px;
  cursor: pointer;
}

.menu-link-num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.4;
  letter-spacing: 1px;
}

.menu-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 1px;
}

.menu-socials {
  display: flex;
  gap: 20px;
}

.menu-socials a {
  color: var(--text-ticket);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

/* ==================================================== */
/* TEMA INVERTIDO PARA PÁGINAS INTERNAS (NO HOME) */
/* ==================================================== */
body.nav-inverted {
  /* Aquí pones tu color oscuro (el que antes era para el texto) */
  --ticket-bg: #141414;
  /* Aquí pones tu color claro (el que antes era para el fondo) */
  --text-ticket: #ffffff;
}

/* 1. Corrige el hover de los links grandes y redes sociales (usando tu variable) */
body.nav-inverted .menu-links a:hover,
body.nav-inverted .menu-socials a:hover {
  color: var(--text-ticket);
  opacity: 0.7; /* Le da un efecto suave e interactivo al pasar el mouse */
}

/* 2. Corrige el hover del dropdown de obras (pasando de negro a blanco semitransparente) */
body.nav-inverted .work-item:hover {
  /*background-color: rgba(255, 255, 255, 0.1);*/
}

/* 3. (Opcional) Si el hover oscuro persistía por una regla anterior, lo forzamos a heredar el color correcto */
body.nav-inverted .menu-link-item:hover {
  /*color: var(--text-ticket);*/
}

/* ==================================================== */
/* CURSOR PERSONALIZADO */
/* ==================================================== */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background-color: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  mix-blend-mode: difference;
  transition:
    width 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    height 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    background-color 0.4s ease,
    border-color 0.4s ease,
    mix-blend-mode 0.4s ease;
}

.custom-cursor .cursor-text {
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  line-height: 1.2;
  text-transform: uppercase;
}

.custom-cursor.is-expanded {
  width: 90px;
  height: 90px;
  background-color: #fff;
  border-color: #fff;
  mix-blend-mode: normal;
}

.custom-cursor.is-expanded .cursor-text {
  opacity: 1;
}

.menu-overlay.is-active ~ .custom-cursor {
  display: none !important;
}

.custom-cursor.is-dragging {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translate(-50%, -50%) scale(0.85);
  mix-blend-mode: normal;
}

.custom-cursor.is-dragging .cursor-text {
  opacity: 1;
  font-size: 1.2rem;
  color: #fff;
}

/* ==================================================== */
/* PANTALLA DE APERTURA (SPLASH SCREEN) */
/* ==================================================== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  background-color: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.splash-title {
  font-family: var(--font-charlie);
  font-size: clamp(3rem, 10dvw, 7.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 1rem;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  text-transform: uppercase;
}

.splash-subtitle {
  font-family: var(--font-charlie);
  font-size: clamp(0.7rem, 2dvw, 1rem);
  letter-spacing: 3px;
  opacity: 0.9;
  text-transform: uppercase;
}

.splash-scroll-indicator {
  position: absolute;
  bottom: 8dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  opacity: 0.7;
  animation: pulseFade 2.5s infinite ease-in-out;
}

.splash-scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.splash-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(
    to bottom,
    var(--text-light) 0%,
    transparent 100%
  );
}

@keyframes pulseFade {
  0% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 0.9;
    transform: translateY(10px);
  }
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
}

/* ==================================================== */
/* MEDIA QUERIES & RESPONSIVE DESKTOP/MÓVIL */
/* ==================================================== */
@media (max-width: 768px) {
  .site-header {
    top: 4dvw;
    left: 4dvw;
    right: 4dvw;
  }

  .ticket-content {
    display: none;
  }

  .ticket-menu {
    padding-left: 0;
    justify-content: center;
    mask-image: none;
    -webkit-mask-image: none;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  }

  .ticket-hamburger {
    padding: 10px 18px;
  }

  .logo-main {
    font-size: 1.6rem;
  }

  .burger-lines {
    width: 22px;
    height: 8px;
  }

  .ticket-hamburger.is-open .burger-lines span:nth-child(1) {
    top: 3px;
    transform: rotate(45deg);
  }

  .ticket-hamburger.is-open .burger-lines span:nth-child(2) {
    bottom: 3px;
    transform: rotate(-45deg);
  }

  .menu-text {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    margin-right: 10px;
  }

  .menu-overlay {
    top: calc(4dvw + 40px);
    right: 4dvw;
    left: 4dvw;
    width: auto;
    max-width: none;
    padding: 3rem 2rem 2rem 2rem;
    mask-image: none;
    -webkit-mask-image: none;
  }
  
  .menu-links {
    gap: 0.8rem;        /* Aún más compacto en móvil */
    padding-bottom: 1.5rem;
  }

  .menu-link-item {
    font-size: 2rem;
  }

  .splash-subtitle {
    margin-bottom: 5dvh;
  }

  .splash-scroll-indicator {
    bottom: 6dvh;
  }
}

@media (max-width: 1024px) {
  .menu-overlay {
    top: calc(4dvw + 48px);
  }
 }

@media (min-width: 1024px) {
  .ticket-dropdown {
    height: 48px;
  }
  .ticket-hamburger {
    height: 78px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .custom-cursor {
    display: none !important;
  }
  body,
  .ticket-menu,
  .ticket-hamburger,
  .menu-overlay,
  .menu-link-item,
  .menu-close,
  .menu-socials a,
  .work-item {
    cursor: auto !important;
  }
}
