/* ════════════════════════════════════════════════
   AMASHIFT — global.css
   Estilos base, variables y componentes compartidos
   ════════════════════════════════════════════════ */

/* ─── Custom Fonts ─── */
/* TAN Buster: coloca los archivos de fuente en /assets/fonts/
   y descomenta el bloque de abajo cuando los tengas disponibles.
@font-face {
  font-family: 'TAN Buster';
  src: url('../fonts/TANBuster.woff2') format('woff2'),
       url('../fonts/TANBuster.woff')  format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
*/

/* ─── CSS Variables ─── */
:root {
  /* Colores */
  --bg-primary:    #0B0C0E;
  --bg-secondary:  #111318;
  --bg-card:       #13151A;
  --accent:        #00A3FF;
  --accent-dim:    rgba(0, 163, 255, 0.12);
  --accent-glow:   rgba(0, 163, 255, 0.35);
  --text-primary:  #F0F2F5;
  --text-secondary:#7A8494;
  --text-muted:    #454D5C;
  --border:        rgba(255, 255, 255, 0.07);
  --border-accent: rgba(0, 163, 255, 0.22);

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Fuentes */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'TAN Buster', 'Inter', sans-serif;

  /* Transición base */
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

ul, ol { list-style: none; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar              { width: 5px; }
::-webkit-scrollbar-track        { background: var(--bg-primary); }
::-webkit-scrollbar-thumb        { background: rgba(0,163,255,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: var(--accent); }

/* ─── Contenedor ─── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ─── Utilidades ─── */
.text-accent { color: var(--accent); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}

/* ═══════════════════════════════════════════════
   SCROLL REVEAL — compartido por todas las páginas
   ═══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide desde la izquierda */
.slide-in-left.reveal {
  transform: translateX(-40px) translateY(0);
}
.slide-in-left.reveal.is-visible {
  transform: translateX(0) translateY(0);
}

/* Slide desde la derecha */
.slide-in-right.reveal {
  transform: translateX(40px) translateY(0);
}
.slide-in-right.reveal.is-visible {
  transform: translateX(0) translateY(0);
}

/* ═══════════════════════════════════════════════
   BOTONES — compartidos por todas las páginas
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.btn-primary {
  background: #00A3FF;
  color: #fff;
  border: none;
}
.btn-primary:hover  { background: #0099ee; }
.btn-primary:active { background: #0088d4; }

.btn-outline {
  background: transparent;
  color: #00A3FF;
  border: 1px solid rgba(0,163,255,0.28);
}
.btn-outline:hover {
  border-color: #00A3FF;
  background: rgba(0,163,255,0.06);
}

.btn-ghost {
  background: transparent;
  color: #A1A1AA;
  border: 1px solid #27272A;
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.15);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 0.9375rem;
}

/* ═══════════════════════════════════════════════
   ETIQUETAS DE SECCIÓN — compartidas
   ═══════════════════════════════════════════════ */
.section-label { margin-bottom: 18px; }
.section-label span {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  background: var(--accent-dim);
  padding: 6px 14px;
  border-radius: 100px;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 56px;
  line-height: 1.75;
}

/* ═══════════════════════════════════════════════
   HEADER (ama-header web component)
   ═══════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition),
              border-color var(--transition),
              backdrop-filter var(--transition);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(11, 12, 14, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo-img {
  display: block;
  height: 24px;
  width: auto;
  object-fit: contain;
  transition: opacity var(--transition);
}
.logo:hover .logo-img { opacity: 0.7; }

.logo-img--footer {
  height: 20px;
}

/* Desktop nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.nav-link.active { color: var(--text-primary); }

.btn-nav {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  margin-left: 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid #27272A;
  transition: color var(--transition), border-color var(--transition);
}
.btn-nav:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.18);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5.5px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  gap: 2px;
  background: rgba(11, 12, 14, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s ease, padding 0.38s ease;
}
.nav-mobile.open {
  max-height: 420px;
  padding: 14px 20px 24px;
}
.nav-mobile .nav-link {
  font-size: 0.95rem;
  padding: 12px 14px;
}
.nav-mobile .btn-nav {
  margin: 8px 0 0;
  justify-content: center;
}

/* ═══════════════════════════════════════════════
   FOOTER (ama-footer web component)
   ═══════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 64px;
  padding: 72px 0 56px;
}

.footer-brand-logo {
  display: block;
  height: 22px;
  width: auto;
  margin-bottom: 16px;
  opacity: 0.65;
  transition: opacity var(--transition);
}
.footer-brand-logo:hover { opacity: 1; }

.footer-tagline {
  font-size: 0.85rem;
  color: #52525B;
  line-height: 1.65;
  max-width: 240px;
}

.footer-col-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3F3F46;
  margin-bottom: 20px;
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.footer-col-links a {
  font-size: 0.875rem;
  color: #71717A;
  transition: color var(--transition);
}
.footer-col-links a:hover { color: #F0F2F5; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #1C1C1E;
  padding: 20px 0;
}
.footer-bottom p,
.footer-bottom a {
  font-size: 0.8rem;
  color: #3F3F46;
}
.footer-bottom a:hover { color: #71717A; }

/* ═══════════════════════════════════════════════
   RESPONSIVE — global
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle  { display: flex; }

  /* ── Footer móvil ── */
  .footer-grid {
    /* 1 col: tagline arriba, luego 2-col para los bloques de enlaces */
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    padding: 40px 20px 20px;
  }

  /* La marca (logo + tagline) ocupa la fila completa */
  .footer-brand {
    grid-column: 1 / -1;
    margin-bottom: 36px;        /* separación generosa hasta los bloques */
  }
  .footer-brand .footer-tagline {
    max-width: 100%;
    margin-top: 12px;
  }

  /* Las dos columnas de enlaces (Navegación / Social) en 2-col */
  .footer-col {
    padding: 0 12px 0 0;
  }

  .footer-col-title {
    margin-bottom: 14px;        /* más espacio título → enlaces */
  }

  /* Links más fáciles de pulsar con el dedo */
  .footer-col-links {
    gap: 0;
  }
  .footer-col-links a {
    display: block;
    line-height: 2.4;
    padding: 2px 0;
  }

  /* Barra de copyright */
  .footer-bottom {
    flex-direction: column;
    gap: 4px;
    text-align: center;
    border-top: 1px solid #1C1C1E;
    margin-top: 32px;
    padding: 20px 20px 24px;
  }
  .footer-bottom p,
  .footer-bottom a {
    font-size: 0.78rem;
    color: #2E2E32;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    /* En pantallas muy pequeñas colapsamos a 1 columna */
    grid-template-columns: 1fr;
    padding: 40px 20px 16px;
  }

  .footer-brand { margin-bottom: 28px; }

  .footer-col { padding: 0; margin-bottom: 28px; }

  .footer-bottom { margin-top: 8px; padding: 16px 20px 24px; }
}
