/* ============================================================
   APPLICATION FORM MODAL — Protocolo DNA
   Glass + gold accents · multi-step funnel
   ============================================================ */

/* Reset bleed from global `section { padding: 140px 40px; max-width: 1320px; margin: 0 auto; }` */
.app-modal section.step { padding: 0; max-width: none; margin: 0; position: relative; }

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  isolation: isolate;
}
.app-modal[data-open="true"] { display: flex; }
.app-modal-veil {
  position: absolute; inset: 0;
  background: rgba(5,8,12,0.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  animation: fadeIn .35s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Card */
.app-modal-card {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 80px);
  background:
    radial-gradient(ellipse 80% 50% at 10% 90%, rgba(201,164,60,0.10), transparent 60%),
    rgba(13,18,25,0.85);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--line-glass-str);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 60px 120px -30px rgba(0,0,0,0.8),
    0 0 80px -20px rgba(201,164,60,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cardIn .55s cubic-bezier(.2,.7,.2,1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Close */
.app-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-glass);
  color: var(--t-60);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  z-index: 5;
}
.app-close:hover {
  background: rgba(255,255,255,0.09);
  color: var(--g-claro);
  border-color: var(--line-gold-strong);
}

/* Header */
.app-head {
  position: relative;
  padding: 22px 60px 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-glass);
}
.app-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--t-60);
}
.app-mark {
  display: inline-flex;
  height: 22px;
  width: auto;
  align-items: center; justify-content: center;
}
.app-mark img { height: 22px; width: auto; display: block; }

/* Progress — thin gold bar at the bottom of the header */
.app-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  transition: opacity .3s;
}
.app-progress .bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--grad-gold);
  transition: width .55s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 12px rgba(201,164,60,0.4);
}

/* Stage / steps */
.app-stage {
  position: relative;
  padding: 32px 32px 28px;
  overflow-y: auto;
  flex: 1;
}
.step {
  display: none;
  animation: stepIn .45s cubic-bezier(.2,.7,.2,1);
}
.step.is-active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.step-index {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--g-base);
  margin-bottom: 12px;
}
.step-q {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--t-100);
  margin: 0 0 22px;
  max-width: 24ch;
}
.step-q em.g-italic {
  font-style: italic;
  font-weight: 200;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step-lede {
  font-size: 14px;
  line-height: 1.55;
  color: var(--t-60);
  margin: -12px 0 22px;
  max-width: 52ch;
  font-weight: 400;
}

/* Options */
.opts {
  display: grid;
  gap: 10px;
}
.opts-2 { grid-template-columns: 1fr 1fr; }
.opts-1 { grid-template-columns: 1fr; }
.opt {
  position: relative;
  width: 100%;
  text-align: left;
  padding: 16px 22px;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--t-100);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line-glass);
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s, color .2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.opt::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 1.4px solid var(--t-40);
  border-top: 1.4px solid var(--t-40);
  transform: rotate(45deg);
  transition: border-color .2s, transform .2s;
}
.opt:hover {
  background: var(--glass-bg-h);
  border-color: var(--line-gold-strong);
  color: var(--g-claro);
}
.opt:hover::after {
  border-color: var(--g-claro);
  transform: rotate(45deg) translate(2px, -2px);
}
.opt-yes { text-align: center; justify-content: center; }
.opt-no  { text-align: center; justify-content: center; }
.opt-yes::after,
.opt-no::after { display: none; }
.opt-yes {
  background: rgba(201,164,60,0.08);
  border-color: var(--line-gold-strong);
  color: var(--g-claro);
}
.opt-yes:hover {
  background: rgba(201,164,60,0.15);
}
.opt-no:hover { color: var(--t-60); }

/* Form fields — reference style: glass pill + icon */
.app-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line-glass);
  border-radius: 999px;
  padding: 0 22px 0 18px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field:hover { background: rgba(255,255,255,0.06); }
.field:focus-within {
  border-color: var(--line-gold-strong);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 4px rgba(201,164,60,0.08);
}
.field-ico {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 22px; height: 22px;
  margin-right: 12px;
  color: var(--t-40);
  flex-shrink: 0;
}
.field:focus-within .field-ico { color: var(--g-claro); }
.field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 14px 0;
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 14.5px;
  color: var(--t-100);
  letter-spacing: -0.005em;
}
.field input::placeholder {
  color: var(--t-40);
  font-weight: 400;
}
.field.has-error {
  border-color: rgba(220,90,90,0.55);
  box-shadow: 0 0 0 4px rgba(220,90,90,0.08);
}

/* Submit button — matches reference image */
.app-submit {
  margin-top: 4px;
  position: relative;
  width: 100%;
  border: 1px solid var(--line-glass-str);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 999px;
  padding: 18px 28px;
  color: var(--t-100);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background .25s, border-color .25s, box-shadow .25s, transform .15s;
}
.app-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--grad-gold);
  opacity: 0;
  transition: opacity .25s;
  z-index: -1;
}
.app-submit:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--g-base);
  box-shadow: 0 8px 30px -10px rgba(201,164,60,0.4);
}
.app-submit:active { transform: translateY(1px); }
.app-submit.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.form-note {
  margin: 8px 0 0;
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-40);
  text-align: center;
}

/* Footer */
.app-foot {
  padding: 14px 28px;
  border-top: 1px solid var(--line-glass);
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--t-40);
  text-align: center;
}
.app-foot .sep {
  color: var(--g-base);
  margin: 0 4px;
}

/* Lock body scroll when open */
body.has-modal { overflow: hidden; }

/* Responsive */
@media (max-width: 560px) {
  .app-modal { padding: 16px; }
  .app-modal-card { border-radius: 14px; max-height: calc(100vh - 32px); }
  .app-head { padding: 18px 20px 14px; }
  .app-stage { padding: 26px 22px 22px; }
  .opts-2 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .step-q { font-size: 24px; max-width: none; }
  .app-foot { font-size: 9px; letter-spacing: 0.2em; }
}
