/* ==========================
   Reset básico y tipografía
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --bg-dark: #05080f;
  --bg-light: #f6f8ff;
  --primary: #5f7cff;
  --secondary: #6ee7b7;
  --accent: #ff8a5b;
  --text: #eef2ff;
  --subtext: #c8d2ff;
  --card: rgba(10, 14, 27, 0.75);
  --shadow: 0 20px 45px rgba(9, 11, 23, 0.4);
  --radius: 18px;
}
body {
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(165deg, #070a14 0%, #0d1330 60%, #02040a 100%);
  overflow-x: hidden;
  line-height: 1.6;
}
a {
  text-decoration: none;
  color: inherit;
}
.container {
  width: min(1200px, 94%);
  margin-inline: auto;
}
.section-wrapper {
  padding-block: 5rem;
}
h2 {
  font-size: clamp(2rem, 1.8rem + 1vw, 2.7rem);
  margin-bottom: 1.4rem;
  letter-spacing: 0.3px;
  color: #f4f6ff;
}
p {
  color: var(--subtext);
}

/* ==========================
   Navbar
========================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  transition: backdrop-filter 0.35s ease, padding 0.35s ease, background 0.35s ease;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  transition: padding 0.3s ease;
}
.header.active {
  background: rgba(12, 20, 35, 0.72);
  backdrop-filter: blur(12px);
  padding-block: 0.7rem;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
}
.nav {
  display: flex;
  gap: 1.5rem;
}
.nav-link {
  font-weight: 500;
  transition: color 0.25s ease, transform 0.25s ease;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.28rem;
  height: 2px;
  background: var(--secondary);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}
.nav-link:hover {
  transform: translateY(-2px);
  color: #fff;
}
.hamburger {
  display: none;
  width: 2rem;
  height: 1.35rem;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.hamburger span {
  height: 3px;
  border-radius: 999px;
  background: #edf2ff;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================
   Hero
========================== */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding-top: 3.7rem;
  position: relative;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(52, 95, 255, 0.5) 0%, rgba(120, 69, 255, 0.2) 40%, rgba(17, 215, 196, 0.2) 100%);
  opacity: 0.7;
  filter: blur(30px);
  pointer-events: none;
  animation: slideGradient 12s linear infinite;
}
@keyframes slideGradient {
  0% {
    transform: translateX(-20%);
  }
  50% {
    transform: translateX(20%);
  }
  100% {
    transform: translateX(-20%);
  }
}
.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2.5rem;
}
.hero-text {
  max-width: 560px;
  animation: fadeInUp 1.1s ease forwards;
  opacity: 0;
  transform: translateY(28px);
}
.eyebrow {
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 0.8rem;
}
.headline {
  font-size: clamp(2.5rem, 2.5rem + 1.2vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #fff, #f8f7ff 40%, #d9e5ff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.subheadline {
  font-size: clamp(1rem, 1.1rem + 0.3vw, 1.4rem);
  color: var(--subtext);
  max-width: 530px;
  margin-bottom: 1.5rem;
}
.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.88rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  box-shadow: 0 18px 40px rgba(32, 57, 126, 0.2);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #9a69ff);
  color: #fff;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #f8faff;
  border-color: rgba(114, 150, 255, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 22px 42px rgba(95, 124, 255, 0.45);
}
.btn-secondary:hover {
  transform: translateY(-2px) scale(1.03);
  background: rgba(255, 255, 255, 0.3);
}
.hero-illustration {
  display: grid;
  place-items: center;
}
.floating-card {
  width: min(340px, 100%);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 70px rgba(5, 7, 21, 0.28);
  animation: float 5s ease-in-out infinite;
}
.floating-card img {
  width: 100%;
  display: block;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.2deg); }
}

/* ==========================
   Secciones
========================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
}
.about-card,
.stats-card,
.canal-card,
.project-card,
.contact-form {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.1);
}
.about-card {
  padding: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.avatar-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(113, 155, 255, 0.35);
  box-shadow: 0 10px 26px rgba(5, 8, 23, 0.35);
}
.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-text h3 {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}
.stats-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.3rem;
}
.stats-card.single-column {
  grid-template-columns: 1fr;
}
.video-uploader {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  justify-content: center;
  min-height: 260px;
}
.video-uploader-info h3 {
  margin: 0;
  font-size: 1.5rem;
}



/*  
  .video-uploader-info p {
  margin: 0;
  color: var(--subtext);
}
#video-input {
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
}
#video-preview {
  width: 100%;
  border-radius: 1rem;
  background: #000;
  max-height: 300px;
}
*/







.stat-item h3 {
  font-size: 1.8rem;
  color: #fff;
}
.stat-item p {
  color: var(--subtext);
}
.canales-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
  perspective: 1200px;
}
.canales-grid > a {
  display: block;
  text-decoration: none;
  transform-style: preserve-3d;
}
.canal-card {
  padding: 1.4rem;
  text-align: center;
  border: 1px solid rgba(235, 243, 255, 0.15);
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
}
.canal-card i {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  color: var(--secondary);
  transform: translateZ(20px);
  display: inline-block;
}
.canal-card h3 {
  transform: translateZ(14px);
  display: block;
}
.canal-card p {
  transform: translateZ(10px);
  display: block;
}
.canal-card:hover {
  transform: rotateX(-10deg) rotateY(8deg) translateY(-10px) scale(1.04);
  box-shadow:
    8px 28px 52px rgba(25, 45, 112, 0.5),
    -3px 6px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
  perspective: 1200px;
}
.project-card {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
}
.project-card img {
  width: 100%;
  height: 290px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.project-card:hover {
  transform: rotateX(-6deg) rotateY(6deg) translateY(-8px);
  box-shadow:
    10px 30px 55px rgba(15, 28, 60, 0.55),
    -4px 8px 20px rgba(0, 0, 0, 0.3);
}
.project-card:hover img {
  transform: scale(1.08);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 28, 60, 0.2), rgba(4, 10, 29, 0.86));
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.project-card:hover .project-overlay {
  opacity: 1;
}
.project-overlay h3,
.project-overlay p {
  margin-bottom: .4rem;
}
.project-btn {
  align-self: flex-start;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--secondary), #52b0ff);
  padding: .56rem 1rem;
  color: #021a3a;
  font-weight: 700;
  transition: transform 0.3s ease;
}
.project-btn:hover {
  transform: translateY(-1px) scale(1.03);
}
.contact-form {
  max-width: 640px;
  margin-inline: auto;
  padding: 2rem;
  display: grid;
  gap: 1.1rem;
}
.field-group {
  position: relative;
}
.field-group input,
.field-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(142, 158, 255, 0.35);
  color: #fff;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.field-group label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: rgba(220, 230, 255, 0.8);
  pointer-events: none;
  transition: transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}
.field-group input:focus,
.field-group textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(113, 214, 192, 0.18);
}
.field-group input:focus + label,
.field-group textarea:focus + label,
.field-group input:not(:placeholder-shown) + label,
.field-group textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.45rem) scale(0.85);
  color: var(--secondary);
}
.btn-primary {
  width: min(220px, 100%);
  margin-top: 0.6rem;
}
.footer {
  padding: 1.7rem 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--subtext);
}

/* ==========================
   Animaciones y apariciones
========================== */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================
   Responsive
========================== */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-illustration { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .canales-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .nav { position: fixed; inset: 0; margin-top: 5rem; height: calc(100vh - 5rem); background: rgba(10, 16, 35, 0.98); flex-direction: column; align-items: center; justify-content: start; gap: 2rem; padding-top: 2rem; transform: translateX(110%); transition: transform 0.35s ease; }
  .nav.open { transform: translateX(0); }
  .hamburger { display: flex; }
  .nav-link { font-size: 1.2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .canales-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 5.2rem; }
}
