/* Hamid Quiz Maker - Frontend Styles */
/* Brand-matched to hamidsaeed.com */

:root {
  /* Brand Colors */
  --hs-crimson:       #791C27;
  --hs-near-black:    #212121;
  --hs-heading:       #111111;
  --hs-body:          #363636;
  --hs-muted:         #AAAAAA;
  --hs-parchment:     #F4EFE7;
  --hs-border:        #DDDDDD;
  --hs-white:         #FFFFFF;

  /* Typography */
  --hs-font-display:  'Times New Roman', Georgia, serif;
  --hs-font-body:     'Cabin', sans-serif;

  /* Quiz */
  --hs-quiz-max-width:  860px;
  --hs-transition:      200ms ease;
}

/* Container */
.hq-quiz-container {
  max-width: var(--hs-quiz-max-width);
  margin: 0 auto;
  background: var(--hs-white);
  font-family: var(--hs-font-body);
  color: var(--hs-body);
}

.hq-quiz-accent-line {
  height: 3px;
  background: var(--hs-crimson);
  width: 100%;
}

.hq-quiz-content {
  padding: 60px 48px;
}

@media (max-width: 600px) {
  .hq-quiz-content {
    padding: 40px 24px;
  }
}

/* Steps */
.hq-quiz-step {
  opacity: 0;
  animation: hq-fade-in 200ms ease forwards;
}

@keyframes hq-fade-in {
  to { opacity: 1; }
}

/* Intro Screen */
.hq-step-intro {
  text-align: center;
}

.hq-eyebrow {
  display: block;
  font-family: var(--hs-font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--hs-crimson);
  margin-bottom: 16px;
}

.hq-quiz-title {
  font-family: var(--hs-font-display);
  font-size: 36px;
  font-weight: 400;
  color: var(--hs-heading);
  margin: 0 0 20px;
  line-height: 1.2;
}

@media (max-width: 600px) {
  .hq-quiz-title {
    font-size: 28px;
  }
}

.hq-quiz-description {
  font-family: var(--hs-font-body);
  font-size: 16px;
  color: var(--hs-body);
  line-height: 1.6;
  margin: 0 0 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.hq-btn {
  display: inline-block;
  font-family: var(--hs-font-body);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 32px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all var(--hs-transition);
  text-decoration: none;
}

.hq-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hq-btn-primary {
  background: var(--hs-near-black);
  color: var(--hs-white);
}

.hq-btn-primary:hover:not(:disabled) {
  background: var(--hs-heading);
}

.hq-btn-outline {
  background: transparent;
  color: var(--hs-heading);
  border: 1px solid var(--hs-heading);
}

.hq-btn-outline:hover {
  background: var(--hs-parchment);
}

/* Progress */
.hq-progress {
  padding: 24px 48px;
  border-bottom: 1px solid var(--hs-border);
}

@media (max-width: 600px) {
  .hq-progress {
    padding: 16px 24px;
  }
}

.hq-progress-label {
  display: block;
  font-family: var(--hs-font-body);
  font-size: 13px;
  color: var(--hs-muted);
  margin-bottom: 12px;
}

.hq-progress-dots {
  display: flex;
  gap: 8px;
}

.hq-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hs-border);
  transition: background var(--hs-transition);
}

.hq-dot-active {
  background: var(--hs-crimson);
}

/* Question Screen */
.hq-question-number {
  display: block;
  font-family: var(--hs-font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--hs-crimson);
  margin-bottom: 12px;
}

.hq-question-text {
  font-family: var(--hs-font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--hs-heading);
  margin: 0 0 32px;
  line-height: 1.3;
}

@media (max-width: 600px) {
  .hq-question-text {
    font-size: 22px;
  }
}

/* Answers - List View (text only) */
.hq-answers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.hq-answers-list .hq-answer-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
}

.hq-answers-list .hq-answer-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid var(--hs-border);
}

/* Answers - Grid View (with images) */
.hq-answers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 600px) {
  .hq-answers-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.hq-answers-grid .hq-answer-card-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0;
  border: 1px solid var(--hs-border);
  background: var(--hs-white);
  cursor: pointer;
  transition: all var(--hs-transition);
  position: relative;
}

.hq-answers-grid .hq-answer-card-image:hover {
  border-color: var(--hs-near-black);
  background: var(--hs-parchment);
}

.hq-answers-grid .hq-answer-card-image.hq-selected {
  border: 2px solid var(--hs-crimson);
  background: var(--hs-parchment);
}

.hq-answers-grid .hq-answer-card-image.hq-selected .hq-answer-text {
  color: var(--hs-heading);
  font-weight: 600;
}

.hq-answers-grid .hq-answer-card-image.hq-selected .hq-answer-indicator {
  opacity: 1;
  color: var(--hs-crimson);
}

.hq-answers-grid .hq-answer-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--hs-parchment);
}

.hq-answers-grid .hq-answer-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hq-answers-grid .hq-answer-text {
  padding: 12px 16px;
  font-size: 14px;
}

/* Answer Card Base */
.hq-answer-card {
  border: 1px solid var(--hs-border);
  background: var(--hs-white);
  cursor: pointer;
  transition: all var(--hs-transition);
  position: relative;
}

.hq-answer-card:hover {
  border-color: var(--hs-near-black);
  background: var(--hs-parchment);
}

.hq-answer-card.hq-selected {
  border: 2px solid var(--hs-crimson);
  background: var(--hs-parchment);
}

.hq-answer-card.hq-selected .hq-answer-text {
  color: var(--hs-heading);
  font-weight: 600;
}

.hq-answer-card.hq-selected .hq-answer-indicator {
  opacity: 1;
  color: var(--hs-crimson);
}

.hq-answer-text {
  flex: 1;
  font-family: var(--hs-font-body);
  font-size: 15px;
  color: var(--hs-body);
  line-height: 1.4;
}

.hq-answer-indicator {
  opacity: 0;
  font-size: 18px;
  transition: opacity var(--hs-transition);
}

.hq-answer-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Navigation */
.hq-nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Result Screen */
.hq-step-result {
  text-align: center;
}

.hq-result-eyebrow {
  display: block;
  font-family: var(--hs-font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--hs-crimson);
  margin-bottom: 16px;
}

.hq-result-title {
  font-family: var(--hs-font-display);
  font-size: 38px;
  font-weight: 400;
  color: var(--hs-heading);
  margin: 0 0 24px;
  line-height: 1.2;
}

@media (max-width: 600px) {
  .hq-result-title {
    font-size: 28px;
  }
}

.hq-result-divider {
  height: 1px;
  background: var(--hs-border);
  margin: 32px 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hq-result-description {
  font-family: var(--hs-font-body);
  font-size: 16px;
  color: var(--hs-body);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 32px;
  text-align: left;
}

.hq-result-description p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--hs-body);
}

.hq-result-description p:last-child {
  margin-bottom: 0;
}

.hq-result-description ul,
.hq-result-description ol {
  margin: 0 0 16px;
  padding-left: 24px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--hs-body);
}

.hq-result-description li {
  margin-bottom: 6px;
}

.hq-result-description strong,
.hq-result-description b {
  color: var(--hs-heading);
  font-weight: 600;
}

.hq-result-description em,
.hq-result-description i {
  font-style: italic;
}

.hq-result-description a {
  color: var(--hs-crimson);
  text-decoration: underline;
}

.hq-result-description a:hover {
  opacity: 0.8;
}

.hq-result-description h2,
.hq-result-description h3,
.hq-result-description h4 {
  font-family: var(--hs-font-display);
  font-weight: 400;
  color: var(--hs-heading);
  margin: 24px 0 12px;
}

.hq-result-image {
  max-width: 100%;
  height: auto;
  margin-bottom: 32px;
}

.hq-result-cta {
  margin-top: 40px;
}

.hq-result-cta-title {
  font-family: var(--hs-font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--hs-heading);
  margin: 0 0 12px;
}

.hq-result-cta-text {
  font-family: var(--hs-font-body);
  font-size: 16px;
  color: var(--hs-body);
  margin: 0 0 24px;
}

.hq-result-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hq-loading {
  padding: 60px;
  font-family: var(--hs-font-body);
  color: var(--hs-muted);
}

/* Lead Capture Form */
.hq-lead-form {
  max-width: 400px;
  margin: 0 auto;
}

.hq-form-row {
  margin-bottom: 20px;
  text-align: left;
}

.hq-form-row label {
  display: block;
  font-family: var(--hs-font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--hs-heading);
  margin-bottom: 8px;
}

.hq-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--hs-border);
  border-radius: 0;
  font-family: var(--hs-font-body);
  font-size: 15px;
  color: var(--hs-body);
  background: var(--hs-white);
  transition: border-color var(--hs-transition);
  box-sizing: border-box;
}

.hq-input:focus {
  outline: none;
  border-color: var(--hs-near-black);
}

.hq-input::placeholder {
  color: var(--hs-muted);
}

.hq-lead-form .hq-nav-buttons {
  margin-top: 30px;
}
