/* Geschmackstest v2 — self-contained styles.
 * Extracted and cleaned from the legacy inline <style>. Modernizr and the
 * repo-wide css/main.css are intentionally NOT referenced; Font Awesome is
 * replaced with inline SVG in the markup. Only rules that affect this page
 * are kept. Fonts, icons and images are referenced relative to this folder.
 */

@font-face {
  font-family: Grotesk;
  src: url("fonts/Px-Grotesk-Bold.woff");
  font-display: swap;
}

@font-face {
  font-family: Bliss;
  src: url("fonts/BlissPro - Bliss Pro - Regular.woff");
  font-display: swap;
}

html {
  font-family: Bliss, Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
}

h3 {
  font-family: Grotesk, Helvetica, Arial, sans-serif;
}

a {
  color: #000;
}

em,
i {
  font-style: normal;
}

/* Layout containers (no external main.css to fold in) */
.wrapper {
  max-width: 1100px;
  margin: 0 auto;
}

.content {
  position: relative;
}

/* --- Geschmackstest logo + spinning Trabi wheel --- */
#geschmacklogo {
  width: 50%;
  position: relative;
  margin-left: auto;
  margin-right: auto;
}

#geschmacklogo img {
  max-width: 100%;
}

#wheel {
  position: absolute;
  margin-left: -400px;
  bottom: -15px;
  transform: translateX(0) rotateZ(0);
  opacity: 0;
  transition: 0.75s ease-out, transform 2.2s ease-out;
  transform-origin: center;
}

#wheel.active {
  transform: translateX(525px) rotateZ(900deg);
  opacity: 1;
}

/* --- Starter screen --- */
.starter {
  display: flex;
  flex-flow: column nowrap;
  margin: 60px 0 80px 60px;
}

#startertext {
  font-family: Bliss, Helvetica, Arial, sans-serif;
}

.starter-row {
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  width: 100%;
  padding: 3px;
}

.starter-column {
  display: flex;
  flex-flow: column nowrap;
  width: 600px;
  margin: 0;
  padding: 0;
  border: 0;
}

.starter-column:first-child {
  margin-right: 5px;
}

.streambutton {
  width: 100%;
  height: 400px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 0;
  cursor: pointer;
  color: #fff;
}

.streambutton:hover .overlay,
.streambutton:focus-visible .overlay {
  opacity: 0.9;
}

.streambutton:hover > h3,
.streambutton:focus-visible > h3 {
  opacity: 0.9;
  text-shadow: 10px 10px 5px rgba(0, 0, 0, 0.75);
  transform: translate(0, -80px);
}

#stream-onderbouw {
  background-color: darkorange;
  margin-right: 1.25rem;
}

#stream-bovenbouw {
  background-color: cadetblue;
}

.streambutton h3 {
  color: #fff;
  font-size: 2.5rem;
  margin: 0;
  transition: all 0.5s ease-out;
}

/* --- Quiz --- */
.binary-quiz {
  display: none;
}

.binary-quiz.current {
  display: block;
  /* Match the starter screen's top offset (margin-top: 60px) so the first
   * question sits at the same vertical position the starter occupied, instead
   * of jumping up when the quiz replaces the starter. */
  margin-top: 60px;
}

.question-title {
  width: 100%;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: flex-start;
  /* Fixed height (not just min-height) so the title area occupies exactly the
   * same vertical space whether the title is one or two lines, and on every
   * step including the starter. This keeps the choice blocks below anchored at
   * a constant position — no jump after the first choice, no downward push from
   * a longer title. Overflow is hidden as a safety net for unusually long text. */
  height: 3.6em;
  overflow: hidden;
}

.question-title h3 {
  display: inline-block;
  text-align: left;
  margin: 0;
  width: 75%;
  line-height: 1.3;
  /* Allow up to two lines of title within the fixed-height bar. */
  font-size: 1.15rem;
}

.sb-progress {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  right: 0;
  width: 20%;
  height: 6px;
  border: 0;
  background-color: rgb(224, 244, 253);
  border-radius: 3px;
}

.sb-progress::-webkit-progress-bar {
  background-color: rgb(224, 244, 253);
  border-radius: 3px;
}

.sb-progress::-webkit-progress-value {
  background-color: #009df1;
  border-radius: 3px;
}

.sb-progress::-moz-progress-bar {
  background-color: #009df1;
  border-radius: 3px;
}

.quiz {
  padding: 0;
  list-style: none;
}

.quiz > li {
  position: relative;
  display: none;
}

.quiz > li.current {
  display: block;
}

.question {
  text-align: center;
}

.question::after {
  clear: both;
  content: "";
  display: table;
}

.question img {
  width: 100%;
}

.question h3 {
  text-align: left;
}

.binary-choice {
  display: inline-block;
  position: relative;
  max-width: 100%;
  margin: 0 0 80px;
  padding: 0;
}

.binary-choice > li {
  position: relative;
  z-index: 2;
  display: inline-block;
  vertical-align: top;
  width: 49%;
  height: auto;
  border-radius: 5px;
  list-style: none;
  background: #0285cd;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

/* The interactive choice is a <button> wrapping the image */
.choice-button {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 5px;
}

.choice-button img {
  display: block;
  width: 100%;
  /* All question images are 600x399. Reserving the aspect ratio makes the block
   * take its full height BEFORE the image bytes load, so the choice blocks never
   * collapse-then-grow (which caused the first shown step to jump). */
  aspect-ratio: 600 / 399;
  height: auto;
  border-radius: 5px;
}

.binary-choice > li:hover,
.choice-button:focus-visible {
  background: #acf9d4;
  outline: none;
}

.binary-choice > li.active {
  background: #acf9d4;
}

/* Thumbs-up overlay shown on hover / activation */
.overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: 0.5s ease;
  background-color: #0285cd;
  pointer-events: none;
  border-radius: 5px;
}

.overlay .icon {
  color: #fff;
  height: 5rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.binary-choice > li:hover .overlay {
  opacity: 0.9;
}

.icon.anim {
  animation-name: thumbsup;
  animation-duration: 0.25s;
}

@keyframes thumbsup {
  0% {
    transform: translate(-50%, -50%) rotate(0);
  }
  50% {
    transform: translate(-50%, -50%) rotate(55deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(45deg);
  }
}

/* --- Results --- */
.results {
  position: relative;
  padding: 0 60px;
}

.answer,
.share-bar {
  display: none;
}

.answer.selected,
.results.complete .share-bar {
  display: block;
}

/* When a result is shown, the result replaces the quiz: hide the questions and
 * progress so they can no longer be seen or clicked. Only the selected answer
 * (.answer.selected) remains visible via the rule above. */
.binary-quiz.complete .quiz {
  display: none;
}

.productVisual {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 1rem;
  text-align: left;
}

.productVisual .col {
  flex: 1 1 320px;
  max-width: 480px;
}

.productVisual img.visual {
  max-width: 100%;
  height: auto;
}

.methodlogo img {
  max-width: 100%;
  vertical-align: text-bottom;
}

.c7-list-checks {
  list-style: none;
  padding-left: 0;
}

.c7-list-checks-item {
  padding-left: 1.25rem;
  padding-bottom: 0.5rem;
  position: relative;
}

.c7-list-checks-item::before {
  content: "\2714";
  color: rgb(245, 180, 0);
  width: 2rem;
  display: block;
  font-size: 1.25rem;
  top: 0;
  left: 0;
  position: absolute;
}

.result_btns {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dropbtn {
  background: #0082c8;
  color: #fff;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-family: Bliss, "Helvetica Neue", Roboto, Arial, sans-serif;
  margin-bottom: 1.5625rem;
  text-align: center;
  text-decoration: none;
  border-radius: 50rem;
  padding: 17px 20px;
}

.dropbtn:hover,
.dropbtn:focus-visible {
  background: #009df1;
  color: #fff;
}

.dropbtn img {
  height: 24px;
  width: 24px;
  margin-right: 0.5rem;
}

.reset-button {
  border: 2px solid rgb(0, 130, 200);
  border-radius: 50rem;
  background: transparent;
  cursor: pointer;
  padding: 0.75rem;
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5625rem;
}

.reset-button:hover,
.reset-button:focus-visible {
  background-color: rgb(224, 244, 253);
}

.reset-button img {
  height: 24px;
  width: 24px;
}

/* --- Share bar --- */
.share-bar {
  text-align: center;
  color: #6d7c86;
}

.share-bar h3 {
  margin-top: 17px;
  display: inline-block;
}

.share-icons {
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  gap: 0.5rem;
}

.share-bar a {
  text-decoration: none;
  color: #2e85d0;
  display: inline-flex;
}

.share-bar a:hover,
.share-bar a:focus-visible {
  color: #389ef4;
}

.share-bar svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
}

/* --- Confetti cannon --- */
.cannon {
  height: 500px;
  width: 10px;
  margin-top: -100px;
  position: absolute;
  top: 0;
  left: 50%;
  transform-origin: 50% 100%;
  animation: cannon-explosion 1s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
  animation-iteration-count: 2;
}

@keyframes cannon-explosion {
  0% {
    transform: scale(0);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.cannon__path {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  transform-origin: 50% 100%;
  padding-bottom: 30%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: space-around;
  align-items: center;
}

.cannon__path--lg {
  height: 100%;
}

.cannon__path--md {
  height: 95%;
}

.cannon__path--sm {
  height: 90%;
}

.cannon__path--angle-2 {
  transform: rotate(-15deg);
}

.cannon__path--angle-1 {
  transform: rotate(-7.5deg);
}

.cannon__path--angle1 {
  transform: rotate(7.5deg);
}

.cannon__path--angle2 {
  transform: rotate(15deg);
}

.cannon__confetti {
  flex: 0 1 auto;
  animation-duration: 1s;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
  animation-iteration-count: 2;
}

.cannon__confetti:nth-child(even) {
  animation-name: confetti-rotate-l;
}

@keyframes confetti-rotate-l {
  0% {
    transform: rotate(0) scaleY(1);
  }
  50% {
    transform: rotate(2turn) scaleY(1.5);
  }
  100% {
    transform: rotate(2.05turn) scaleY(1);
  }
}

.cannon__confetti:nth-child(odd) {
  animation-name: confetti-rotate-r;
}

@keyframes confetti-rotate-r {
  0% {
    transform: rotate(0) scaleY(1);
  }
  50% {
    transform: rotate(-2turn) scaleY(1.5);
  }
  100% {
    transform: rotate(-2.05turn) scaleY(1);
  }
}

.cannon__confetti--ribbon {
  height: 1em;
  width: 0.5em;
  border-radius: 0.1em;
}

.cannon__confetti--flake {
  height: 0.5em;
  width: 0.5em;
  border-radius: 50%;
}

.cannon__confetti--color-1 {
  background-color: #f3e400;
}

.cannon__confetti--color-2 {
  background-color: #004874;
}

.cannon__confetti--color-3 {
  background-color: #e88408;
}

.cannon__confetti--color-4 {
  background-color: #81b1e2;
}

.party-popper {
  left: 42.5%;
  bottom: 5vh;
  font-size: 2em;
}

/* --- Responsive --- */
@media screen and (max-width: 770px) {
  .starter {
    margin-left: unset;
  }

  .starter-row {
    flex-flow: column nowrap;
    width: 100%;
    padding: 3px;
  }

  .starter-column:first-child {
    margin-bottom: 5px;
    margin-right: 0;
  }

  .starter-column {
    width: 100%;
  }

  #stream-onderbouw {
    margin-right: 0;
  }

  .question h3 {
    width: 100%;
  }

  /* On mobile the title h3 spans (almost) full width, so give it more room and
   * keep a fixed height so the stacked choice blocks stay anchored. */
  .question-title {
    height: 3.4em;
  }

  .question-title h3 {
    width: 78%;
  }

  .binary-choice > li {
    width: 100%;
  }

  .binary-choice > li:first-child {
    margin-bottom: 5px;
  }

  .methodlogo {
    width: 100%;
  }

  .results {
    padding: 0;
  }

  .result_btns {
    flex-flow: column nowrap;
    align-items: stretch;
  }

  #wheel {
    display: none;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  #wheel,
  #wheel.active,
  .cannon,
  .cannon__confetti,
  .icon.anim,
  .streambutton h3 {
    transition: none !important;
    animation: none !important;
  }

  #wheel {
    opacity: 1;
  }
}
