/* ==========================================================================
   Justfamily — campagne.css
   Alleen geladen op campagne.html. Bouwt voort op de tokens uit style.css:
   tally counter (hero), doel-dashboard, pakketkaarten, Bureau Liefhebbers,
   en de opmaak van het donatieformulier.
   ========================================================================== */

/* ---------- Hero ---------- */
.campaign-hero { padding-bottom: clamp(56px, 8vw, 96px); }
.campaign-hero .container {
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
}
.campaign-hero .lead { color: #fff; opacity: 0.92; }
.campaign-hero .btn-outline { color: #fff; }
.campaign-hero .btn-outline:hover { color: #fff; }

.countdown {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin: 28px 0 10px;
}
.countdown-unit {
  background: #fff;
  color: var(--color-soft-black);
  border-radius: var(--radius-s);
  min-width: 74px;
  padding: 10px 12px 8px;
  text-align: center;
  box-shadow: 0 10px 24px -14px rgba(0,0,0,0.45);
}
.countdown-unit .num {
  display: block;
  font-size: 1.9rem; font-weight: 800; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.countdown-unit .label {
  display: block;
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #6b6b70;
}
.countdown-note { color: #fff; opacity: 0.8; font-size: var(--fs-small); margin: 0; }
#campaign-closed-banner {
  background: #fff; color: var(--color-soft-black);
  display: block; max-width: 460px; margin: 0 0 8px;
}

@media (max-width: 880px) {
  .campaign-hero .container { grid-template-columns: 1fr; text-align: center; }
  .campaign-hero .lead { margin-left: auto; margin-right: auto; }
  .countdown, .campaign-hero .badge-row { justify-content: center; }
  .countdown-note { margin: 0 auto; }
  #campaign-closed-banner { margin: 0 auto 8px; }
}

/* ---------- Tally counter ---------- */
/* Alles schaalt mee met font-size van .tally (em-eenheden). */
.tally {
  --tally-body: #fff;
  --tally-face: var(--color-primary-blue);
  font-size: clamp(11px, 3.4vw, 16px);
  position: relative;
  width: 24em;
  height: 31em;
  margin: 0 auto;
  user-select: none;
}

/* Vingerring onderaan */
.tally-ring {
  position: absolute;
  left: 50%; bottom: 0;
  width: 8.5em; height: 8.5em;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1.5em solid var(--color-mustard-yellow);
  box-shadow: inset 0 0.25em 0 rgba(0,0,0,0.08), 0 0.6em 1.4em -0.6em rgba(0,0,0,0.35);
}

/* Knop bovenop */
.tally-button {
  position: absolute;
  left: 50%; top: 0;
  width: 7.5em; height: 4.6em;
  transform: translateX(-50%);
  z-index: 1;
  display: block;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tally-button::before { /* stang */
  content: "";
  position: absolute; left: 50%; top: 2.4em;
  width: 2.6em; height: 2.6em;
  transform: translateX(-50%);
  background: #d9d6cc;
  border-radius: 0.4em;
}
.tally-cap {
  position: absolute; inset: 0 0 auto 0;
  height: 3em;
  background: var(--color-mustard-yellow);
  border-radius: 1.5em 1.5em 0.9em 0.9em;
  box-shadow: inset 0 -0.45em 0 rgba(0,0,0,0.12), 0 0.4em 0.8em -0.3em rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s ease;
}
.tally-heart {
  width: 1.5em; height: 1.35em;
  background: var(--color-orange);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21.3 10.6 20C5.4 15.4 2 12.3 2 8.5 2 5.4 4.4 3 7.5 3c1.7 0 3.4.8 4.5 2.1C13.1 3.8 14.8 3 16.5 3 19.6 3 22 5.4 22 8.5c0 3.8-3.4 6.9-8.6 11.5L12 21.3z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21.3 10.6 20C5.4 15.4 2 12.3 2 8.5 2 5.4 4.4 3 7.5 3c1.7 0 3.4.8 4.5 2.1C13.1 3.8 14.8 3 16.5 3 19.6 3 22 5.4 22 8.5c0 3.8-3.4 6.9-8.6 11.5L12 21.3z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.tally-button:hover .tally-cap { transform: translateY(-0.15em); }
.tally-button:active .tally-cap,
.tally-button.is-pressed .tally-cap { transform: translateY(0.9em); }
.tally-button:focus-visible { outline: none; }
.tally-button:focus-visible .tally-cap { outline: 3px solid #fff; outline-offset: 3px; }

/* Behuizing */
.tally-body {
  position: absolute;
  left: 50%; top: 4em;
  width: 22em; height: 22em;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--tally-body);
  box-shadow:
    inset 0 -0.6em 0 rgba(57,57,58,0.08),
    0 1.6em 3em -1.2em rgba(0,0,0,0.45);
  z-index: 2;
}
/* Resetknopje rechts */
.tally-reset {
  position: absolute;
  right: -1.1em; top: 50%;
  width: 2em; height: 3.2em;
  transform: translateY(-50%);
  background: var(--color-old-pink);
  border-radius: 0.7em;
  box-shadow: inset -0.3em 0 0 rgba(0,0,0,0.1);
  z-index: -1;
}
.tally-face {
  position: absolute; inset: 1.4em;
  border-radius: 50%;
  background: var(--tally-face);
  box-shadow: inset 0 0.5em 1em rgba(0,0,0,0.18);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff;
  text-align: center;
}
.tally-brand {
  font-weight: 800; font-size: 1.15em; letter-spacing: -0.01em;
  color: var(--color-mustard-yellow);
  line-height: 1;
  margin-bottom: 0.9em;
}
.tally-brand small { font-weight: 700; font-size: 0.75em; }

.tally-window {
  display: flex; align-items: stretch; gap: 0.22em;
  padding: 0.45em;
  background: var(--color-soft-black);
  border-radius: 0.9em;
  border: 0.25em solid #fff;
  box-shadow: 0 0.4em 0.9em -0.4em rgba(0,0,0,0.5);
}
.tally-cur {
  display: flex; align-items: center; justify-content: center;
  width: 1.35em;
  font-size: 1.6em; font-weight: 800;
  color: var(--color-mustard-yellow);
}
.tally-digits { display: flex; gap: 0.22em; }
.tally-digit {
  position: relative;
  width: 2.15em; height: 3.2em;
  overflow: hidden;
  border-radius: 0.4em;
  background: linear-gradient(#2a2a2b, #464647 50%, #2a2a2b);
}
.tally-digit::after { /* cilinder-schaduw */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(rgba(0,0,0,0.55), transparent 32%, transparent 68%, rgba(0,0,0,0.55));
  pointer-events: none;
}
.tally-digit::before { /* middennaad */
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: rgba(0,0,0,0.35);
  z-index: 1;
}
.tally-strip {
  display: flex; flex-direction: column;
  transform: translateY(calc(var(--d, 0) * -10%));
  transition: transform 1.4s cubic-bezier(.2,.9,.25,1.12);
}
.tally-strip span {
  height: 3.2em;
  display: flex; align-items: center; justify-content: center;
  font-size: 1em;
}
.tally-strip span b {
  font-size: 2.2em; font-weight: 800; line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.tally-digit--sep { width: auto; background: none; }
.tally-label {
  margin-top: 0.9em;
  font-size: 0.85em; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  display: inline-flex; align-items: center; gap: 0.5em;
}
.tally-sub { font-size: 0.85em; opacity: 0.85; margin-top: 0.35em; }
.tally-hint {
  text-align: center; color: #fff; opacity: 0.85;
  font-size: var(--fs-small); font-weight: 600;
  margin: 14px auto 0; max-width: none;
}

.live-dot {
  width: 0.6em; height: 0.6em; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.7);
  animation: livePulse 1.8s infinite;
  display: inline-block;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.65); }
  70%  { box-shadow: 0 0 0 0.6em rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.tally.is-bump .tally-window { animation: tallyBump 0.35s ease; }
@keyframes tallyBump {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(0.12em); }
}

/* ---------- Dashboard ---------- */
.dash {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
  gap: 24px;
  margin-top: 36px;
}
.dash-card {
  background: #fff;
  border-radius: var(--radius-m);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}
.dash-gauge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.gauge { position: relative; width: min(240px, 100%); aspect-ratio: 1; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { stroke: var(--color-light-grey); }
.gauge-fill {
  stroke: var(--color-primary-blue);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.6s cubic-bezier(.2,.8,.2,1);
}
.gauge-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gauge-pct { font-size: clamp(2.6rem, 2rem + 2vw, 3.4rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge-cap { font-size: var(--fs-small); color: #6b6b70; font-weight: 600; margin-top: 6px; }
.dash-gauge .dash-note { margin: 18px 0 0; font-size: var(--fs-small); color: #6b6b70; }

.dash-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.tile {
  background: #fff;
  border-radius: var(--radius-m);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 6px;
}
.tile-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--fs-small); color: #55555a; }
.tile-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tile-icon svg { width: 18px; height: 18px; }
.tile-value {
  font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.25rem);
  font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.tile-sub { font-size: var(--fs-small); color: #6b6b70; }

.dash-progress { grid-column: 1 / -1; }
.dash-progress-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.dash-progress-head h3 { margin: 0; font-size: var(--fs-large); }
.dash-updated { font-size: var(--fs-small); color: #6b6b70; display: inline-flex; align-items: center; gap: 8px; }
.dash-updated .live-dot { font-size: 14px; }

.mbar { position: relative; padding: 0 0 54px; }
.mbar-track {
  position: relative;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--color-light-grey);
  overflow: hidden;
}
.mbar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  border-radius: var(--radius-full);
  background: var(--color-primary-blue);
  transition: width 1.6s cubic-bezier(.2,.8,.2,1);
}
.mbar-marks { position: absolute; left: 0; right: 0; top: 0; height: 16px; list-style: none; margin: 0; padding: 0; }
.mbar-mark {
  position: absolute; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
}
.mbar-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff;
  border: 3px solid var(--color-light-grey);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.mbar-dot svg { width: 12px; height: 12px; opacity: 0; }
.mbar-mark.is-reached .mbar-dot { background: var(--color-primary-blue); border-color: #fff; box-shadow: 0 0 0 2px var(--color-primary-blue); }
.mbar-mark.is-reached .mbar-dot svg { opacity: 1; }
.mbar-label {
  position: absolute; top: 34px;
  white-space: nowrap; text-align: center;
  font-size: var(--fs-small); line-height: 1.25;
}
.mbar-label strong { display: block; font-weight: 800; }
.mbar-label span { color: #6b6b70; }
.mbar-mark:last-child { transform: translate(-100%, -50%); align-items: flex-end; }
.mbar-mark:last-child .mbar-label { right: 0; text-align: right; }

.dash-nudge {
  margin: 4px 0 0; max-width: none;
  padding: 14px 18px;
  background: var(--color-off-white);
  border-radius: var(--radius-s);
  font-size: var(--fs-medium);
}
.dash-nudge strong { font-weight: 800; }

@media (max-width: 880px) {
  .dash { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .dash-tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile { padding: 16px; }
  .tile-head { font-size: 0.8rem; }
  .mbar-label span { display: none; }
  .mbar-mark[data-pct="25"] .mbar-label,
  .mbar-mark[data-pct="75"] .mbar-label { display: none; }
  .mbar { padding-bottom: 36px; }
}

/* ---------- Pakketkaarten ---------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
  align-items: stretch;
}
.tier-card {
  --tier: var(--color-sky);
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
  border: 2px solid transparent;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tier-card:hover { transform: translateY(-4px); box-shadow: 0 28px 55px -24px rgba(57,57,58,0.35); }
.tier-card--familie { --tier: var(--color-primary-blue); border-color: var(--color-primary-blue); }
.tier-card--bedrijf { --tier: var(--color-teal); }
.tier-card--partner { --tier: var(--color-mustard-yellow); }

.tier-top {
  background: var(--tier);
  color: #fff;
  padding: 22px 24px 20px;
}
.tier-card--partner .tier-top,
.tier-card--vip .tier-top { color: var(--color-soft-black); }
.tier-kind {
  display: inline-block;
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(255,255,255,0.25);
  padding: 4px 10px; border-radius: var(--radius-full);
  margin-bottom: 12px;
}
.tier-card--partner .tier-kind,
.tier-card--vip .tier-kind { background: rgba(255,255,255,0.45); }
.tier-name { font-size: var(--fs-large); font-weight: 800; margin: 0 0 2px; color: inherit; }
.tier-amount { font-size: clamp(2rem, 1.6rem + 1vw, 2.5rem); font-weight: 800; line-height: 1.1; }
.tier-amount small { font-size: 0.45em; font-weight: 600; opacity: 0.85; margin-left: 4px; }
.tier-badge {
  position: absolute; top: 18px; right: 18px;
  background: var(--color-mustard-yellow);
  color: var(--color-soft-black);
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 6px 12px; border-radius: var(--radius-full);
  box-shadow: 0 6px 14px -8px rgba(0,0,0,0.5);
}

.tier-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.tier-body h4 { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.06em; color: #6b6b70; margin: 0 0 12px; }
.check-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 34px;
  font-size: var(--fs-medium);
  font-weight: 400;
  line-height: 1.35;
}
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-primary-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / 14px;
}
.check-list li.is-plus::before { background-color: var(--color-teal); }
.check-list a { color: var(--color-primary-blue); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.check-list .muted { display: block; font-size: var(--fs-small); color: #6b6b70; font-weight: 300; }
.tier-body .btn { margin-top: auto; justify-content: center; width: 100%; }
.tier-card--familie .tier-body .btn { background: var(--color-primary-blue); }

.tier-other {
  margin-top: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px;
  border: 2px dashed var(--color-middle-grey);
  border-radius: var(--radius-m);
}
.tier-other p { margin: 0; font-size: var(--fs-medium); }
.tier-other .btn { padding: 12px 24px; }

@media (max-width: 1100px) { .tier-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .tier-grid { grid-template-columns: 1fr; } }

/* ---------- Bureau Liefhebbers ---------- */
.partner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.partner-photo { position: relative; margin: 0; }
.partner-photo img {
  width: 100%; height: auto;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  position: relative; z-index: 1;
}
.partner-photo picture { position: relative; display: block; }
.partner-photo picture::before { /* kleurvlak achter de foto */
  content: "";
  position: absolute; inset: 18px -18px -18px 18px;
  z-index: 0;
  background: var(--color-old-pink);
  border-radius: var(--radius-l);
}
.partner-sticker {
  position: absolute; z-index: 2;
  left: -14px; top: 28px;
  background: var(--color-mustard-yellow);
  color: var(--color-soft-black);
  font-weight: 800; font-size: var(--fs-small);
  padding: 10px 16px; border-radius: var(--radius-full);
  box-shadow: 0 10px 24px -12px rgba(0,0,0,0.5);
  transform: rotate(-4deg);
}
.partner-photo figcaption {
  position: relative; z-index: 1;
  margin-top: 34px;
  font-size: var(--fs-small); color: #6b6b70;
}
.partner-copy p { color: #45454a; }
.partner-perks {
  background: #fff;
  border-radius: var(--radius-m);
  padding: 22px 24px 8px;
  box-shadow: var(--shadow-soft);
  margin: 24px 0 28px;
}
.partner-perks h3 { font-size: var(--fs-large); margin-bottom: 14px; }
.partner-perks .check-list { margin-bottom: 16px; }

@media (max-width: 880px) {
  .partner-grid { grid-template-columns: 1fr; }
  .partner-photo { max-width: 560px; margin: 0 auto; width: calc(100% - 18px); }
}

/* ---------- Donatieformulier ---------- */
.donate-form {
  background: #fff;
  border-radius: var(--radius-m);
  padding: clamp(22px, 4vw, 36px);
  box-shadow: var(--shadow-soft);
  margin-top: 24px;
}
.donate-form h3 { font-size: var(--fs-large); }
.amount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.amount-option {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px;
  border: 2px solid var(--color-light-grey);
  border-radius: var(--radius-s);
  font-weight: 800; font-size: var(--fs-large);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.amount-option span { font-weight: 600; font-size: var(--fs-small); color: #6b6b70; }
.amount-option input { position: absolute; opacity: 0; pointer-events: none; }
.amount-option:hover { border-color: var(--color-middle-grey); }
.amount-option.is-selected { border-color: var(--color-primary-blue); background: rgba(85,120,246,0.07); }
.amount-option:focus-within { outline: 3px solid var(--color-primary-blue); outline-offset: 2px; }
#custom-bedrag {
  width: 100%; padding: 14px 16px; margin-bottom: 20px;
  border: 2px solid var(--color-light-grey); border-radius: var(--radius-s);
  font-family: var(--font-body); font-size: var(--fs-medium);
}
#custom-bedrag:focus { outline: none; border-color: var(--color-primary-blue); }
.checkbox-row {
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 14px;
  font-size: var(--fs-medium);
}
.checkbox-row input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--color-primary-blue); flex-shrink: 0; }
.checkbox-row a { color: var(--color-primary-blue); text-decoration: underline; }
.invoice-fields {
  padding: 16px 18px 2px;
  background: var(--color-off-white);
  border-radius: var(--radius-s);
  margin-bottom: 16px;
}
.payment-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.btn-mollie { background: var(--color-primary-blue); color: #fff; }
.btn-mollie:hover { color: #fff; box-shadow: var(--shadow-soft); }
.bank-transfer-box {
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: var(--radius-m);
  background: #fff;
  border: 2px dashed var(--color-middle-grey);
}
.bank-transfer-box .iban {
  display: inline-block;
  font-weight: 800;
  background: var(--color-off-white);
  padding: 8px 14px; border-radius: var(--radius-s);
  font-variant-numeric: tabular-nums;
}

/* Zonder beweging: geen rollende cijfers en vullende balken */
@media (prefers-reduced-motion: reduce) {
  .tally-strip, .gauge-fill, .mbar-fill { transition: none !important; }
  .live-dot { animation: none !important; }
}

:root { --color-dark-blue: #1f3a9e; }
#main a:not(.btn):not(.tally-button) { transition: color 0.15s ease; }
#main a:not(.btn):not(.tally-button):hover,
#main a:not(.btn):not(.tally-button):focus-visible {
  color: var(--color-dark-blue);
}
