/* ==============================
   VARIABLES & DESIGN TOKENS
   ============================== */
:root {
  /* Colors */
  --bg-color: #000000;
  --surface-color: rgba(255, 255, 255, 0.03);
  --surface-border: rgba(255, 255, 255, 0.08);
  --primary-color: #8B6508;      /* Deep Authentic Gold */
  --secondary-color: #B8860B;    /* Aged Gold */
  
  --text-main: #f8f9fa;
  --text-muted: #a0a0ab;
  
  /* Typography */
  --font-headings: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-spacing: 120px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 50% -20%, #0a0a0f 0%, #000000 100%);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Cinematic Grain Effect */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  z-index: 9999;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  border: 3px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* ==============================
   LAYOUT & UTILITIES
   ============================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.container-narrow {
  max-width: 800px;
}

.text-center {
  text-align: center;
}

section {
  padding: var(--section-spacing) 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 4rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(139, 101, 8, 0.3));
}

/* ==============================
   BUTTONS
   ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-headings);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #000;
  border: none;
  box-shadow: 0 10px 30px rgba(139, 101, 8, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(184, 134, 11, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 20px rgba(139, 101, 8, 0.3);
}

/* ==============================
   NAVIGATION
   ============================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  padding: 15px 0;
  border-bottom: 1px solid var(--surface-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 45px; /* Altura ideal para la navbar */
  width: auto;
  object-fit: contain;
  /* AJUSTE DE COLOR: Volvemos el logo dorado y le damos un resplandor elegante */
  filter: sepia(1) saturate(6) hue-rotate(5deg) brightness(0.9) drop-shadow(0 0 8px var(--primary-color));
  transition: var(--transition-smooth);
}

.logo-img:hover {
  filter: sepia(1) saturate(8) hue-rotate(10deg) brightness(1.2) drop-shadow(0 0 12px var(--secondary-color));
}

.logo-text {
  font-family: var(--font-headings);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.logo-text span {
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-family: var(--font-headings);
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--secondary-color);
}

/* MENU TOGGLE (HAMBURGER) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer; /* ESENCIAL PARA TOQUE EN MÓVIL */
  z-index: 10001;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--secondary-color);
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: #fff;
  transition: var(--transition-smooth);
  border-radius: 2px;
}

/* ==============================
   HERO SECTION
   ============================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-with-bg {
  background-image: url('assets/hero_background.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 8, 5, 0.88); /* Tono ambarino oscuro para integrar con el dorado */
  z-index: -2;
}

.hero-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(139, 101, 8, 0.15) 0%, rgba(184, 134, 11, 0.05) 40%, rgba(7,7,10,0) 70%);
  z-index: -1;
  filter: blur(50px);
}

.hero-content {
  max-width: 900px;
}

.badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(139, 101, 8, 0.15);
  border: 1px solid rgba(139, 101, 8, 0.4);
  color: var(--primary-color);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
}

.hero-title span {
  color: transparent;
  -webkit-text-stroke: 1px var(--text-main);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect fill='none' width='100' height='100'/%3E%3C/svg%3E");
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* ==============================
   FEATURES (PODER DE LA VIRALIDAD)
   ============================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: 0.5s;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--secondary-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(139, 101, 8, 0.1);
}

.feature-image-wrapper {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 30px;
  position: relative;
}

.feature-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
  filter: sepia(0.25) brightness(0.9) contrast(1.1) saturate(1.1);
}

.feature-card:hover .feature-image-wrapper img {
  transform: scale(1.05);
  filter: sepia(0.1) brightness(1) contrast(1.1) saturate(1.2);
}

.feature-number {
  font-family: var(--font-headings);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.05);
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 2;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
}

/* ==============================
   FÓRMULAS
   ============================== */
.formulas {
  position: relative;
}

.formulas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--surface-border), transparent);
}

.formulas-header {
  text-align: center;
  margin-bottom: 4rem;
}

.formulas-header p {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.formulas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

.formula-card {
  background: linear-gradient(180deg, var(--surface-color) 0%, rgba(255,255,255,0) 100%);
  border-top: 1px solid var(--surface-border);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  transition: var(--transition-smooth);
}

.formula-card:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
  transform: translateY(-5px);
}

.formula-image-wrapper {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--surface-border);
}

.formula-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
  filter: sepia(0.2) brightness(0.95) contrast(1.1);
}

.formula-card:hover .formula-image-wrapper img {
  transform: scale(1.05);
  filter: sepia(0.1) brightness(1) contrast(1.1);
}

.formula-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.formula-card p {
  color: var(--text-muted);
}

/* ==============================
   ABOUT
   ============================== */
.about {
  background: rgba(212, 175, 55, 0.02);
  position: relative;
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}

.about .section-title {
  margin-bottom: 2rem;
  text-align: center;
}

.about-text {
  font-size: 1.2rem;
  text-align: center;
  color: var(--text-muted);
}

.about-text strong {
  color: var(--text-main);
  font-size: 1.3rem;
}

.placeholder-image .initials {
  font-family: var(--font-headings);
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.2);
}

/* ==============================
   FORMS (AUDITORÍA)
   ============================== */
.auditoria-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  align-items: center;
}

@media (min-width: 900px) {
  .auditoria-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tech-form {
  background: var(--surface-color);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-family: var(--font-headings);
  margin-bottom: 10px;
  color: var(--secondary-color);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(139, 101, 8, 0.3);
}

.form-group textarea {
  resize: vertical;
}

.auditoria-image img {
  filter: sepia(0.3) brightness(0.8) contrast(1.2) saturate(1.2);
}

/* ==============================
   TEAM
   ============================== */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
}

.team-member {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  width: 100%;
}

@media (min-width: 768px) {
  .team-member {
    flex-direction: row;
    align-items: flex-start;
    gap: 60px;
  }
  
  .team-member:nth-child(even) {
    flex-direction: row-reverse;
  }
}

.member-image {
  flex-shrink: 0;
  width: 100%;
  max-width: 300px;
  height: 400px;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  position: relative;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.member-image.real-photo {
  border: 2px solid var(--surface-border);
  /* Filtro de lujo: Calidez de hora dorada, alto contraste y saturación selectiva */
  filter: brightness(1.05) contrast(1.15) sepia(0.4) saturate(1.3) hue-rotate(-5deg);
  box-shadow: 0 0 30px rgba(139, 101, 8, 0.3); /* Aura dorada profunda */
  position: relative;
  overflow: visible;
}

/* Efecto de 'Vanessa' - Oro Suave */
.team-member:nth-child(even) .real-photo {
  box-shadow: 0 0 30px rgba(184, 134, 11, 0.25); 
  border-color: rgba(184, 134, 11, 0.3);
}

.member-image.real-photo:hover {
  filter: brightness(1.1) contrast(1.2);
  transform: scale(1.02);
}

/* Resplandor Neón Intenso al Hover */
.member-image.real-photo:hover {
  box-shadow: 0 0 40px var(--primary-color), 0 0 10px var(--primary-color);
}

.team-member:nth-child(even) .real-photo:hover {
  box-shadow: 0 0 40px var(--secondary-color), 0 0 10px var(--secondary-color);
}

.member-info {
  flex: 1;
}

.member-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.member-info p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 100%;
}

/* ==============================
   FOOTER
   ============================== */
.footer {
  margin-top: var(--section-spacing);
  border-top: 1px solid var(--surface-border);
  position: relative;
  overflow: hidden;
}

.footer-cta {
  padding: 100px 20px;
  text-align: center;
  background: radial-gradient(circle at top, rgba(139, 101, 8, 0.08) 0%, transparent 70%);
}

.footer-cta h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.footer-cta p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.footer-bottom {
  padding: 30px 0;
  background: #000000;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-flex {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer-flex {
    flex-direction: row;
  }
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.social-links a:hover {
  color: var(--secondary-color);
}

/* ==============================
   ANIMATIONS & EFFECTS
   ============================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 991px) {
  :root {
    --section-spacing: 60px;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .nav-container {
    padding: 10px 0;
    justify-content: space-between;
    flex-direction: row !important;
    align-items: center;
  }

  .logo-img {
    height: 35px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 7, 10, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.77,0.2,0.05,1.0);
    transform: translateX(100%); /* EMPEZAR FUERA */
    visibility: hidden;
  }

  .nav-links.active {
    transform: translateX(0); /* ENTRAR */
    visibility: visible;
  }

  .nav-links a {
    font-size: 2rem;
    font-weight: 700;
  }

  .menu-toggle {
    display: flex !important;
  }

  .desktop-only {
    display: none !important;
  }

  /* Animación Hamburguesa */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: var(--secondary-color);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: var(--secondary-color);
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .member-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .footer-cta h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .logo-text {
    display: none; /* Dejamos solo el icono en pantallas muy pequeñas para ganar espacio */
  }
  
  .navbar {
    padding: 10px 0;
  }
}

