@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap");

:root {
  --navy-950: #071225;
  --navy-900: #0f1f3d;
  --navy-800: #162d55;
  --navy-700: #1e3a6b;
  --sand-600: #a37e2c;
  --sand-500: #c49a38;
  --sand-400: #d4a843;
  --sand-300: #e3be6e;
  --sand-100: #f5e8c8;
  --cream: #fafaf7;
  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-700: #334155;
  --danger: #dc2626;
  --radius: 10px;
  --font: "Montserrat", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy-900);
  background: var(--navy-950);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 30px 18px;
  background:
    linear-gradient(90deg, rgba(7, 18, 37, 0.96), rgba(15, 31, 61, 0.78)),
    url("img/milk-production.webp") center / cover fixed;
}

.quiz-shell {
  width: calc(100vw - 36px);
  max-width: 560px;
  min-width: 0;
}

.brand-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.brand-bar img {
  width: 184px;
  height: auto;
}

.quiz-card {
  width: 100%;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  background: rgba(250, 250, 247, 0.975);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
}

.quiz-heading {
  text-align: center;
}

.quiz-heading > span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(212, 168, 67, 0.4);
  border-radius: 999px;
  color: var(--sand-600);
  background: rgba(212, 168, 67, 0.12);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quiz-heading h1 {
  margin: 14px 0 8px;
  color: var(--navy-900);
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.quiz-heading p {
  margin: 0 0 21px;
  color: var(--slate-500);
  font-size: 14px;
  line-height: 1.55;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--slate-500);
  font-size: 11px;
  font-weight: 700;
}

.progress-meta strong {
  color: var(--sand-600);
  font-weight: 900;
}

.progress-track {
  width: 100%;
  height: 6px;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--slate-100);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy-700), var(--sand-400));
  transition: width 220ms ease;
}

.question-card {
  min-height: 265px;
}

.question-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--sand-600);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.question-card h2 {
  margin: 0 0 17px;
  color: var(--navy-900);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.form-label {
  display: grid;
  gap: 7px;
  color: var(--slate-700);
  font-size: 12px;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
}

.form-input {
  width: 100%;
  min-height: 52px;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  outline: none;
  color: var(--navy-900);
  background: var(--white);
  font-size: 15px;
  font-weight: 600;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea.form-input {
  min-height: 122px;
  resize: vertical;
  line-height: 1.5;
}

.form-input::placeholder {
  color: var(--slate-400);
  font-weight: 500;
}

.form-input:focus {
  border-color: var(--sand-400);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.16);
}

.field-error {
  border-color: var(--danger) !important;
}

.options-container {
  display: grid;
  gap: 9px;
}

.answer-btn,
.multi-answer-btn,
.cta-button,
.secondary-link {
  min-height: 50px;
  border-radius: var(--radius);
  font-weight: 800;
  cursor: pointer;
}

.answer-btn,
.multi-answer-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  background: var(--white);
  text-align: left;
  font-size: 13px;
  line-height: 1.3;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.answer-btn::after,
.multi-answer-btn::after {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: 0.42;
  transform: rotate(45deg);
}

.multi-answer-btn::after {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
  transform: none;
}

.answer-btn:hover,
.multi-answer-btn:hover,
.multi-answer-btn.is-selected {
  transform: translateX(2px);
  border-color: var(--sand-400);
  background: #fffcf5;
}

.multi-answer-btn.is-selected {
  color: var(--navy-900);
}

.multi-answer-btn.is-selected::after {
  border-color: var(--sand-400);
  background: var(--sand-400);
  box-shadow: inset 0 0 0 4px #fffcf5;
  opacity: 1;
}

.cta-button {
  width: 100%;
  margin-top: 14px;
  padding: 12px 18px;
  border: 0;
  color: var(--navy-950);
  background: var(--sand-400);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: transform 160ms ease, background 160ms ease;
}

.cta-button:hover {
  transform: translateY(-1px);
  background: var(--sand-300);
}

.cta-button:disabled {
  cursor: wait;
  color: var(--slate-500);
  background: var(--slate-200);
}

.back-button {
  width: 100%;
  min-height: 40px;
  margin-top: 7px;
  border: 0;
  color: var(--slate-500);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.inline-note {
  margin-top: 10px;
  color: var(--slate-500);
  font-size: 11px;
  line-height: 1.45;
}

.outro-container {
  margin-top: 10px;
}

.outro-container[hidden] {
  display: none;
}

.loading-state {
  min-height: 265px;
  display: grid;
  place-items: center;
  color: var(--navy-700);
  font-weight: 800;
  text-align: center;
}

.loading-state::before {
  content: "";
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border: 3px solid var(--sand-100);
  border-top-color: var(--sand-500);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--slate-200);
  color: var(--slate-500);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.privacy-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--sand-600);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-card {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--white);
  background: rgba(7, 18, 37, 0.96);
  text-align: center;
}

.result-card[hidden] {
  display: none;
}

.result-box {
  width: min(440px, 100%);
  padding: 32px;
  border-radius: var(--radius);
  color: var(--navy-900);
  background: var(--cream);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.result-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: var(--navy-950);
  background: var(--sand-400);
}

.result-icon svg {
  width: 40px;
  height: 40px;
}

.result-eyebrow {
  color: var(--sand-600);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-box h2 {
  margin: 8px 0 10px;
  color: var(--navy-900);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.result-box p {
  margin: 0 0 22px;
  color: var(--slate-500);
  font-size: 14px;
  line-height: 1.55;
}

.secondary-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid var(--slate-200);
  color: var(--navy-900);
  background: var(--slate-100);
  font-size: 12px;
}

.shake {
  animation: shake 360ms ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
  .page-shell {
    align-items: start;
    padding: 20px 13px;
    background-attachment: scroll;
  }

  .brand-bar {
    margin-bottom: 15px;
  }

  .brand-bar img {
    width: 154px;
  }

  .quiz-shell {
    width: calc(100vw - 26px);
  }

  .quiz-card {
    padding: 21px;
  }

  .question-card h2 {
    font-size: 21px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr) 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
