/*
  Hotfix visual para la exportacion estatica.
  Mantiene visible el contenido aunque las animaciones de Next/Framer tarden en hidratar.
*/
header[style*="opacity:0"],
main [style*="opacity:0"],
footer [style*="opacity:0"],
a[aria-label="Contactar por WhatsApp"][style*="opacity:0"] {
  opacity: 1 !important;
  transform: none !important;
}

/* Header mas legible y consistente en desktop y mobile. */
header.fixed {
  background: rgba(8, 8, 15, 0.86) !important;
  border-bottom: 1px solid rgba(46, 46, 90, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

header a[href="/"] img[src="/logo.png"] {
  width: 42px !important;
  height: 42px !important;
  object-fit: contain;
}

.codex-brand-label {
  margin-left: 10px;
  color: #f0f0f8;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.codex-brand-label span {
  display: block;
  margin-top: 3px;
  color: #9494b0;
  font-size: 11px;
  font-weight: 600;
}

/* Panel del menu movil: mas opaco para que no compita con el hero. */
.codex-mobile-menu-panel {
  background: rgba(8, 8, 15, 0.98) !important;
  border-bottom: 1px solid rgba(124, 58, 237, 0.28);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(18px);
}

/* Contraste de textos secundarios sin cambiar el estilo general. */
main p.text-\[\#9494B0\],
footer .text-\[\#9494B0\] {
  color: #b6b6ca !important;
}

main .text-\[\#5A5A78\],
footer .text-\[\#5A5A78\] {
  color: #83839c !important;
}

/* CTAs mas consistentes y faciles de tocar en mobile. */
main a[href="/contacto"],
header a[href="/contacto"],
.codex-mobile-menu-panel a[href="/contacto"] {
  min-height: 44px;
}

/* Bloque visual liviano para que la home muestre producto, no solo promesas. */
.codex-visual-proof {
  position: relative;
  overflow: hidden;
  padding: 72px 16px;
  background: linear-gradient(180deg, #08080f 0%, #0b1018 52%, #08080f 100%);
  border-top: 1px solid rgba(46, 46, 90, 0.72);
  border-bottom: 1px solid rgba(46, 46, 90, 0.72);
}

.codex-visual-proof-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}

.codex-visual-proof h2 {
  color: #f0f0f8;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: 0;
}

.codex-visual-proof p {
  margin-top: 18px;
  color: #b6b6ca;
  font-size: 17px;
  line-height: 1.7;
}

.codex-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.codex-proof-actions a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 750;
  text-decoration: none;
}

.codex-proof-actions a:first-child {
  color: #fff;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
}

.codex-proof-actions a:last-child {
  color: #f0f0f8;
  border: 1px solid #2e2e5a;
  background: #0f0f1a;
}

.codex-showcase {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  min-height: 360px;
}

.codex-browser-mock,
.codex-phone-mock,
.codex-metric-mock {
  border: 1px solid rgba(86, 86, 130, 0.72);
  background: rgba(15, 15, 26, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.codex-browser-mock {
  grid-row: span 2;
  border-radius: 18px;
  padding: 16px;
}

.codex-browser-top {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.codex-browser-top span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #5a5a78;
}

.codex-browser-hero {
  height: 98px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.72), rgba(6, 182, 212, 0.66));
}

.codex-browser-lines {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.codex-browser-lines span {
  height: 11px;
  border-radius: 999px;
  background: #252545;
}

.codex-browser-lines span:nth-child(2) {
  width: 72%;
}

.codex-browser-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.codex-browser-cards span {
  height: 86px;
  border-radius: 14px;
  background: #111827;
  border: 1px solid rgba(46, 46, 90, 0.8);
}

.codex-phone-mock {
  border-radius: 28px;
  padding: 18px 14px;
}

.codex-phone-mock strong,
.codex-metric-mock strong {
  display: block;
  color: #f0f0f8;
  font-size: 14px;
  margin-bottom: 14px;
}

.codex-phone-mock span {
  display: block;
  height: 42px;
  border-radius: 14px;
  margin-top: 10px;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.58), rgba(6, 182, 212, 0.42));
}

.codex-metric-mock {
  border-radius: 18px;
  padding: 18px;
}

.codex-metric-mock div {
  height: 9px;
  margin-top: 10px;
  border-radius: 999px;
  background: #252545;
}

.codex-metric-mock div:nth-child(3) {
  width: 76%;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
}

/* Footer terminado: reemplaza el footer exportado para evitar enlaces rotos tras la hidratacion. */
.codex-footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(46, 46, 90, 0.85);
  background:
    radial-gradient(circle at 18% 0%, rgba(124, 58, 237, 0.16), transparent 32%),
    radial-gradient(circle at 86% 16%, rgba(6, 182, 212, 0.11), transparent 28%),
    #08080f;
  color: #b6b6ca;
}

.codex-footer-glow {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(720px, 80vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #7c3aed, #06b6d4, transparent);
}

.codex-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.55fr) minmax(240px, 0.75fr);
  gap: 44px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 58px 16px 42px;
}

.codex-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #f0f0f8;
  text-decoration: none;
}

.codex-footer-logo img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.codex-footer-logo span {
  display: block;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: 0;
}

.codex-footer-logo small {
  display: block;
  margin-top: 5px;
  color: #9494b0;
  font-size: 12px;
  font-weight: 650;
}

.codex-footer-brand p {
  max-width: 460px;
  margin-top: 18px;
  color: #b6b6ca;
  font-size: 14px;
  line-height: 1.75;
}

.codex-footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.codex-footer-socials a {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(46, 46, 90, 0.9);
  border-radius: 12px;
  background: rgba(15, 15, 26, 0.92);
  color: #d8d8e8;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.codex-footer-socials a:hover {
  border-color: #7c3aed;
  color: #fff;
  transform: translateY(-2px);
}

.codex-footer-socials svg {
  width: 18px;
  height: 18px;
}

.codex-footer h2 {
  margin: 0 0 16px;
  color: #f0f0f8;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.codex-footer-nav,
.codex-footer-contact {
  display: grid;
  align-content: start;
  gap: 11px;
}

.codex-footer a {
  color: inherit;
  text-decoration: none;
}

.codex-footer-nav a {
  color: #b6b6ca;
  font-size: 14px;
  line-height: 1.5;
  transition: color 180ms ease;
}

.codex-footer-nav a:hover,
.codex-footer-bottom a:hover {
  color: #f0f0f8;
}

.codex-footer-contact a,
.codex-footer-contact p {
  margin: 0;
  padding: 12px 13px;
  border: 1px solid rgba(46, 46, 90, 0.72);
  border-radius: 12px;
  background: rgba(15, 15, 26, 0.58);
  color: #f0f0f8;
  font-size: 14px;
  line-height: 1.35;
}

.codex-footer-contact span {
  display: block;
  margin-bottom: 4px;
  color: #83839c;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.codex-footer-bottom {
  display: flex;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 30px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(46, 46, 90, 0.72);
  color: #83839c;
  font-size: 12px;
}

.codex-footer-bottom p {
  margin: 0;
}

.codex-footer-bottom div {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 767px) {
  header a[href="/"] img[src="/logo.png"] {
    width: 40px !important;
    height: 40px !important;
  }

  .codex-brand-label {
    display: inline-block;
    font-size: 13px;
  }

  main section:first-of-type {
    min-height: 92vh;
  }

  .codex-visual-proof {
    padding: 56px 16px;
  }

  .codex-visual-proof-inner,
  .codex-showcase {
    grid-template-columns: 1fr;
  }

  .codex-showcase {
    min-height: 0;
  }

  .codex-browser-mock {
    grid-row: auto;
  }

  .codex-footer-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 44px;
  }

  .codex-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .codex-footer-bottom div {
    gap: 14px;
  }
}
