/* AztroAgent+ — estilos base compartidos.
   Los tokens de marca vienen de https://aztrotech.mx/style.css; si el sitio cambia su
   paleta, se actualiza aquí y todas las pantallas la heredan. */

:root {
  /* Marca (idénticos al sitio) */
  --Cloud-Dancer: #f3f0eb;
  --Darkest-Hour: #201e1f;
  --Blue-Violet: #6b5fc8;
  --Blue-Violet-soft: #b3abe0;
  --Blue-Violet-light: #a79eea;
  --Exuberant-Orange: #fe582a;
  --Sun-Glare: #daff02;
  --muted: #77736f;
  --Gradient-Light: linear-gradient(90deg, var(--Blue-Violet), var(--Exuberant-Orange) 55%, var(--Sun-Glare));
  --Gradient-Light-rev: linear-gradient(90deg, var(--Sun-Glare), var(--Exuberant-Orange) 45%, var(--Blue-Violet));

  /* Derivados para la app */
  --Blue-Violet-hover: #5a4eb6;
  --Blue-Violet-tint: #e6e1f6;
  /* --muted no llega a contraste AA en texto pequeño sobre Cloud-Dancer; este sí (5.9:1) */
  --muted-strong: #5f5b57;
  --error: #b23a14;
  --surface: #ffffff;
  --line-light: #dcd7cf;
  --line-dark: rgba(243, 240, 235, .08);
  --glass-dark: rgba(243, 240, 235, .04);

  --radius: 16px;
  --radius-sm: 8px;
  --font-head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--Darkest-Hour);
  color: var(--Darkest-Hour);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input { font: inherit; }

:focus-visible { outline: 3px solid var(--Exuberant-Orange); outline-offset: 2px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--Cloud-Dancer);
  color: var(--Darkest-Hour);
  font-family: var(--font-head);
  font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Tipografía y acentos ---------- */

.grad {
  background: var(--Gradient-Light);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--Sun-Glare);
  color: var(--Darkest-Hour);
  font-family: var(--font-head);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* ---------- Botones (mismo lenguaje que el sitio: flecha en cuadro) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px 8px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--Blue-Violet);
  color: #fff;
  font-family: var(--font-head);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, transform .15s var(--ease-out), box-shadow .15s;
}
.btn::after {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: var(--Cloud-Dancer) center / 15px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b5fc8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E");
  transition: transform .2s var(--ease-out);
}
.btn:hover { background: var(--Blue-Violet-hover); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(107, 95, 200, .8); }
.btn:hover::after { transform: translateX(2px); }
.btn:active { transform: translateY(0); }
.btn--block { justify-content: space-between; width: 100%; }

/* Estado "enviando": el cuadro de la flecha se vuelve un spinner */
.btn.is-loading { cursor: progress; }
.btn.is-loading::after {
  width: 20px;
  height: 20px;
  margin: 5px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  background: none;
  animation: girar .7s linear infinite;
}
.btn:disabled { transform: none; box-shadow: none; }
.btn:disabled:not(.is-loading) { opacity: .6; cursor: not-allowed; }

@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Formularios ---------- */

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field label {
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 600;
}
.field__control { position: relative; }

.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid var(--Blue-Violet-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--Darkest-Hour);
  font-family: var(--font-head);
  /* 16px evita el zoom automático de iOS al enfocar */
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:hover { border-color: var(--Blue-Violet-light); }
.input:focus-visible {
  outline: none;
  border-color: var(--Blue-Violet);
  box-shadow: 0 0 0 4px rgba(107, 95, 200, .2);
}
.input[aria-invalid="true"] { border-color: var(--Exuberant-Orange); }
.input[aria-invalid="true"]:focus-visible { border-color: var(--Exuberant-Orange); box-shadow: 0 0 0 4px rgba(254, 88, 42, .18); }

.field__error,
.field__hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: .8125rem;
  font-weight: 600;
}
.field__error { color: var(--error); }
.field__error:empty { display: none; }
.field__hint { color: var(--muted-strong); }
.field__hint[hidden] { display: none; }
.field__error svg, .field__hint svg { flex: none; width: 15px; height: 15px; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9375rem;
  cursor: pointer;
}
.check input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--Blue-Violet); cursor: pointer; }

.form-feedback {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--Exuberant-Orange);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--error);
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 600;
  animation: aparecer .25s var(--ease-out);
}
.form-feedback[hidden] { display: none; }
.form-feedback svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

.link {
  color: var(--Blue-Violet);
  font-family: var(--font-head);
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--Gradient-Light) left bottom / 0 1.5px no-repeat;
  transition: background-size .2s;
}
.link:hover { background-size: 100% 1.5px; }

@keyframes aparecer {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
