/* ═══════════════════════════════════════════════════════════════
   ADAPTIA — globals.css
   Variables, reset, tipografía, utilidades compartidas
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --blue:          #0EA5E9;
  --blue-dim:      #0284C7;
  --blue-deep:     #0369A1;
  --blue-glow:     rgba(14,165,233,0.20);
  --blue-glow-lg:  rgba(14,165,233,0.40);
  --blue-subtle:   rgba(14,165,233,0.08);
  --blue-border:   rgba(14,165,233,0.18);
  --bg-abyss:      #010810;
  --bg-deep:       #020c1b;
  --bg-mid:        #061424;
  --bg-surface:    #0a1e33;
  --bg-card:       #0d2340;
  --bg-card-hover: #112843;
  --text-primary:  #F0F6FF;
  --text-muted:    rgba(200,220,255,0.65);
  --text-faint:    rgba(200,220,255,0.35);
  --text-ghost:    rgba(200,220,255,0.15);
  --border:        rgba(14,165,233,0.14);
  --border-mid:    rgba(14,165,233,0.28);
  --border-bright: rgba(14,165,233,0.50);
  --shadow-card:   0 4px 32px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  --shadow-glow:   0 0 40px var(--blue-glow);
  --shadow-glow-lg:0 0 80px var(--blue-glow-lg);
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Outfit', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
  --space-2xl: 10rem;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7,  0, 0.84, 0);
  --ease-io:   cubic-bezier(0.45, 0, 0.55, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (pointer: fine) {
  body   { cursor: none; }
  button { cursor: none; }
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { border: none; background: none; font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.display-xl { font-size: clamp(3.5rem, 8vw, 7rem); font-weight: 900; line-height: 0.98; letter-spacing: -0.03em; }
.display-lg { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 700; letter-spacing: -0.02em; }
.display-md { font-size: clamp(1.8rem, 3.5vw, 3rem); font-weight: 700; }
.display-sm { font-size: clamp(1.3rem, 2.5vw, 2rem); font-weight: 700; }
.body-lg  { font-size: 1.125rem; line-height: 1.75; }
.body-md  { font-size: 1rem;     line-height: 1.7;  }
.body-sm  { font-size: 0.875rem; line-height: 1.65; }
.body-xs  { font-size: 0.75rem;  line-height: 1.5;  }
.label { font-family: var(--font-body); font-weight: 600; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.mono  { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); }

.container      { max-width: 1240px; margin: 0 auto; padding: 0 var(--space-md); }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 var(--space-md); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em;
  padding: 0.85rem 2rem; border-radius: var(--radius-md); border: 1px solid transparent;
  transition: all 0.28s var(--ease-out); position: relative; overflow: hidden; white-space: nowrap;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 50%);
  opacity: 0; transition: opacity 0.25s;
}
.btn:hover::before { opacity: 1; }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 2px 20px rgba(14,165,233,0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(14,165,233,0.45); }
.btn-primary:active { transform: translateY(1px) scale(0.98); box-shadow: 0 1px 8px rgba(14,165,233,0.20); }
.btn-ghost { background: rgba(255,255,255,0.1); color: var(--text-primary); border-color: rgba(255,255,255,0.25); }
.btn-ghost:hover { border-color: var(--blue); color: var(--text-primary); background: var(--blue-subtle); }
.btn-ghost:active { transform: translateY(1px) scale(0.98); }
.btn-sm { font-size: 0.8rem; padding: 0.6rem 1.25rem; border-radius: var(--radius-sm); }

/* Focus-visible accessibility ring */
.btn:focus-visible,
.nav-link:focus-visible,
.lang-btn:focus-visible,
.phase-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.28rem 0.7rem; border-radius: 4px; }
.chip-blue   { background: rgba(14,165,233,0.12); color: var(--blue); border: 1px solid rgba(14,165,233,0.25); }
.chip-purple { background: rgba(168,85,247,0.10); color: #c084fc; border: 1px solid rgba(168,85,247,0.25); }
.chip-teal   { background: rgba(20,184,166,0.10); color: #2dd4bf; border: 1px solid rgba(20,184,166,0.22); }

#a-cursor { position: fixed; width: 10px; height: 10px; background: var(--blue); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%,-50%); transition: width 0.2s var(--ease-out), height 0.2s var(--ease-out), background 0.2s; mix-blend-mode: screen; }
#a-cursor-ring { position: fixed; width: 38px; height: 38px; border: 1.5px solid rgba(14,165,233,0.45); border-radius: 50%; pointer-events: none; z-index: 9998; transform: translate(-50%,-50%); transition: width 0.22s var(--ease-out), height 0.22s var(--ease-out), border-color 0.2s; }
#a-cursor.hover { width: 18px; height: 18px; }
#a-cursor-ring.hover { width: 56px; height: 56px; border-color: rgba(14,165,233,0.7); }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out); }
.reveal.up    { transform: translateY(36px); }
.reveal.left  { transform: translateX(-36px); }
.reveal.right { transform: translateX(36px); }
.reveal.scale { transform: scale(0.92); }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.08s !important; }
.delay-2 { transition-delay: 0.16s !important; }
.delay-3 { transition-delay: 0.24s !important; }
.delay-4 { transition-delay: 0.32s !important; }
.delay-5 { transition-delay: 0.40s !important; }
.delay-6 { transition-delay: 0.48s !important; }

.nav-link.active { color: var(--text-primary) !important; }
.nav-link.active::after { width: 100% !important; }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: 0.025; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E"); background-size: 200px 200px; }
.divider { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--border-mid) 30%, var(--border-mid) 70%, transparent); }

@media (max-width: 768px) {
  :root { --space-lg: 2.5rem; --space-xl: 4.5rem; }
  .container { padding: 0 1.25rem; }
  .display-xl { font-size: clamp(2rem, 8vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; }
  .display-lg { font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.1; }
  .display-md { font-size: clamp(1.25rem, 4.5vw, 1.7rem); }
  .btn { padding: 0.75rem 1.5rem; font-size: 0.875rem; white-space: normal; text-align: center; }
  .btn-sm { padding: 0.55rem 1rem; font-size: 0.78rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .btn { padding: 0.7rem 1.25rem; font-size: 0.82rem; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ─── PRODUCT MODAL — base hidden state (injected on all pages) ─── */
/* Full visual styles live in cards.css; this ensures it is hidden on
   pages that do not load cards.css (metodologia, nosotros, contacto). */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 850;
  opacity: 0;
  pointer-events: none;
}

/* ─── FOOTER (injected on every page via navbar.js) ─── */
.footer {
  background: var(--bg-abyss);
  border-top: 1px solid var(--border);
  padding: 5rem 0 2.5rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.footer__logo {
  height: 94px;
  width: auto;
  display: block;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 6px rgba(0,71,171,0.4));
}
.footer__brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 1rem;
}
.footer__brand-name em {
  font-style: normal;
  color: var(--blue);
}
.footer__tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 260px;
  margin-bottom: 1.5rem;
}
.footer__social {
  display: flex; gap: 0.75rem;
}
.footer__social a {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.22s;
}
.footer__social a:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-subtle);
  transform: scale(1.1);
}
.footer__col h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
}
.footer__col ul li { margin-bottom: 0.65rem; }
.footer__col ul li a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__col ul li a:hover { color: var(--blue); }

.footer__bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__copy, .footer__location {
  font-size: 0.78rem;
  color: var(--text-faint);
}

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer__grid { grid-template-columns: 1fr; }
}
