/*--------------------------------------------------------------
  WHERE'S MR. REID? — Styles
--------------------------------------------------------------*/

/* ── Hidden character ── */
#mr-reid-wrap {
  display: none; /* JS reveals after injection */
  position: absolute;
  z-index: 10;
  cursor: pointer;
  width: 76px;
  height: 76px;
}

#mr-reid-wrap:focus-visible {
  outline: 3px solid var(--accent, #c8963c);
  outline-offset: 3px;
  border-radius: 50%;
}

.mr-reid-char {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0,0,0,0.1);
  background: var(--primary, #1a5c3a);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mr-reid-breathe 3.5s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#mr-reid-wrap:hover .mr-reid-char,
#mr-reid-wrap:focus .mr-reid-char {
  transform: scale(1.13);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation-play-state: paused;
}

.mr-reid-char img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* Fallback avatar shown when photo hasn't been added yet */
.mr-reid-fallback {
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  line-height: 1.2;
  user-select: none;
  pointer-events: none;
}
.mr-reid-fallback .mr-cap { font-size: 22px; line-height: 1; margin-bottom: 2px; }
.mr-reid-fallback .mr-name { font-size: 9px; font-weight: 700; letter-spacing: 0.04em; }

/* Subtle breathe — looks like someone standing still in a window */
@keyframes mr-reid-breathe {
  0%, 100% { transform: scale(1);    }
  50%       { transform: scale(1.04); }
}

/* Small badge — pulses to hint the character is interactive */
.mr-reid-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  animation: mr-reid-ping 1.8s ease-in-out infinite;
  pointer-events: none;
  transition: background 0.3s;
}

@keyframes mr-reid-ping {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.28); opacity: 0.8; }
}

/* ── Celebration modal ── */
#mr-reid-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(17, 27, 21, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

#mr-reid-modal.active { display: flex; }

.mr-reid-modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 44px 38px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: mr-reid-pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

@keyframes mr-reid-pop {
  from { transform: scale(0.55); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.mr-reid-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #bbb;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  transition: color 0.2s;
  border-radius: 6px;
}
.mr-reid-modal-close:hover,
.mr-reid-modal-close:focus-visible { color: #333; outline: 2px solid #ddd; }

.mr-reid-modal-trophy {
  display: block;
  font-size: 3.8rem;
  line-height: 1;
  margin-bottom: 14px;
  animation: mr-reid-bounce 0.55s 0.3s ease both;
}

@keyframes mr-reid-bounce {
  0%   { transform: scale(0) rotate(-15deg); }
  60%  { transform: scale(1.22) rotate(6deg); }
  100% { transform: scale(1)   rotate(0deg); }
}

.mr-reid-modal-round {
  display: inline-block;
  background: var(--accent, #c8963c);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 3px 14px;
  margin-bottom: 14px;
}

.mr-reid-modal-box h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary, #1a5c3a);
  margin-bottom: 10px;
  line-height: 1.2;
}

.mr-reid-modal-box p {
  font-size: 0.93rem;
  color: #555;
  line-height: 1.75;
  margin-bottom: 26px;
}

.mr-reid-modal-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary, #1a5c3a);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 26px;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.mr-reid-modal-cta:hover { opacity: 0.88; color: #fff; transform: translateY(-1px); }

.mr-reid-modal-dismiss {
  display: block;
  background: none;
  border: none;
  color: #aaa;
  font-size: 0.8rem;
  cursor: pointer;
  margin: 0 auto;
  padding: 6px 12px;
  transition: color 0.2s;
  font-family: inherit;
}
.mr-reid-modal-dismiss:hover { color: #555; }

/* ── Confetti ── */
.mr-reid-confetti {
  position: fixed;
  top: -12px;
  pointer-events: none;
  z-index: 10000;
  animation: mr-reid-fall linear forwards;
  border-radius: 2px;
}

@keyframes mr-reid-fall {
  0%   { top: -12px; opacity: 1;  transform: rotate(0deg)   translateX(0); }
  80%  {              opacity: 1; }
  100% { top: 105vh; opacity: 0;  transform: rotate(680deg) translateX(var(--drift, 0px)); }
}

/* ── Homepage clue strip ── */
.mr-reid-clue {
  background: #fffdf5;
  border-top: 1px solid rgba(200, 150, 60, 0.22);
  border-bottom: 1px solid rgba(200, 150, 60, 0.22);
  padding: 14px 0;
}

.mr-reid-clue .mrc-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.mr-reid-clue .mrc-icon {
  font-size: 1.7rem;
  flex-shrink: 0;
  animation: mr-reid-bob 2.4s ease-in-out infinite;
  line-height: 1;
}

.mr-reid-clue .mrc-body {
  flex: 1;
  min-width: 180px;
}

.mr-reid-clue .mrc-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent, #c8963c);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.mr-reid-clue .mrc-text {
  font-size: 0.87rem;
  color: #555;
}

.mr-reid-clue .mrc-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary, #1a5c3a);
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid var(--primary, #1a5c3a);
  border-radius: 20px;
  padding: 5px 14px;
  transition: background 0.2s, color 0.2s;
}
.mr-reid-clue .mrc-cta:hover {
  background: var(--primary, #1a5c3a);
  color: #fff;
}

/* ── Waldo staff card ── */
.staff-card.waldo-card {
  position: relative;
  cursor: pointer;
  overflow: visible !important;
}

.waldo-overlay {
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 2;
  overflow: hidden;
}

/* Reveal triggered by JS adding .revealed (on image hover) */
.staff-card.waldo-card.revealed .waldo-overlay {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

.waldo-overlay .sc-img img {
  object-position: center top;
}

.waldo-overlay .sc-name {
  color: var(--primary, #1a5c3a);
  font-size: 1rem;
}

.waldo-overlay .sc-email {
  font-size: 0.82rem;
  color: #888;
  font-style: italic;
}

.waldo-hint {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: #aaa;
  padding: 4px 0 10px;
  letter-spacing: 0.04em;
}

/* Congratulations panel — slides up when Alan Reid is revealed */
.waldo-congrats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: linear-gradient(135deg, var(--primary, #1a5c3a) 0%, #1e4d2b 100%);
  padding: 14px 16px 16px;
  text-align: center;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.38s cubic-bezier(0.34, 1.25, 0.64, 1), opacity 0.25s ease;
  border-radius: 0 0 12px 12px;
}

.staff-card.waldo-card.revealed .waldo-congrats {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.waldo-congrats .wc-title {
  color: var(--accent, #c8963c);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 5px;
  line-height: 1.3;
}

.waldo-congrats .wc-body {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 0 0 10px;
}

.waldo-congrats .wc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent, #c8963c);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 20px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.waldo-congrats .wc-btn:hover {
  opacity: 0.88;
  transform: scale(1.04);
  color: #fff;
}

/* ── Mobile tweaks ── */
@media (max-width: 576px) {
  #mr-reid-wrap    { width: 52px; height: 52px; }
  .mr-reid-char    { width: 52px; height: 52px; }
  .mr-reid-modal-box { padding: 36px 22px 28px; }
  .mr-reid-modal-box h2 { font-size: 1.3rem; }
  .mr-reid-modal-trophy { font-size: 3rem; }
}
