@font-face {
  font-family: 'Roboto';
  src: url('assets/roboto-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --blauw: #0074D0;
  --blauw-donker: #005FAA;
  --blauw-diep: #00467F;
  --navy: #00264D;
  --lichtblauw: #D7EAFF;
  --groen: #22C55E;
  --groen-donker: #16A34A;
  --geel: #FACC15;
  --schaduw: 0 5px 8px rgba(0, 96, 172, 0.2);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--blauw-donker);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #fff;
  background:
    radial-gradient(110% 55% at 75% 0%, rgba(46, 166, 255, 0.85) 0%, rgba(46, 166, 255, 0) 65%),
    linear-gradient(180deg, #0A84E0 0%, var(--blauw) 45%, var(--blauw-donker) 100%);
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  flex-direction: column;
  max-width: 30rem;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(0.75rem, env(safe-area-inset-top)) 1.25rem max(1rem, env(safe-area-inset-bottom));
}

.top { display: flex; align-items: center; justify-content: center; height: 3rem; }
.logo { height: 2.3rem; width: auto; }

main { flex: 1; }

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding-top: 0.5rem;
  text-align: center;
  animation: enter 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.95rem 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--geel);
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 0 #CA8A04;
}
.badge svg { width: 1.35rem; height: 1.35rem; }
.ticket { fill: var(--navy); }
.ticket-cut { fill: none; stroke: var(--geel); stroke-width: 1.6; stroke-dasharray: 2 2; }
.badge--soft { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; padding: 0.4rem 0.9rem; }

.title {
  margin: 0.15rem 0 0;
  font-size: clamp(1.9rem, 8.6vw, 2.6rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.lead {
  max-width: 23rem;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.45;
}
.lead strong { font-weight: 800; }

.meta { margin: -0.2rem 0 0; color: var(--lichtblauw); font-size: 0.92rem; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.6rem;
  padding: 0.9rem 1.25rem;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.btn--go {
  background: var(--groen);
  color: #fff;
  box-shadow: 0 5px 0 var(--groen-donker), 0 14px 28px rgba(0, 38, 77, 0.35);
}
.btn--go:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--groen-donker), 0 6px 14px rgba(0, 38, 77, 0.3); }
.btn--ghost {
  background: transparent;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

:focus-visible { outline: 3px solid var(--geel); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.link {
  padding: 0.5rem;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* De blauwe deur. Alle maten zijn in em, zodat dezelfde deur in elk formaat klopt.
   Op lage schermen wordt de deur kleiner, zodat de groene knop zonder scrollen zichtbaar blijft. */
.door-slot {
  --door-w: min(50vw, clamp(6rem, 100vh * 0.3 - 4.5rem, 13rem));
  --door-w: min(50vw, clamp(6rem, 100svh * 0.3 - 4.5rem, 13rem));
  display: grid;
  place-items: center;
  padding: clamp(0.6rem, 3vh, 1.4rem) 0 clamp(0.5rem, 2vh, 0.9rem);
}
.door-slot--small { --door-w: 5rem; padding: 0; }
.door-slot--result { --door-w: min(42vw, 10.5rem); padding: 1.6rem 0 1.4rem; }

.door {
  position: relative;
  width: var(--door-w);
  aspect-ratio: 5 / 8;
  font-size: calc(var(--door-w) / 10);
}
.door__glow {
  position: absolute;
  inset: -35% -60% -12%;
  background: radial-gradient(closest-side, rgba(255, 214, 102, 0.6), rgba(255, 214, 102, 0) 72%);
  opacity: 0.45;
  pointer-events: none;
  animation: glow 2.6s ease-in-out infinite;
}
.door__frame {
  position: absolute;
  inset: 0;
  padding: 0.45em 0.45em 0;
  border-radius: 0.6em 0.6em 0 0;
  background: linear-gradient(180deg, #fff, #e3eefa);
  box-shadow: var(--schaduw), 0 1.4em 3em rgba(0, 30, 70, 0.35);
  perspective: 70em;
}
.door__inside {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0.2em 0.2em 0 0;
  background: radial-gradient(130% 80% at 50% 85%, #FFFBEA 0%, #FFE08A 28%, #F5B43D 62%, #C46A1C 100%);
}
.door__rays {
  position: absolute;
  inset: -60%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0.6) 0deg 7deg, rgba(255, 255, 255, 0) 7deg 24deg);
  opacity: 0.55;
  animation: spin 16s linear infinite;
}
.door__leaf {
  position: absolute;
  inset: 0.45em 0.45em 0;
  border-radius: 0.2em 0.2em 0 0;
  background: linear-gradient(165deg, #1B8AE0 0%, var(--blauw) 35%, var(--blauw-donker) 75%, var(--blauw-diep) 100%);
  box-shadow: inset 0 0 0 0.08em rgba(255, 255, 255, 0.14);
  transform-origin: left center;
  transition: transform 1.3s cubic-bezier(0.2, 0.85, 0.25, 1);
}
.door[data-open="true"] .door__leaf { transform: rotateY(-72deg); }
.door[data-open="true"] .door__glow { opacity: 0.95; animation: none; }
.door-slot[data-door="start"] .door__leaf { animation: peek 4.5s ease-in-out 1.2s infinite; }

.door__panel {
  position: absolute;
  left: 14%;
  right: 14%;
  border-radius: 0.25em;
  box-shadow: inset 0.12em 0.12em 0 rgba(0, 20, 50, 0.28), inset -0.12em -0.12em 0 rgba(255, 255, 255, 0.16);
}
.door__panel--top { top: 7%; height: 38%; }
.door__panel--bottom { top: 52%; height: 41%; }
.door__handle {
  position: absolute;
  top: 50%;
  right: 7%;
  width: 0.45em;
  height: 1.7em;
  border-radius: 0.3em;
  background: linear-gradient(180deg, #fff, #C9DCF2);
  box-shadow: 0 0.1em 0.2em rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
}
.door__spill {
  position: absolute;
  left: 50%;
  bottom: -1.1em;
  width: 170%;
  height: 2.2em;
  background: radial-gradient(closest-side, rgba(255, 214, 102, 0.7), rgba(255, 214, 102, 0));
  opacity: 0.45;
  transform: translateX(-50%);
  transition: opacity 1s;
  pointer-events: none;
}
.door[data-open="true"] .door__spill { opacity: 1; }

.door__locks {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  padding: 0.4em;
  border-radius: 1.8em;
  background: linear-gradient(180deg, #0868B8, #004C8C);
  box-shadow: inset 0 0.08em 0.25em rgba(0, 20, 50, 0.45), 0 0 0 0.1em rgba(255, 255, 255, 0.12);
  transform: translate(-50%, -50%);
}
.lock {
  display: grid;
  place-items: center;
  width: 2.6em;
  height: 2.6em;
  border-radius: 50%;
  background: rgba(0, 38, 77, 0.35);
  box-shadow: inset 0 0 0 0.14em rgba(255, 255, 255, 0.55);
  color: #fff;
  transition: background 0.3s, box-shadow 0.3s;
}
.lock svg { width: 60%; height: 60%; overflow: visible; }
.lock__shackle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: 100% 100%;
  transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.lock__body { fill: currentColor; }
.lock__hole { fill: var(--blauw-donker); transition: fill 0.3s; }
.lock[data-open="true"] {
  background: var(--groen);
  box-shadow: inset 0 0 0 0.14em rgba(255, 255, 255, 0.9), 0 0 1.2em rgba(34, 197, 94, 0.8);
  animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.lock[data-open="true"] .lock__shackle { transform: translateY(-14%) rotate(32deg); }
.lock[data-open="true"] .lock__hole { fill: var(--groen-donker); }

/* Vragen */
.progress { display: flex; align-items: center; justify-content: center; gap: 1.1rem; align-self: stretch; padding-top: 0.6rem; }
.step { margin: 0; color: var(--lichtblauw); font-size: 1rem; font-weight: 700; text-align: left; }
.step span { display: block; margin-top: 0.15rem; font-size: 0.88rem; font-weight: 400; }
.question {
  margin: 0.3rem 0 0.2rem;
  font-size: clamp(1.5rem, 6.6vw, 1.9rem);
  font-weight: 900;
  line-height: 1.12;
  text-wrap: balance;
}
.answers { display: grid; gap: 0.7rem; width: 100%; }
.answer {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 3.75rem;
  padding: 0.85rem 1.1rem;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--schaduw), 0 4px 0 #B9D4F0;
  transition: transform 0.12s, box-shadow 0.12s, background 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.answer:active { transform: translateY(3px); box-shadow: var(--schaduw), 0 1px 0 #B9D4F0; }
.answer__emoji { font-size: 1.6rem; line-height: 1; }
.answer[aria-pressed="true"] { background: #ECFDF3; box-shadow: inset 0 0 0 3px var(--groen), 0 4px 0 var(--groen-donker); }
.answers.is-locked .answer:not([aria-pressed="true"]) { opacity: 0.45; }

/* Vraag met veel korte antwoorden (genres): tegels in twee kolommen. */
.answers--grid { grid-template-columns: 1fr 1fr; }
.answers--grid .answer {
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  min-height: 4.6rem;
  padding: 0.7rem 0.5rem;
  text-align: center;
}
.answers--grid .answer__emoji { font-size: 1.75rem; }

/* Uitslag */
.eyebrow { margin: 0; color: var(--geel); font-size: 0.9rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.result-title { margin: -0.3rem 0 0; font-size: clamp(1.5rem, 6.4vw, 1.9rem); font-weight: 500; line-height: 1.05; }
.result-title span { display: block; margin-top: 0.2rem; font-size: 1.35em; font-weight: 900; text-transform: uppercase; }
.type-text { max-width: 24rem; margin: 0; font-size: 1.08rem; font-weight: 300; line-height: 1.45; }
.card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: #fff;
  color: var(--navy);
  text-align: left;
  box-shadow: var(--schaduw), 0 16px 32px rgba(0, 38, 77, 0.25);
}
.card__icon { flex: none; width: 3.5rem; height: 3.5rem; }
.card__label { margin: 0 0 0.2rem; color: var(--blauw); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.card__text { margin: 0; font-size: 1rem; line-height: 1.4; }
.small { margin: -0.2rem 0 0; color: var(--lichtblauw); font-size: 0.92rem; }

.others { width: 100%; padding: 0.1rem 1rem; border-radius: 14px; background: rgba(255, 255, 255, 0.1); text-align: left; }
.others summary { display: flex; justify-content: space-between; padding: 0.8rem 0; font-weight: 700; list-style: none; cursor: pointer; }
.others summary::-webkit-details-marker { display: none; }
.others summary::after { content: '+'; font-size: 1.3rem; font-weight: 400; line-height: 1; }
.others[open] summary::after { content: '–'; }
.others ul { display: grid; gap: 0.65rem; margin: 0 0 0.9rem; padding: 0; list-style: none; }
.others li { display: flex; align-items: center; gap: 0.75rem; }
.others img { flex: none; width: 2.3rem; height: 2.3rem; padding: 0.25rem; border-radius: 10px; background: #fff; }
.others b { display: block; }
.others span { color: var(--lichtblauw); font-size: 0.92rem; }
.fineprint { margin: 0; color: var(--lichtblauw); font-size: 0.8rem; }
.fineprint a { color: #fff; }

/* Tijdelijke formulierpagina */
.handover { display: grid; gap: 0.5rem; width: 100%; margin: 0.2rem 0 0.4rem; }
.handover div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; border-radius: 12px; background: #fff; color: var(--navy); }
.handover dt { color: var(--blauw); }
.handover dd { margin: 0; font-weight: 800; }

.foot { padding-top: 1.6rem; color: var(--lichtblauw); font-size: 0.78rem; text-align: center; opacity: 0.85; }

.confetti { position: fixed; inset: 0; z-index: 10; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute;
  top: var(--y0);
  left: var(--x0);
  width: 0.55rem;
  height: 0.9rem;
  border-radius: 2px;
  background: var(--c);
  opacity: 0;
  animation: burst var(--d) cubic-bezier(0.15, 0.7, 0.3, 1) var(--delay) forwards;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes enter { from { opacity: 0; transform: translateY(14px); } }
@keyframes glow { 50% { opacity: 0.75; transform: scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 40% { transform: scale(1.22); } }
@keyframes peek {
  0%, 68%, 100% { transform: rotateY(0deg); }
  78% { transform: rotateY(-16deg); }
  88% { transform: rotateY(-5deg); }
}
@keyframes burst {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  30% { transform: translate(calc(var(--dx) * 0.45), var(--up)) rotate(calc(var(--r) * 0.3)); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .confetti { display: none; }
}

/* Lage schermen (bv. iPhone SE met werkbalken): alles iets compacter, zodat de groene knop in beeld blijft. */
@media (max-height: 620px) {
  .top { height: 2.5rem; }
  .logo { height: 2rem; }
  .screen { gap: 0.65rem; padding-top: 0.25rem; }
  .title { font-size: clamp(1.7rem, 7.6vw, 2.2rem); }
  .lead { font-size: 1.02rem; }
  .door-slot--small { --door-w: 3.9rem; }
  .answers--grid .answer { min-height: 4rem; padding: 0.5rem; }
}
