/*
Theme Name: AppleVerse – The iArchives (Landing)
Author: KandadosDev
Description: Landing page tipo Apple con animaciones limpias estilo Apple Intelligence.
Version: 2.7
*/

/* === FUENTE HILMAR SANS === */
@font-face {
  font-family: 'Hilmar Sans';
  src: url('fonts/HilmarSans-Regular.woff2') format('woff2'),
       url('fonts/HilmarSans-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Hilmar Sans';
  src: url('fonts/HilmarSans-Medium.woff2') format('woff2'),
       url('fonts/HilmarSans-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Hilmar Sans';
  src: url('fonts/HilmarSans-Bold.woff2') format('woff2'),
       url('fonts/HilmarSans-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}

/* === BASE GENERAL === */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Hilmar Sans', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: #fff;
  color: #000;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* === MENÚ SUPERIOR === */
.main-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eee;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  z-index: 1000;
}
.main-nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0.8rem 1rem;
  gap: 2.2rem;
}
.main-nav a {
  text-decoration: none;
  color: #000;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.active {
  color: #007aff;
  border-bottom: 2px solid #007aff;
}

/* === HERO === */
.hero {
  position: relative;
  width: 100%;
  height: 60vh;
  background-image: url('https://appleverse.app/wp-content/themes/appleverse-landing/images/fondoCabecera.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(1.05) contrast(0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(255,255,255,0.8));
  z-index: 1;
}
.hero-overlay {
  position: relative;
  z-index: 2;
  color: #000;
  max-width: 1000px;
  padding: 1.5rem;
}
.hero-title {
  position: relative;
  font-weight: 700;
  font-size: 4.8rem;
  letter-spacing: -1px;
  line-height: 1.05;
  margin-bottom: 0.6rem;
  background: linear-gradient(180deg, #000 0%, #333 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(30px);
  filter: blur(10px);
  animation: heroFadeIn 1.4s ease forwards;
}
.hero-subtitle {
  font-weight: 400;
  font-size: 1.8rem;
  color: #333;
  opacity: 0;
  transform: translateY(25px);
  filter: blur(8px);
  animation: heroFadeIn 1.6s ease 0.3s forwards;
}
@keyframes heroFadeIn {
  0% { opacity: 0; transform: translateY(35px); filter: blur(10px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* === SECCIONES === */
.section {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 2rem;
}
.section h2 {
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 3.4rem;
  background: linear-gradient(180deg, #000 0%, #222 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section p {
  max-width: 800px;
  line-height: 1.65;
  font-size: 1.12rem;
  color: #444;
}

/* === EFECTOS DE REVELADO === */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 1.3s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 1.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === GALERÍA APPLEVERSE === */
.appleverse-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  padding: 3rem 2rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #e9f3ff 0%, #f8fbff 100%);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.05);
}

/* efecto de aparición para las imágenes */
.appleverse-gallery img {
  width: 30%;
  min-width: 280px;
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(35px) scale(0.98);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.appleverse-gallery img.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* === GALERÍA MODERNA === */
.modern-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 250px;
  gap: 1.6rem;
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 22px;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 35px rgba(0,0,0,0.06);
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

/* animación suave también en la galería general */
.modern-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  transition: transform 0.8s ease, filter 0.8s ease, opacity 1.1s ease;
  opacity: 0;
  transform: translateY(25px) scale(0.98);
  filter: brightness(0.97) contrast(1.05);
}
.modern-gallery img.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.1) saturate(1.1);
}

/* === MODAL GALERÍA === */
.modal-gallery {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-gallery img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(255,255,255,0.1);
}
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2.6rem;
  cursor: pointer;
  opacity: 0.8;
  transition: 0.3s;
}
.arrow.left { left: 40px; }
.arrow.right { right: 40px; }
.arrow:hover { opacity: 1; transform: translateY(-50%) scale(1.1); }

/* === GALERÍA DEL PROYECTO === */
.texto-galeria {
  text-align: center;
  padding: 4rem 1rem 2rem;
  background: #fff;
}
.texto-galeria h2 {
  position: relative;
  display: inline-block;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #000 0%, #333 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.texto-galeria h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 120px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #007aff, #5ac8fa, #007aff);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}
.texto-galeria h2.reveal.visible::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}
.texto-galeria p {
  font-size: 1.15rem;
  color: #444;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}
.galeria-fondo {
  background: linear-gradient(180deg, #f9fbff 0%, #eaf3ff 100%);
  padding: 4rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.galeria-fondo .modern-gallery {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  border-radius: 22px;
  box-shadow: 0 8px 35px rgba(0,0,0,0.05);
  padding: 2rem;
}

/* === SECCIÓN CONTACTO (GLASS COMPLETO) === */
.contacto-section-light {
  position: relative;
  width: 100%;
  text-align: center;
  padding: 3.5rem 2rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  border-top: 1px solid rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6),
              0 6px 20px rgba(0,0,0,0.03);
}
.contacto-section-light::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(250,250,250,0.9) 100%);
  z-index: -1;
}
.contacto-section-light .container {
  max-width: 900px;
  margin: 0 auto;
}
.contacto-section-light h2 {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(180deg, #000 0%, #333 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}
.contacto-section-light p {
  max-width: 700px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.65;
  opacity: 0.95;
}
.glass-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(200,200,200,0.6);
  color: #111;
  font-weight: 600;
  padding: 0.9rem 2rem;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.glass-btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 8px 22px rgba(0,113,227,0.12);
  border-color: rgba(180,180,180,0.85);
}
.glass-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

/* === MODAL CONTACTO === */
.modal-contacto {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-content-contacto {
  position: relative;
  width: 90%;
  max-width: 600px;
  padding: 2.5rem 2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}
.cerrar-modal {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.8rem;
  color: #333;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
}
.cerrar-modal:hover {
  transform: scale(1.15);
  color: #007aff;
}

/* === FORMULARIO DE CONTACTO === */
.contact-form-glass {
  max-width: 600px;
  margin: 3rem auto 2rem;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}
.form-group {
  position: relative;
  width: 100%;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1.2rem 1rem 0.8rem;
  font-size: 1rem;
  border: 1px solid rgba(200, 200, 200, 0.7);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  color: #111;
  outline: none;
  transition: all 0.25s ease;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: #0071e3;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 6px rgba(0, 113, 227, 0.25);
}
.form-group label {
  position: absolute;
  top: 1.1rem;
  left: 1rem;
  color: #666;
  pointer-events: none;
  font-size: 1rem;
  background: transparent;
  transition: 0.25s ease;
}
.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -0.65rem;
  left: 0.9rem;
  font-size: 0.8rem;
  color: #0071e3;
  background: #fff;
  padding: 0 0.35rem;
  border-radius: 6px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero { height: 50vh; }
  .hero-title { font-size: 2.8rem; }
  .hero-subtitle { font-size: 1.3rem; }
  .appleverse-gallery { flex-direction: column; padding: 2rem 1rem; }
  .appleverse-gallery img { width: 85%; }
  .modern-gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); grid-auto-rows: 180px; }
  .glass-btn { width: 100%; text-align: center; }
}

/* === MARCO AZUL CLARO PARA SECCIÓN DE CONTACTO === */
.contacto-section-light {
  position: relative;
  width: 100%;
  text-align: center;
  padding: 3.5rem 2rem;
  background: linear-gradient(180deg, #f9fbff 0%, #eaf3ff 100%) !important;
  border-top: 1px solid rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  z-index: 0;
}