/* =========================================================
   BGSC DESIGN SYSTEM
   Archivo: bgsc.css
   Autor: Grupo BGSC – Ecosistema Global
   ========================================================= */

/* === VARIABLES DE COLOR === */
:root {
  --bgsc-primary: #b600ff;
  --bgsc-primary-dark: #8300b8;
  --bgsc-bg: #0b0b0f;
  --bgsc-text: #f5f5f7;
  --bgsc-card: #18181c;
  --bgsc-accent: #8c3fff;
  --bgsc-gray: #a1a1aa;
  --transition: 0.25s ease;
}

/* === RESETEO GENERAL === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: #f5f5f7;
  background-color: #0b0b0f;
  line-height: 1.6;
  overflow-x: hidden;
}

/* === CONTENEDORES === */
.container {
  width: min(90%, 1200px);
  margin-inline: auto;
  padding-block: 2rem;
}

.section {
  padding-block: 4rem;
}

.section--alt {
  background-color: #18181c;
}

/* === TIPOGRAFÍA === */
h1, h2, h3 {
  font-weight: 700;
  color: #f5f5f7;
}

h1.hero__title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

p {
  color: #a1a1aa;
  margin-bottom: 1rem;
}

/* === BOTONES === */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.btn--primary {
  background-color: #b600ff;
  color: #fff;
}

.btn--primary:hover {
  background-color: #8300b8;
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  border: 1px solid #b600ff;
  color: #b600ff;
}

.btn--ghost:hover {
  background: var(--bgsc-primary);
  color: #fff;
}

/* === ENCABEZADO / NAV === */
.header {
  background: rgba(15, 15, 20, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 999;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.brand img {
  height: 35px;
  border-radius: 8px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav a {
  color: #a1a1aa;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav a:hover,
.nav a.active {
  color: #b600ff;
}

@media (max-width: 768px) {
  .nav {
    display: none;
    flex-direction: column;
    background: var(--bgsc-card);
    position: absolute;
    right: 1rem;
    top: 4.5rem;
    padding: 1.2rem;
    border-radius: 10px;
  }
  .nav[data-open] {
    display: flex;
  }
}

/* === GRID / LAYOUT === */
.grid {
  display: grid;
  gap: 2rem;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* === TARJETAS === */
.card {
  background-color: #18181c;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
}

.card__title {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.card__text {
  color: #a1a1aa;
}

/* === LISTAS === */
ul.helper {
  list-style: none;
  margin-top: 1rem;
}

ul.helper li {
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  position: relative;
}

ul.helper li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #b600ff;
}

/* === FORMULARIOS === */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input, .textarea, .select {
  width: 100%;
  background-color: #18181c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.8rem;
  border-radius: 8px;
  font-size: 1rem;
}

.input:focus, .textarea:focus, .select:focus {
  border-color: #b600ff;
  outline: none;
}

/* === PIE DE PÁGINA === */
.footer {
  text-align: center;
  padding: 2rem 0;
  background-color: #18181c;
  color: #a1a1aa;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* === HERO Y ELEMENTOS DESTACADOS === */
.hero__title span {
  color: #b600ff;
}

.hero__subtitle {
  color: #a1a1aa;
  font-weight: 400;
}

/* === ANIMACIONES === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section, .card, .btn {
  animation: fadeInUp 0.6s ease forwards;
}
/* Botón Menú: oculto en desktop, visible en móvil */
[data-nav-toggle] { display: none; }

@media (max-width: 768px) {
  [data-nav-toggle] {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
  }
}

/* Nav: siempre visible en desktop, desplegable en móvil */
@media (min-width: 769px) {
  [data-nav] {
    display: flex !important;
    position: static;
    background: transparent;
    padding: 0;
  }
}

/* Sombra del header al hacer scroll (opcional si usas .scrolled en JS) */
.header.scrolled {
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: box-shadow .25s ease;
}

/* base */
.header { position: sticky; top:0; z-index: 1000; background: rgba(15,15,20,.95); }
.header__inner { display:flex; align-items:center; justify-content:space-between; padding:1rem 0; }

.nav { display:flex; gap:1.2rem; }
.nav a { color: var(--bgsc-gray); text-decoration:none; font-weight:500; }
.nav a:hover, .nav a.active { color: var(--bgsc-primary); }

/* botón hidden en desktop */
.nav-toggle { display:none; }

/* ====== MOBILE ====== */
@media (max-width: 768px) {
  /* mostrar botón y esconder menú por defecto */
  .nav-toggle { display:inline-flex; }
  .nav {
    display:none;                 /* oculto por defecto */
    position:absolute;
    right:1rem;
    top:4.25rem;
    background: var(--bgsc-card);
    border:1px solid rgba(255,255,255,.06);
    border-radius:10px;
    padding: .8rem;
    flex-direction:column;
    gap:.6rem;
    min-width: 220px;
  }
  /* cuando JS le ponga el atributo data-open → visible */
  .nav[data-open] { display:flex; }
}
