/* =========================================================
   Parachute Advansed Gold – Hair Quiz
   Palette taken from the KV: bottle blue, sky, coconut cream, gold
========================================================= */
:root {
  --navy: #0a2463;
  --blue: #1641c8;
  --blue-soft: #eef4ff;
  --sky: #dcecfb;
  --cream: #fffaf0;
  --gold-light: #f7de8f;
  --gold: #d4a63e;
  --gold-dark: #a87a1c;
  --ink: #14213d;
  --muted: #5d6b85;
  --line: #dde6f3;
  --danger: #c0392b;
  --radius-lg: 28px;
  --radius-md: 16px;
  --shadow-card: 0 30px 70px -30px rgba(10, 36, 99, 0.35), 0 8px 24px -12px rgba(10, 36, 99, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(43, 106, 230, 0.18), transparent 60%),
    linear-gradient(180deg, #e3effc 0%, #f2f7fd 45%, #fbf5e8 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
}

/* ========================= MAIN WRAPPER ========================== */
.quiz-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 20px;
}

.quiz-container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
}

/* ========================= SCREEN ========================== */
.quiz-screen {
  display: none;
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.quiz-screen.active {
  display: flex;
  animation: screen-in 0.45s ease both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ========================= START SCREEN ==========================
   Same split layout as the question screens. The card is capped at the
   viewport height so the Start Quiz button is always in view without scrolling */
.start-screen {
  max-width: max(820px, calc((100vh - 40px) * 2));
  max-width: max(820px, calc((100dvh - 40px) * 2));
  margin: 0 auto;
}

.hero-panel {
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: #fdf3d8;
  border: 1px solid #f3e1ac;
}

.hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  margin: 18px 0 12px;
}

.hero-title span {
  font-style: italic;
  color: var(--blue);
}

.hero-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 460px;
}

.hero-points {
  list-style: none;
  padding: 22px 0 0;
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
  align-self: stretch;
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.hero-points i {
  color: var(--blue);
  margin-right: 6px;
}

/* ========================= BUTTONS ========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border-radius: 50px;
  padding: 12px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.4s ease;
}

.btn:focus-visible {
  outline: 3px solid rgba(22, 65, 200, 0.35);
  outline-offset: 2px;
}

.btn-gold {
  color: #3b2a05;
  border: none;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-light) 100%);
  background-size: 200% 100%;
  box-shadow: 0 10px 22px -10px rgba(168, 122, 28, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-gold:hover,
.btn-gold:focus {
  color: #3b2a05;
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -12px rgba(168, 122, 28, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-gold:disabled {
  opacity: 0.65;
  transform: none;
}

.btn-lg-kv {
  font-size: 18px;
  padding: 15px 40px;
  min-width: 230px;
}

.btn-blue {
  color: #fff;
  border: none;
  background: linear-gradient(145deg, #2b6ae6, var(--blue));
  white-space: nowrap;
  padding: 0 22px;
  border-radius: 12px;
}

.btn-blue:hover,
.btn-blue:focus {
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--navy));
}

.btn-ghost {
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--line);
  font-weight: 600;
  padding: 10px 22px;
}

.btn-ghost:hover,
.btn-ghost:focus {
  color: var(--navy);
  background: var(--blue-soft);
  border-color: #c8d6ee;
}

.btn-block {
  width: 100%;
  padding: 14px 24px;
  font-size: 17px;
}

/* ========================= STEP SCREENS ========================== */
.step-screen {
  display: none;
}

.step-screen.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.step-visual {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--sky);
}

/* blurred copy of the KV fills any space left when the panel is taller than the square image */
.step-visual::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: url("../images/kv-square-sm.jpg") center / cover no-repeat;
  filter: blur(28px) saturate(1.1);
  opacity: 0.9;
}

.step-visual img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

.step-panel {
  display: flex;
  flex-direction: column;
  padding: 40px 44px;
}

.step-progress {
  margin-bottom: 26px;
}

.step-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.step-meta span:first-child {
  color: var(--blue);
  letter-spacing: 0.4px;
}

.progress-track {
  height: 6px;
  border-radius: 10px;
  background: var(--blue-soft);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #2b6ae6, var(--gold));
}

.question-text,
.form-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  margin: 0 0 22px;
}

/* ========================= ANSWERS ========================== */
.answer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-option {
  position: relative;
}

.answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answer-label {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 10px 16px 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.answer-label:hover {
  border-color: #9fb8ea;
  background: #fbfdff;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -16px rgba(10, 36, 99, 0.5);
}

.answer-key {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.answer-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}

.answer-check {
  font-size: 20px;
  color: var(--blue);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.answer-option input:checked + .answer-label {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(22, 65, 200, 0.1);
}

.answer-option input:checked + .answer-label .answer-key {
  color: #fff;
  background: linear-gradient(145deg, #2b6ae6, var(--blue));
}

.answer-option input:checked + .answer-label .answer-check {
  opacity: 1;
  transform: scale(1);
}

.answer-option input:focus-visible + .answer-label {
  outline: 3px solid rgba(22, 65, 200, 0.3);
  outline-offset: 2px;
}

.answer-error {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--danger);
}

.step-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.step-buttons.single {
  justify-content: center;
}

/* ========================= FORM ========================== */
.form-title {
  margin-bottom: 6px;
}

.form-subtitle {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 22px;
}

.field {
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.input-group-text {
  background: var(--blue-soft);
  border: 1.5px solid var(--line);
  border-right: none;
  border-radius: 12px 0 0 12px;
  color: var(--blue);
  font-weight: 600;
  font-size: 14px;
  min-width: 48px;
  justify-content: center;
}

.form-control {
  min-height: 50px;
  border: 1.5px solid var(--line);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  color: var(--ink);
}

.form-control::placeholder {
  color: #9aa6bb;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: none;
}

.input-group:focus-within .input-group-text {
  border-color: var(--blue);
}

.input-group:focus-within {
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(22, 65, 200, 0.1);
}

.otp-row {
  display: flex;
  gap: 10px;
}

.otp-row .input-group {
  flex: 1;
  width: auto;
}

.consent {
  margin: 4px 0 20px;
  font-size: 14px;
  color: var(--muted);
}

.consent .form-check-input {
  border-color: #b9c8e3;
}

.consent .form-check-input:checked {
  background-color: var(--blue);
  border-color: var(--blue);
}

/* ========================= THANK YOU ========================== */
.thankyou-screen {
  justify-content: center;
}

.thankyou-screen img {
  display: block;
  width: 100%;
  height: auto;
}

/* ========================= RESPONSIVE ========================== */
@media (max-width: 991.98px) {
  .step-screen.active {
    grid-template-columns: 1fr;
  }

  .step-visual::before {
    display: none;
  }

  /* stacked start screen: the image shrinks (over a blurred fill) so the button stays above the fold */
  .start-screen.active {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
  }

  .start-screen .step-visual {
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: 2000 / 1047;
  }

  .start-screen .step-visual::before {
    display: block;
  }

  .start-screen .step-visual img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: contain;
  }

  .hero-panel {
    flex-shrink: 0;
    align-items: center;
    text-align: center;
  }

  .hero-text {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-points {
    display: flex;
    justify-content: center;
    gap: 18px;
  }

  .step-panel {
    padding: 28px 28px 30px;
  }


}

@media (max-width: 767.98px) {
  .quiz-wrapper {
    padding: 12px;
  }

  .start-screen.active {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .hero-panel {
    padding: 18px 18px 20px;
  }

  .quiz-screen {
    border-radius: 22px;
  }


  .eyebrow {
    font-size: 11px;
    padding: 5px 12px;
  }

  .hero-title {
    font-size: 25px;
    margin: 10px 0 6px;
  }

  .hero-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
  }


  .hero-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 0;
    margin-top: 12px;
    border-top: none;
    font-size: 12px;
    text-align: center;
  }

  .hero-points li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 12px;
    background: var(--blue-soft);
  }

  .hero-points i {
    margin: 0;
    font-size: 18px;
  }

  .btn-lg-kv {
    width: 100%;
  }

  .step-panel {
    padding: 22px 18px 24px;
  }

  .step-progress {
    margin-bottom: 18px;
  }

  .answer-label {
    min-height: 56px;
  }

  .answer-text {
    font-size: 15px;
  }

  .step-buttons .btn {
    flex: 1;
  }
}

/* short phones: drop the feature chips so the button still fits */
@media (max-width: 767.98px) and (max-height: 640px) {
  .hero-points {
    display: none;
  }
}

@media (max-width: 380px) {
  .otp-row {
    flex-direction: column;
  }

  .btn-blue {
    padding: 12px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
