/**
 * Phase 17 — Multi-step agent application (modern neural UI + hovers).
 */

.ar-apply {
  position: relative;
  padding: 1.35rem 0 2.75rem;
  overflow: clip;
  background:
    radial-gradient(ellipse 50% 35% at 85% 0%, rgba(201, 162, 39, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 45% 40% at 8% 10%, rgba(161, 34, 115, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, #faf9fc 0%, #fceef6 55%, #faf9fc 100%);
  color: #1a0033;
}

.ar-apply-shell {
  display: grid;
  gap: 0.85rem;
  max-width: 44rem;
}

/* —— Hero card —— */
.ar-apply-hero {
  position: relative;
  padding: 1.25rem 1.3rem 1.2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(161, 34, 115, 0.14);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 240, 252, 0.88) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 10px 0 rgba(161, 34, 115, 0.045),
    0 18px 36px rgba(61, 13, 40, 0.08);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.ar-apply-hero:hover {
  transform: translateY(-3px);
  border-color: rgba(161, 34, 115, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 12px 0 rgba(161, 34, 115, 0.06),
    0 24px 44px rgba(161, 34, 115, 0.14);
}

.ar-apply-hero__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 55% 70% at 100% 0%, rgba(161, 34, 115, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(201, 162, 39, 0.1) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.35s ease;
}

.ar-apply-hero:hover .ar-apply-hero__glow { opacity: 1; }

.ar-apply-hero__inner { position: relative; z-index: 1; }

.ar-apply-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  padding: 0.35rem 0.55rem 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(161, 34, 115, 0.07);
  border: 1px solid rgba(161, 34, 115, 0.12);
  font-size: 0.74rem;
  font-weight: 800;
  color: #A12273;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.ar-apply-hero:hover .ar-apply-kicker {
  background: rgba(161, 34, 115, 0.1);
  border-color: rgba(161, 34, 115, 0.22);
  transform: translateY(-1px);
}

.ar-apply-kicker__pulse {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #A12273;
  animation: ar-apply-pulse 1.8s ease-out infinite;
}

.ar-apply-kicker__chip {
  margin-inline-start: 0.15rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #A12273, #A12273);
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ar-apply-hero h1 {
  margin: 0 0 0.45rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.65rem, 3.4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #1a0033 0%, #A12273 55%, #2a0a3d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ar-apply-lead {
  margin: 0 0 0.85rem;
  max-width: 34rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #5c3a6e;
}

.ar-apply-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ar-apply-pills li {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #A12273;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(161, 34, 115, 0.14);
  box-shadow: 0 4px 12px rgba(61, 13, 40, 0.05);
  transition: transform 0.28s ease, background 0.28s ease, border-color 0.28s ease, color 0.28s ease;
}

.ar-apply-pills li:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, #A12273, #A12273);
  border-color: transparent;
  color: #fff;
}

/* —— AI guide bar —— */
.ar-apply-ai {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1.05rem;
  border-radius: 1.35rem;
  background: linear-gradient(125deg, #1a0033 0%, #A12273 52%, #2a0a3d 100%);
  color: rgba(250, 249, 252, 0.9);
  border: 1px solid rgba(201, 162, 39, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 14px 32px rgba(61, 13, 40, 0.2);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.ar-apply-ai:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 20px 40px rgba(161, 34, 115, 0.28);
}

.ar-apply-ai__bot {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.35s ease, background 0.35s ease;
}

.ar-apply-ai:hover .ar-apply-ai__bot {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.1);
}

.ar-apply-ai__ring {
  stroke-dasharray: 5 7;
  animation: ar-apply-orbit 10s linear infinite;
  transform-origin: 24px 24px;
}

.ar-apply-ai__eye { animation: ar-apply-blink 4s ease-in-out infinite; }

.ar-apply-ai__label {
  margin: 0 0 0.2rem;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e8d48b;
}

.ar-apply-ai__tip {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(250, 249, 252, 0.82);
}

.ar-apply-ai__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: #6ee7b7;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ar-apply-ai__status i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45);
  animation: ar-apply-pulse-green 1.8s ease-out infinite;
}

/* —— Steps —— */
.ar-apply-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ar-apply-steps li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5c3a6e;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(161, 34, 115, 0.1);
  box-shadow: 0 4px 14px rgba(61, 13, 40, 0.04);
  cursor: default;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

.ar-apply-steps li:hover {
  transform: translateY(-2px);
  border-color: rgba(161, 34, 115, 0.25);
  box-shadow: 0 10px 22px rgba(161, 34, 115, 0.12);
  color: #A12273;
}

.ar-apply-steps li span {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: rgba(161, 34, 115, 0.1);
  font-size: 0.72rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.ar-apply-steps li.is-active,
.ar-apply-steps li.is-done {
  color: #fff;
  background: linear-gradient(145deg, #A12273, #A12273);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(161, 34, 115, 0.22);
}

.ar-apply-steps li.is-active:hover,
.ar-apply-steps li.is-done:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(161, 34, 115, 0.28);
}

.ar-apply-steps li.is-active span,
.ar-apply-steps li.is-done span {
  background: rgba(232, 212, 139, 0.28);
  color: #e8d48b;
}

/* —— Form card —— */
.ar-apply-box {
  padding: 1.25rem 1.3rem 1.35rem;
  border-radius: 1.45rem;
  background: linear-gradient(165deg, #fff 0%, #f6f2fa 100%);
  border: 1px solid rgba(161, 34, 115, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 8px 0 rgba(161, 34, 115, 0.045),
    0 16px 32px rgba(61, 13, 40, 0.08);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.ar-apply-box:hover {
  transform: translateY(-2px);
  border-color: rgba(161, 34, 115, 0.2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 10px 0 rgba(161, 34, 115, 0.055),
    0 22px 40px rgba(161, 34, 115, 0.12);
}

.ar-apply-panel h2 {
  margin: 0 0 0.95rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.ar-apply-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.ar-apply-field span {
  font-size: 0.76rem;
  font-weight: 800;
  color: #A12273;
}

.ar-apply-field input,
.ar-apply-field select,
.ar-apply-field textarea {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.6rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(161, 34, 115, 0.14);
  background: rgba(255, 255, 255, 0.95);
  font: inherit;
  color: #1a0033;
  box-shadow: 0 2px 8px rgba(61, 13, 40, 0.03);
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.28s ease,
    background 0.28s ease;
}

.ar-apply-field textarea { min-height: 5.75rem; resize: vertical; }

.ar-apply-field input:hover,
.ar-apply-field select:hover,
.ar-apply-field textarea:hover {
  border-color: rgba(161, 34, 115, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(161, 34, 115, 0.08);
}

.ar-apply-field input:focus,
.ar-apply-field select:focus,
.ar-apply-field textarea:focus {
  outline: none;
  border-color: rgba(161, 34, 115, 0.5);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(161, 34, 115, 0.16), 0 10px 22px rgba(161, 34, 115, 0.1);
  transform: translateY(-1px);
}

.ar-apply-field.is-invalid input,
.ar-apply-field.is-invalid select,
.ar-apply-field.is-invalid textarea {
  border-color: #c026d3;
}

.ar-apply-field em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: #a21caf;
}

.ar-apply-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.ar-apply-nav .ar-btn {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease !important;
}

.ar-apply-nav .ar-btn:hover {
  transform: translateY(-3px);
}

.ar-apply-review {
  margin: 0 0 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 1.1rem;
  background: linear-gradient(160deg, rgba(161, 34, 115, 0.06), rgba(161, 34, 115, 0.04));
  border: 1px solid rgba(161, 34, 115, 0.16);
  font-size: 0.86rem;
  line-height: 1.7;
  color: #2a0a3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ar-apply-review:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(161, 34, 115, 0.1);
}

.ar-apply-review strong { color: #A12273; }

.ar-apply-note {
  margin: 0.85rem 0 0;
  font-size: 0.72rem;
  color: #5c3a6e;
}

.ar-apply-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ar-apply-form { position: relative; }

.ar-apply-form-msg,
.ar-apply-banner {
  margin: 0;
  padding: 0.75rem 0.95rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.ar-apply-form-msg.is-error,
.ar-apply-banner {
  background: rgba(192, 38, 211, 0.1);
  color: #86198f;
}

.ar-apply-form-msg.is-ok {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.ar-apply-success {
  text-align: center;
  padding: 2.1rem 1.35rem;
}

.ar-apply-success__icon {
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #34d399, #059669);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  animation: ar-apply-pulse 1.8s ease-out infinite;
}

.ar-apply-success h2 { margin: 0 0 0.4rem; }
.ar-apply-success p { margin: 0 0 1.1rem; color: #5c3a6e; }

.ar-apply-form.is-busy [data-ar-apply-submit] { opacity: 0.7; pointer-events: none; }

@keyframes ar-apply-pulse {
  0% { box-shadow: 0 0 0 0 rgba(161, 34, 115, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(161, 34, 115, 0); }
  100% { box-shadow: 0 0 0 0 rgba(161, 34, 115, 0); }
}

@keyframes ar-apply-pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes ar-apply-orbit { to { stroke-dashoffset: -120; } }

@keyframes ar-apply-blink {
  0%, 44%, 50%, 100% { transform: scaleY(1); }
  47% { transform: scaleY(0.12); }
}

@media (max-width: 640px) {
  .ar-apply-ai { grid-template-columns: auto 1fr; }
  .ar-apply-ai__status { grid-column: 1 / -1; justify-self: start; }
  .ar-apply-steps li { font-size: 0.72rem; }
  .ar-apply-steps li span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ar-apply-kicker__pulse,
  .ar-apply-ai__ring,
  .ar-apply-ai__eye,
  .ar-apply-ai__status i,
  .ar-apply-success__icon,
  .ar-apply-hero,
  .ar-apply-ai,
  .ar-apply-box,
  .ar-apply-steps li,
  .ar-apply-pills li,
  .ar-apply-field input,
  .ar-apply-field select,
  .ar-apply-field textarea {
    animation: none !important;
    transition: none !important;
  }
}
