/* ── Cookie consent banner ───────────────────────────────────────────────── */
/* Restored for analytics consent, 2026-09-19. */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 28px;
  pointer-events: none;
}

.consent-card {
  pointer-events: all;
  max-width: 400px;
  width: 100%;
  background: rgba(6, 7, 14, 0.94);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid rgba(119, 119, 119, 0.22);
  border-radius: 24px;
  padding: 26px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255,255,255,0.04);
  transform: translateY(130%);
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.consent-card.is-visible { transform: translateY(0); }

.consent-card.is-exiting {
  transform: translateY(130%);
  transition: transform 0.4s cubic-bezier(0.36, 0, 0.66, -0.56);
}

@keyframes consentShake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-7px); }
  35%       { transform: translateX(7px); }
  55%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}

.consent-card.is-shake { animation: consentShake 0.38s ease; }

/* Cookie SVG */
.consent-cookie {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  margin-bottom: 6px;
}

.cookie-svg { display: block; }

.cookie-base {
  transform-box: fill-box;
  transform-origin: center;
  animation: cookieBaseIn 0.55s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cookieBaseIn {
  from { transform: scale(0.1) rotate(-18deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

.cookie-chip {
  transform-box: fill-box;
  transform-origin: center;
  animation: chipPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes chipPop {
  from { transform: scale(0) rotate(-25deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Checkmark overlay */
.consent-checkmark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.consent-checkmark.is-visible { opacity: 1; }

.check-path {
  stroke-dasharray: 90;
  stroke-dashoffset: 90;
}

.consent-checkmark.is-visible .check-path {
  animation: checkDraw 0.42s 0.08s ease forwards;
}

@keyframes checkDraw { to { stroke-dashoffset: 0; } }

/* Text */
.consent-title {
  font-family: var(--font-head);
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  text-align: center;
}

.consent-text {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-dim);
  text-align: center;
  margin: 0;
}

.consent-text a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Buttons */
.consent-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.consent-btn {
  flex: 1;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  font-family: var(--font-body, inherit);
}

.consent-btn--accept {
  background: var(--accent);
  color: #fff;
}

.consent-btn--accept:hover {
  background: #7c6efd;
  transform: translateY(-1px);
}

.consent-btn--reject {
  background: rgba(119, 119, 119, 0.1);
  color: var(--text-dim);
  border: 1px solid rgba(119, 119, 119, 0.2);
}

.consent-btn--reject:hover {
  background: rgba(119, 119, 119, 0.16);
  color: var(--text);
}

/* Crumb explosion canvas */
#cookieCrumbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10001;
}

/* Keep consent choices equally readable and keyboard accessible. */
.consent-btn--reject { color: var(--text, #fff); }
.consent-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.consent-card { max-height: calc(100dvh - 40px); overflow-y: auto; }
@media (prefers-reduced-motion: reduce) {
  .consent-card, .consent-card *, .consent-btn { animation: none !important; transition: none !important; }
}
