/* Academic Teacher quote banner + popup (v1). All rules are scoped to .aq-* so the rest of the site is untouched. */
:root {
  --aq-orange: #f28a32;
  --aq-orange-hot: #f97316;
  --aq-gold: #e5ad2d;
  --aq-bg: #0b1324;
  --aq-text: #f8f6f0;
  --aq-muted: #b8c1cb;
  --aq-ink: #132034;
  --aq-border: rgba(255, 255, 255, 0.14);
  --aq-input: #f8f6f1;
  --aq-danger: #ffb4aa;
  --aq-radius-small: 12px;
  --aq-shadow: 0 32px 90px rgba(2, 8, 15, 0.48);
  --aq-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --aq-serif: Georgia, "Times New Roman", serif;
}

.aq-banner, .aq-banner *, .aq-popup, .aq-popup * { box-sizing: border-box; }
.aq-banner, .aq-popup { font-family: var(--aq-font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
:where(.aq-banner, .aq-popup) :where(button, input, select, textarea) { font: inherit; -webkit-tap-highlight-color: transparent; }
body.aq-popup-open { overflow: hidden; }

.aq-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.aq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Homepage hero slot: slightly wider than the old form, but kept inside the hero height */
.aq-hero-slot { width: 100%; max-width: 30rem !important; }

/* ---------- Banner ---------- */
.aq-banner {
  position: relative;
  padding: 22px 26px 18px;
  color: var(--aq-text);
  text-align: left;
  background: rgba(7, 17, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.aq-banner::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, transparent 8%, var(--aq-orange) 35%, var(--aq-orange) 65%, transparent 92%);
}

.aq-eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
  color: #ffd6b2; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}
.aq-eyebrow__dot { width: 8px; height: 8px; flex: 0 0 auto; background: var(--aq-orange); border-radius: 50%; box-shadow: 0 0 0 4px rgba(242, 138, 50, 0.15); }
.aq-eyebrow__check { width: 22px; height: 22px; display: inline-grid; place-items: center; color: var(--aq-bg); background: var(--aq-orange); border-radius: 50%; font-size: 0.78rem; }

.aq-banner h2, .aq-popup__step h2, .aq-popup__success h2 {
  margin: 0; color: #fff; font-family: var(--aq-serif); font-weight: 400;
  line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance;
}
.aq-banner h2 { font-size: clamp(1.5rem, 1.75vw, 1.6rem); }
.aq-banner .aq-eyebrow { margin-bottom: 8px; font-size: 0.72rem; }
.aq-banner__support { margin: 6px 0 0; color: var(--aq-muted); font-size: 0.92rem; line-height: 1.45; }

/* ---------- Early-bird offer callout (made to stand out) ---------- */
.aq-offer {
  display: flex; align-items: center; gap: 15px;
  margin: 20px 0 26px; padding: 16px 18px;
  color: #fff; font-size: 1.04rem; font-weight: 600; line-height: 1.45;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.26), rgba(229, 173, 45, 0.16));
  border: 1px solid rgba(249, 115, 22, 0.62);
  border-radius: 16px;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.09), 0 14px 34px rgba(249, 115, 22, 0.2);
}
.aq-offer__icon {
  flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center;
  color: #1a0f05; background: linear-gradient(135deg, #ffb35c, var(--aq-orange-hot));
  border-radius: 50%; font-size: 1.35rem; font-weight: 900;
  box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.2);
  animation: aq-pulse 2.6s ease-in-out infinite;
}
.aq-offer__badge {
  display: inline-block; margin: 0 2px; padding: 1px 10px;
  color: #1a1206; background: var(--aq-gold); border-radius: 999px;
  font-weight: 900; white-space: nowrap;
}
@keyframes aq-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.2); }
  50% { box-shadow: 0 0 0 11px rgba(249, 115, 22, 0.06); }
}

/* ---------- Fields ---------- */
.aq-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 15px; }
.aq-field--full { grid-column: 1 / -1; }
.aq-field label, .aq-choice-group legend {
  display: block; margin: 0 0 8px; color: #e2e5e8;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; line-height: 1.3; text-transform: uppercase;
}
.aq-field label span { color: var(--aq-orange); }
.aq-field input, .aq-field textarea, .aq-phone select {
  width: 100%; min-height: 56px; color: var(--aq-ink); background: var(--aq-input);
  border: 1px solid transparent; border-radius: var(--aq-radius-small); outline: none;
  font-size: 1rem; transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.aq-field input { padding: 0 16px; }
.aq-field textarea { min-height: 110px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.aq-field input::placeholder, .aq-field textarea::placeholder { color: #737b85; opacity: 1; }
.aq-field input:hover, .aq-field textarea:hover, .aq-phone select:hover { background: #fff; }
.aq-field input:focus, .aq-field textarea:focus, .aq-phone select:focus {
  background: #fff; border-color: var(--aq-orange); box-shadow: 0 0 0 4px rgba(242, 138, 50, 0.18);
}
.aq-field.aq-is-invalid input, .aq-field.aq-is-invalid textarea, .aq-field.aq-is-invalid .aq-phone,
.aq-choice-group.aq-is-invalid .aq-options { border-color: var(--aq-danger); }

.aq-phone {
  display: grid; grid-template-columns: 118px 1fr; overflow: hidden; background: var(--aq-input);
  border: 1px solid transparent; border-radius: var(--aq-radius-small);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.aq-phone:focus-within { border-color: var(--aq-orange); box-shadow: 0 0 0 4px rgba(242, 138, 50, 0.18); }
.aq-phone select, .aq-phone input, .aq-phone input:focus, .aq-phone select:focus { border: 0; border-radius: 0; box-shadow: none; }
.aq-phone select { padding: 0 10px; border-right: 1px solid #d8d7d1; cursor: pointer; }

.aq-field__help, .aq-field__error { margin: 6px 2px 0; font-size: 0.8rem; line-height: 1.35; }
.aq-field__help { color: #98a5b3; }
.aq-field__error { color: var(--aq-danger); }
.aq-field__error:empty { display: none; }
.aq-form__status { margin: 12px 0 0; color: var(--aq-danger); font-size: 0.88rem; }
.aq-form__status:empty { display: none; }
.aq-form__status a { color: #fff; text-decoration: underline; }

/* ---------- Buttons ---------- */
.aq-btn {
  width: 100%; min-height: 60px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border: 0; border-radius: 13px;
  font-size: 0.95rem; font-weight: 850; letter-spacing: 0.045em; line-height: 1.25; text-transform: uppercase;
  cursor: pointer; transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.aq-btn--primary { margin-top: 20px; color: #1a140f; background: var(--aq-orange); box-shadow: 0 10px 24px rgba(242, 138, 50, 0.24); }
.aq-btn--primary:hover:not(:disabled) { background: #ff9b46; box-shadow: 0 13px 30px rgba(242, 138, 50, 0.32); transform: translateY(-1px); }
.aq-btn:active:not(:disabled) { transform: translateY(1px); }
.aq-btn:focus-visible, .aq-option input:focus-visible + span, .aq-popup__close:focus-visible, .aq-link-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.aq-btn:disabled { opacity: 0.58; cursor: not-allowed; box-shadow: none; }
.aq-btn__loading { display: none; align-items: center; gap: 9px; }
.aq-btn.aq-is-loading .aq-btn__label { display: none; }
.aq-btn.aq-is-loading .aq-btn__loading { display: inline-flex; }
.aq-spinner { width: 16px; height: 16px; border: 2px solid rgba(26, 20, 15, 0.3); border-top-color: #1a140f; border-radius: 50%; animation: aq-spin 700ms linear infinite; }
@keyframes aq-spin { to { transform: rotate(360deg); } }
.aq-btn--secondary { max-width: 260px; margin: 26px auto 0; color: #fff; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--aq-border); }
.aq-btn--secondary:hover { background: rgba(255, 255, 255, 0.13); }
.aq-link-btn { display: block; margin: 14px auto 0; padding: 6px 10px; color: #c9d1da; background: none; border: 0; font-size: 0.9rem; text-decoration: underline; cursor: pointer; }
.aq-link-btn:hover { color: #fff; }

.aq-trust { margin-top: 15px; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; color: #bdc6d0; font-size: 0.78rem; }
.aq-trust span span { margin-right: 4px; color: #f0b37c; }
.aq-privacy { margin: 10px 0 0; color: #93a1b0; font-size: 0.74rem; text-align: center; }
.aq-privacy a { color: #d5dbe2; text-decoration: underline; }

/* ---------- Banner: compact sizing (popup keeps the larger sizes) ---------- */
.aq-banner .aq-offer { margin: 12px 0 14px; padding: 10px 12px; gap: 10px; font-size: 0.9rem; line-height: 1.4; border-radius: 14px; }
.aq-banner .aq-offer__icon { width: 32px; height: 32px; font-size: 0.95rem; }
.aq-banner .aq-offer__badge { padding: 0 8px; }
.aq-banner .aq-form__grid { gap: 10px 12px; }
.aq-banner .aq-field label { margin-bottom: 5px; font-size: 0.7rem; }
.aq-banner .aq-field input, .aq-banner .aq-phone select { min-height: 46px; font-size: 0.95rem; }
.aq-banner .aq-field input { padding: 0 14px; }
.aq-banner .aq-phone { grid-template-columns: 104px 1fr; }
.aq-banner .aq-field__help { margin-top: 4px; font-size: 0.74rem; }
.aq-banner .aq-btn--primary { min-height: 50px; margin-top: 14px; padding: 12px 20px; }
.aq-banner .aq-trust { margin-top: 10px; font-size: 0.74rem; }
.aq-banner .aq-privacy { margin-top: 6px; font-size: 0.7rem; }
/* Short desktop screens (e.g. 1366x768 laptops): keep the banner no taller than the hero copy */
@media (min-width: 1024px) and (max-height: 780px) {
  .aq-banner__support, .aq-banner .aq-field__help { display: none; }
  .aq-banner .aq-offer { margin-top: 10px; }
}

/* ---------- Popup ---------- */
.aq-popup[hidden] { display: none; }
.aq-popup {
  position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  text-align: left;
}
.aq-popup__backdrop { position: absolute; inset: 0; background: rgba(3, 9, 16, 0.72); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); opacity: 0; transition: opacity 240ms ease; }
.aq-popup__dialog {
  position: relative; width: min(100%, 640px); min-width: 0; max-width: 100%;
  max-height: min(900px, calc(100dvh - 40px)); overflow: auto; overscroll-behavior: contain;
  padding: clamp(28px, 4vw, 46px); color: var(--aq-text);
  background: radial-gradient(circle at 90% 0, rgba(45, 73, 104, 0.34), transparent 38%), rgba(9, 21, 37, 0.985);
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 24px; box-shadow: var(--aq-shadow);
  opacity: 0; transform: translateY(18px) scale(0.985);
  transition: opacity 240ms ease, transform 280ms cubic-bezier(0.2, 0.75, 0.2, 1);
  scrollbar-width: thin; scrollbar-color: #42556b transparent;
}
.aq-popup.aq-is-open .aq-popup__backdrop, .aq-popup.aq-is-open .aq-popup__dialog { opacity: 1; }
.aq-popup.aq-is-open .aq-popup__dialog { transform: translateY(0) scale(1); }
.aq-popup__close {
  position: absolute; z-index: 2; top: 16px; right: 16px; width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--aq-border); border-radius: 50%; cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}
.aq-popup__close:hover { background: rgba(255, 255, 255, 0.13); transform: rotate(3deg); }
.aq-popup__close span { position: absolute; width: 17px; height: 1.5px; background: #fff; border-radius: 2px; transform: rotate(45deg); }
.aq-popup__close span + span { transform: rotate(-45deg); }

.aq-popup__progress { width: calc(100% - 56px); margin-bottom: 26px; }
.aq-progress-copy { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; color: #8897a7; font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; }
.aq-progress-copy strong { color: #d9dee4; font-size: 0.77rem; }
.aq-progress-track { height: 3px; margin-top: 9px; overflow: hidden; background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
.aq-progress-track span { display: block; width: 33%; height: 100%; background: var(--aq-orange); transition: width 280ms ease; }

.aq-popup__step h2, .aq-popup__success h2 { padding-right: 12px; font-size: clamp(2.1rem, 6vw, 3.1rem); }
.aq-popup__lead { margin: 14px 0 0; color: #d1d6dc; font-size: 1.04rem; line-height: 1.55; }
.aq-popup__sublead { margin: 8px 0 0; color: #a3b0bd; font-size: 0.95rem; }
.aq-popup__form, .aq-qualification, .aq-brief { margin-top: 24px; }
.aq-popup__form > .aq-field + .aq-field, .aq-brief > .aq-field + .aq-field { margin-top: 14px; }
.aq-trust--popup { justify-content: space-between; }
.aq-popup__step.aq-is-entering, .aq-popup__success.aq-is-entering { animation: aq-step-in 260ms ease both; }
.aq-popup__step.aq-is-leaving { animation: aq-step-out 180ms ease both; }
@keyframes aq-step-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes aq-step-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-12px); } }

.aq-choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.aq-choice-group + .aq-choice-group { margin-top: 20px; }
.aq-options { display: flex; flex-wrap: wrap; gap: 9px; border: 1px solid transparent; border-radius: 10px; }
.aq-option { position: relative; cursor: pointer; }
.aq-option input { position: absolute; opacity: 0; pointer-events: none; }
.aq-option span {
  min-height: 46px; display: inline-flex; align-items: center; padding: 10px 16px; color: #d5dbe2;
  background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px;
  font-size: 0.9rem; font-weight: 650; line-height: 1.15;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.aq-option:hover span { color: #fff; border-color: rgba(242, 138, 50, 0.55); }
.aq-option input:checked + span { color: #24180e; background: var(--aq-orange); border-color: var(--aq-orange); transform: translateY(-1px); }
.aq-qualification__inputs { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 14px; margin-top: 22px; }
.aq-qualification__note { margin: 11px 0 0; color: #9ca9b6; font-size: 0.8rem; text-align: center; }

.aq-file {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px;
  color: #d5dbe2; background: rgba(255, 255, 255, 0.05); border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--aq-radius-small); cursor: pointer; transition: border-color 180ms ease, background 180ms ease;
}
.aq-file:hover { border-color: var(--aq-orange); background: rgba(242, 138, 50, 0.08); }
.aq-file__icon { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; color: #1a140f; background: var(--aq-orange); border-radius: 10px; font-weight: 900; }
.aq-file__text { font-size: 0.95rem; line-height: 1.35; word-break: break-word; }
.aq-file__text small { display: block; color: #93a1b0; font-size: 0.78rem; }
.aq-file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.aq-field label.aq-file { display: flex; margin: 0; color: #d5dbe2; font-size: 1rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.aq-field label.aq-file span { color: inherit; }
.aq-field label.aq-file .aq-file__icon { color: #1a140f; font-size: 1.2rem; }
.aq-field label.aq-file .aq-file__text small { color: #93a1b0; font-weight: 400; }

.aq-popup__success { padding: 40px 0 20px; text-align: center; }
.aq-popup__success .aq-eyebrow { justify-content: center; }
.aq-popup__success p:not(.aq-eyebrow) { max-width: 470px; margin: 18px auto 0; color: var(--aq-muted); font-size: 1.02rem; }
.aq-success-icon { width: 60px; height: 60px; display: grid; place-items: center; margin: 0 auto 18px; color: var(--aq-bg); background: var(--aq-orange); border-radius: 50%; font-size: 1.5rem; font-weight: 800; }

@media (max-width: 720px) {
  .aq-banner { padding: 26px 20px 22px; border-radius: 20px; }
  .aq-form__grid, .aq-qualification__inputs { grid-template-columns: 1fr; }
  .aq-offer { font-size: 0.98rem; padding: 14px 15px; gap: 12px; }
  .aq-offer__icon { width: 40px; height: 40px; font-size: 1.15rem; }
  .aq-popup { place-items: end center; padding: max(12px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); }
  .aq-popup__dialog {
    width: calc(100vw - 16px); max-width: calc(100vw - 16px);
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top))); overflow-x: hidden;
    padding: 28px 20px max(24px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; transform: translateY(26px);
  }
  .aq-popup__close { top: 13px; right: 13px; }
  .aq-popup__step h2, .aq-popup__success h2 { font-size: clamp(1.95rem, 9vw, 2.6rem); }
  .aq-trust--popup { justify-content: center; gap: 5px 12px; }
  .aq-options--deadline .aq-option { flex: 1 1 calc(50% - 5px); }
  .aq-options--deadline .aq-option span { width: 100%; justify-content: center; }
}
@media (max-width: 390px) {
  .aq-phone { grid-template-columns: 106px 1fr; }
  .aq-trust { gap: 5px 10px; }
  .aq-popup__dialog { padding-inline: 17px; }
  .aq-option span { padding-inline: 13px; font-size: 0.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .aq-banner *, .aq-popup, .aq-popup * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
