:root {
  --bg: #03050a;
  --accent: #5b8cff;
  --accent-glow: rgba(91, 140, 255, 0.3);
  --text: #ffffff;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --glass: rgba(15, 23, 42, 0.6);
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* Safe areas */
  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
}

/* Reset básico */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.6;
  padding-top: max(0px, var(--safe-top));
}

/* BG visual */
.bg-visuals {
  position: fixed; width: 100vw; height: 100vh; top: 0; left: 0; z-index: -1;
  background:
    radial-gradient(circle at 50% 0%, #1e293b 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, #0f172a 0%, transparent 40%);
}
.bg-grid {
  position: absolute; width: 100%; height: 100%;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
  opacity: 0.2;
}

/* Animación */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px);} to { opacity: 1; transform: translateY(0);} }
.reveal { animation: fadeInUp 1s cubic-bezier(0.19, 1, 0.22, 1) forwards; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
  background: rgba(3, 5, 10, 0.8);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; height: 80px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: relative;
}
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: 1px; text-decoration: none; color: inherit; }
.logo-bg {
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
  padding: 8px 12px; border-radius: 10px; display: inline-block;
  box-shadow: 0 0 20px rgba(91, 140, 255, 0.6), 0 0 40px rgba(91, 140, 255, 0.3); transition: 0.3s ease;
}
.logo-bg:hover { box-shadow: 0 0 30px rgba(91, 140, 255, 0.8), 0 0 60px rgba(91, 140, 255, 0.5); transform: scale(1.05); }
.logo-img { height: 40px; width: auto; display: block; }

.nav-links { display: flex; gap: 20px; font-size: 14px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; transition: 0.3s; min-height: 20px; }
.nav-links a:hover { color: #fff; }

.lang-toggle {
  display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--border);
  padding: 3px; background: rgba(15, 23, 42, 0.8); font-size: 11px; cursor: pointer; position: relative;
  min-width: 84px; min-height: 36px;
}
.lang-toggle[aria-checked="true"] .lang-knob { transform: translateX(100%); }
.lang-option { width: 40px; text-align: center; z-index: 2; color: var(--muted); font-weight: 600; user-select: none; line-height: 30px; }
.lang-toggle[data-lang="en"] .lang-option.en, .lang-toggle[data-lang="pt"] .lang-option.pt { color: #fff; }
.lang-knob { position: absolute; top: 2px; left: 2px; width: 40px; height: 30px; border-radius: 999px; background: var(--accent); transition: transform 0.25s ease; z-index: 1; }

/* Mobile menu */
.nav-toggle { display: none; }
.menu { display: none; }

@media (max-width: 850px) {
  .nav-inner { flex-wrap: wrap; gap: 12px; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .nav-links { display: none !important; }
  
  /* REGLAS HEADER MÓVIL */
  .lang-toggle { order: 1; min-width: 70px; min-height: 28px; font-size: 9px; }
  .nav-toggle { 
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; 
    border-radius: 8px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); 
    color: #fff; cursor: pointer; order: 2; 
  }
  .lang-option { width: 33px; line-height: 22px; }
  .lang-knob { width: 33px; height: 24px; top: 1px; left: 1px; }
  .lang-toggle[aria-checked="true"] .lang-knob { transform: translateX(33px); }

  /* REGLAS ORDEN DE SECCIONES MÓVIL */
  .grid-2 { display: flex !important; flex-direction: column; gap: 30px; }
  #for-teams .grid-2:nth-of-type(2) { flex-direction: column-reverse; }
  #for-talent .grid-2:nth-of-type(1) { flex-direction: column-reverse; }

  .menu {
    display: block; position: absolute; top: 100%; right: 24px; left: 24px;
    background: rgba(3,5,10,0.95); border: 1px solid var(--border); border-radius: 12px; padding: 12px; backdrop-filter: blur(10px);
  }
  .menu a { display: block; padding: 12px 10px; color: var(--muted); text-decoration: none; border-radius: 8px; }
  .menu a:hover { background: rgba(255,255,255,0.06); color: #fff; }
  .menu[hidden] { display: none; }
}

@media (min-width: 851px) { .nav-toggle, .menu { display: none; } .nav-links { display: flex; } }

/* Hero y secciones */
.hero { padding: clamp(80px, 12vw, 140px) 24px clamp(48px, 8vw, 80px); text-align: center; }
.eyebrow {
  display: inline-block; padding: 6px 16px; border-radius: 100px;
  background: var(--accent-glow); border: 1px solid var(--accent);
  color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 30px;
}
.hero h1 {
  font-size: clamp(34px, 7vw, 64px); line-height: 1.1; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 24px;
  background: linear-gradient(to bottom, #fff 40%, #94a3b8 100%);
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  max-width: 900px; margin-left: auto; margin-right: auto;
}
.hero p { font-size: clamp(16px, 1.8vw, 18px); color: var(--muted); max-width: 750px; margin: 0 auto 40px; }

#hero, #vision, #for-teams, #for-talent, #how-it-works, #about, #join { scroll-margin-top: 80px; }
.section { padding: clamp(60px, 10vw, 100px) 24px; max-width: min(1100px, 100%); margin: 0 auto; }
.section h2 { font-size: 32px; margin-bottom: 24px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.glass-card { background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--border); padding: 40px; border-radius: 24px; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.glass-card:hover { border-color: var(--accent); background: rgba(91, 140, 255, 0.05); transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

.card-title { font-size: clamp(18px, 2.5vw, 20px); font-weight: 700; margin-bottom: 15px; color: #fff; }
.card-text { color: var(--muted); font-size: clamp(14px, 2vw, 15px); margin-bottom: 20px; }

/* Listas */
.feature-list { list-style: none; }
.feature-list li { margin-bottom: 12px; font-size: 14px; color: var(--muted); display: flex; align-items: flex-start; gap: 12px; }
.feature-list li::before { content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent); flex-shrink: 0; margin-top: 8px; }

/* Steps */
.steps-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.step-item { padding: 30px; border-top: 2px solid var(--border); transition: 0.3s; }
.step-item:hover { border-top-color: var(--accent); }
.step-label { color: var(--accent); font-weight: 800; font-size: 12px; text-transform: uppercase; margin-bottom: 15px; display: block; }
@media (max-width: 850px) { .steps-container { grid-template-columns: 1fr; } }

/* Founder */
.founder-box { display: grid; grid-template-columns: 1fr 350px; gap: 40px; align-items: center; margin-top: 40px; }
@media (max-width: 850px) { .founder-box { grid-template-columns: 1fr; } }
.quote-box { font-size: 16px; color: #fff; line-height: 1.8; position: relative; }
.quote-box::before { content: '\"'; font-size: 60px; position: absolute; top: -30px; left: -20px; opacity: 0.1; }

.legal-card { margin-top: 40px; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* Utilidades para imágenes */
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
.hero-shield {
  height: 120px; width: auto; margin-bottom: 20px; margin-left: auto; margin-right: auto;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
  padding: 16px; border-radius: 20px;
  box-shadow: 0 0 30px rgba(91, 140, 255, 0.5), 0 0 60px rgba(91, 140, 255, 0.3);
}
.btn { padding: 10px 22px; border-radius: 100px; font-weight: 700; font-size: 13px; cursor: pointer; transition: 0.4s; text-decoration: none; display: inline-block; }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: 0 10px 20px rgba(255,255,255,0.1); }
.btn-primary:hover { transform: scale(1.05); background: var(--accent); color: white; }
.btn-outline { border: 1px solid var(--border); color: var(--text); background: rgba(255,255,255,0.05); }
.btn-outline:hover { border-color: var(--accent); background: var(--accent-glow); }

/* ======= NUEVA SECCIÓN DE FOOTER PROFESIONAL ======= */
.footer-main { 
  border-top: 1px solid var(--border); 
  padding: 60px 24px; 
  margin-top: 40px; 
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.footer-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.logo-footer {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge-footer {
  background: #fff;
  padding: 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.logo-badge-footer img {
  height: 32px;
  width: auto;
  display: block;
}

.brand-name-footer {
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  font-size: 1.1rem;
}

.footer-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.footer-note {
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 0.85rem;
  max-width: 450px;
  line-height: 1.4;
}

.footer-links {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: 0.3s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: #fff;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease, color .2s ease;
}

.footer-social a:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(91, 140, 255, 0.12);
  color: var(--accent);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.footer-copy {
  color: var(--muted);
  font-size: 11px;
  margin-top: 15px;
  opacity: 0.8;
}

@media (max-width: 850px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 32px;
  }
  .footer-right {
    align-items: center;
    text-align: center;
  }
  .footer-social, .footer-links {
    justify-content: center;
  }
}

/* --- HISTORY PAGE SPECIFIC STYLES --- */

.history-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.member-card {
  display: flex;
  flex-direction: row; /* Horizontal en PC */
  align-items: center;
  gap: 40px;
  margin-bottom: 30px;
  text-align: left;
}

.member-photo {
  flex: 0 0 200px; /* Tamaño fijo para la foto en PC */
  width: 200px;
  height: 200px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--border);
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Evita que la foto se estire */
}

.role-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 10px 0;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
  .member-card {
    flex-direction: column; /* Vertical en móvil */
    text-align: center;
    padding: 30px 20px;
  }
  
  .member-photo {
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
    margin: 0 auto;
  }

  .member-info h3 {
    margin-top: 15px;
  }
}

/* --- MODAL CONTACT FORM STYLES --- */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px);
  display: none; justify-content: center; align-items: center; z-index: 2000; padding: 20px;
}
.modal-content {
  width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto;
  position: relative; animation: modalIn 0.3s ease-out;
}
.modal-close {
  position: absolute; top: 20px; right: 20px; background: none; border: none;
  color: var(--muted); font-size: 28px; cursor: pointer; z-index: 10;
}
.modal-close:hover { color: #fff; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px; background: rgba(255,255,255,0.05) !important;
  border: 1px solid var(--border); border-radius: 10px; color: #fff !important; font-family: inherit;
}
.form-group input:focus { border-color: var(--accent); outline: none; }
.form-row { display: grid; grid-template-columns: 100px 1fr; gap: 10px; }
.btn-submit { width: 100%; padding: 15px; background: var(--accent); color: #000; border: none; font-weight: 800; border-radius: 100px; cursor: pointer; margin-top: 10px; }
.success-message, .error-list { display: none; padding: 12px; border-radius: 10px; margin-bottom: 15px; text-align: center; font-size: 13px; }
.success-message { background: rgba(52, 211, 153, 0.1); border: 1px solid #34d399; color: #34d399; }
.error-list { background: rgba(239, 68, 68, 0.1); border: 1px solid #ef4444; color: #f87171; }

@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 600px) { .modal-overlay { padding: 0; align-items: flex-end; } .modal-content { border-radius: 24px 24px 0 0; max-height: 95vh; } }