/* ===================================================================
   AUSTIN HOME GYM — Quiz Styles
   Typeform-style full-screen quote flow
   =================================================================== */

/* --- Page Setup --- */
.quiz-page {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

/* --- Top Bar --- */
.quiz-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--container-pad);
}

.quiz-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-light);
  transition: color var(--transition);
  opacity: 0;
  pointer-events: none;
}

.quiz-back.visible {
  opacity: 1;
  pointer-events: all;
}

.quiz-back:hover {
  color: var(--color-text);
}

.quiz-back svg {
  width: 18px;
  height: 18px;
}

.quiz-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--color-text-light);
  transition: all var(--transition);
}

.quiz-close:hover {
  background: var(--color-bg-card);
  color: var(--color-text);
}

.quiz-close svg {
  width: 18px;
  height: 18px;
}

/* --- Progress --- */
.quiz-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
  height: 3px;
  background: var(--color-border);
  opacity: 0;
  transition: opacity var(--transition);
}

.quiz-progress.visible {
  opacity: 1;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 0 2px 2px 0;
  transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0%;
}

.quiz-progress-label {
  position: fixed;
  top: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 102;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity var(--transition);
  white-space: nowrap;
}

.quiz-progress-label.visible {
  opacity: 1;
}

/* --- Screen Container --- */
.quiz-container {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

/* --- Screens --- */
.quiz-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem var(--container-pad) 2rem;
  opacity: 0;
  transform: translateX(50px);
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.35s ease;
}

.quiz-screen--active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.quiz-screen--left {
  opacity: 0;
  transform: translateX(-50px);
}

/* Contact screen uses fade instead of slide */
.quiz-screen--fade {
  transform: none;
}

.quiz-screen--fade.quiz-screen--active {
  transform: none;
}

/* --- Intro Screen --- */
.quiz-intro {
  text-align: center;
  max-width: 560px;
}

.quiz-intro-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.quiz-intro-sub {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
}

/* --- Question Screen --- */
.quiz-question {
  width: 100%;
  max-width: 720px;
}

.quiz-question-text {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  text-align: center;
}

.quiz-question-sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
  text-align: center;
}

/* --- Option Grid --- */
.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* 5-option layout: 2x2 + 1 centered */
.quiz-options--5 {
  max-width: 100%;
}

.quiz-options--5 .quiz-option:nth-child(5) {
  grid-column: 1 / -1;
  max-width: calc(50% - 0.5rem);
  justify-self: center;
}

/* --- Option Card --- */
.quiz-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1.25rem;
  background: #FFFFFF;
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.quiz-option:hover {
  border-color: var(--color-text-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.quiz-option--selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.03);
  box-shadow: 0 8px 30px rgba(90, 114, 71, 0.2);
}

.quiz-option--selected .quiz-option-label {
  color: #FFFFFF;
}

.quiz-option--selected .quiz-option-sub {
  color: rgba(255, 255, 255, 0.75);
}

.quiz-option--selected .quiz-option-icon {
  background: rgba(255, 255, 255, 0.2);
}

/* --- Icon Placeholder --- */
.quiz-option-icon {
  width: 144px;
  height: 144px;
  border-radius: 16px;
  background: var(--color-bg-card);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.quiz-option-icon svg {
  width: 56px;
  height: 56px;
  stroke: var(--color-text-light);
  opacity: 0.4;
}

.quiz-option--selected .quiz-option-icon svg {
  stroke: rgba(255, 255, 255, 0.5);
}

/* --- Option Text --- */
.quiz-option-text {
  display: flex;
  flex-direction: column;
}

.quiz-option-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.2rem;
  transition: color 0.25s ease;
}

.quiz-option-sub {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-light);
  transition: color 0.25s ease;
}

/* --- Contact Form --- */
.quiz-form {
  width: 100%;
  max-width: 480px;
}

.quiz-form-headline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.quiz-form-sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.quiz-fields {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.quiz-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quiz-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.quiz-field label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
}

.quiz-input,
.quiz-textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  background: #FFFFFF;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  transition: border-color var(--transition);
  outline: none;
  width: 100%;
}

.quiz-input:focus,
.quiz-textarea:focus {
  border-color: var(--color-accent);
}

.quiz-input.error,
.quiz-textarea.error {
  border-color: #C0392B;
}

.quiz-textarea {
  resize: vertical;
  min-height: 100px;
}

.quiz-submit {
  margin-top: 0.75rem;
  width: 100%;
  padding: 1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 100px;
  background: var(--color-text);
  color: var(--color-bg);
  transition: all var(--transition);
}

.quiz-submit:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.quiz-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.quiz-error-msg {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #C0392B;
  margin-top: 0.5rem;
  display: none;
}

.quiz-error-msg.visible {
  display: block;
}

/* --- Thank You Screen --- */
.quiz-thankyou {
  text-align: center;
  max-width: 520px;
}

.quiz-thankyou-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.quiz-thankyou-sub {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
}

.quiz-thankyou-secondary {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text-light);
  transition: color var(--transition);
}

.quiz-thankyou-secondary:hover {
  color: var(--color-text);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .quiz-options {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .quiz-options--5 .quiz-option:nth-child(5) {
    max-width: 100%;
    grid-column: auto;
  }

  .quiz-option {
    flex-direction: row;
    text-align: left;
    padding: 1.25rem;
    gap: 1rem;
  }

  .quiz-option-icon {
    width: 80px;
    height: 80px;
    min-width: 80px;
    margin-bottom: 0;
    border-radius: 14px;
  }

  .quiz-option-icon svg {
    width: 36px;
    height: 36px;
  }

  .quiz-field-row {
    grid-template-columns: 1fr;
  }

  .quiz-screen {
    padding: 4.5rem 1.25rem 1.5rem;
    align-items: flex-start;
    padding-top: 6rem;
  }

  .quiz-question-text {
    text-align: left;
  }

  .quiz-question-sub {
    text-align: left;
  }
}
