/* ====== BASE GENERAL ====== */
/* ====== ESCENAS (pantallas independientes) ====== */

/* El body no scrollea; cada escena scrollea por dentro */
html, body {
  height: 100%;
  overflow: hidden !important;        /* bloquea el scroll global */
  background: var(--bg);
}



:root {
   --bg:#2C2C2C;
  --fg:#f6f4ef;
  --accent: #3f3f3f;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "DM Mono", monospace;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  scroll-snap-type: y mandatory;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

body::before { display: none !important; }


/* Cada escena ocupa la pantalla completa y puede scrollear internamente */
.scene {
  position: relative;           /* YA NO FIXED */
  min-height: 100vh;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(48px, 8vh, 120px) clamp(20px, 6vw, 60px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  background-color: transparent;
}

.scene.show {
  opacity: 1;
  pointer-events: auto;
}


/* Ajuste: como movimos el padding a .scene, evita doble padding en .m-panel */
.m-panel { padding: 0; }

/* El Orb siempre arriba de las escenas */
.floating-orb { z-index: 9999; }

/* Asegura que modales queden sobre escenas */
.pf-modal { z-index: 10000; }


/* ====== ESTRUCTURA DE SECCIONES ====== */

.m-panel {
  padding: clamp(48px, 8vh, 120px) clamp(20px, 6vw, 60px);
  max-width: 960px;
  margin: 0 auto;
    scroll-snap-align: start;
  height: 100vh;
  overflow-y: auto;
}

.m-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 4vh, 60px);
}

/* ===== ORB flotante ===== */
.floating-orb {
  position: fixed;
  top: clamp(16px, 4vh, 32px);
  right: clamp(16px, 4vw, 32px);
  z-index: 50;
}
.floating-orb img {
  width: clamp(64px, 12vw, 120px);
  cursor: pointer;
  transition: filter 0.3s ease;
}
.floating-orb img:hover {
  filter: invert(100%);
}
.floating-orb.active img {
  animation: orbBreath 4s ease-in-out infinite;
}
@keyframes orbBreath {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.5); opacity: 1; }
}

/* Menú emergente */
.menu-box[hidden]{display:none;}
.menu-box {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--fg);
  padding: 8px 0;
  opacity: .95;
  width: max-content;
  min-width: 200px;
}
.menu-box li {
  list-style: none;
  padding: 8px 18px;
}
.menu-box a {
  text-decoration: none;
  color: var(--fg);
  font-family: "DM Mono", monospace;
  font-size: .8rem;
  letter-spacing: .2em;
}
.menu-box a:hover {
  text-decoration: line-through;
  box-shadow: inset 0 0 40px #0a0a0a;
  color: #f5f5f5;
  transition: .3s ease-in-out;
}

#cursorGlow {
  position: fixed;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: hard-light;
  background: radial-gradient(
    circle,
    rgba(255,255,255,0.4),
    rgba(255,255,255,0) 70%
  );
  transform: translate(-50%, -50%);
}

#distortionLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  mix-blend-mode: color-dodge;
  opacity: 0.3;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.12) 0 2px,
    rgba(255,255,255,0) 2px 6px
  );
  backdrop-filter: blur(2px) contrast(1.2);
}

#filmNoise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events:none;
  mix-blend-mode: screen;
  background:
    url('media/noise.gif') repeat,
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.15) 0 2px,
      rgba(255,255,255,0) 2px 8px
    );
  opacity: .35;
  animation: shift 4s infinite;
}

@keyframes shift {
  0%   { transform: translateY(0); filter: blur(1px); }
  50%  { transform: translateY(-4px); filter: blur(2px); }
  100% { transform: translateY(0); filter: blur(1px); }
}

/* ==========================================================
   HOME
   ========================================================== */
.m-home .m-wrap {
  text-align: center;
}


.m-trace {
  width: 200px;
  align-items: left;
  margin: 10px auto auto 25px;
  opacity: .9;
  z-index: 1;
}

.m-tagline {
  margin-top: -75px; /* 🡅 sube todo el bloque de tagline */
  margin-bottom: 55px; /* 🡇 separa del trace o siguiente elemento */
  margin-left: -35px;
  z-index: 5;
}


.m-tagline p {
  font-family: "DM Mono", monospace;
  font-size: clamp(12px, 2vw, 16px);
  letter-spacing: .25em;
  margin: .3em 0;
  text-align: left;
}
.m-ornament-wrap {
  display: flex;
  flex-direction: flex-start;
  align-items: flex-start;
  gap: 10px;
}

.m-ornament {
  width: 100px;
  opacity: .9;
  align-items: right;
  margin: auto 15px 0 auto;
  z-index: 1;
}
.m-signature {
  font-family: "DM Mono", monospace;
  font-weight: 600;
  font-size: clamp(13px, 3vw, 16px);
  letter-spacing: .5em;
  text-align: right;
  margin: -70px 35px 45px 35px;
  z-index: 5;
}
.m-line {
  height: 1px;
  width: 60%;
  background: var(--fg);
  opacity: .6;
  margin: -72px auto 30px auto;
 
}


.m-introcopy {
  margin-top: 40px; /* 🡅 aire arriba del bloque entero */
  text-align: center;
  padding: 0 20px;
}


.m-introcopy p {
  font-size: clamp(11px, 2vw, 16px);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: 1.2em 0;
}

.m-introcopy .es {
  margin-bottom: 20px; /* 🡇 espacio entre ES y EN */
}

.m-introcopy .en {
  margin-bottom: 30px; /* 🡇 espacio entre EN y helecho */
}

.m-fern {
  width: clamp(260px, 70vw, 620px);
  margin: 80px auto 140px auto;
  opacity: .9;
}

.scroll-down-icon {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: #111;
  animation: bounce 2s infinite;
  cursor: pointer;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* === BACKGROUND VIDEO MOBILE === */

.m-bgvideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  mix-blend-mode: difference;
  filter: brightness(1.1) contrast(0.9); /* igual que desktop */
  opacity: 0.35;
  pointer-events: none;
  z-index: -3 !important;
  animation: breatheMobile 18s ease-in-out infinite;
}
/* DEBUG — fuerza a que el video sea visible */
#mBgVideo {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: block !important;
  opacity: .35 !important;
  background: transparent!important; /* TEST */
  z-index: 0 !important;
}

.m-tagline a {
  text-decoration: none;
  color: var(--fg);
  font-family: "DM Mono", monospace;
  font-size: clamp(12px, 2vw, 16px);
  letter-spacing: .25em;
  margin: .3em 0;
  text-align: left;
  display: inline-block;
}

.m-tagline a:active {
  text-decoration: underline;
}

.m-tagline a {
  text-decoration: none;
  color: inherit;
}


.m-tagline a:active {
  text-decoration: underline;
}

.m-introcopy a {
  text-decoration: none;
  color: inherit;
}

.m-introcopy a:active {
  text-decoration: underline;
}

/* ==========================================================
   ABOUT
   ========================================================== */
.m-about .m-wrap {
  text-align: left;
  position: relative; /* necesario para que 'absolute' funcione dentro */
}
.m-flower-img {
  display: block;
  margin-left: 0;
  margin-right: auto;
  width: 85vw; /* o el valor que se acomode a tu composición */
  max-width: 450px; /* límite para no pasarte en móviles grandes */
  opacity: 0.9;
}
.m-about-cap {
  text-align: center;
  text-transform: uppercase;
  font-family: "DM Mono", monospace;
  letter-spacing: .25em;
    margin-top: -3em; /* ajusta este valor a ojo */
  margin-left: 5.5em;   /* mueve si quieres ajustarlo horizontalmente */
  font-size: 1.2rem;
}
.m-about-mirror {
  position: absolute;
  top: 8em;                   /* Ajusta verticalmente a ojo */
  right: .7em;               /* Moverlo más a la derecha respecto a la línea (ajustable) */
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Grenze", serif;
  font-weight: 700;           /* bold */
  font-style: italic;
  font-size: 1.5rem;          /* más grande */
  letter-spacing: 0.3em;      /* más separadas */
  transform: scaleY(-1);
  opacity: 0.75;
  z-index: 3;
}

.m-about-name {
  text-align: right;
  font-family: "Archivo Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: .5em;
  font-size: clamp(18px, 5vw, 26px);
  margin-top: 1.2em;
}
.m-about-col {
  font-family: "DM Mono", monospace;
  font-size: clamp(14px, 3.1vw, 16px);
  line-height: 2;
  opacity: .85;
  margin-top: 1.4em;
  margin-right: 60px;
  text-align: right;
}
.m-about-col p + p {
  margin-top: 1em;
}
.m-animal img {
  width: clamp(240px, 70vw, 420px);
  margin: 3em auto 0;
  opacity: .9;
}

.m-line-vertical {
  position: absolute;
  top: 0;
  right: 3em;
  height: 100%;
  width: 1.2px;
  background-color: #d9d9d9;
  opacity: 0.5;
  z-index: 0; /* por detrás de los textos */
}

/* === Línea de remate en About === */
.about-remate-line {
  position: absolute;
  bottom: 5vh;          /* separación del borde inferior */
  left: 50%;            /* alineada al eje vertical central */
  transform: translateX(-50%);
  width: 380px;         /* largo de la línea, ajusta a gusto */
  height: 1px;
  background-color: var(--fg);
  opacity: 0.6;
}

.m-about-link {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.m-about-link:active,
.m-about-link:focus {
  text-decoration: underline;
}

/* ==========================================================
   SERVICES
   ========================================================== */

.m-services-header {
  position: relative;
  margin-top: 4em; /* baja todo el bloque */
  padding-right: 2em; /* alinea a la derecha sin pegar al borde */
}

.m-services-title-bg {
  display: block;
  width: clamp(160px, 60vw, 280px);
  opacity: .9;
  margin: 1.5em .3em 0 7em;
}

.m-services-title {
  position: absolute;
  top: 50%;
  right: 2em;
  transform: translateY(-50%);
  font-family: "Archivo Narrow", sans-serif;
  font-weight: 400;
  letter-spacing: .5em;
  text-transform: uppercase;
  font-size: clamp(13px, 3vw, 18px);
  text-align: right;
  color: #f6f4ef;
}
.m-services-intro {
  font-family: "DM Mono", monospace;
  font-size: clamp(14px, 3vw, 16px);
  text-align: left;
   line-height: 2;
  letter-spacing: 0.2em;
  word-spacing: 0.2em; 
  opacity: .80;
  margin: 2em 1.5em;  /* espacio vertical + margen lateral */
}
.m-services-list {
  list-style: none;
  padding: 0;
  font-family: "DM Mono", monospace;
  text-align: left;
  text-transform: uppercase;     /* ✅ convierte todo a mayúsculas */
  font-size: clamp(14px, 3.5vw, 18px);
  line-height: 1.9;              /* ✅ control vertical por ahora */
  letter-spacing: 0.25em;        /* ajustamos para no quedar exagerado */
  margin: 2em .5em;
  opacity: .80;
}

.m-services-list li {
  margin-left: 1.5em;            /* ✅ indentación uniforme */
  text-indent: -1.5em;           /* ✅ alinea guion con texto */
  margin-bottom: 1.2em;          /* ✅ espacio entre ítems */
}
.m-services-list li::before {
  content: "· ";
  opacity: .6;
}
.m-sv-primary {
  display: block;
  width: 100vw;       /* ocupa todo el ancho de pantalla */
  max-width: none;
  margin-top: -3.5em;
  padding: 0;
  opacity: .9;
  z-index: 3;
}

.m-sv-bottom {
  display: block;
  width: 100vw;
  max-width: none;
  margin-top: -30em;  /* superposición ligera */
  opacity: .45;
}

.m-services-remate {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  height: 40px;
  margin-top: 4em;
}

.m-services-line {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: var(--fg, #111);
  opacity: 0.6;
}

.m-services-cube {
  position: absolute;
  right: 5px;
  bottom: -18px;
  width: 36px;
  height: 36px;
  background-color: var(--fg, #111);
  opacity: 0.1;
}


/* ==========================================================
   PORTFOLIO
   ========================================================== */

.m-pf-hero {
  position: relative;
  margin: 0;
  padding: 0;
  width: 100vw;
}

.m-pf-hero-main {
  display: block;
  width: 100vw;
  margin: -3.8em 0 0 0;
  padding: 0;
}

.m-pf-hero-sub {
  display: block;
  width: 100vw;
  margin: -7em 0 0 0;
  padding: 0;
}

.m-pf-planeta {
  display: block;
  width: 80vw;
  margin: -5em .2em 0 auto;
  padding: 0;
}

.m-pf-titlebar {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* alinear hacia la derecha */
  gap: .5em;
  margin: 4em 1em 2em auto; /* bajamos más el bloque y lo separamos de la derecha */
  text-align: right;
}
.m-pf-title {
   font-family: "Archivo Narrow", sans-serif;
  font-weight: 100;
  letter-spacing: .5em;
  text-transform: uppercase;
  font-size: clamp(14px, 3.5vw, 18px);
  margin: 0;
}
.m-pf-square {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--accent);
  opacity: .95;
  margin-left: 0px;
  margin-right: 20px
  
}

.m-pf-list {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 8vh, 96px);
  margin-top: 3em;
}
.pf-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2em;
}
.pf-thumb {
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 6px;
  background: transparent;
}
.pf-thumb img {
  width: 80%;
  height: auto;
  margin: auto;
}
.pf-caption {
  font-family: "DM Mono", monospace;
  font-size: clamp(12px, 3vw, 15px);
  letter-spacing: .08em;
  text-align: left;
  margin-left: 10px;
  margin-right: 5px;
  opacity: .85;
}
.pf-caption .pf-sub {
  display: block;
  font-family: "Archivo Narrow", sans-serif;
  font-size: clamp(11px, 2.8vw, 14px);
  opacity: .65;
  line-height: 1.5;
}

/* ==========================================================
   CONTACT
   ========================================================== */
.m-contact-image img {
  width: clamp(160px, 60vw, 300px);
  margin: 0 auto;
  opacity: .9;
}
.m-contact-meta,
.m-contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4em;
  font-family: "Archivo Narrow", sans-serif;
  font-size: clamp(11px, 3vw, 14px);
  letter-spacing: .25em;
  text-transform: uppercase;
  opacity: .7;
}
.m-contact-links a {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: all .3s ease;
}
.m-contact-links a:hover {
  border-color: var(--fg);
}
.m-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  margin-top: 3em;
  width: 100%;
  max-width: 480px;
}
.m-contact-form label {
  font-size: clamp(10px, 2.8vw, 13px);
  letter-spacing: .2em;
  text-transform: uppercase;
  display: block;
}
.m-contact-form input,
.m-contact-form textarea {
  width: 100%;
  border: 1px solid var(--fg);
  background: transparent;
  padding: .8em;
  font-family: inherit;
  color: var(--fg);
  font-size: clamp(12px, 3vw, 15px);
}
.m-submit {
  background: none;
  border: none;
  font-family: "DM Mono", monospace;
  font-size: clamp(14px, 3.4vw, 18px);
  letter-spacing: .25em;
  align-self: flex-end;
  margin-top: .6em;
  cursor: pointer;
  transition: transform .3s ease;
}
.m-submit:hover {
  transform: translateX(4px);
}

/* ==========================================================
   FOOTER ESPACIO FINAL
   ========================================================== */
.m-contact::after {
  content: "";
  display: block;
  height: 6vh;
}

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

.pf-modal {
  position: fixed;
  inset: 0;
  z-index: 99999 !important;
  display: none;
  background: rgba(0, 0, 0, 0.95);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4vh 2vw;
}

.pf-modal.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  gap: 2em;
}

.pf-modal-frame {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

.pf-modal-gallery {
  display: flex;
  flex-direction: row;
  gap: 0;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  height: auto;
  max-height: 80vh;
}

.pf-modal-gallery img,
.pf-modal-gallery video {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  scroll-snap-align: center;
  object-fit: contain;
  display: block;
  background: #000;
  border: none;
  outline: none;
  pointer-events: auto;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .scene {
  pointer-events: none;
}

.scene.show:not(.modal-open) {
  pointer-events: auto;
}

/* ==== BOTÓN DE CIERRE ==== */
.pf-close {
  position: fixed;
 right: 16px;           /* 👈 Aquí lo alineas a la derecha */
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 100000;
}


/* ==== BOTONES DE NAVEGACIÓN ==== */
.pf-prev,
.pf-next {
 position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 100000;
}

.pf-prev {
  left: 16px;
}

.pf-next {
  right: 16px;
}

.pf-close:hover,
.pf-prev:hover,
.pf-next:hover {
  opacity: 0.7;
}
