:root {
  --bg: #0c0d10;
  --bg-card: #15171d;
  --bg-input: #1e2027;
  --line: #2b2f38;
  --text: #eef1f5;
  --muted: #9aa3b2;
  --accent: #2b5cff;        /* azul eléctrico del logo */
  --accent-deep: #1840c8;   /* azul profundo para gradientes */
  --accent-2: #c4cad4;      /* plata / cromo del logo */
  --ok: #2ecc71;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* El atributo [hidden] debe ganarle a cualquier display de clase
   (ej. .btn { display: inline-block }), si no, los elementos ocultos
   por JS igual se mostrarían. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: "Montserrat", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

h1, h2, h3, h4, legend {
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.4px;
  font-weight: 700;
}

.noscript-warn {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 0.8rem;
}

/* ===== PANTALLA DE CARGA ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 40%, #161a24, #0c0d10 70%);
  transition: opacity 0.5s ease;
}
.loader[hidden] { display: none; }
.loader--done { opacity: 0; pointer-events: none; }
.loader__inner { text-align: center; width: min(420px, 90vw); }
.loader__brand {
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(120deg, #fff 15%, var(--accent-2) 50%, var(--accent) 92%);
  /* stylelint-disable-next-line property-no-vendor-prefix -- requerido para texto con gradiente en Safari/iOS */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.loader__msg {
  margin: 0.7rem 0 1.3rem;
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 1.3rem;
}
.loader__bar {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-input);
  overflow: hidden;
}
.loader__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: load-fill 3s ease forwards;
}

@keyframes load-fill {
  from { width: 0; }
  to { width: 100%; }
}

/* ===== Animaciones (vida) ===== */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
  0%, 100% { text-shadow: 0 4px 30px rgba(43, 92, 255, 0.45); }
  50% { text-shadow: 0 4px 45px rgba(196, 202, 212, 0.4); }
}

@keyframes float-bg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(43, 92, 255, 0.32), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(196, 202, 212, 0.12), transparent 45%),
    linear-gradient(160deg, #0c0d10, #161a24, #0c0d10);
  background-size: 100% 100%, 100% 100%, 200% 200%;
  animation: float-bg 18s ease infinite;
  text-align: center;
  padding: 3rem 1.25rem;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
}
.hero__overlay { max-width: 760px; position: relative; z-index: 1; }
.hero__content > * { animation: rise 0.7s ease both; }
.hero__content > :nth-child(2) { animation-delay: 0.08s; }
.hero__content > :nth-child(3) { animation-delay: 0.16s; }
.hero__content > :nth-child(4) { animation-delay: 0.24s; }
.hero__content > :nth-child(5) { animation-delay: 0.32s; }

.hero__badge {
  margin-bottom: 0.7rem;
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.hero__title {
  font-size: clamp(2.6rem, 9vw, 6rem);
  font-weight: 800;
  line-height: 1;
  margin: 0.5rem 0;
  background: linear-gradient(120deg, #fff 15%, var(--accent-2) 50%, var(--accent) 92%);
  /* stylelint-disable-next-line property-no-vendor-prefix -- requerido para texto con gradiente en Safari/iOS */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.7s ease both, glow 4s ease-in-out 0.7s infinite;
}
.hero__subtitle {
  color: var(--text);
  font-size: clamp(1.05rem, 3.4vw, 1.3rem);
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.hero__location {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
  justify-content: center;
}
.hero__maps {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(196, 202, 212, 0.4);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.hero__maps:hover { color: #fff; border-color: #fff; }
.hero__cta { font-size: 1.05rem; }

/* ===== BOTONES ===== */
.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius);
  padding: 0.85rem 1.6rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.25s ease, opacity 0.2s, filter 0.2s;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 10px 28px rgba(43, 92, 255, 0.4);
}
.btn--primary:hover { filter: brightness(1.1); box-shadow: 0 14px 34px rgba(43, 92, 255, 0.55); }
.btn--secondary { background: var(--bg-input); color: var(--text); border: 1px solid var(--line); }
.btn--block { width: 100%; margin-top: 1rem; padding: 1.05rem; font-size: 1.1rem; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== INFO (cards compactos, horizontales) ===== */
.info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
  max-width: 980px;
  margin: -2.5rem auto 0;
  padding: 0 1.25rem;
  position: relative;
  z-index: 2;
}
.info__card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1.1rem;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.info__card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
.info__icon {
  flex: 0 0 auto;
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(43, 92, 255, 0.16);
  color: var(--accent-2);
}
.info__icon svg { width: 22px; height: 22px; }
.info__text h3 { font-size: 1rem; margin-bottom: 0.1rem; }
.info__text p { color: var(--muted); font-size: 0.85rem; line-height: 1.4; }

/* ===== FORM ===== */
.form-section { max-width: 820px; margin: 4rem auto; padding: 0 1.25rem; }
.section-title { font-size: clamp(1.7rem, 5vw, 2.2rem); text-align: center; }
.form-code { text-align: center; color: var(--muted); margin: 0.5rem 0 2rem; }
.form-code strong { color: var(--accent-2); font-size: 1.1rem; }

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  animation: rise 0.6s ease both;
}
legend {
  padding: 0 0.6rem;
  font-size: 1.1rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 600;
  gap: 0.35rem;
}
input, select {
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.75rem 0.85rem;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 92, 255, 0.25);
}
input:invalid:not(:placeholder-shown) { border-color: var(--accent); }

/* ===== PAGO ===== */
.fee { font-size: 1.05rem; margin-bottom: 1rem; }
.fee strong { color: var(--accent-2); font-size: 1.4rem; }

.pay-box {
  background: var(--bg-input);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.2rem 1.5rem;
  margin-bottom: 1rem;
}
.pay-box h4 { color: var(--accent-2); margin-bottom: 0.6rem; }
.pay-box ol { padding-left: 1.2rem; display: grid; gap: 0.6rem; }
.pay-box .btn { margin-top: 0.4rem; }
.hl { color: #fff; background: rgba(43, 92, 255, 0.18); padding: 0.1rem 0.4rem; border-radius: 4px; }

.form-status { text-align: center; margin-top: 1rem; min-height: 1.4rem; font-weight: 600; }
.form-status.error { color: var(--accent); }
.form-status.ok { color: var(--ok); }

/* ===== FOOTER ===== */
.footer { text-align: center; padding: 2.5rem 1rem; border-top: 1px solid var(--line); color: var(--muted); }
.footer__small { font-size: 0.85rem; margin-top: 0.3rem; }

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 50;
}
/* El atributo [hidden] debe ganarle a display:flex, si no el modal
   aparecería al cargar la página. */
.modal[hidden] { display: none; }
.modal__card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem;
  text-align: center;
  max-width: 420px;
  animation: rise 0.35s ease both;
}
.modal__icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  border-radius: 50%;
  background: rgba(46, 204, 113, 0.14);
  color: var(--ok);
}
.modal__icon--blue { background: rgba(43, 92, 255, 0.16); color: var(--accent); }
.modal__icon--error { background: rgba(229, 72, 77, 0.16); color: #e5484d; }
.modal__icon svg { width: 36px; height: 36px; }
.modal__card h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.modal__card p { color: var(--muted); margin-bottom: 0.8rem; }
.modal__card strong { color: var(--accent-2); }
.modal__card .btn { margin-top: 0.8rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .hero { min-height: 72vh; padding: 2.5rem 1.1rem; }
  .info { margin-top: -2.5rem; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  fieldset { padding: 1.2rem; }
  .form-section { margin: 2.5rem auto; }
  .btn--block { padding: 0.95rem; }
}

/* Respeta a quien prefiere menos movimiento. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, .hero { transition: none !important; animation: none !important; }
  .btn:hover, .info__card:hover { transform: none; }
}

/* Foco visible por teclado (accesibilidad). */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
