/* =========================================================================
   Projects page — intro pitch + "freedom check" quiz overlay
   ========================================================================= */

/* ------------------------------------------------------- header add-ons */

/* The tagline now lives in the status bar, so the bar is one centred line
   with the lights pinned to the left. */
.project-deck__status {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-template-columns: none;
  gap: 12px;
  text-align: center;
}

.project-deck__status .project-deck__lights {
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
}

/* one centred column: title + quiz button side by side, pitch across the
   full width underneath */
.project-deck__intro {
  min-height: 0;
  padding: 20px 30px 16px;
  justify-content: center;
  text-align: center;
}

.project-deck__lead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.project-deck__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 22px;
}

.project-deck__title-row h1 { text-align: center; }

.project-quiz-open {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 20px;
  border: 1px solid rgba(70, 216, 255, 0.4);
  border-radius: 999px;
  background: rgba(70, 216, 255, 0.08);
  color: #9fe9ff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.project-quiz-open:hover,
.project-quiz-open:focus-visible {
  border-color: rgba(70, 216, 255, 0.85);
  background: rgba(70, 216, 255, 0.16);
  color: #e6f8ff;
  outline: none;
}

/* the generic .project-deck__intro p rule would make this an eyebrow */
.project-deck__intro .project-deck__pitch {
  width: 100%;
  max-width: none;
  margin: 2px 0 0;
  color: #a9bdc8;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
  text-align: center;
}

.project-deck__pitch strong { color: #e8f4fa; font-weight: 700; }

/* ------------------------------------------------------------- overlay */

.project-quiz {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.project-quiz[hidden] { display: none; }

.project-quiz__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 9, 14, 0.82);
  backdrop-filter: blur(6px);
  animation: quiz-fade 0.22s ease-out;
}

.project-quiz__panel {
  position: relative;
  width: min(620px, 100%);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  padding: 26px 26px 24px;
  border: 1px solid rgba(70, 216, 255, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 84% 0%, rgba(70, 216, 255, 0.12), transparent 58%),
    linear-gradient(160deg, #08161f, #050c12 72%);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), inset 0 1px rgba(255, 255, 255, 0.05);
  animation: quiz-rise 0.26s cubic-bezier(0.22, 1.1, 0.4, 1);
}

@keyframes quiz-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes quiz-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.project-quiz__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #b9c9d3;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project-quiz__close:hover,
.project-quiz__close:focus-visible {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  outline: none;
}

.project-quiz__eyebrow {
  display: block;
  color: #46d8ff;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.project-quiz__panel h2 {
  margin: 8px 40px 0 0;
  color: #f2f9fd;
  font-family: "Bahnschrift SemiCondensed", "Aptos Display", "Segoe UI Variable Display", "Trebuchet MS", sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ------------------------------------------------------------ progress */

.project-quiz__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: #8ba3b0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.project-quiz__progress[hidden] { display: none; }

.project-quiz__bar {
  position: relative;
  flex: 1 1 auto;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.project-quiz__bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #46d8ff, #59fcb3);
  transition: width 0.28s ease;
}

/* ----------------------------------------------------------- questions */

.project-quiz__body { margin-top: 22px; }

.project-quiz__question {
  min-height: 2.6em;
  margin: 0;
  color: #eaf4fa;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 600;
  line-height: 1.35;
}

.project-quiz__answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.project-quiz__answers button {
  padding: 13px 16px;
  border: 1px solid rgba(70, 216, 255, 0.3);
  border-radius: 13px;
  background: rgba(70, 216, 255, 0.07);
  color: #d9eef8;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.project-quiz__answers button:hover,
.project-quiz__answers button:focus-visible {
  border-color: rgba(70, 216, 255, 0.8);
  background: rgba(70, 216, 255, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.project-quiz__answers button[data-quiz-answer="no"]:hover,
.project-quiz__answers button[data-quiz-answer="no"]:focus-visible {
  border-color: rgba(255, 160, 122, 0.7);
  background: rgba(255, 160, 122, 0.12);
}

/* -------------------------------------------------------------- result */

.project-quiz__result[hidden] { display: none; }

.project-quiz__result h3 {
  margin: 20px 0 0;
  color: #f4fbff;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* the 1–10 scale of self-responsibility */
.project-quiz__scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  margin-top: 18px;
}

.project-quiz__scale i {
  height: 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.11);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.project-quiz__scale i.is-on {
  background: linear-gradient(180deg, #59fcb3, #2fbd80);
  box-shadow: 0 0 10px rgba(89, 252, 179, 0.55);
}

.project-quiz__scale i.is-on.is-low {
  background: linear-gradient(180deg, #ffb08a, #d9713f);
  box-shadow: 0 0 10px rgba(255, 160, 122, 0.5);
}

.project-quiz__scale-label {
  margin: 10px 0 0;
  color: #a9bdc8;
  font-size: 0.78rem;
}

.project-quiz__scale-label b { color: #eaf4fa; }

.project-quiz__scale-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  color: #6f8794;
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.project-quiz__text {
  margin: 16px 0 0;
  color: #b9ccd6;
  font-size: 0.92rem;
  line-height: 1.6;
}

.project-quiz__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.project-quiz__primary,
.project-quiz__ghost {
  padding: 11px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.project-quiz__primary {
  border: 1px solid rgba(89, 252, 179, 0.45);
  background: rgba(89, 252, 179, 0.16);
  color: #b6ffdd;
}

.project-quiz__primary:hover,
.project-quiz__primary:focus-visible {
  background: rgba(89, 252, 179, 0.28);
  transform: translateY(-1px);
  outline: none;
}

.project-quiz__ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: none;
  color: #a9bdc8;
}

.project-quiz__ghost:hover,
.project-quiz__ghost:focus-visible {
  border-color: rgba(255, 255, 255, 0.4);
  color: #eaf4fa;
  outline: none;
}

/* ----------------------------------------------------------------- body */

body.quiz-open { overflow: hidden; }

@media (max-width: 720px) {
  .project-deck__intro { padding: 12px 14px 12px; }
  .project-deck__title-row { gap: 8px 12px; }
  .project-deck__title-row h1 { font-size: clamp(1.5rem, 7vw, 2.1rem); }
  /* the button used to stretch across the whole row and push the cards down */
  .project-quiz-open { width: fit-content; min-height: 34px; padding: 0 14px; font-size: 0.72rem; }
  .project-deck__intro .project-deck__pitch { font-size: 0.84rem; line-height: 1.5; }
  .project-deck__status .project-deck__lights { left: 10px; }
  .project-deck__status { font-size: 0.6rem; letter-spacing: 0.14em; }
  .project-quiz { padding: 12px; }
  .project-quiz__panel { padding: 22px 18px 20px; border-radius: 18px; }
  .project-quiz__answers { grid-template-columns: minmax(0, 1fr); }
  .project-quiz__scale { gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-quiz__backdrop,
  .project-quiz__panel { animation: none; }
  .project-quiz-open:hover,
  .project-quiz__answers button:hover { transform: none; }
}
