/* ============================================
   POTENCIA - Landing Page
   Diseño Disruptivo & Moderno
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #ff4d00;
  --primary-glow: rgba(255, 77, 0, 0.4);
  --dark: #0a0a0a;
  --light: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--dark);
  color: var(--light);
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- Video Background --- */
.video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
}

.video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.75) 100%
  );
  backdrop-filter: blur(2px);
}

/* --- Main Layout --- */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
}

/* --- Header / Hero --- */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  padding-top: 2rem;
  animation: fadeInDown 1s ease-out;
}

.hero-logo {
  width: clamp(180px, 28vw, 340px);
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1) drop-shadow(0 0 30px var(--primary-glow));
  animation: float 4s ease-in-out infinite;
}

.hero p {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* --- Navigation Grid --- */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
  justify-items: center;
  animation: fadeInUp 1s ease-out 0.3s both;
}

/* --- Card Button --- */
.card-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: var(--light);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
  overflow: hidden;
  cursor: pointer;
}

.card-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 120%,
    var(--primary-glow) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity var(--transition);
}

.card-btn:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: var(--primary);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px var(--primary-glow);
}

.card-btn:hover::before {
  opacity: 1;
}

.card-btn:active {
  transform: translateY(-2px) scale(0.98);
}

.card-btn img {
  position: relative;
  z-index: 1;
  width: clamp(80px, 12vw, 140px);
  height: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1) drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
  transition: var(--transition);
}

.card-btn:hover img {
  transform: scale(1.1);
  filter: brightness(0) invert(1) drop-shadow(0 4px 25px var(--primary-glow));
}

.card-btn span {
  position: relative;
  z-index: 1;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: var(--transition);
}

.card-btn:hover span {
  opacity: 1;
  color: var(--primary);
}

/* Potencia card */
.nav-grid .card-btn.card-potencia {
  grid-column: auto;
}

/* --- Pulse Ring Animation on Hover --- */
.card-btn .pulse-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  opacity: 0;
  z-index: 0;
  transition: var(--transition);
}

.card-btn:hover .pulse-ring {
  animation: pulseRing 1.5s ease-out infinite;
}

/* --- Footer --- */
.footer {
  margin-top: 3rem;
  text-align: center;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.footer p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.1em;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes pulseRing {
  0% {
    transform: scale(0.5);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  .landing {
    padding: 2rem 1.5rem;
    justify-content: flex-start;
    padding-top: 4vh;
  }

  .hero {
    margin-bottom: 2.5rem;
    padding-top: 0;
  }

  .hero-logo {
    width: clamp(180px, 40vw, 300px);
    margin-bottom: 1.2rem;
  }

  .hero p {
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.7);
  }

  .nav-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
    max-width: 100%;
  }

  .card-btn {
    padding: 1.2rem 0.5rem;
    border-radius: 16px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .landing {
    padding: 1.5rem 1rem;
    justify-content: flex-start;
    padding-top: 3vh;
  }

  .hero {
    margin-bottom: 1.8rem;
    padding-top: 0;
  }

  .hero-logo {
    width: 60vw;
    max-width: 250px;
    margin-bottom: 0.8rem;
  }

  .hero p {
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    line-height: 1.5;
  }

  .nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    max-width: 340px;
    width: 100%;
  }

  .card-btn {
    padding: 1.3rem 1rem;
    border-radius: 16px;
  }

  .card-btn img {
    width: clamp(65px, 22vw, 100px);
    margin-bottom: 0;
  }

  .card-btn:hover {
    transform: translateY(-3px) scale(1.02);
  }

  .card-btn:active {
    transform: scale(0.97);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
  }

  /* Potencia solo, centrado en su fila */
  .nav-grid .card-btn.card-potencia {
    grid-column: 1 / -1;
    max-width: 60%;
    justify-self: center;
  }

  .footer {
    margin-top: 2rem;
  }

  .footer p {
    font-size: 0.65rem;
  }
}

/* ============================================
   SUBPAGE STYLES
   ============================================ */
.subpage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
}

.subpage-content {
  text-align: center;
  max-width: 700px;
  animation: fadeInUp 0.8s ease-out;
}

.subpage-logo {
  width: clamp(100px, 20vw, 200px);
  margin-bottom: 2rem;
  filter: brightness(0) invert(1) drop-shadow(0 0 40px var(--primary-glow));
  animation: float 4s ease-in-out infinite;
}

.subpage-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--light) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subpage-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

.back-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateX(-5px);
  box-shadow: 0 0 30px var(--primary-glow);
}

.back-btn svg {
  width: 18px;
  height: 18px;
  transition: var(--transition);
}

.back-btn:hover svg {
  transform: translateX(-3px);
}
