/* Benny & Jojo’s — printed festival tickets
   Bricolage Grotesque (display) + Space Grotesk (text). Plum / mint on near-black. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --mint: #c6f0e4;
  --aqua: #a7e8d7;
  --plum: #64165d;
  --berry: #8a176e;
  --night: #171317;
  --night-2: #221822;

  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --text: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);

  --pad-x: clamp(1rem, 4vw, 2rem);
  --deck: min(100% - (var(--pad-x) * 2), 60rem);
  --r: 0.9rem;
  --stub: 9rem;

  /* Notch masks: half-circle bites at two corners of one edge */
  --hole: #0000 var(--r), #000 calc(var(--r) + 0.5px);
  --cut-bottom:
    radial-gradient(circle at 0 100%, var(--hole)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 100%, var(--hole)) right / 51% 100% no-repeat;
  --cut-top:
    radial-gradient(circle at 0 0, var(--hole)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 0, var(--hole)) right / 51% 100% no-repeat;
  --cut-right:
    radial-gradient(circle at 100% 0, var(--hole)) top / 100% 51% no-repeat,
    radial-gradient(circle at 100% 100%, var(--hole)) bottom / 100% 51%
      no-repeat;
  --cut-left:
    radial-gradient(circle at 0 0, var(--hole)) top / 100% 51% no-repeat,
    radial-gradient(circle at 0 100%, var(--hole)) bottom / 100% 51% no-repeat;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: vt-out 0.18s var(--ease) both;
}

::view-transition-new(root) {
  animation: vt-in 0.22s var(--ease) both;
}

@keyframes vt-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background: var(--plum);
  color: var(--mint);
}

.tkt--plum ::selection,
.tkt--berry ::selection,
.tkt--ink ::selection,
.tkt--entry .tkt__stub--photo ::selection,
.tkt__punch::selection,
.btn::selection,
.btn ::selection {
  background: var(--mint);
  color: var(--plum);
}

.tkt--ink ::selection {
  color: var(--night);
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  position: relative;
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip;
  background: var(--night);
  color: var(--mint);
  font-family: var(--text);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body > * {
  position: relative;
  z-index: 1;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.frame {
  display: block;
  overflow: hidden;
}

.frame img {
  transition: transform 0.4s var(--ease);
}

@media (hover: hover) {
  .frame:hover img {
    transform: scale(1.028);
  }
}

h1,
h2,
h3,
p,
figure,
ul,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 75%;
  font-variation-settings: "opsz" 96;
  line-height: 0.9;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--pad-x);
  top: -4rem;
  z-index: 80;
  padding: 0.6rem 0.8rem;
  background: var(--mint);
  color: var(--night);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
}

/* Small print: labels, codes, units */
.tkt__label,
.tkt__code,
.facts dt,
.clock-label,
.tick small,
.tkt__sign span:first-child,
.langs button,
.btn-text {
  font-family: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

/* Page transition */
.wash {
  position: fixed;
  inset: 0;
  z-index: 90 !important;
  background: var(--plum);
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: bottom;
}

.page-gate.is-leaving .wash {
  transform: scaleY(1);
  transition: transform 0.2s var(--ease);
}

html.is-arriving .wash {
  animation: open 0.26s var(--ease) forwards;
}

@keyframes open {
  from {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(0);
  }
}

/* Language switch */
.langs {
  display: flex;
  gap: 0.15rem;
}

.langs button {
  appearance: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.3rem;
  border: 0;
  background: transparent;
  color: rgba(198, 240, 228, 0.45);
  cursor: pointer;
  transition:
    color 0.15s var(--ease),
    transform 0.08s var(--ease);
}

.langs button:active {
  transform: translateY(1px);
}

.langs button:hover,
.langs button[aria-pressed="true"] {
  color: var(--mint);
}

.langs button[aria-pressed="true"] {
  text-decoration: underline;
  text-underline-offset: 0.4em;
  text-decoration-thickness: 2px;
}

.langs--float {
  position: absolute !important;
  top: max(0.4rem, env(safe-area-inset-top));
  right: max(0.4rem, env(safe-area-inset-right));
  z-index: 30 !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 3.4rem;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 2px;
  background: var(--plum);
  color: var(--mint);
  font-family: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.16s var(--ease),
    transform 0.08s var(--ease);
}

.btn:hover {
  background: var(--berry);
}

.btn:active {
  background: #52114c;
  transform: translateY(1px);
}

.btn__arrow {
  font-size: 1.15rem;
  transition: transform 0.2s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(0.25rem);
}

#claim .btn__arrow {
  padding-left: 0.85rem;
  border-left: 1.5px dashed rgba(198, 240, 228, 0.36);
}

.btn-text {
  appearance: none;
  margin-top: 0.6rem;
  padding: 0.35rem 0;
  border: 0;
  border-bottom: 2px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition:
    opacity 0.15s var(--ease),
    color 0.15s var(--ease),
    border-color 0.15s var(--ease),
    transform 0.08s var(--ease);
}

.btn-text:hover {
  opacity: 0.78;
}

.btn-text:active {
  transform: translateY(1px);
}

.btn-text.is-copied {
  opacity: 1;
  color: var(--aqua);
  border-bottom-color: var(--aqua);
}

/* ===================== TICKET SYSTEM ===================== */

.tkt {
  --bg: var(--mint);
  --stub-bg: var(--aqua);
  --ink: var(--night);
  --head: var(--plum);
  --soft: rgba(23, 19, 23, 0.7);
  --rule: rgba(23, 19, 23, 0.22);
  --perf: rgba(23, 19, 23, 0.45);
  --sc: 0.28rem;
  --sc-step: 1rem;
  --sc-hole: #0000 var(--sc), #000 calc(var(--sc) + 0.5px);
  --tooth: 0.5rem;
  --punch: #0000 0.2rem, #000 calc(0.2rem + 0.5px);
  --corner: #0000 0.9rem, #000 calc(0.9rem + 0.5px);
  /* Die-cut edge on the stub end; each ticket picks its own cut */
  --edge: radial-gradient(circle at 50% 100%, var(--sc-hole)) bottom / var(--sc-step) 100% round no-repeat;

  display: grid;
  grid-template-columns: minmax(0, 1fr);
  color: var(--ink);
  border-radius: 0.75rem;
  overflow: hidden;
  -webkit-mask: var(--edge);
  mask: var(--edge);
}

.tkt--entry {
  --edge: radial-gradient(circle at 50% 0, var(--sc-hole)) top / var(--sc-step) 100% round no-repeat;
}

/* Line-up: pinking-shear teeth */
#programma {
  --edge:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat,
    conic-gradient(from -45deg at 50% 100%, #000 0 90deg, #0000 0) bottom / calc(var(--tooth) * 2) var(--tooth) round no-repeat;
}

/* Overnight: wide, soft scallops */
#slapen {
  --sc: 0.45rem;
  --sc-step: 1.5rem;
}

/* Gift: a row of punched holes */
#cadeau {
  --edge: radial-gradient(circle at 50% calc(100% - 0.7rem), var(--punch)) bottom / 1rem 100% round no-repeat;
}

/* RSVP: admit-one, scalloped at both ends */
#aanwezig {
  --edge:
    radial-gradient(circle at 50% 0, var(--sc-hole)) top / var(--sc-step) 51% round no-repeat,
    radial-gradient(circle at 50% 100%, var(--sc-hole)) bottom / var(--sc-step) 51% round no-repeat;
}

/* Closing: classic theatre ticket, scooped corners */
#totziens {
  border-radius: 0;
  --edge:
    radial-gradient(circle at 0 0, var(--corner)) top left / 51% 51% no-repeat,
    radial-gradient(circle at 100% 0, var(--corner)) top right / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%, var(--corner)) bottom left / 51% 51% no-repeat,
    radial-gradient(circle at 100% 100%, var(--corner)) bottom right / 51% 51% no-repeat;
}

.tkt__main,
.tkt__stub {
  position: relative;
  isolation: isolate;
  min-width: 0;
}

.tkt__main {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.75rem 1.4rem 1.9rem;
  background: var(--bg);
  -webkit-mask: var(--cut-bottom);
  mask: var(--cut-bottom);
}

.tkt__stub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.4rem;
  background: var(--stub-bg);
  -webkit-mask: var(--cut-top);
  mask: var(--cut-top);
}

/* Die-cut perforation stopping cleanly at the notch cutouts */
.tkt__stub::before {
  content: "";
  position: absolute;
  inset: 0 var(--r) auto var(--r);
  height: 2px;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    var(--perf) 0 5px,
    transparent 5px 10px
  );
}

/* Themes */
.tkt--aqua {
  --bg: var(--aqua);
  --stub-bg: var(--mint);
}

.tkt--plum,
.tkt--berry,
.tkt--ink {
  --ink: var(--mint);
  --head: var(--mint);
  --soft: rgba(198, 240, 228, 0.74);
  --rule: rgba(198, 240, 228, 0.24);
  --perf: rgba(198, 240, 228, 0.45);
}

.tkt--plum {
  --bg: var(--plum);
  --stub-bg: var(--berry);
}

.tkt--berry {
  --bg: var(--berry);
  --stub-bg: var(--plum);
}

.tkt--ink {
  --bg: var(--night-2);
  --stub-bg: var(--plum);
  --head: var(--aqua);
  --rule: rgba(198, 240, 228, 0.3);
}

/* Ticket typography */
.tkt__label {
  color: var(--soft);
}

.tkt__title {
  color: var(--head);
  font-size: clamp(2.6rem, 11vw, 4.6rem);
  max-width: 12em;
}

.tkt__title--xl {
  font-size: min(8.9rem, 19.2cqi);
  line-height: 0.82;
  letter-spacing: -0.025em;
  max-width: none;
}

.tkt__lead {
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 28em;
  text-wrap: pretty;
}

.tkt__text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 34em;
  color: var(--soft);
  text-wrap: pretty;
}

.tkt__text strong {
  color: var(--ink);
  font-weight: 700;
}

.tkt__code {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--soft);
}

.barcode {
  flex: 0 0 auto;
  width: 7.5rem;
  height: 2.2rem;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 4px,
    var(--ink) 4px 5px,
    transparent 5px 8px,
    var(--ink) 8px 11px,
    transparent 11px 12px,
    var(--ink) 12px 13px,
    transparent 13px 17px,
    var(--ink) 17px 19px,
    transparent 19px 21px
  );
  opacity: 0.85;
}

/* ===================== ENTRY (index) ===================== */

.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(3.5rem, calc(env(safe-area-inset-top) + 3rem)) var(--pad-x)
    max(2.5rem, calc(env(safe-area-inset-bottom) + 2rem));
}

.tkt--entry {
  width: min(100%, 64rem);
  --stub-bg: var(--plum);
}

.tkt--entry .tkt__stub--photo {
  order: -1;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.4rem 1.25rem;
  color: var(--mint);
  --soft: rgba(198, 240, 228, 0.74);
  --perf: rgba(198, 240, 228, 0.45);
  -webkit-mask: var(--cut-bottom);
  mask: var(--cut-bottom);
  transition: transform 0.26s var(--ease);
}

.tkt--entry .tkt__stub--photo::before {
  inset: auto var(--r) 0 var(--r);
}

@media (hover: hover) {
  .tkt--entry:has(#claim:hover) .tkt__stub--photo,
  .tkt--entry:has(#claim:focus-visible) .tkt__stub--photo {
    transform: translateY(-2px);
  }
}

.page-gate.is-leaving .tkt--entry .tkt__stub--photo {
  transform: translateY(-5px);
}

.photo {
  display: grid;
  gap: 0.5rem;
  width: min(100%, 13.5rem);
}

.photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.tkt--entry .tkt__stub--photo .tkt__code {
  flex-direction: row;
  justify-content: space-between;
  width: min(100%, 13.5rem);
}

.tkt--entry .tkt__main {
  gap: 1.15rem;
  padding: 1.8rem 1.4rem 1.7rem;
  -webkit-mask: var(--cut-top);
  mask: var(--cut-top);
}

.headline {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  color: var(--plum);
}

.headline__small {
  font-size: clamp(1.5rem, 6.5vw, 2.2rem);
  font-stretch: 100%;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.headline__big {
  font-size: min(7.3rem, 18.4cqi);
  line-height: 0.84;
  letter-spacing: -0.02em;
}

.tkt__punch {
  align-self: flex-start;
  max-width: 100%;
  padding: 0.5rem 0.8rem 0.45rem;
  background: var(--plum);
  color: var(--mint);
  font-family: var(--display);
  font-size: clamp(1.35rem, 5vw, 1.9rem);
  font-weight: 800;
  font-stretch: 75%;
  font-variation-settings: "opsz" 96;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
}

.tkt__foot {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 0.6rem;
  padding-top: 1.25rem;
  border-top: 1.5px solid var(--rule);
}

.tkt__sign {
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  font-stretch: 85%;
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.tkt__sign span:first-child {
  color: var(--soft);
  margin-bottom: 0.4rem;
}

.tkt__action {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tkt__ask {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 800;
  font-stretch: 75%;
  font-variation-settings: "opsz" 96;
  line-height: 1;
  color: var(--plum);
}

.tkt__action .btn {
  width: 100%;
}

/* ===================== FESTIVAL PAGE ===================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(0.35rem, env(safe-area-inset-top)) var(--pad-x) 0.35rem;
  background: rgba(23, 19, 23, 0.96);
  border-bottom: 1px solid rgba(198, 240, 228, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  font-stretch: 75%;
  font-variation-settings: "opsz" 96;
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mint);
}

.deck {
  width: var(--deck);
  margin: 0 auto;
  padding: 2rem 0 max(4rem, calc(env(safe-area-inset-bottom) + 3rem));
  display: grid;
  gap: 1.4rem;
}

/* Practical */
.tkt__split {
  display: grid;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.portraits {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.portraits img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 25%;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
}

.facts > div {
  padding-top: 0.6rem;
  border-top: 1.5px solid var(--rule);
}

.facts dt {
  color: var(--soft);
}

.facts dd {
  margin-top: 0.35rem;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.6vw, 1.6rem);
  font-weight: 700;
  font-stretch: 85%;
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.01em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* Countdown in stub */
.countdown {
  width: 100%;
}

.clock-label,
.clock-done {
  color: var(--soft);
}

.clock-label {
  margin-bottom: 0.45rem;
}

.clock-done {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 75%;
  color: var(--plum);
}

.clock-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.tick {
  display: grid;
  gap: 0.15rem;
}

.tick strong {
  font-family: var(--display);
  font-size: clamp(2.1rem, 8vw, 2.8rem);
  font-weight: 800;
  font-stretch: 75%;
  font-variation-settings: "opsz" 96;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--plum);
}

.tick small {
  color: var(--soft);
}

/* Line-up */
.lineup {
  display: grid;
  margin-top: 0.4rem;
}

.act {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1.5px solid var(--rule);
}

.act:last-child {
  border-bottom: 1.5px solid var(--rule);
}

.act time {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--aqua);
}

.act h3 {
  font-size: clamp(1.9rem, 7.5vw, 3.1rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--mint);
}

.act p {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--soft);
  text-wrap: pretty;
}

.soon {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 800;
  font-stretch: 75%;
}

/* Sleep */
.stay {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.stay li {
  padding: 0.7rem 0;
  border-top: 1.5px solid var(--rule);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  font-stretch: 85%;
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.stay li:has(a) {
  padding: 0;
}

.stay a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.stay__arrow {
  font-family: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.5;
  transition:
    transform 0.18s var(--ease),
    opacity 0.18s var(--ease);
}

.stay a:hover,
.stay a:focus-visible {
  color: var(--plum);
}

.stay a:hover .stay__arrow,
.stay a:focus-visible .stay__arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.stay .stay__lead {
  font-family: var(--text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--plum);
  text-wrap: pretty;
}

/* Gift */
.accounts {
  display: grid;
  gap: 1rem;
  margin-top: 0.35rem;
}

.account {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding-top: 1rem;
  border-top: 1.5px solid var(--rule);
}

.account img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
}

.account h3 {
  font-size: 2.2rem;
  color: var(--mint);
}

.iban {
  margin-top: 0.5rem !important;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--mint);
  overflow-wrap: anywhere;
  text-decoration: underline 1.5px solid transparent;
  text-underline-offset: 0.25em;
  transition:
    color 0.18s var(--ease),
    text-decoration-color 0.18s var(--ease);
}

.iban.is-copied {
  color: #ffffff;
  text-decoration-color: var(--aqua);
}

#totziens .tkt__title {
  max-width: 6em;
}

/* RSVP */
#aanwezig .btn {
  align-self: flex-start;
  width: min(100%, 24rem);
  margin-top: 0.4rem;
}

/* Closing */
.tkt__closing {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1.5px solid var(--rule);
}

.signoff {
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 700;
  font-stretch: 85%;
  font-variation-settings: "opsz" 48;
  line-height: 1.1;
  color: var(--mint);
}

/* ===================== MOTION ===================== */

.tkt--entry {
  animation: drop 0.9s var(--ease) both;
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(2.5rem) rotate(-3deg);
  }
}

.deck > .tkt {
  --tilt: 0deg;
  --shift: 0rem;
  transform: translateX(var(--shift)) rotate(var(--tilt));
  transition:
    transform 0.7s var(--ease),
    opacity 0.7s var(--ease);
}

.js .deck > .tkt:not(.is-in) {
  opacity: 0;
  transform: translate(var(--shift), 3rem) rotate(calc(var(--tilt) - 2.5deg));
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 420px) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .portraits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .barcode {
    width: 5.5rem;
  }
}

@media (min-width: 760px) {
  .tkt {
    grid-template-columns: minmax(0, 1fr) var(--stub);
    --edge: radial-gradient(circle at 100% 50%, var(--sc-hole)) right / 100% var(--sc-step) no-repeat round;
  }

  .tkt--entry {
    --edge: radial-gradient(circle at 0 50%, var(--sc-hole)) left / 100% var(--sc-step) no-repeat round;
  }

  #programma {
    --edge:
      linear-gradient(#000 0 0) left / calc(100% - var(--tooth)) 100% no-repeat,
      conic-gradient(from 225deg at 100% 50%, #000 0 90deg, #0000 0) right / var(--tooth) calc(var(--tooth) * 2) no-repeat round;
  }

  #cadeau {
    --edge: radial-gradient(circle at calc(100% - 0.7rem) 50%, var(--punch)) right / 100% 1rem no-repeat round;
  }

  #aanwezig {
    --edge:
      radial-gradient(circle at 0 50%, var(--sc-hole)) left / 51% var(--sc-step) no-repeat round,
      radial-gradient(circle at 100% 50%, var(--sc-hole)) right / 51% var(--sc-step) no-repeat round;
  }

  .tkt__main {
    padding: 2.2rem 2.4rem 2.3rem;
    -webkit-mask: var(--cut-right);
    mask: var(--cut-right);
  }

  .tkt__stub {
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    -webkit-mask: var(--cut-left);
    mask: var(--cut-left);
  }

  .tkt__stub::before {
    inset: var(--r) auto var(--r) 0;
    width: 2px;
    height: auto;
    background: repeating-linear-gradient(
      180deg,
      var(--perf) 0 5px,
      transparent 5px 10px
    );
  }

  .tkt__stub .tkt__code {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    flex-direction: row;
    gap: 0.75rem;
    font-size: 0.66rem;
    white-space: nowrap;
  }

  .tkt__stub .barcode {
    width: 2.2rem;
    height: 4.5rem;
    background: repeating-linear-gradient(
      0deg,
      var(--ink) 0 2px,
      transparent 2px 4px,
      var(--ink) 4px 5px,
      transparent 5px 8px,
      var(--ink) 8px 11px,
      transparent 11px 12px,
      var(--ink) 12px 13px,
      transparent 13px 17px,
      var(--ink) 17px 19px,
      transparent 19px 21px
    );
  }

  /* Countdown stacks vertically in the stub */
  #praktisch .tkt__stub {
    justify-content: center;
  }

  #praktisch .countdown {
    text-align: center;
  }

  #praktisch .clock-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  #praktisch .clock-label {
    margin-bottom: 1rem;
  }

  /* Entry: photo stub on the left */
  .tkt--entry {
    grid-template-columns: 18.5rem minmax(0, 1fr);
  }

  .tkt--entry .tkt__stub--photo {
    justify-content: center;
    padding: 1.5rem 1.4rem;
    -webkit-mask: var(--cut-right);
    mask: var(--cut-right);
  }

  .tkt--entry .tkt__stub--photo::before {
    inset: var(--r) 0 var(--r) auto;
  }

  @media (hover: hover) {
    .tkt--entry:has(#claim:hover) .tkt__stub--photo,
    .tkt--entry:has(#claim:focus-visible) .tkt__stub--photo {
      transform: translateX(-2px);
    }
  }

  .page-gate.is-leaving .tkt--entry .tkt__stub--photo {
    transform: translateX(-5px);
  }

  .tkt--entry .photo,
  .tkt--entry .tkt__stub--photo .tkt__code {
    width: 100%;
  }

  .tkt--entry .tkt__stub--photo .tkt__code {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .tkt--entry .tkt__main {
    justify-content: center;
    padding: 2.4rem 2.6rem 2.3rem;
    -webkit-mask: var(--cut-left);
    mask: var(--cut-left);
  }

  .tkt__foot {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.4rem 2rem;
  }

  .tkt__closing {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
  }

  .tkt__closing .signoff {
    text-align: right;
  }

  .tkt__action {
    align-items: stretch;
    min-width: 16rem;
  }

  .tkt__split {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: 2rem;
  }

  .portraits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .act {
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  .stay {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.75rem;
  }

  .stay__lead {
    grid-column: 1 / -1;
  }

  .accounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }

  .deck > .tkt:nth-of-type(odd) {
    --tilt: -0.6deg;
  }

  .deck > .tkt:nth-of-type(even) {
    --tilt: 0.5deg;
  }
}

@media (min-width: 760px) and (max-width: 1023px) {
  .tkt__split {
    grid-template-columns: minmax(0, 1fr);
  }

  .portraits {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Wide screens: tickets lie slightly scattered */
@media (min-width: 1100px) {
  .deck > .tkt:nth-of-type(odd) {
    --shift: -1.5rem;
  }

  .deck > .tkt:nth-of-type(even) {
    --shift: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }

  .page-gate.is-leaving .wash,
  html.is-arriving .wash {
    transition: none;
    animation: none;
  }

  .btn,
  .btn__arrow,
  .btn-text,
  .langs button,
  .frame img,
  .stay a,
  .stay__arrow,
  .iban,
  .tkt--entry .tkt__stub--photo,
  .deck > .tkt {
    transition: none;
  }

  .tkt--entry {
    animation: none;
  }

  .frame:hover img,
  .tkt--entry:has(#claim:hover) .tkt__stub--photo,
  .tkt--entry:has(#claim:focus-visible) .tkt__stub--photo,
  .page-gate.is-leaving .tkt--entry .tkt__stub--photo {
    transform: none;
  }

  .js .deck > .tkt:not(.is-in) {
    opacity: 1;
    transform: translateX(var(--shift)) rotate(var(--tilt));
  }
}
