.hmk, .hmk * { box-sizing: border-box; }
.hmk {
  --ink: #212529; --rose: #DAB0AE; --lavender: #BBAADD; --tint: #F3F0FA; --white: #fff;
  --radius: 4px;
  --ease-panel: cubic-bezier(.65, 0, .35, 1);
  --ease-reveal: cubic-bezier(.16, 1, .3, 1);
  container-type: inline-size;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 16px; line-height: 1.55; color: var(--ink);
  padding: clamp(24px, 4vw, 48px) 0;
  text-align: left;
}
.hmk h2, .hmk p, .hmk ol, .hmk li { margin: 0; padding: 0; font-family: inherit; color: var(--ink); text-transform: none; }
.hmk a { text-decoration: none; }
.hmk button { font-family: inherit; }
.hmk :focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.hmk .hmk-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.hmk .hmk-eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 24px; }
.hmk .hmk-title { font-size: clamp(30px, 12cqw, 68px); line-height: 1.05; font-weight: 700; letter-spacing: -.025em; margin-bottom: 24px; }
.hmk .hmk-title .hmk-line { display: block; overflow: hidden; }
.hmk .hmk-title .hmk-line > span { display: block; animation: hmk-rise .9s var(--ease-reveal) both; }
.hmk .hmk-title .hmk-line:nth-child(2) > span { animation-delay: .12s; }
.hmk .hmk-lede { max-width: 44ch; font-size: 18px; margin-bottom: 32px; animation: hmk-fade .8s var(--ease-reveal) .3s both; }
.hmk .hmk-steps { list-style: none; display: grid; gap: 16px; max-width: 46ch; counter-reset: s; animation: hmk-fade .8s var(--ease-reveal) .45s both; }
.hmk .hmk-steps li { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 16px; counter-increment: s; font-weight: 500; }
.hmk .hmk-steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius); background: var(--tint); font-weight: 700; }

.hmk .hmk-play { display: grid; gap: 20px; }
.hmk .hmk-stage { position: relative; background: var(--tint); border-radius: var(--radius); min-height: 392px; padding: 0 24px 24px; overflow: hidden; }
.hmk .hmk-rail { height: 16px; margin: 0 -24px; background: var(--rose); }
.hmk .hmk-ribbons { display: flex; justify-content: center; gap: clamp(16px, 4cqw, 48px); }
.hmk .hmk-slot { display: grid; justify-items: center; }

.hmk .hmk-ribbon {
  white-space: normal;
  --c: var(--rose); --fg: var(--ink); --cut: 56%;
  position: relative; display: block; width: 96px; height: 292px; padding: 0; margin: 0;
  border: 0 !important; border-radius: 0; background: none !important; box-shadow: none; cursor: pointer; text-transform: none; letter-spacing: normal;
  transition: transform .4s var(--ease-panel), opacity .5s var(--ease-panel);
  animation: hmk-drop .9s var(--ease-reveal) both; -webkit-tap-highlight-color: transparent;
}
.hmk .hmk-slot:nth-child(1) .hmk-ribbon { animation-delay: .25s; }
.hmk .hmk-slot:nth-child(2) .hmk-ribbon { --c: var(--lavender); animation-delay: .4s; }
.hmk .hmk-slot:nth-child(3) .hmk-ribbon { --c: var(--ink); --fg: var(--white); animation-delay: .55s; }
.hmk .hmk-ribbon .hmk-top, .hmk .hmk-ribbon .hmk-bottom { position: absolute; left: 0; right: 0; background: var(--c); }
.hmk .hmk-ribbon .hmk-top { top: 0; height: var(--cut); }
.hmk .hmk-ribbon .hmk-bottom { top: calc(var(--cut) - 1px); bottom: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 88%, 0 100%); transition: transform .85s cubic-bezier(.55, 0, .9, .5), opacity .5s linear .35s; }
.hmk .hmk-ribbon .hmk-num { position: absolute; top: 28px; left: 0; right: 0; text-align: center; font-weight: 700; font-size: 28px; line-height: 1; color: var(--fg); }
.hmk .hmk-ribbon .hmk-mark { white-space: normal; overflow-wrap: anywhere; position: absolute; top: calc(var(--cut) + 28px); left: 8px; right: 8px; text-align: center; font-weight: 600; font-size: 14px; line-height: 1.25; color: var(--fg); transition: opacity .2s; }
.hmk .hmk-stage.hmk-is-idle .hmk-ribbon:hover, .hmk .hmk-stage.hmk-is-idle .hmk-ribbon:focus-visible { transform: translateY(-6px); }
.hmk .hmk-stage.hmk-is-busy .hmk-ribbon, .hmk .hmk-stage.hmk-is-done .hmk-ribbon { cursor: default; }
.hmk .hmk-stage.hmk-is-busy .hmk-ribbon:not(.hmk-chosen), .hmk .hmk-stage.hmk-is-done .hmk-ribbon:not(.hmk-chosen) { opacity: .3; }
.hmk .hmk-ribbon.hmk-chosen.hmk-cut .hmk-bottom { transform: translateY(190px); opacity: 0; }
.hmk .hmk-ribbon.hmk-chosen.hmk-cut .hmk-mark { opacity: 0; }

.hmk .hmk-scissors { position: absolute; left: 0; top: 0; width: 84px; height: 44px; pointer-events: none; transition: transform .6s var(--ease-panel), opacity .4s linear; will-change: transform; }
.hmk .hmk-scissors svg { position: absolute; inset: 0; }
.hmk .hmk-scissors .hmk-closed { opacity: 0; }
.hmk .hmk-scissors.hmk-snip .hmk-open { opacity: 0; }
.hmk .hmk-scissors.hmk-snip .hmk-closed { opacity: 1; }
.hmk .hmk-scissors.hmk-gone { opacity: 0; }

.hmk .hmk-hint { font-size: 14px; font-weight: 500; min-height: 22px; }
.hmk .hmk-panel { min-height: 250px; padding: 8px 0 0; display: grid; align-content: start; gap: 16px; }
.hmk .hmk-ph { font-size: 18px; font-weight: 500; }
.hmk .hmk-deal { display: grid; gap: 16px; animation: hmk-pop .7s var(--ease-reveal) both; }
.hmk .hmk-kicker { font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.hmk .hmk-deal-title { font-size: clamp(22px, 6cqw, 36px); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; }
.hmk .hmk-deal p { max-width: 52ch; }
.hmk .hmk-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hmk .hmk-code { min-height: 48px; padding: 0 24px; display: inline-flex; align-items: center; background: var(--tint); border-radius: var(--radius); font-weight: 700; font-size: 20px; letter-spacing: .12em; user-select: all; color: var(--ink); }
.hmk .hmk-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--radius); font-family: inherit; font-weight: 600; font-size: 16px; line-height: 1; cursor: pointer; text-transform: none; transition: background-color .25s var(--ease-panel), transform .2s var(--ease-panel); }
.hmk .hmk-btn:active { transform: scale(.98); }
.hmk a.hmk-btn-primary, .hmk .hmk-btn-primary { background: var(--ink); color: var(--white); }
.hmk a.hmk-btn-primary:hover, .hmk .hmk-btn-primary:hover { background: #3b4249; color: var(--white); }
.hmk .hmk-btn-soft { background: var(--tint); color: var(--ink); }
.hmk .hmk-btn-soft:hover { background: var(--lavender); color: var(--ink); }
.hmk .hmk-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hmk .hmk-note { font-size: 14px; }
.hmk .hmk-linklike { background: none; border: 0; box-shadow: none; padding: 12px 0; min-height: 44px; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; text-transform: none; }
.hmk .hmk-linklike:hover { background: none; color: var(--ink); opacity: .65; }
.hmk .hmk-status { font-size: 14px; font-weight: 500; min-height: 22px; }

@keyframes hmk-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes hmk-fade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes hmk-drop { from { opacity: 0; transform: translateY(-48px); } to { opacity: 1; transform: none; } }
@keyframes hmk-pop  { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* Donkere achtergrond (bv. hero): tekst onder het speelvak licht */
.hmk.hmk--donker { --text: #fff; }
.hmk.hmk--donker .hmk-intro, .hmk.hmk--donker .hmk-intro *, .hmk.hmk--donker .hmk-hint, .hmk.hmk--donker .hmk-ph, .hmk.hmk--donker .hmk-kicker, .hmk.hmk--donker .hmk-deal-title, .hmk.hmk--donker .hmk-deal p, .hmk.hmk--donker .hmk-note, .hmk.hmk--donker .hmk-status { color: #fff; }
.hmk.hmk--donker .hmk-steps li::before { color: var(--ink); }
.hmk.hmk--donker .hmk-code { background: var(--white); color: var(--ink); }
.hmk.hmk--donker a.hmk-btn-primary, .hmk.hmk--donker .hmk-btn-primary { background: var(--rose); color: var(--ink); }
.hmk.hmk--donker a.hmk-btn-primary:hover, .hmk.hmk--donker .hmk-btn-primary:hover { background: var(--white); color: var(--ink); }
.hmk.hmk--donker .hmk-btn-soft { background: var(--tint); color: var(--ink); }
.hmk.hmk--donker .hmk-linklike, .hmk.hmk--donker .hmk-linklike:hover { color: #fff; }
.hmk.hmk--donker :focus-visible { outline-color: #fff; }

/* Alleen het spel (tekst staat in Elementor) */
.hmk.hmk--spel { padding: 0; }
.hmk.hmk--spel .hmk-grid { grid-template-columns: 1fr; }
/* Compacter speelvak als alleen het spel getoond wordt (hero) */
.hmk.hmk--spel .hmk-play { gap: 14px; }
.hmk.hmk--spel .hmk-stage { min-height: 320px; }
.hmk.hmk--spel .hmk-ribbon { height: 244px; }
.hmk.hmk--spel .hmk-panel { min-height: 150px; padding-top: 0; }
@container (max-width: 599px) {
  .hmk.hmk--spel .hmk-stage { min-height: 300px; }
  .hmk.hmk--spel .hmk-ribbon { width: 84px; height: 228px; }
}
@container (max-width: 379px) {
  .hmk.hmk--spel .hmk-ribbon { width: 76px; height: 220px; }
}
.hmk.hmk--spel .hmk-deal { gap: 12px; }
.hmk.hmk--spel .hmk-status:empty { display: none; }
@container (min-width: 440px) {
  .hmk.hmk--spel .hmk-btn, .hmk.hmk--spel .hmk-code { width: auto; }
  .hmk.hmk--spel .hmk-code-row, .hmk.hmk--spel .hmk-actions { display: flex; flex-wrap: wrap; gap: 12px; }
}

@container (min-width: 900px) {
  .hmk .hmk-grid { grid-template-columns: 1fr 1fr; column-gap: 64px; }
}
@container (max-width: 599px) {
  .hmk .hmk-stage { min-height: 360px; padding: 0 16px 16px; }
  .hmk .hmk-rail { margin: 0 -16px; }
  .hmk .hmk-ribbon { width: 84px; height: 264px; }
  .hmk .hmk-ribbon .hmk-num { top: 24px; font-size: 24px; }
  .hmk .hmk-btn, .hmk .hmk-code { width: 100%; justify-content: center; }
  .hmk .hmk-code-row, .hmk .hmk-actions { display: grid; gap: 8px; }
}
@container (max-width: 379px) {
  .hmk .hmk-stage { padding: 0 8px 16px; }
  .hmk .hmk-rail { margin: 0 -8px; }
  .hmk .hmk-ribbons { gap: 10px; }
  .hmk .hmk-ribbon { width: 76px; height: 248px; }
  .hmk .hmk-ribbon .hmk-mark { left: 4px; right: 4px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .hmk *, .hmk *::before, .hmk *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
