/* Arsitel App - Portal Visual Premium (Glassmorphism) */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

:root {
  --bg-0: #093637;
  --bg-1: #44a08d;
  --accent: #7be0c8;

  /* Opacidad fácil de ajustar para la imagen de fondo extra */
  --bg-photo-opacity: 0.30;

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.66);

  --stroke: rgba(255, 255, 255, 0.14);
  --stroke-2: rgba(255, 255, 255, 0.10);

  --shadow: rgba(0, 0, 0, 0.35);
  --radius-xl: 22px;
  --radius-lg: 16px;

  /* Set by JS for subtle highlight movement */
  --px: 50%;
  --py: 30%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans",
    sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(900px circle at var(--px) var(--py), rgba(123, 224, 200, 0.16), transparent 55%),
    radial-gradient(760px circle at 15% 85%, rgba(68, 160, 141, 0.10), transparent 62%),
    radial-gradient(900px circle at 50% 120%, rgba(0, 0, 0, 0.32), transparent 58%),
    linear-gradient(180deg, #071f1f 0%, var(--bg-0) 45%, #061818 100%);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Intro boot (premium, short, quiet) ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  pointer-events: none;

  opacity: 1;
  visibility: visible;
  transition: opacity 520ms ease, visibility 520ms ease;

  background: radial-gradient(900px circle at 50% 40%, rgba(123, 224, 200, 0.10), transparent 60%);
}

body.boot-done .boot {
  opacity: 0;
  visibility: hidden;
}

.boot-logo {
  width: clamp(170px, 24vw, 300px);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(123, 224, 200, 0.35));
  animation: boot-logo 1.2s ease-out both;
}

.boot-glow {
  position: absolute;
  width: min(720px, 70vw);
  height: min(720px, 70vw);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(123, 224, 200, 0.25), transparent 60%);
  filter: blur(24px);
  opacity: 0.8;
  animation: boot-glow 1.2s ease-out both;
}

@keyframes boot-logo {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    filter: blur(14px) drop-shadow(0 0 0 rgba(123, 224, 200, 0));
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px) drop-shadow(0 0 24px rgba(123, 224, 200, 0.45));
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scale(1.02);
    filter: blur(8px) drop-shadow(0 0 40px rgba(123, 224, 200, 0.18));
  }
}

@keyframes boot-glow {
  0% {
    transform: scale(0.96);
    opacity: 0.0;
  }
  45% {
    transform: scale(1);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.05);
    opacity: 0.0;
  }
}

/* ---------- Premium background ---------- */
.bg {
  position: fixed;
  inset: -30vh -20vw;
  pointer-events: none;
  z-index: -3;

  background:
    conic-gradient(
      from 210deg,
      rgba(123, 224, 200, 0.0),
      rgba(123, 224, 200, 0.12),
      rgba(68, 160, 141, 0.0),
      rgba(9, 54, 55, 0.0)
    );
  filter: blur(55px);
  opacity: 0.78;
}

/* Textura adicional de prueba (overlay atmosférico) */
.bg-photo {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index:-2;

  background-image: url("/app/img/fondoSaaSAppArsitel.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--bg-photo-opacity);

  /* Integra la imagen con el fondo sin convertirlo en wallpaper */
  mix-blend-mode: soft-light;
  filter: blur(12px) saturate(0.92) contrast(1.10);
}

/* Modo prueba: ver SOLO la imagen (sin interferencia del fondo abstracto) */
body.photo-only .bg {
  display: none !important;
}

body.photo-only .bg-network {
  display: none !important;
}

body.photo-only {
  /* Desactiva cualquier background del body para no dejar restos */
  background: #061818 !important;
}

body.photo-only .bg-photo {
  z-index: -1; /* queda debajo del glass */
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  filter: none !important;
}

body.photo-only .bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.bg-network {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  opacity: 0.72;
}

.bg-network path {
  animation: dash-move 10s linear infinite;
}

@keyframes dash-move {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 250;
  }
}

/* ---------- Layout / glass ---------- */
.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
}

body.booting .page {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(10px);
  pointer-events: none;
  transition: opacity 420ms ease, transform 650ms ease, filter 650ms ease;
}

body.boot-done .page {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
  pointer-events: auto;
  transition: opacity 420ms ease, transform 650ms ease, filter 650ms ease;
}

.glass {
  width: min(1000px, 100%);
  padding: clamp(22px, 4.6vw, 44px);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 30px 90px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(123, 224, 200, 0.06);

  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);

  position: relative;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
}

.glass::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(980px circle at var(--px) var(--py), rgba(123, 224, 200, 0.22), transparent 55%),
    radial-gradient(600px circle at 100% 0%, rgba(255, 255, 255, 0.09), transparent 50%);
  opacity: 0.98;
  z-index: 0;
  pointer-events: none; /* evita que la capa decorativa capture clicks */
}

.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      115deg,
      rgba(123, 224, 200, 0.0) 0%,
      rgba(123, 224, 200, 0.11) 42%,
      rgba(255, 255, 255, 0.055) 50%,
      rgba(123, 224, 200, 0.0) 75%
    );
  transform: translateX(-22%);
  opacity: 0.75;
  z-index: 0;
  pointer-events: none;

  animation: sheen 9s ease-in-out infinite;
}

@keyframes sheen {
  0% {
    transform: translateX(-26%);
  }
  50% {
    transform: translateX(12%);
  }
  100% {
    transform: translateX(-26%);
  }
}

.glass > * {
  position: relative;
  z-index: 1;
}

/* Feedback visual mínimo al interactuar */
.glass.pulse {
  animation: glass-pulse 650ms ease-out;
}

@keyframes glass-pulse {
  0% {
    box-shadow:
      0 30px 90px var(--shadow),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  55% {
    box-shadow:
      0 34px 105px rgba(0, 0, 0, 0.44),
      0 0 0 1px rgba(123, 224, 200, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }
  100% {
    box-shadow:
      0 30px 90px var(--shadow),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
}

/* ---------- Top / brand ---------- */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.brand-logo {
  height: 56px;
  width: auto;
  display: block;
  filter:
    drop-shadow(0 12px 28px rgba(0, 0, 0, 0.36))
    drop-shadow(0 0 18px rgba(123, 224, 200, 0.18));
}

.topbar-meta {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ---------- Typography ---------- */
.title {
  margin: 12px 0 10px;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 0 0 22px;
  max-width: 70ch;
  font-size: clamp(14px, 1.7vw, 16.5px);
  color: rgba(255, 255, 255, 0.70);
  font-weight: 450;
  line-height: 1.7;
}

/* Micro indicador de acceso seguro (sobrio y premium) */
.secure-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -10px;
  margin-bottom: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.01em;
}

.secure-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(123, 224, 200, 0.95);
  box-shadow: 0 0 0 6px rgba(123, 224, 200, 0.12), 0 0 34px rgba(123, 224, 200, 0.18);
  flex: 0 0 auto;
}

/* ---------- CTAs ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 650;
  letter-spacing: 0.01em;
  user-select: none;

  background: rgba(255, 255, 255, 0.055);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.btn:focus-visible {
  outline: 2px solid rgba(123, 224, 200, 0.65);
  outline-offset: 3px;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.06);
}

.btn-primary {
  background:
    radial-gradient(140px circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(135deg, rgba(123, 224, 200, 0.70), rgba(9, 54, 55, 0.18));
  border-color: rgba(123, 224, 200, 0.66);
  box-shadow:
    0 24px 75px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(123, 224, 200, 0.28),
    0 0 46px rgba(123, 224, 200, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: rgba(6, 35, 32, 0.92);
  font-weight: 820;
}

.btn-primary:hover {
  transform: translateY(-3px);
  border-color: rgba(123, 224, 200, 0.80);
  background:
    radial-gradient(160px circle at 18% 18%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(135deg, rgba(123, 224, 200, 0.78), rgba(9, 54, 55, 0.12));
  box-shadow:
    0 30px 96px rgba(0, 0, 0, 0.34),
    0 0 72px rgba(123, 224, 200, 0.26),
    0 0 0 1px rgba(123, 224, 200, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:focus-visible {
  outline: 2px solid rgba(123, 224, 200, 0.82);
  box-shadow:
    0 30px 96px rgba(0, 0, 0, 0.34),
    0 0 0 4px rgba(123, 224, 200, 0.18),
    0 0 70px rgba(123, 224, 200, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-secondary {
  background:
    radial-gradient(140px circle at 20% 20%, rgba(255, 255, 255, 0.10), transparent 55%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(68, 160, 141, 0.14));
  border-color: rgba(68, 160, 141, 0.36);
  color: rgba(255, 255, 255, 0.90);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background:
    radial-gradient(140px circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 55%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(68, 160, 141, 0.20));
  border-color: rgba(68, 160, 141, 0.55);
  box-shadow:
    0 26px 86px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(68, 160, 141, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-secondary:focus-visible {
  outline: 2px solid rgba(68, 160, 141, 0.62);
}

/* ---------- Products / modules ---------- */
.products {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.products-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.products-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.60);
  max-width: 60ch;
}

.products-sub {
  font-size: 12px;
  font-weight: 600;
  color: rgba(123, 224, 200, 0.70);
  white-space: nowrap;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  width: 100%;
  text-align: left;
  text-decoration: none; /* asegura estilo correcto en <a> */
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.18);

  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;

  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: linear-gradient(
    180deg,
    rgba(123, 224, 200, 0.0),
    rgba(123, 224, 200, 0.78),
    rgba(68, 160, 141, 0.0)
  );
  opacity: 0.85;
  pointer-events: none; /* evita que la decoración capture clicks */
}

.module-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.module-name {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.01em;
  font-size: 14.5px;
}

.module-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 450;
  line-height: 1.35;
}

.module-arrow {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 30px rgba(123, 224, 200, 0.08);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.module-arrow::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(123, 224, 200, 0.92);
  border-top: 2px solid rgba(123, 224, 200, 0.92);
  transform: rotate(45deg) translate(-1px, 1px);
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(123, 224, 200, 0.74);
  background: rgba(255, 255, 255, 0.075);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 22px 70px rgba(0, 0, 0, 0.25),
    0 0 64px rgba(123, 224, 200, 0.14);
}

.module-card:hover .module-arrow {
  border-color: rgba(123, 224, 200, 0.70);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(123, 224, 200, 0.24), 0 0 28px rgba(123, 224, 200, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.module-card:hover .module-meta {
  color: rgba(255, 255, 255, 0.72);
}

.module-card:focus-visible {
  outline: 2px solid rgba(123, 224, 200, 0.65);
  outline-offset: 3px;
}

/* ---------- Disabled modules (futuros) ---------- */
.module-card:disabled,
.module-card[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.48;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 42px rgba(0, 0, 0, 0.12);
}

.module-card:disabled:hover,
.module-card[aria-disabled="true"]:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 42px rgba(0, 0, 0, 0.12);
}

.module-card:disabled::before,
.module-card[aria-disabled="true"]::before {
  opacity: 0.25;
}

.module-card:disabled .module-meta,
.module-card[aria-disabled="true"] .module-meta {
  color: rgba(255, 255, 255, 0.50);
}

.module-card:disabled .module-arrow,
.module-card[aria-disabled="true"] .module-arrow {
  opacity: 0.35;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-meta {
    width: 100%;
    justify-content: space-between;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .products-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .bg-network path,
  .glass::after,
  .boot-logo,
  .boot-glow {
    animation: none !important;
  }

  .glass.pulse {
    animation: none !important;
  }

  .btn,
  .module-card,
  body.booting .page {
    transition: none !important;
  }
}

