/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Work Sans', sans-serif;
  background: #111;
  color: #fff;
  overflow-x: hidden;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 24px;
  background: rgba(20, 15, 5, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);

  z-index: 1000;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: #f5b942;
  text-shadow:
    0 0 10px rgba(255,215,0,0.7),
    0 0 25px rgba(255,185,56,0.5);
}

.logo img {
  height: 38px;
  object-fit: contain;
}

/* NAV */
nav {
  display: flex;
  gap: 28px;
}

nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

nav a:hover, nav a.active {
  color: #f59f0a;
  text-shadow: 0 0 8px rgba(245, 159, 10, 0.5);
}

/* LOGOUT BUTTON */
.logout-btn {
  background: #f59f0a;
  color: #111;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;

  transition: all 0.2s ease;
  flex-shrink: 0;
}

.logout-btn:hover {
  background: #ffb938;
  transform: translateY(-1px);
}

/* HERO VIDEO */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* VIDEO */
.hero-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;

  /* MUY IMPORTANTE */
  transform: none;
  will-change: transform;
}

/* OVERLAY */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  z-index: 1;
}

/* CONTENIDO */
.hero-content {
  position: relative;
  z-index: 2;
}

.welcome-greeting {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  color: #FFD700;
  margin-bottom: 20px;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  opacity: 0;
  animation: fadeInDown 1.5s forwards 0.5s;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-content p {
  font-size: 1.2rem;
  color: #ddd;
}

/* SCROLL CTA */
.scroll-cta {
  display: inline-block;
  margin-top: 35px;
  color: #FFD700;
  font-size: 28px;
  font-weight: 800;
  text-decoration: none;
  text-shadow:
    0 0 15px rgba(255,215,0,0.9),
    0 0 30px rgba(255,185,56,0.8),
    0 0 50px rgba(255,170,30,0.5);
  animation: ctaPulse 2.5s ease-in-out infinite;
  transition: all 0.3s;
}

.scroll-cta:hover {
  transform: scale(1.05);
  color: #ffffff;
  text-shadow:
    0 0 20px rgba(255,215,0,1),
    0 0 45px rgba(255,185,56,0.9),
    0 0 75px rgba(255,170,30,0.7);
}

.scroll-arrow {
  display: block;
  text-align: center;
  font-size: 42px;
  margin-top: 15px;
  animation: bounce 1.5s ease infinite;
}

@keyframes ctaPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ===== SECCIONES ===== */
.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  color: white;
}

.align-left {
  padding-left: 5vw;
  padding-right: 55vw;
  text-align: left;
}

.align-right {
  padding-left: 55vw;
  padding-right: 5vw;
  text-align: right;
}

.section h2 {
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 600;
  margin-bottom: 20px;
  color: #ffffff;

  /* 💥 esto hace que destaque */
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.text-wrap {
  position: relative;
  display: inline-block;
}

/* TEXTO ORIGINAL */
.reveal-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) scale(0.95) rotate(2deg);
  filter: blur(10px);

  background: linear-gradient(
    120deg,
    #ffffff,
    #e6e6e6,
    #ffffff,
    #d4d4d4,
    #ffffff
  );

  background-size: 200% auto;
  animation: shine 4s linear infinite;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  /* GLOW DINÁMICO */
  text-shadow:
    0 0 10px rgba(255,255,255,0.3),
    0 0 30px rgba(255,255,255,0.2),
    0 10px 40px rgba(0,0,0,0.8);
}

/* REFLEJO */
.text-wrap::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;

  transform: scaleY(-1);
  opacity: 0.25;

  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  filter: blur(3px);
}

/* DORADO PRO MÁS METÁLICO */
.reveal-text .highlight {
  background: linear-gradient(
    120deg,
    #d4af37 0%,
    #ffd700 25%,
    #ffffff 50%,
    #ffb938 75%,
    #b8860b 100%
  );

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.9),
    0 0 30px rgba(255, 215, 0, 0.7),
    0 0 60px rgba(255, 185, 56, 0.5);
}

/* BRILLO EN MOVIMIENTO */
@keyframes shine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.section p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 500px;
  line-height: 1.6;

  /* mejora lectura brutal */
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

/* HEADER ACTIONS & HAMBURGER */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: #ffd700;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Hamburger animations to 'X' */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    right: -280px; /* Hidden offscreen on the right */
    width: 280px;
    height: calc(100vh - 70px);
    background: rgba(15, 12, 10, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 215, 0, 0.25);
    padding: 40px 24px;
    gap: 20px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    z-index: 999;
  }

  nav.active {
    right: 0;
  }

  nav a {
    font-size: 16px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 8px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.05);
    display: flex;
    align-items: center;
    color: #ccc;
    transition: all 0.3s ease;
  }

  nav a:hover, nav a.active {
    background: rgba(255, 215, 0, 0.08);
    color: #f59f0a;
    border-bottom-color: rgba(255, 215, 0, 0.2);
    padding-left: 24px; /* subtle slide-in effect on hover */
  }

  /* LOGOUT VISIBLE EN MÓVIL */
  .header {
    padding: 0 14px;
    justify-content: space-between;
  }

  .logout-btn {
    font-size: 12px;
    padding: 7px 12px;
    flex-shrink: 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* ===== ZONA HISTORIA ===== */
.main {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: -100px; /* Overlap with hero for cool effect */
  padding-bottom: 100px;
}

.box {
  width: 90%;
  max-width: 600px;
  padding: 50px 40px;
  background: rgba(15, 12, 10, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.box h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: #fff;
  font-weight: 600;
}

textarea {
  width: 100%;
  height: 180px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 14px;
  padding: 20px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  resize: none;
  outline: none;
  margin-bottom: 25px;
  transition: 0.3s;
}

textarea:focus {
  border-color: #ffd700;
  background: rgba(255, 255, 255, 0.08);
}

#saveStory {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #ffb347, #ff8c00);
  color: #111;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.3s;
}

#saveStory:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 140, 0, 0.4);
}

#savedMessage {
  margin-top: 15px;
  color: #ffd700;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== FINAL CTA ===== */
.final-cta {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;

  text-align: center;
  padding: 40px 20px;

  position: relative;
  z-index: 2;
}

/* TITULO */
.final-cta h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;

  text-shadow:
    0 10px 30px rgba(0,0,0,0.9),
    0 5px 20px rgba(0,0,0,0.8);
}

/* BOTÓN */
.cta-btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 30px;

  font-weight: 600;
  text-decoration: none;

  background: linear-gradient(120deg, #ffd700, #ffb938);
  color: #111;

  box-shadow:
    0 10px 30px rgba(255,185,56,0.4),
    0 0 20px rgba(255,215,0,0.4);

  transition: all 0.3s ease;
}

/* HOVER */
.cta-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 15px 40px rgba(255,185,56,0.6),
    0 0 30px rgba(255,215,0,0.6);
}

/* COPYRIGHT */
.copyright {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}