@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,200;0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,300&display=swap');

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

:root {
  --purple: #C109D9;
  --purple-light: #BC6ECC;
  --bg: #070707;
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
}

/* .header-container — gestionado por el bloque <style> inline del index.html (position:fixed) */

.logo {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

html { scroll-behavior: smooth; }

body {
  /* background-color gestionado por el campo estelar en index.html */
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}

/* ── Gradient text ── */
.grad-text {
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass card ── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  transition: border-color .35s, box-shadow .35s;
}
.glass:hover {
  border-color: var(--purple);
  box-shadow: 0 0 28px rgba(193,9,217,.18), inset 0 0 0 1px rgba(193,9,217,.12);
}

/* ── Glow blob ── */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

/* ── Jellyfish glow ── */
.jelly-glow {
  filter: drop-shadow(0 0 60px rgba(193,9,217,.55)) drop-shadow(0 0 120px rgba(193,9,217,.3));
}

/* ── Header & Navbar (Nymera Glassmorphism) ── */
header,
.header-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  background-color: rgba(20, 5, 40, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.header-content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8%;
  width: 100%;
  position: relative;
}

.nav-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
}

.logo {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ── Gradient border button (WhatsApp / Contact) ── */
.btn-contact {
  position: relative;
  border-radius: 999px;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  font-weight: 500;
  color: #fff;
  padding: .5rem 1.3rem;
  cursor: pointer;
  border: none;
  transition: opacity .25s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-contact::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, #C109D9, #BC6ECC) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
}

.btn-contact:hover {
  opacity: .8;
}

/* ── Mobile menu ── */
#mob-menu {
  display: none;
}

#mob-menu.open {
  display: flex;
}

@media (max-width: 768px) {
  header,
  .header-container {
    height: 60px !important;
  }
  .header-content-wrapper {
    padding: 0 5% !important;
  }
  .logo img {
    max-height: 48px !important;
  }
}

/* ── Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: .7rem 1.8rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: .95rem;
  cursor: pointer;
  transition: opacity .25s, transform .2s, box-shadow .3s;
}
.btn-primary:hover {
  opacity: .88;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(193,9,217,.45);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .7rem 1.8rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: .95rem;
  cursor: pointer;
  transition: border-color .25s, box-shadow .25s, transform .2s;
}
.btn-outline:hover {
  border-color: var(--purple);
  box-shadow: 0 0 16px rgba(193,9,217,.25);
  transform: translateY(-2px);
}

/* ── Stat chips ── */
.stat-chip {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  text-align: center;
  transition: border-color .3s, box-shadow .3s;
}
.stat-chip:hover { border-color: var(--purple); box-shadow: 0 0 20px rgba(193,9,217,.2); }

/* ── Service card ── */
.service-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  overflow: hidden;
  transition: border-color .35s, box-shadow .35s, transform .3s;
}
.service-card:hover {
  border-color: var(--purple);
  box-shadow: 0 0 36px rgba(193,9,217,.2);
  transform: translateY(-4px);
}
.service-card .card-accent {
  position: absolute; bottom: 0; right: 0;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(193,9,217,.35) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ── Numbered steps ── */
.step-num {
  font-size: 3.5rem;
  font-weight: 300;
  color: rgba(255,255,255,.15);
  line-height: 1;
}

/* ── Client logos ── */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.logo-tile {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .9rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
  transition: border-color .3s, color .3s;
}
.logo-tile:hover { border-color: var(--purple); color: #fff; }

/* ── Testimonial card ── */
.testi-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  padding: 1.5rem;
  font-size: .85rem;
  line-height: 1.6;
  transition: border-color .3s, box-shadow .3s;
}
.testi-card:hover { border-color: var(--purple); box-shadow: 0 0 20px rgba(193,9,217,.15); }

/* ── FAQ accordion ── */
.faq-item {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .3s;
}
.faq-item.open { border-color: rgba(193,9,217,.4); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 400;
  background: transparent;
  color: #fff;
  width: 100%;
  text-align: left;
  border: none;
  font-family: 'DM Sans', sans-serif;
  transition: background .2s;
}
.faq-question:hover { background: rgba(255,255,255,.03); }
.faq-icon {
  width: 24px; height: 24px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .3s, border-color .3s, transform .3s;
  font-size: .8rem;
}
.faq-item.open .faq-icon {
  background: var(--purple);
  border-color: var(--purple);
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  font-size: .88rem;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  padding: 0 1.4rem;
}
.faq-item.open .faq-answer { max-height: 200px; padding-bottom: 1.2rem; }

/* ── "Who we work with" numbers ── */
.work-item { border-bottom: 1px solid rgba(255,255,255,.1); padding: 2rem 0; }
.work-item:last-child { border-bottom: none; }

/* ═══════════════════════════════════
   PORTFOLIO MULTIDIMENSIONAL v3 (Clean)
   ═══════════════════════════════════ */

/* ── Filter bar ── */
.pf-filters { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:2rem; justify-content: center; }
.pf-filter-btn {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.55);
  font-family:'DM Sans',sans-serif; font-size:.82rem; font-weight:500;
  padding:.5rem 1.2rem; border-radius:999px; cursor:pointer;
  transition: all .3s ease;
}
.pf-filter-btn:hover { border-color:rgba(193,9,217,.5); color:#fff; }
.pf-filter-btn.active {
  background:linear-gradient(135deg,#C109D9,#BC6ECC);
  border-color:transparent; color:#fff;
  box-shadow:0 0 18px rgba(193,9,217,.35);
}

/* ── Grid System ── */
.portfolio-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* ── Card Container ── */
.portfolio-card-new {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
}

.portfolio-card-new:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(193, 9, 217, 0.2);
  border-color: rgba(193, 9, 217, 0.5);
}

/* ── Media Header (Image/Video) ── */
.portfolio-media {
  width: 100%;
  height: 220px;
  background: #111;
  position: relative;
  overflow: hidden;
}

.portfolio-media img, .portfolio-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  transition: transform 0.5s;
}

.portfolio-card-new:hover .portfolio-media img {
  transform: scale(1.05);
}

.portfolio-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Card Content ── */
.portfolio-content {
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.portfolio-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.3;
}

.portfolio-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
}

/* ── Tags / Results ── */
.portfolio-result {
  font-size: 0.8rem;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.portfolio-result::before { content:'\2191'; font-size:.75rem; }

/* ── Buttons ── */
.portfolio-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-web-primary {
  background: var(--purple);
  color: #fff;
  border: none;
}
.btn-web-primary:hover {
  background: var(--purple-light);
  box-shadow: 0 0 15px rgba(193, 9, 217, 0.4);
}

.btn-outline-sec {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-outline-sec:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-icon {
  width: 16px;
  height: 16px;
}

/* ── Mobile menu ── */
#mobile-menu { display: none; }
#mobile-menu.open { display: flex; flex-direction: column; }

/* ── Scroll animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr !important; text-align: center; }
  .hero-grid .hero-img-col { order: -1; }
  .services-grid { grid-template-columns: 1fr !important; }
  .steps-grid { grid-template-columns: 1fr 1fr !important; }
  .faq-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr !important; text-align: center; }
}
@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════
   HERO SECTION SYSTEM
   ══════════════════════════════════════ */

/* 1. Body — background gestionado por campo estelar en index.html */
body {
    /* background-color: eliminado para no sobrescribir el campo estelar */
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
    padding-top: 0;
}

/* 2. El Astronauta (Recuperación y Posición) */
.astronaut-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45vw; /* Tamaño impactante */
    z-index: 5;
    pointer-events: none;
    display: block !important; /* Forzar visibilidad */
    filter: drop-shadow(0 0 50px rgba(193, 11, 217, 0.2));
}

/* 3. Navbar y Menú Central (Fixed Glassmorphism) */
header, .header-container {
    position: fixed;         /* Te sigue al hacer scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;            /* Altura ajustada */
    z-index: 1000;
    
    /* Efecto semitransparente (Glassmorphism) */
    background-color: rgba(10, 10, 10, 0.7); /* Gris casi negro con transparencia */
    backdrop-filter: blur(10px);             /* Desenfoque del fondo */
    -webkit-backdrop-filter: blur(10px);
    
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;            /* Mantiene sintonía con 'Digital' y boxes */
    width: 100%;
    position: relative;
}

.nav-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
}

.logo {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* 4. Título y Cuerpo (Ajuste de jerarquía) */
.hero-content {
    position: relative;
    z-index: 40;
    margin-top: 20px;
}

/* 3. Boxes de la Izquierda */
.left-stats-container {
    position: absolute;
    bottom: 8%;          /* Se mantiene abajo para crear balance */
    left: 8%;            /* Alineado con el logo y el título */
    display: flex;
    gap: 20px;
    z-index: 10;
}

.stat-box {
    background: white;
    border-radius: 30px;
    padding: 25px;
    width: 200px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
    color: #000;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-box .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    color: #C109D9;
    margin: 0;
}

.stat-box .stat-number span {
    font-size: 1rem;
    font-weight: 400;
    color: #9ca3af;
}

.stat-box .stat-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.stat-box .stat-desc {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.4;
    margin: 0;
}

/* 4. Box de la Derecha ($250K) */
.right-budget-card {
    position: absolute;
    top: 22%;            /* Bajado del tope para evitar choques con el header */
    right: 8%;           /* Mismo margen que los elementos de la izquierda */
    width: 240px;
    background: white;
    border-radius: 35px;
    padding: 30px;
    z-index: 50;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    color: #000;
}

.right-budget-card p {
    margin: 0;
}

/* 5. Título y Contenedor de Texto */
.hero-text-container {
    position: absolute;
    top: 15%;            /* Elevado desde el centro */
    left: 8%;            /* Margen lateral estético */
    z-index: 40;         /* Por encima del astronauta */
    max-width: 650px;    /* Ancho controlado para rotura de texto */
}

.hero-title {
    font-size: 6.5rem;
    line-height: 0.85;   /* Interlineado compacto */
    font-weight: 300;
    color: white;
    margin-bottom: 1.5rem;
    font-family: 'DM Sans', sans-serif;
}

/* ══════════════════════════════════════════
   CAMPO ESTELAR & MOTOR ESPACIAL 24on
   ══════════════════════════════════════════ */
#shooting-stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.star-field-bright {
    position: fixed;
    top: 0;
    left: 0;
    width: 2px;
    height: 2px;
    background: transparent;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}

/* Translucent Glassmorphism Cards */
.portfolio-card, .project-glass-card {
    background: rgba(18, 10, 31, 0.65) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(193, 9, 217, 0.20) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover, .project-glass-card:hover {
    background: rgba(24, 13, 42, 0.80) !important;
    border-color: rgba(193, 9, 217, 0.50) !important;
    box-shadow: 0 20px 50px -15px rgba(193, 9, 217, 0.35);
}

