/* ============================================================
   ADVRTISE — Qualification questionnaire modal
   Relies on the CSS custom properties defined in index.html :root
   (--color-accent, --color-bg-card, --font-display, etc.)
   ============================================================ */

/* ---- Overlay (blurs the landing page behind) ---- */
.q-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 2rem);
  background: rgba(8, 12, 17, 0.6);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  backdrop-filter: blur(10px) saturate(115%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.45s,
              -webkit-backdrop-filter 0.45s ease,
              backdrop-filter 0.45s ease;
}
.q-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---- Modal card ---- */
.q-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: auto;
  background: #11171f;
  border: 1px solid var(--color-border-dark, rgba(255, 255, 255, 0.08));
  border-radius: 22px;
  box-shadow: 0 40px 120px -22px rgba(0, 0, 0, 0.78);
  padding: clamp(1.25rem, 3.5vw, 2rem);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.q-overlay.open .q-modal { opacity: 1; transform: none; }

/* ---- Top: progress + close ---- */
.q-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.q-progress { flex: 1; min-width: 0; }
.q-progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 9px;
}
.q-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  white-space: nowrap;
}
.q-step-pct {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.q-track {
  position: relative;
  height: 8px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--color-border-dark);
  overflow: hidden;
}
.q-fill {
  height: 100%;
  width: 0;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--color-accent), #ff6a2b);
  box-shadow: 0 0 14px rgba(239, 73, 2, 0.5);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.q-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-dark);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.q-close:hover {
  color: var(--color-text-primary);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}
.q-close svg { width: 16px; height: 16px; }

/* ---- Screen transitions ---- */
.q-body { position: relative; }
.q-screen { animation: qIn 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
.q-screen.back { animation: qInBack 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes qIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes qInBack {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}

/* ---- Back link ---- */
.q-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.95rem;
  transition: color 0.2s ease;
}
.q-back:hover { color: var(--color-text-primary); }
.q-back svg { width: 14px; height: 14px; }
.q-back-spacer { height: 0.95rem; }

/* ---- Question head ---- */
.q-question {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.q-question h2 {
  flex: 1;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.25rem, 3.1vw, 1.55rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.q-question h2 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
  font-size: 1.08em;
}
.q-help {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 1.15rem;
  text-wrap: pretty;
}

/* ---- Tip "?" ---- */
.q-tip { position: relative; flex: 0 0 auto; margin-top: 5px; }
.q-tip-btn {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid var(--color-border-dark);
  color: var(--color-text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.q-tip-btn:hover { color: var(--color-accent); border-color: var(--color-accent); }
.q-tip-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(270px, 72vw);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-dark);
  border-radius: 11px;
  padding: 0.75rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, visibility 0.2s, transform 0.2s ease;
  z-index: 6;
  text-align: left;
}
.q-tip.open .q-tip-pop,
.q-tip-btn:hover + .q-tip-pop,
.q-tip-btn:focus-visible + .q-tip-pop { opacity: 1; visibility: visible; transform: none; }

/* ---- Options ---- */
.q-options { display: flex; flex-direction: column; gap: 0.6rem; }
.q-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  padding: 0.95rem 1.05rem;
  min-height: 58px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-dark);
  border-radius: 13px;
  color: var(--color-text-primary);
  font-size: 0.97rem;
  line-height: 1.35;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.q-opt:hover {
  border-color: rgba(239, 73, 2, 0.4);
  background: rgba(239, 73, 2, 0.05);
  transform: translateY(-1px);
}
.q-opt-mark {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-border-dark);
  display: grid;
  place-items: center;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.q-opt.multi .q-opt-mark { border-radius: 7px; }
.q-opt-mark svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transform: scale(0.6);
  stroke: #fff;
  stroke-width: 3.5;
  fill: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.q-opt.sel { border-color: var(--color-accent); background: rgba(239, 73, 2, 0.1); }
.q-opt.sel .q-opt-mark { background: var(--color-accent); border-color: var(--color-accent); }
.q-opt.sel .q-opt-mark svg { opacity: 1; transform: none; }
.q-opt-label { flex: 1; }
.q-opt.suggested { border-color: rgba(239, 73, 2, 0.3); }
.q-opt-tag {
  flex: 0 0 auto;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-bg);
  border: 1px solid rgba(239, 73, 2, 0.25);
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ---- Actions / buttons ---- */
.q-actions { margin-top: 1.15rem; display: flex; flex-direction: column; gap: 0.55rem; }
.q-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 1rem;
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(239, 73, 2, 0.3);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.q-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(239, 73, 2, 0.4);
}
.q-btn:disabled { opacity: 0.38; cursor: not-allowed; transform: none; box-shadow: none; }
.q-btn svg { width: 18px; height: 18px; }

/* ---- Contact form ---- */
.q-fields { display: flex; flex-direction: column; gap: 0.7rem; }
.q-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
@media (max-width: 430px) { .q-row2 { grid-template-columns: 1fr; } }
.q-field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}
.q-field label .opt { color: rgba(138, 158, 174, 0.6); font-weight: 500; }
.q-field input {
  width: 100%;
  padding: 13px 14px;
  min-height: 50px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-dark);
  border-radius: 10px;
  color: var(--color-text-primary);
  font: inherit;
  font-size: 0.97rem;
  transition: border-color 0.2s ease;
}
.q-field input:focus { outline: none; border-color: var(--color-accent); }
.q-field input::placeholder { color: rgba(138, 158, 174, 0.55); }
.q-field.err input { border-color: #e5564b; }
.q-field .q-err-msg {
  display: none;
  font-size: 0.74rem;
  color: #e5564b;
  margin-top: 5px;
}
.q-field.err .q-err-msg { display: block; }
.q-privacy {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: var(--color-text-secondary);
  margin-top: 0.2rem;
}
.q-privacy svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--color-success); }
/* honeypot */
.q-hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* ---- Footer social proof ---- */
.q-footer {
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--color-border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}
.q-footer .q-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  flex: 0 0 auto;
}
.q-footer .q-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-success);
  animation: qPing 1.9s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes qPing {
  0% { transform: scale(1); opacity: 0.7; }
  80%, 100% { transform: scale(2.8); opacity: 0; }
}
.q-footer strong { color: var(--color-text-primary); font-weight: 700; }

/* ---- Checking screen ---- */
.q-checking { text-align: center; padding: 2.6rem 0 2.2rem; }
.q-spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  border: 3px solid rgba(239, 73, 2, 0.18);
  border-top-color: var(--color-accent);
  animation: qSpin 0.8s linear infinite;
}
@keyframes qSpin { to { transform: rotate(360deg); } }
.q-checking h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}
.q-checking h2 em { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--color-accent); }
.q-checking p { color: var(--color-text-secondary); font-size: 0.92rem; }

/* ============================================================
   ON-PAGE INVITE CARD (replaces the raw calendar in #booking)
   ============================================================ */
.q-invite {
  background: linear-gradient(180deg, #161d27, #0e141b);
  border: 1px solid rgba(239, 73, 2, 0.35);
  border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: 0 28px 70px rgba(12, 18, 25, 0.35);
}
.q-invite-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--color-accent-bg);
  border: 1px solid rgba(239, 73, 2, 0.25);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.1rem;
}
.q-invite-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}
.q-invite-title {
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}
.q-invite-title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
  font-size: 1.08em;
}
.q-invite-text {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 1.4rem;
  text-wrap: pretty;
}
.q-invite-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 0 1.6rem;
}
.q-invite-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.95rem;
  color: var(--color-text-primary);
}
.q-invite-check {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-accent-bg);
  border: 1px solid rgba(239, 73, 2, 0.3);
  display: grid;
  place-items: center;
}
.q-invite-check svg { width: 12px; height: 12px; stroke: var(--color-accent); stroke-width: 3; fill: none; }
.q-invite-cta { font-size: 1.02rem; }
.q-invite-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}
.q-invite-social strong { color: var(--color-text-primary); font-weight: 700; }
.q-invite-social .q-dot {
  position: relative;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  flex: 0 0 auto;
}
.q-invite-social .q-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-success);
  animation: qPing 1.9s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .q-overlay, .q-modal, .q-screen, .q-fill, .q-spinner,
  .q-footer .q-dot::after, .q-btn, .q-opt {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .q-modal { transform: none; }
}
