/*
 * AINA ONE Chat · Pantalla de acceso · Corrección P0
 * Auditoría forense visual 2026-10-24 (hallazgos M1, M2, M5, C1, C3, C4, C5, T1, T2, T3, T4, T5, N1, N2, N3)
 *
 * Hoja de corrección autocontenida: se carga DESPUÉS del bundle y gana por especificidad
 * (prefijo .aina-stage). No cambia textos ni lógica. Reversible: quitar el <link> la desactiva.
 * Cuando se integre en el código fuente, cada bloque indica qué regla de SignInScreen sustituye.
 *
 * Escala única (Fibonacci): 5 · 8 · 13 · 21 · 34 · 55 · 89 · 144
 */

.aina-stage {
  --g-sp-1: 5px; --g-sp-2: 8px; --g-sp-3: 13px; --g-sp-4: 21px; --g-sp-5: 34px; --g-sp-6: 55px;
  --g-r-1: 8px; --g-r-2: 13px; --g-r-3: 21px;
  --g-text-1: #f4f9ff; --g-text-2: #b4cbe3; --g-text-3: #8fa9c4;
  --g-accent: #86cdff; --g-on-accent: #030d1c; --g-genesis: #c9eaff;
  --g-line: rgba(134, 205, 255, .18);
  --g-ls-caps: .14em;
  --g-ease: cubic-bezier(.16, 1, .3, 1);
  height: 100dvh !important;
  max-height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
}

/* N2 · una sola rejilla: queda la del campo de marca (fija); fuera las dos duplicadas.
   El halo animado del escenario pasa a fijo para no inflar el área de scroll. */
.aina-stage::before,
.aina-stage .aina-gate::before,
.aina-stage .aina-brand-intro__grid { display: none; }
.aina-stage::after {
  position: fixed;
  background:
    radial-gradient(ellipse 64% 48% at 50% 0%, rgba(23, 73, 119, 0.52), transparent 58%),
    radial-gradient(ellipse 50% 44% at 100% 55%, rgba(23, 75, 152, 0.17), transparent 52%),
    radial-gradient(ellipse 48% 42% at 0% 75%, rgba(23, 73, 119, 0.19), transparent 50%),
    #030d1c;
}

/* N3 · el fondo deja de animarse en bucle: cada animación termina en su estado inicial */
.aina-stage::after,
.aina-stage .aina-brand-intro__nebula,
.aina-stage .aina-brand-intro__halo { animation-iteration-count: 2; }
.aina-stage .aina-brand-intro__orbit { animation-iteration-count: 1; }

/* N1 · la «baldosa» cuadrada pasa a ser dos anillos reales */
.aina-stage .aina-brand-intro__trace {
  width: auto; height: auto; inset: 0; border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(134, 205, 255, .16),
    0 0 0 21px rgba(134, 205, 255, .035),
    0 0 0 55px rgba(66, 125, 252, .025);
}

/* ---------- Escritorio (≥ 921 px): todo en un viewport, panel centrado con la marca, CERO SCROLL ---------- */
@media (min-width: 921px) {
  .aina-stage .aina-gate {
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
    padding-block: clamp(12px, 2vh, 28px) !important;
    grid-template-rows: auto 1fr;
    align-items: center;
    row-gap: clamp(8px, 1.6vh, 24px);
  }
  .aina-stage .aina-gate__splash-top { grid-column: 1; justify-content: flex-start; gap: var(--g-sp-5); }
  .aina-stage .aina-gate__brand { grid-column: 1; grid-row: 2; align-self: center; }
  .aina-stage .aina-gate__panel { grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: clamp(14px, 2.2vh, 28px) clamp(18px, 2.5vw, 32px); }
  .aina-stage .aina-gate__presence {
    width: clamp(64px, 10.5vh, 132px) !important;
    margin: 0 0 var(--g-sp-2) 0 !important;
  }
  .aina-stage .aina-gate__claim { font-size: clamp(28px, min(3.8vw, 6vh), 50px); line-height: 1.06; }
  .aina-stage .aina-gate__points { gap: clamp(8px, 1.2vh, 13px); margin-top: clamp(10px, 1.8vh, 21px); }
  .aina-stage .aina-gate__panel h1 { margin-top: clamp(8px, 1.4vh, 16px); font-size: clamp(22px, 2.8vh, 28px); }
  .aina-stage .aina-gate__lead { margin-top: clamp(6px, 1vh, 12px); line-height: 1.46; }
  .aina-stage .aina-gate__submit,
  .aina-stage .aina-gate__submit:not(:disabled) { min-height: clamp(44px, 5.5vh, 52px); margin-top: clamp(10px, 1.6vh, 18px); }
  .aina-stage .aina-gate__methods { margin-top: clamp(8px, 1.4vh, 16px); padding-top: clamp(6px, 1vh, 12px); }
  .aina-stage .aina-gate__privacy { margin-top: clamp(6px, 1vh, 10px); line-height: 1.42; }
  .aina-stage .aina-gate__legal { margin-top: clamp(6px, 1vh, 10px); padding-top: var(--g-sp-1); }
}

/* Escritorio bajo (≤ 760 px de alto, p. ej. 1280 × 720): margen vertical más corto */
@media (min-width: 921px) and (max-height: 760px) {
  .aina-stage .aina-gate { padding-block: 10px !important; }
  .aina-stage .aina-gate__presence { width: clamp(54px, 8.5vh, 84px) !important; }
  .aina-stage .aina-gate__points { margin-top: 8px; gap: 6px; }
  .aina-stage .aina-gate__lead { line-height: 1.38; }
}

/* ---------- Componentes ---------- */

/* C3 · píldora solo para el CTA: etiquetas planas con su punto de estado */
.aina-stage .aina-brand-intro__badge,
.aina-stage .aina-gate__eyebrow,
.aina-stage .aina-gate__mode {
  padding: 0; border: 0; background: none; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
/* T1 + T4 · etiquetas en mayúsculas: 13 px, un único tracking */
.aina-stage .aina-brand-intro__top span,
.aina-stage .aina-brand-intro__badge small,
.aina-stage .aina-gate__eyebrow,
.aina-stage .aina-gate__mode,
.aina-stage .aina-gate__methods > p {
  font-size: 13px; font-weight: 700; letter-spacing: var(--g-ls-caps);
}
.aina-stage .aina-brand-intro__top span { font-weight: 400; color: #c4cbd6; }
.aina-stage .aina-gate__eyebrow { margin-bottom: var(--g-sp-3); }

/* M5 · el chip de dominio repite el destino del CTA y la barra del navegador */
.aina-stage .aina-gate__host { display: none; }

/* T5 · énfasis en color sólido (sin degradado que parta «con|trol») */
.aina-stage .aina-gate__claim em {
  background: none; -webkit-text-fill-color: currentColor; color: var(--g-accent);
  text-shadow: none; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.aina-stage .aina-gate__panel h1 {
  background: none; -webkit-text-fill-color: currentColor; color: var(--g-text-1);
  margin-top: var(--g-sp-4);
}

/* C1 · las tres pruebas dejan de parecer botones: lista limpia, sin hover */
.aina-stage .aina-gate__points { gap: var(--g-sp-3); margin-top: var(--g-sp-5); width: min(700px, 100%); }
.aina-stage .aina-gate__points li {
  align-items: flex-start; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; transition: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.aina-stage .aina-gate__points li:hover { transform: none; }
.aina-stage .aina-gate__points li > i { width: 34px; height: 34px; border-radius: var(--g-r-1); box-shadow: none; }
.aina-stage .aina-gate__points li strong { font-size: 16px; font-weight: 700; letter-spacing: -.005em; line-height: 1.35; }
.aina-stage .aina-gate__points li small { font-size: 13px; line-height: 1.5; color: var(--g-text-2); }

/* Panel: radios y ritmo de la escala; blur solo aquí */
.aina-stage .aina-gate__panel { border-radius: var(--g-r-3); padding: clamp(21px, 3vw, 34px); }
.aina-stage .aina-gate__head { padding-bottom: var(--g-sp-3); }
.aina-stage .aina-gate__lead { margin-top: var(--g-sp-3); font-size: 16px; line-height: 1.6; }

/* C4 · CTA sólido, una sola regla de hover, glow solo en hover/foco */
.aina-stage .aina-gate__submit,
.aina-stage .aina-gate__submit:not(:disabled) {
  min-height: 52px; margin-top: var(--g-sp-4);
  border: 1px solid transparent;
  background: var(--g-accent); background-size: auto;
  color: var(--g-on-accent); font-size: 16px; font-weight: 700; letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(201, 234, 255, .6);
  transition: transform .233s var(--g-ease), box-shadow .233s var(--g-ease);
}
.aina-stage .aina-gate__submit:hover:not(:disabled),
.aina-stage .aina-gate__submit:focus-visible {
  transform: translateY(-1px); filter: none; background-position: 0 0;
  box-shadow: 0 0 34px -8px var(--g-accent), inset 0 1px 0 rgba(201, 234, 255, .6);
}

/* T1 + T3 · suelo de 13 px; la mono a 13 px para que «a» no se lea «o» */
.aina-stage .aina-gate__destination { margin-top: var(--g-sp-3); font-size: 13px; }
/* T3 · el dominio en AINTECH Text: en Mono la «a» de un piso se lee «o» («oino.oin-tech») */
.aina-stage .aina-gate__destination code { font-family: var(--aina-one-body, "AINTECH Text 12", system-ui, sans-serif); font-size: 13px; letter-spacing: .02em; }
.aina-stage .aina-gate__methods { margin-top: var(--g-sp-4); padding-top: var(--g-sp-3); }
/* T2 · solo pesos que existen en AINTECH Text 12 (400 / 700) */
.aina-stage .aina-gate__methods li { font-size: 13px; font-weight: 400; }
/* M5 · la nota de proveedores repite lo que dice la lista */
.aina-stage .aina-gate__methods small { display: none; }
.aina-stage .aina-gate__privacy { margin-top: var(--g-sp-3); font-size: 13px; line-height: 1.55; color: var(--g-text-2); }

/* C5 · enlaces legales de 24 px de alto y separadores que nunca quedan a principio de línea */
.aina-stage .aina-gate__legal {
  gap: 0 var(--g-sp-3); margin-top: var(--g-sp-3); padding-top: var(--g-sp-2); color: var(--g-text-3);
}
.aina-stage .aina-gate__legal > span { display: inline-flex; align-items: center; min-height: 24px; }
.aina-stage .aina-gate__legal > span > span[aria-hidden] { display: none; }
.aina-stage .aina-gate__legal > span:not(:last-child)::after { content: "·"; margin-left: var(--g-sp-3); color: var(--g-text-3); }
.aina-stage .aina-gate__legal a {
  display: inline-flex; align-items: center; min-height: 24px;
  font-size: 13px; font-weight: 400;
}

/* ---------- Móvil y tableta (≤ 920 px): la acción y toda la vista entran en 100dvh sin scroll ---------- */
@media (max-width: 920px) {
  .aina-stage .aina-gate {
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
    align-content: center;
    gap: clamp(6px, 1vh, 14px);
    padding: clamp(6px, 1.2vh, 16px) 16px;
  }
  .aina-stage .aina-gate__brand { display: contents; }
  .aina-stage .aina-gate__splash-top { order: 0; transform: scale(0.88); transform-origin: left center; margin-bottom: -4px; }
  .aina-stage .aina-gate__claim { order: 1; font-size: clamp(22px, min(6.2vw, 3.8vh), 34px); line-height: 1.06; max-width: 100%; }
  .aina-stage .aina-gate__panel { order: 2; padding: clamp(10px, 1.5vh, 18px) 15px; }
  .aina-stage .aina-gate__head { padding-bottom: 6px; }
  .aina-stage .aina-gate__points { display: none !important; }
  .aina-stage .aina-gate__eyebrow { display: none !important; }
  .aina-stage .aina-gate__presence { display: none !important; }
  .aina-stage .aina-gate__panel h1 { font-size: clamp(19px, 2.5vh, 24px); margin-top: clamp(4px, 0.8vh, 10px); }
  .aina-stage .aina-gate__lead { margin-top: clamp(4px, 0.6vh, 8px); font-size: 13.5px; line-height: 1.38; }
  .aina-stage .aina-gate__submit,
  .aina-stage .aina-gate__submit:not(:disabled) { min-height: 44px; margin-top: clamp(6px, 1.1vh, 12px); }
  .aina-stage .aina-gate__destination { margin-top: 4px; }
  .aina-stage .aina-gate__methods { margin-top: clamp(4px, 0.9vh, 10px); padding-top: clamp(4px, 0.8vh, 8px); }
  .aina-stage .aina-gate__privacy { margin-top: 4px; line-height: 1.34; }
  .aina-stage .aina-gate__legal { margin-top: 4px; padding-top: 4px; }
}
@media (max-width: 920px) and (max-height: 860px) {
  .aina-stage .aina-gate {
    gap: 5px !important;
    padding: 6px 14px !important;
  }
  .aina-stage .aina-gate__claim { font-size: 20px !important; line-height: 1.05 !important; }
  .aina-stage .aina-gate__panel { padding: 8px 14px !important; }
  .aina-stage .aina-gate__panel h1 { font-size: 18px !important; margin-top: 2px !important; }
  .aina-stage .aina-gate__lead { font-size: 13px !important; line-height: 1.32 !important; margin-top: 3px !important; }
  .aina-stage .aina-gate__submit,
  .aina-stage .aina-gate__submit:not(:disabled) { min-height: 40px !important; margin-top: 5px !important; }
  .aina-stage .aina-gate__methods { margin-top: 4px !important; padding-top: 4px !important; }
}
