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

:root {
  --cream:      #FBF7F0;
  --shell:      #F5EADF;
  --blush:      #EEC9BC;
  --sage:       #C0D0B4;
  --sky:        #C2D9E6;
  --apricot:    #F6D3A8;
  --terracotta: #C2765A;
  --olive:      #6E7B5E;
  --ink:        #332E29;
  --ink-soft:   rgba(51, 46, 41, 0.70);
  --ink-muted:  rgba(51, 46, 41, 0.48);
  --hair:       rgba(51, 46, 41, 0.14);
  --glass:      rgba(255, 254, 251, 0.72);
  --glass-firm: rgba(255, 254, 251, 0.92);
  --shadow-sm:  0 6px 22px -10px rgba(51, 46, 41, 0.22);
  --shadow-md:  0 26px 60px -28px rgba(51, 46, 41, 0.32);
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --error:      #A7503F;
  --success:    #5F7A52;
}

html, body { min-height: 100%; margin: 0; }
body {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Het papier van Bob: een naadloze tegel van 600px, ongeveer 8 KB, als
 * data-URI zodat er geen extra verzoek nodig is op zaalwifi. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -3;
  background-color: var(--cream);
  background-image: url("../img/papier.webp?v=202609021333");
  background-repeat: repeat;
  background-size: 300px 300px;
}

/* Een fluistering van de pasteltinten over het papier. Zonder deze laag
 * valt de crèmekleur van de kaarten weg tegen de crèmekleur van het papier
 * en verdwijnt de hele opbouw van de pagina. */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -2;
  opacity: 0.42;
  background:
    radial-gradient(circle at 10% 4%,  #EEC1B2 0%, transparent 46%),
    radial-gradient(circle at 92% 14%, #B9D5E5 0%, transparent 48%),
    radial-gradient(circle at 14% 82%, #BACDAC 0%, transparent 50%),
    radial-gradient(circle at 86% 92%, #F6CE9C 0%, transparent 46%);
  background-size: 200% 200%;
  animation: bloom 34s ease-in-out infinite alternate;
}
@keyframes bloom {
  0%   { background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%; }
  100% { background-position: 18% 12%, 82% 22%, 12% 88%, 88% 78%; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; color: var(--ink); }

.serif { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300; }

.eyebrow {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.30em; text-transform: uppercase;
  color: var(--ink-soft);
}

.rule {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 26px 0;
}
.rule::before, .rule::after {
  content: ""; height: 1px; flex: 1; max-width: 90px;
  background: linear-gradient(90deg, transparent, var(--hair), transparent);
}
.rule span {
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--terracotta);
  opacity: 0.7;
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 46px);
  background: rgba(251, 247, 240, 0.72);
  backdrop-filter: saturate(1.15) blur(16px);
  -webkit-backdrop-filter: saturate(1.15) blur(16px);
  border-bottom: 1px solid rgba(51, 46, 41, 0.07);
}
.monogram {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px; font-weight: 400; letter-spacing: 0.06em;
}
.monogram em { font-style: italic; color: var(--terracotta); padding: 0 2px; }

.lang-switch { display: inline-flex; gap: 2px; }
.lang-switch button {
  padding: 7px 11px; border-radius: 100px;
  font-size: 10.5px; letter-spacing: 0.20em; font-weight: 600;
  color: var(--ink-muted);
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.lang-switch button.active { color: var(--ink); background: rgba(51, 46, 41, 0.08); }

/* ---------- schermen ---------- */

.screen { display: none; }
.screen.active { display: block; animation: rise 0.6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(38px, 7vw, 84px) clamp(20px, 5vw, 40px) 72px;
}

/* ---------- welkom ---------- */

.hero { text-align: center; }
.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(52px, 13vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 18px 0 0;
}
.hero h1 em { font-style: italic; color: var(--terracotta); font-size: 0.72em; padding: 0 0.06em; }
.hero .kicker {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(20px, 4.4vw, 27px);
  color: var(--ink-soft);
  margin-top: 10px;
}
.hero .lead {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto;
  font-size: 15.5px;
}

.card {
  background: var(--glass-firm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  box-shadow: var(--shadow-md);
  padding: clamp(26px, 5vw, 40px);
  margin-top: 38px;
}

.field { display: block; }
.field .label {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-soft);
  display: block; margin-bottom: 12px;
}
.field input[type=text] {
  width: 100%;
  padding: 17px 20px;
  border: 1px solid var(--hair);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 17px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.field input[type=text]:focus {
  border-color: var(--terracotta);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(194, 118, 90, 0.16);
}
.field .help { font-size: 12.5px; color: var(--ink-muted); margin-top: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 16px 26px;
  border-radius: 100px;
  background: var(--ink); color: var(--cream);
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600;
  transition: transform 0.3s var(--ease), background 0.3s, opacity 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); background: #46403a; }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--hair);
}
.btn.ghost:hover:not(:disabled) { background: rgba(51, 46, 41, 0.05); }

.msg {
  font-size: 13px; font-weight: 500;
  color: var(--error);
  min-height: 20px;
  margin-top: 14px;
  opacity: 0; transition: opacity 0.3s;
}
.msg.show { opacity: 1; }

.code-inputs {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: clamp(4px, 1.4vw, 10px);
  margin-top: 14px;
}
.code-inputs input {
  width: 100%; aspect-ratio: 3 / 4;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  text-align: center;
  font-size: clamp(19px, 5vw, 30px);
  font-weight: 500;
  outline: none;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.code-inputs input:focus { border-color: var(--terracotta); background: #fff; transform: translateY(-2px); }
.code-inputs input.filled { background: var(--ink); color: var(--cream); border-color: var(--ink); }
#codeArea[hidden] { display: none; }

/* ---------- uploadruimte ---------- */

.room-head { text-align: center; }
.room-head h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300; font-style: italic;
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1.05;
  margin: 14px 0 0;
}
.room-head .sub { color: var(--ink-soft); font-size: 15px; max-width: 42ch; margin: 12px auto 0; }

.drop {
  display: block;
  margin-top: 32px;
  padding: clamp(34px, 7vw, 58px) 24px;
  text-align: center;
  background: var(--glass-firm);
  border: 1.5px dashed rgba(51, 46, 41, 0.22);
  border-radius: 26px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.drop:hover, .drop.over { background: rgba(255, 255, 255, 0.95); border-color: var(--terracotta); transform: translateY(-2px); }
.drop .bloom {
  width: 62px; height: 62px; margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--blush), var(--apricot));
  display: grid; place-items: center;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.drop h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(22px, 4.6vw, 30px);
  margin: 0 0 6px;
}
.drop .hint { font-size: 13.5px; color: var(--ink-muted); max-width: 40ch; margin: 0 auto; }
.drop input[type=file] { display: none; }

.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pick .btn { font-size: 11px; letter-spacing: 0.16em; padding: 15px 14px; min-height: 54px; }
@media (max-width: 420px) { .pick { grid-template-columns: 1fr; } }

.tally {
  display: flex; justify-content: center; gap: 34px;
  margin-top: 30px;
  text-align: center;
}
.tally div { min-width: 84px; }
.tally .n {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px; font-weight: 400; line-height: 1;
  display: block;
}
.tally .k {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600;
  margin-top: 6px; display: block;
}

.sent { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 13px; align-items: center;
  padding: 13px 16px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  transition: border-color 0.25s, background 0.25s;
}
.item .thumb {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(51, 46, 41, 0.07);
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ink-muted);
  overflow: hidden;
}
.item .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item .meta { min-width: 0; }
.item .nm {
  font-size: 13.5px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item .st { font-size: 11px; color: var(--ink-muted); letter-spacing: 0.04em; margin-top: 2px; }
.item .track {
  position: relative; height: 4px; border-radius: 100px;
  background: rgba(51, 46, 41, 0.10);
  margin-top: 7px; overflow: hidden;
}
.item .track i {
  position: absolute; inset: 0; width: 0%;
  background: linear-gradient(90deg, var(--apricot), var(--terracotta));
  transition: width 0.25s var(--ease);
}
.item .mark {
  width: 24px; height: 24px; border-radius: 50%;
  display: none; place-items: center;
  font-size: 12px; font-weight: 700;
  background: var(--success); color: var(--cream);
}
.item.done { border-color: rgba(95, 122, 82, 0.4); }
.item.done .mark { display: grid; }
.item.done .track { display: none; }
.item.failed { border-color: rgba(167, 80, 63, 0.45); }
.item.failed .st { color: var(--error); }
.item.failed .track { display: none; }
.item .retry {
  display: none;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  padding: 9px 14px; border-radius: 100px;
  border: 1px solid var(--hair); color: var(--ink);
  min-height: 40px;
}
.item.failed .retry { display: inline-flex; align-items: center; }

/* ---------- carrousel ---------- */

.wall { margin-top: 30px; }
.wall[hidden] { display: none; }
.wall-head { text-align: center; margin-bottom: 14px; }
.wall-head .eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.wall-head .eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--terracotta);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.wall-strip {
  position: relative;
  overflow: hidden;
  padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.wall-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: drift 44s linear infinite;
}
.wall-strip:hover .wall-track,
.wall-strip:active .wall-track { animation-play-state: paused; }

/* Bij een handvol foto's is een lopende band onzin: dan zie je dezelfde
 * tegel steeds terugkomen. Onder de vijf staan ze gewoon stil en gecentreerd. */
.wall-strip.still {
  -webkit-mask-image: none; mask-image: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wall-strip.still::-webkit-scrollbar { display: none; }
.wall-track.still {
  animation: none;
  width: 100%;
  justify-content: center;
  min-width: min-content;
}
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.wall-item {
  position: relative;
  width: 116px; height: 116px;
  flex: 0 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.75);
}
.wall-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.wall-item .who {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 8px 6px;
  font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(51, 46, 41, 0.62));
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
@media (max-width: 480px) {
  .wall-item { width: 96px; height: 96px; border-radius: 15px; }
}

/* ---------- deel-vinkje ---------- */

.share {
  display: flex; align-items: flex-start; gap: 13px;
  margin-top: 16px;
  padding: 15px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.share:hover { background: rgba(255, 255, 255, 0.78); }
.share input { position: absolute; opacity: 0; pointer-events: none; }
.share .box {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 8px;
  border: 1.5px solid rgba(51, 46, 41, 0.28);
  background: rgba(255, 255, 255, 0.8);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; line-height: 1;
  color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
  margin-top: 1px;
}
.share input:checked + .box {
  background: var(--terracotta); border-color: var(--terracotta); color: #fff;
}
.share input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(194, 118, 90, 0.22); }
.share .txt { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }
.share .txt b { color: var(--ink); font-weight: 600; display: block; font-size: 14px; margin-bottom: 2px; }

/* ---------- confetti ---------- */

.petal {
  position: fixed;
  width: 9px; height: 9px;
  border-radius: 60% 40% 55% 45%;
  pointer-events: none;
  z-index: 90;
  will-change: transform, opacity;
}



.toast {
  position: fixed; left: 50%; bottom: clamp(16px, 4vw, 30px);
  transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 11px;
  padding: 13px 22px;
  border-radius: 100px;
  background: var(--ink); color: var(--cream);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  z-index: 100;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--sage); color: var(--ink);
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .screen.active { animation: none; }
  .drop, .item .track i, .toast { transition: none; }
  .wall-head .eyebrow::before { animation: none; opacity: 0.8; }
  .wall-track { animation: none; }
  .wall-strip { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .petal { display: none; }
}
