/* ==============================================
   Oniric Lab — styles.css
   ============================================== */

/* -----------------------------------------------
   VARIABLES & RESET
----------------------------------------------- */
:root {
  --orange:  #FF4500;   /* naranja de marca — todos los titulares y acentos */
  --bg:      #111111;   /* fondo principal */
  --white:   #ffffff;
  --divider: #FF4500;   /* color de la línea divisoria */
  --white-60: rgba(255,255,255,0.6);
  --white-80: rgba(255,255,255,0.8);

  --font-display: 'Anton', Impact, Arial Narrow, sans-serif;
  --font-body:    'Poppins', system-ui, sans-serif;

  --anim-duration: 0.75s;
  --anim-ease:     cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* -----------------------------------------------
   HEADER
----------------------------------------------- */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.6rem 4vw;
  transition: background-color 0.45s ease, padding 0.3s ease;
}

#header.scrolled {
  background-color: rgba(17, 17, 17, 0.96);
  backdrop-filter: blur(10px);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(0.6rem, 1vw, 0.85rem);
  letter-spacing: 0.18em;
  color: var(--white);
}

.header-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.header-social a {
  color: var(--white);
  opacity: 0.85;
  transition: opacity 0.2s;
  line-height: 0;
}

.header-social a:hover {
  opacity: 1;
}


/* -----------------------------------------------
   BOTONES
----------------------------------------------- */

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--white);
  border-radius: 50px;
  padding: 0.85rem 2.8rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--white);
  text-transform: uppercase;
  transition: background-color 0.25s, color 0.25s;
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--bg);
}

.btn-outline--sm {
  padding: 0.65rem 2rem;
  font-size: 0.68rem;
  align-self: flex-start;
  width: fit-content;
}

.btn-submit {
  align-self: flex-start;
  display: inline-block;
  border: 1.5px solid var(--white);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  padding: 0.7rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}

.btn-submit:hover {
  background-color: var(--white);
  color: var(--bg);
}


/* -----------------------------------------------
   HERO
----------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh; /* iOS Safari: excluye la barra del navegador */
  overflow: hidden;
  background-color: var(--bg);
}

.hero-photo {
  position: absolute;
  overflow: hidden;
  z-index: 1;
}

.hero-photo--left {
  top: 0;
  left: 0;
  width: 28%;
  height: 85%;
}

.hero-photo--right {
  bottom: 0;
  right: 0;
  width: 22%;
  height: 60%;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  gap: 2.5rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9.5vw, 11rem);
  line-height: 0.9;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.hero-headline em {
  font-style: italic;
}

.hero-headline__line {
  display: block;
}


/* -----------------------------------------------
   SECCIÓN 2 — Obtén ingresos por crear
----------------------------------------------- */
.section-incomes {
  padding-top: 8rem;
}

.section-incomes__header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-end;
  gap: 3rem;
  padding: 0 4vw 4rem;
}

.section-incomes__heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6.5vw, 8rem);
  line-height: 0.92;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.section-incomes__heading em {
  font-style: italic;
}

.section-incomes__desc {
  font-size: clamp(0.7rem, 0.9vw, 0.82rem);
  line-height: 1.75;
  color: var(--white-80);
  text-align: justify;
  padding-bottom: 0.4rem;
}

.section-incomes__image-wrap {
  width: 100%;
  height: 65vh;
  overflow: hidden;
}

.section-incomes__image-wrap .parallax-img {
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center 25%;
  will-change: transform;
}


/* -----------------------------------------------
   LÍNEA DIVISORIA
----------------------------------------------- */
.divider-line {
  width: 100%;
  height: 6px;
  background-color: var(--divider);
}


/* -----------------------------------------------
   SECCIÓN 3 — Conviértete en Creador de Contenido
----------------------------------------------- */
.section-creator {
  padding: 8rem 0;
}

.section-creator__heading-wrap {
  padding: 0 4vw 5rem;
  overflow: hidden;
}

.section-creator__heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 11.5rem);
  line-height: 0.88;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.section-creator__course {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  padding: 0 4vw;
}

.course-num {
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  color: var(--orange);
  padding-top: 0.25rem;
}

.course-body {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.course-title {
  font-family: var(--font-body);
  font-size: clamp(0.65rem, 1vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
}

.course-meta {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.course-meta li {
  font-size: clamp(0.6rem, 0.8vw, 0.72rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-60);
}

.course-desc {
  font-size: clamp(0.68rem, 0.9vw, 0.8rem);
  line-height: 1.8;
  color: var(--white-80);
  text-align: justify;
}

.course-photo {
  width: clamp(180px, 22vw, 360px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.course-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}


/* -----------------------------------------------
   SECCIÓN 4 — Contacto
----------------------------------------------- */
.section-contact {
  padding-bottom: 8rem;
}

.section-contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
  padding: 6rem 4vw;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 5rem);
  line-height: 0.95;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.contact-heading em {
  font-style: italic;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}

.form-field .req {
  color: var(--white-60);
  font-size: 0.62rem;
}

.form-field input,
.form-field textarea {
  background-color: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 0;
  color: var(--white);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.25s;
  width: 100%;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: rgba(255,255,255,0.7);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #000;
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}


/* -----------------------------------------------
   RESPONSIVE — móvil (< 768px)
----------------------------------------------- */
@media (max-width: 768px) {

  /* Header */
  #header {
    padding: 1rem 5vw;
  }

  /* Ocultar ambas fotos del hero — el texto queda limpio y centrado */
  .hero-photo--right,
  .hero-photo--left {
    display: none;
  }

  /* Hero headline */
  .hero-headline {
    font-size: clamp(2.8rem, 13vw, 5rem);
  }

  /* Hero content */
  .hero-content {
    padding: 5rem 6vw 3rem;
    gap: 1.5rem;
  }

  /* Reducir paddings de secciones en móvil */
  .section-incomes {
    padding-top: 4rem;
  }

  .section-creator {
    padding: 4rem 0;
  }

  .section-creator__heading-wrap {
    padding-bottom: 3rem;
  }

  .section-works {
    padding: 4rem 0;
  }

  .section-contact {
    padding-bottom: 4rem;
  }

  /* Sección ingresos */
  .section-incomes__header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 2.5rem;
  }

  /* justify en columnas estrechas deja huecos enormes — usar left */
  .section-incomes__desc {
    max-width: 100%;
    font-size: 0.88rem;
    line-height: 1.7;
    text-align: left;
  }

  .section-incomes__image-wrap {
    height: 45vh;
  }

  /* Sección creator */
  .section-creator__heading {
    font-size: clamp(2.5rem, 12vw, 6rem);
  }

  /* Una sola columna: evita layouts rotos con grids auto/1fr */
  .section-creator__course {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .course-photo {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
  }

  /* Mejorar legibilidad de texto en móvil */
  .course-title {
    font-size: 0.82rem;
  }

  .course-meta li {
    font-size: 0.74rem;
  }

  .course-desc {
    font-size: 0.88rem;
    line-height: 1.75;
    text-align: left;
  }

  /* Sección contacto */
  .section-contact__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3rem 5vw;
  }

  .contact-photo {
    height: 260px;
    order: -1;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-heading {
    font-size: clamp(1.6rem, 8vw, 3rem);
    margin-bottom: 2rem;
  }

  /* iOS: inputs con font-size < 16px disparan zoom automático al enfocar */
  .form-field input,
  .form-field textarea {
    font-size: 16px;
  }

  /* Botón GO a trabajos */
  .works-go-btn {
    padding: 3rem 1.5rem;
    font-size: clamp(2.5rem, 11vw, 5rem);
  }

  /* Botones táctiles — área mínima 44px, sin delay de tap */
  .btn-outline,
  .btn-submit {
    min-height: 44px;
    touch-action: manipulation;
  }

  .btn-outline {
    padding: 0.9rem 2rem;
  }
}

/* -----------------------------------------------
   RESPONSIVE — tablet (768px – 1024px)
----------------------------------------------- */
@media (max-width: 1024px) and (min-width: 769px) {

  .hero-headline {
    font-size: clamp(4rem, 10vw, 8rem);
  }

  /* Mantener 2 columnas pero con foto más pequeña */
  .section-creator__course {
    grid-template-columns: 1fr 200px;
  }

  .course-photo {
    width: 100%;
  }

  .section-contact__inner {
    gap: 3rem;
  }
}


/* -----------------------------------------------
   SECCIÓN TRABAJOS
----------------------------------------------- */
.section-works {
  padding: 8rem 0;
}

.section-works__header {
  padding: 0 4vw 3rem;
}

.section-works__heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 11.5rem);
  line-height: 0.88;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* ── Botón GO → trabajos.html ── */
.works-go-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 11.5rem);
  letter-spacing: -0.02em;
  color: var(--orange);
  text-decoration: none;
  border-top: 2px solid rgba(255,255,255,0.07);
  border-bottom: 2px solid rgba(255,255,255,0.07);
  transition: color 0.3s, background 0.3s, border-color 0.3s;
  line-height: 1;
}

.works-go-btn:hover {
  color: #fff;
  background: rgba(255,69,0,0.04);
  border-color: rgba(255,69,0,0.3);
}


/* -----------------------------------------------
   GALERÍA FOTO — overlay pantalla completa
----------------------------------------------- */
.foto-gallery {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.foto-gallery.open {
  opacity: 1;
  pointer-events: auto;
}

.fg-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(10px);
}

.fg-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  color: var(--orange);
  text-transform: uppercase;
}

.fg-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  color: var(--white);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.fg-close:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ── Grid masonry — 5 columnas ajustadas ── */
.fg-grid {
  height: 100vh;
  overflow-y: auto;
  padding-top: 60px;
  columns: 5;
  column-gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 69, 0, 0.2) transparent;
}

.fg-grid::-webkit-scrollbar { width: 2px; }
.fg-grid::-webkit-scrollbar-thumb { background: rgba(255, 69, 0, 0.25); }

.fg-item {
  break-inside: avoid;
  margin-bottom: 3px;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  display: block;
}

.fg-item img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
  transition: opacity 0.3s ease, transform 0.35s ease;
}

.fg-item:hover img {
  opacity: 0.82;
  transform: scale(1.02);
}

@media (max-width: 1200px) { .fg-grid { columns: 4; } }
@media (max-width: 900px)  { .fg-grid { columns: 3; } }
@media (max-width: 560px)  { .fg-grid { columns: 2; } }


/* -----------------------------------------------
   LIGHTBOX
----------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(10, 10, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 88vw;
  max-height: 88vh;
}

#lb-img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
  transition: opacity 0.2s ease;
}

/* Botón cerrar */
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  color: var(--white);
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 10;
  transition: border-color 0.2s, color 0.2s;
}

.lightbox-close:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* Flechas de navegación */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  color: var(--white);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  user-select: none;
}

.lightbox-arrow:hover {
  border-color: var(--orange);
  background: rgba(255, 69, 0, 0.12);
  color: var(--orange);
}

.lightbox-arrow--prev { left: 1.5rem; }
.lightbox-arrow--next { right: 1.5rem; }

/* Contador */
.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .lightbox-arrow {
    width: 38px;
    height: 38px;
    font-size: 1.6rem;
  }

  .lightbox-arrow--prev { left: 0.75rem; }
  .lightbox-arrow--next { right: 0.75rem; }
}


/* -----------------------------------------------
   GALERÍA VIDEO — overlay pantalla completa
----------------------------------------------- */
.video-gallery {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.video-gallery.open {
  opacity: 1;
  pointer-events: auto;
}

.vg-grid {
  height: 100vh;
  overflow-y: auto;
  padding: 76px 8px 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 69, 0, 0.2) transparent;
}

.vg-grid::-webkit-scrollbar { width: 2px; }
.vg-grid::-webkit-scrollbar-thumb { background: rgba(255, 69, 0, 0.25); }

.vg-item {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0a0a;
  border-radius: 2px;
}

.vg-item iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.vg-empty {
  grid-column: 1 / -1;
  padding: 6rem 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.2);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .vg-grid { grid-template-columns: 1fr; }
}
