/* ── Pilot Zone Gate Modal ── */

.zone-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000; /* above .navbar (z-index: 9999 in custom.css) */
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.zone-overlay.open {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .zone-overlay,
  .zone-modal .zg-screen,
  .zg-check-ring { animation: none !important; transition: none !important; }
}

/* ── Modal shell ── */
.zone-modal {
  width: 100%;
  max-width: 540px;
  min-height: min(90vh, 660px);
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #0E0E0E;
  border: 0.5px solid rgba(232,180,0,0.25);
  border-radius: 18px;
  position: relative;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
  transform: translateY(12px);
  transition: transform 0.3s ease;
}
.zone-overlay.open .zone-modal {
  transform: translateY(0);
}

/* scrollbar inside modal */
.zone-modal::-webkit-scrollbar { width: 4px; }
.zone-modal::-webkit-scrollbar-track { background: transparent; }
.zone-modal::-webkit-scrollbar-thumb { background: rgba(245,243,238,0.12); border-radius: 999px; }

/* ── Screens ── */
.zg-screen { display: none; }
.zg-screen.active { display: flex; flex-direction: column; flex: 1 0 auto; animation: zg-fadeUp 0.3s ease both; }
/* result screens center their content vertically; footer stays pinned at bottom */
.zg-center { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; }

@keyframes zg-fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Topbar ── */
.zg-topbar {
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid rgba(245,243,238,0.08);
}
.zg-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #E8B400;
  font-weight: 500;
}
.zg-icon-btn {
  background: none; border: none; cursor: pointer;
  color: #9A9A9A; font-size: 18px; line-height: 1; padding: 4px;
  display: inline-flex; align-items: center;
}
.zg-icon-btn:hover { color: #F5F3EE; }

.zg-back-btn {
  background: none; border: none; cursor: pointer;
  color: #9A9A9A;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11.5px; letter-spacing: 0.14em; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; padding: 0;
}
.zg-back-btn:hover { color: #F5F3EE; }

/* ── Body ── */
.zg-body { padding: 26px 30px 8px; }

.zg-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(232,180,0,0.12); color: #E8B400;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; letter-spacing: 0.14em; font-weight: 500;
  padding: 5px 10px; border-radius: 999px; margin-bottom: 16px;
}

.zg-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px; line-height: 1.18; font-weight: 500;
  letter-spacing: -0.01em; color: #F5F3EE; margin: 0 0 10px;
  text-transform: none;
}
.zg-lede {
  color: #9A9A9A; font-family: 'Hanken Grotesk', sans-serif;
  font-size: 13.5px; line-height: 1.6; margin: 0 0 18px;
}
.zg-lede .hl { color: #F5F3EE; font-weight: 500; }

.zg-field-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; letter-spacing: 0.16em; color: #F5F3EE;
  font-weight: 500; margin-bottom: 12px;
}

/* ── Zone groups ── */
.zg-zone { margin-bottom: 14px; }
.zg-zone-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.zg-zone-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10.5px; letter-spacing: 0.18em; color: #E8B400; font-weight: 500;
}
.zg-zone-rule { flex: 1; height: 0.5px; background: rgba(232,180,0,0.2); }

.zg-pills { display: flex; flex-wrap: wrap; gap: 6px; }

.zg-pill {
  background: #1A1A1A;
  border: 0.5px solid rgba(245,243,238,0.15);
  color: #F5F3EE;
  padding: 7px 12px; border-radius: 999px;
  font-family: 'Hanken Grotesk', sans-serif; font-size: 12.5px;
  cursor: pointer; transition: all 0.15s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.zg-pill:hover { border-color: #E8B400; color: #E8B400; }
.zg-pill.selected {
  background: #E8B400; border-color: #E8B400; color: #0E0E0E;
  font-weight: 500;
}
.zg-pill.selected:hover { color: #0E0E0E; }
.zg-pill svg { width: 14px; height: 14px; color: #E8B400; }
.zg-pill.selected svg { color: #0E0E0E; }

.zg-corridor-note {
  margin: 6px 2px 0;
  font-size: 11.5px; color: #6E6E6E; font-style: italic;
}

/* ── CTA ── */
.zg-cta-wrap { padding: 4px 30px 16px; }
.zg-cta {
  width: 100%; border: none; cursor: pointer;
  padding: 14px 16px; border-radius: 11px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; letter-spacing: 0.1em; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.15s ease;
}
.zg-cta.gold { background: #E8B400; color: #0E0E0E; }
.zg-cta.gold:hover { background: #C99700; }
.zg-cta.locked { background: #2A2620; color: #6E6E6E; cursor: not-allowed; }

/* ── Alt section ── */
.zg-alt-section { padding: 0 30px 20px; }
.zg-divider {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 12px;
}
.zg-divider .line { flex: 1; height: 0.5px; background: rgba(245,243,238,0.08); }
.zg-divider .lbl {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px; letter-spacing: 0.2em; color: #FFFFFF; font-weight: 500;
}
.zg-alt-row { display: flex; gap: 8px; }
.zg-alt-btn {
  flex: 1; cursor: pointer; background: transparent;
  padding: 11px 12px; border-radius: 11px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11.5px; letter-spacing: 0.1em; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.15s ease;
  text-decoration: none;
}
.zg-alt-btn.waitlist { color: #E8B400; border: 0.5px solid #E8B400; }
.zg-alt-btn.waitlist:hover { background: rgba(232,180,0,0.08); }
.zg-alt-btn.hog { color: #F5F3EE; border: 0.5px solid rgba(245,243,238,0.2); }
.zg-alt-btn.hog:hover { border-color: #F5F3EE; }

.zg-flag { display: inline-flex; gap: 2px; align-items: center; }
.zg-flag span { width: 4px; height: 10px; border-radius: 1px; }
.zg-flag.lg span { width: 5px; height: 14px; }
.zg-flag .k { background: #000000; }
.zg-flag .r { background: #BB0000; }
.zg-flag .g { background: #006B3F; }

/* ── Footer ── */
.zg-footer {
  background: #1A1A1A; padding: 16px 30px;
  border-top: 0.5px solid rgba(245,243,238,0.08);
  border-radius: 0 0 18px 18px;
  display: flex; align-items: center; gap: 10px;
}
.zg-footer svg { width: 16px; height: 16px; color: #E8B400; }
.zg-footer span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; letter-spacing: 0.18em; color: #F5F3EE; font-weight: 500;
}

/* ── Input fields ── */
.zg-input-group { margin-bottom: 14px; }
.zg-input-wrap { position: relative; }
.zg-input-wrap input {
  width: 100%; background: #1A1A1A;
  border: 0.5px solid rgba(245,243,238,0.15); border-radius: 11px;
  padding: 12px 14px 12px 38px; color: #F5F3EE;
  font-family: 'Hanken Grotesk', sans-serif; font-size: 14px;
}
.zg-input-wrap input::placeholder { color: #6E6E6E; }
.zg-input-wrap input:focus { outline: none; border-color: #E8B400; }
.zg-input-wrap > svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #9A9A9A; width: 16px; height: 16px; pointer-events: none;
}
.zg-input-hint { margin: 6px 2px 0; font-size: 11.5px; color: #6E6E6E; font-style: italic; }
.zg-input-error { margin: 6px 2px 0; font-size: 11.5px; color: #e05252; }

/* ── Success screens ── */
.zg-accent-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #E8B400, #C99700); opacity: 0.85;
}
.zg-success-body { padding: 20px 30px 8px; text-align: center; }
.zg-check-ring {
  width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%;
  background: rgba(232,180,0,0.12); border: 0.5px solid rgba(232,180,0,0.3);
  display: flex; align-items: center; justify-content: center;
  animation: zg-pop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
.zg-check-ring svg { width: 36px; height: 36px; color: #E8B400; }
@keyframes zg-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.zg-success-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px; line-height: 1.15; font-weight: 500;
  letter-spacing: -0.01em; color: #F5F3EE; margin: 0 0 12px;
  text-transform: none;
}

/* ── HOG bridge card ── */
.zg-hog-card {
  background: #15110B;
  border: 0.5px solid rgba(232,180,0,0.18);
  border-radius: 11px; padding: 18px;
}
.zg-hog-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.zg-hog-card-head .lbl {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12.5px; letter-spacing: 0.14em; color: #F5F3EE; font-weight: 500;
}
.zg-hog-card p {
  color: #9A9A9A; font-family: 'Hanken Grotesk', sans-serif;
  font-size: 12.5px; line-height: 1.55; margin: 0 0 18px;
}
.zg-hog-link {
  background: none; border: none; cursor: pointer; color: #E8B400;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11.5px; letter-spacing: 0.14em; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px; padding: 0;
  text-decoration: none;
}
.zg-hog-link:hover { color: #F5F3EE; }

/* ── Progress bar ── */
.zg-progress-track { max-width: 300px; margin: 12px auto 0; }
.zg-progress-rail {
  height: 4px; background: rgba(245,243,238,0.1);
  border-radius: 999px; overflow: hidden;
}
.zg-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #E8B400, #C99700);
  border-radius: 999px;
}
.zg-progress-track .zg-progress-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10.5px; letter-spacing: 0.16em; color: #6E6E6E;
  margin: 14px 0 0; display: block; text-align: center; line-height: 1.7;
}

.zg-stay-link-wrap { padding: 14px 30px 24px; text-align: center; }
.zg-stay-link {
  background: none; border: none; cursor: pointer; color: #6E6E6E;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; letter-spacing: 0.12em; font-weight: 500; padding: 6px;
}
.zg-stay-link:hover { color: #F5F3EE; }

/* ── In-zone pill ── */
.zg-inzone-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,107,63,0.16); color: #4FD18B;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; letter-spacing: 0.14em; font-weight: 500;
  padding: 5px 10px; border-radius: 999px; margin-bottom: 16px;
}
.zg-inzone-pill svg { width: 14px; height: 14px; }

/* reduced-motion: static HOG link instead of auto-redirect */
.zg-rm-link { display: none; }
@media (prefers-reduced-motion: reduce) {
  .zg-progress-track { display: none; }
  .zg-rm-link { display: inline-flex; }
}

/* ── Grey eyebrow (apology screen) ── */
.zg-eyebrow-grey {
  background: rgba(154,154,154,0.15);
  color: #F5F3EE;
}
.zg-eyebrow-grey svg { color: #9A9A9A; }

/* ── Draining progress bar (apology screen) ── */
.zg-progress-fill.zg-drain {
  width: 100%;
  animation: zg-drain 8s linear forwards;
}
@keyframes zg-drain {
  from { width: 100%; }
  to   { width: 0%; }
}
@media (prefers-reduced-motion: reduce) {
  .zg-progress-fill.zg-drain { animation: none; width: 0%; }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .zone-modal { border-radius: 14px; }
  .zg-footer { border-radius: 0 0 14px 14px; }
  .zg-body { padding: 20px 20px 6px; }
  .zg-cta-wrap { padding: 4px 20px 14px; }
  .zg-alt-section { padding: 0 20px 16px; }
  .zg-footer { padding: 14px 20px; }
  .zg-title { font-size: 20px; }
  .zg-success-body { padding: 30px 20px 6px; }
  .zg-alt-row { flex-direction: column; }
}
