/* ===== METABOLISMO - GLOBAL STYLES ===== */
/* Este archivo contiene estilos compartidos entre todas las páginas */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #13ec5b;
  --primary-dim: rgba(19,236,91,0.12);
  --primary-glow: rgba(19,236,91,0.35);
  --dark-bg: #0a1a0f;
  --dark-card: #111f16;
  --dark-card-hover: #162a1e;
  --text-light: #f0f4f1;
  --text-muted: rgba(240,244,241,0.55);
  --text-muted2: rgba(240,244,241,0.35);
  --border-dark: rgba(255,255,255,0.08);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--dark-bg);
  color: var(--text-light);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== NOISE GRAIN OVERLAY ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.4;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== SKIP LINK (Accessibility) ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--dark-bg);
  padding: 8px 16px;
  z-index: 9999;
  transition: top 0.3s;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ===== FOCUS STATES (Accessibility) ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { background: rgba(19,236,91,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(19,236,91,0.4); }

/* ===== HEADER SHARED STYLES ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 1rem 2rem;
  background: rgba(10,26,15,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-dark);
  transition: background 0.3s;
  padding-top: env(safe-area-inset-top, 1rem);
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a1a0f;
}
.logo-icon .material-symbols-outlined { font-size: 20px; font-weight: 400; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: -0.5px;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.25s;
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s;
}
nav a:hover { color: var(--primary); }
nav a:hover::after { width: 100%; }
nav .nav-sub { display: block; font-size: 0.7rem; opacity: 0.45; font-style: italic; margin-top: 1px; }

.btn-header {
  background: var(--primary);
  color: #0a1a0f;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 18px var(--primary-glow);
}
.btn-header:hover { transform: scale(1.05); box-shadow: 0 0 28px var(--primary-glow); }

/* ===== MOBILE MENU SHARED STYLES ===== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}
.mobile-menu-btn .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-light);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.mobile-menu-btn.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active .bar:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 26, 15, 0.95);
  backdrop-filter: blur(10px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-menu-overlay.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  transform: translateY(20px);
  transition: transform 0.3s;
}
.mobile-menu-overlay.active .mobile-nav { transform: translateY(0); }
.mobile-nav a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  text-align: center;
  transition: color 0.25s;
}
.mobile-nav a:hover { color: var(--primary); }
.mobile-nav .btn-header { margin-top: 1rem; font-size: 1rem; padding: 1rem 2rem; }

/* ===== FOOTER SHARED STYLES ===== */
footer {
  border-top: 1px solid var(--border-dark);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}
.footer-inner { max-width: 1160px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-dark);
}
.footer-brand .logo-wrap { margin-bottom: 14px; }
.footer-brand p { color: var(--text-muted); font-size: 0.82rem; line-height: 1.6; max-width: 300px; }

.footer-col h4 {
  font-size: 0.82rem; font-weight: 700; color: #fff;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { text-decoration: none; color: var(--text-muted); font-size: 0.83rem; transition: color 0.25s; }
.footer-col a:hover { color: var(--primary); }

.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.social-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dark);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.social-icon:hover { background: var(--primary-dim); color: var(--primary); border-color: rgba(19,236,91,0.3); }
.social-icon .material-symbols-outlined { font-size: 18px; }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.8rem; gap: 1rem; flex-wrap: wrap;
}
.footer-bottom p, .footer-bottom a { font-size: 0.75rem; color: var(--text-muted2); }
.footer-bottom a { text-decoration: none; transition: color 0.25s; }
.footer-bottom a:hover { color: var(--primary); }
.footer-bottom a.active { color: var(--primary); font-weight: 600; }
.footer-bottom .links { display: flex; gap: 1.5rem; }

.disclaimer {
  max-width: 1160px; margin: 0 auto; padding-top: 1.2rem;
  font-size: 0.7rem; color: var(--text-muted2); text-align: center; line-height: 1.5;
}

/* ===== MEDIA QUERIES SHARED ===== */
@media (max-width: 768px) {
  nav { display: none; }
  .mobile-menu-btn { display: block; }
  header { padding: 0.85rem 1.2rem; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
