/* PumpNun tokens
   palette: void #0a0714, plum #1c1030, mint habit #6ee7b0, candle gold #f2b53c, parchment #efe6d3
   type: Cinzel Decorative (hanging initial only) / Cormorant Garamond (prayer, caption) / IBM Plex Mono (imprint, CA)
   corner radius: 10px (die-cut card edge) / motion: one idiom, candle flicker + star twinkle
*/

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cinzel Decorative';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/cinzel-decorative-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

:root {
  --void: #0a0714;
  --plum: #1a0f2c;
  --plum-2: #241536;
  --gold: #e8b84b;
  --gold-dim: #a3813a;
  --mint: #8fe8bd;
  --parchment: #efe6d3;
  --parchment-dim: #cabfa8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--void);
}

body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--parchment);
  padding: 20px;
  background:
    radial-gradient(120% 90% at 50% -10%, #2c1a44 0%, transparent 55%),
    radial-gradient(90% 70% at 50% 110%, #150c24 0%, var(--void) 60%),
    var(--void);
}

.stage {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  position: relative;
  width: min(400px, 92vw);
  max-height: 94dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--plum-2) 0%, var(--plum) 62%, #12081f 100%);
  border: 1px solid var(--gold-dim);
  box-shadow:
    0 1px 0 rgba(255, 220, 150, 0.18) inset,
    0 22px 40px rgba(0, 0, 0, 0.55);
}

.card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(232, 184, 75, 0.35);
  border-radius: 6px;
  pointer-events: none;
}

.kicker {
  margin: 2px 0 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--gold-dim);
  text-transform: uppercase;
}

.art {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.86;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(232, 184, 75, 0.28);
  flex: 0 0 auto;
}

.art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}

.glow {
  position: absolute;
  left: 50%;
  top: 6%;
  width: 46%;
  height: 30%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 214, 120, 0.55), rgba(255, 214, 120, 0) 70%);
  mix-blend-mode: screen;
  animation: flicker 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes flicker {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
  22% { opacity: 0.92; transform: translateX(-50%) scale(1.04); }
  38% { opacity: 0.68; transform: translateX(-49%) scale(0.98); }
  55% { opacity: 0.95; transform: translateX(-51%) scale(1.03); }
  70% { opacity: 0.72; transform: translateX(-50%) scale(1); }
  86% { opacity: 0.88; transform: translateX(-50%) scale(1.02); }
}

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  animation: twinkle 2.8s ease-in-out infinite;
}

.stars span:nth-child(1) { top: 10%; left: 12%; animation-delay: 0s; }
.stars span:nth-child(2) { top: 22%; left: 82%; animation-delay: 0.4s; }
.stars span:nth-child(3) { top: 6%; left: 68%; animation-delay: 0.9s; }
.stars span:nth-child(4) { top: 30%; left: 30%; animation-delay: 1.3s; }
.stars span:nth-child(5) { top: 15%; left: 45%; animation-delay: 1.8s; }
.stars span:nth-child(6) { top: 34%; left: 90%; animation-delay: 2.2s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.9; }
}

.caption {
  margin: 12px 0 0;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(12px, 3.2vw, 13.5px);
  color: var(--mint);
  text-align: center;
  letter-spacing: 0.01em;
}

.prayer {
  margin: 12px 0 0;
  text-align: center;
  font-weight: 400;
  font-size: clamp(13px, 3.4vw, 15px);
  line-height: 1.5;
  color: var(--parchment);
}

.dropcap {
  font-family: 'Cinzel Decorative', serif;
  font-weight: 700;
  font-size: 1.85em;
  color: var(--gold);
  vertical-align: -0.11em;
  margin-right: 0.02em;
  text-shadow: 0 0 12px rgba(232, 184, 75, 0.45);
}

.imprint {
  width: 100%;
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  border-top: 1px solid rgba(232, 184, 75, 0.22);
}

.imprint-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--gold-dim);
}

.ca {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--parchment-dim);
  padding: 2px 0;
  border-bottom: 1px dotted var(--gold-dim);
  letter-spacing: 0.01em;
}

.ca:hover { color: var(--parchment); border-bottom-color: var(--gold); }

.copied {
  position: absolute;
  left: 50%;
  bottom: 130%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #241536;
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  pointer-events: none;
}

.copied.show { opacity: 1; }

.imprint-links {
  display: flex;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
}

.imprint-links a {
  color: var(--parchment-dim);
  text-decoration: none;
  border-bottom: 1px dotted rgba(202, 191, 168, 0.5);
}

.imprint-links a:hover { color: var(--gold); border-bottom-color: var(--gold); }

.canary {
  margin: 8px 0 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(202, 191, 168, 0.45);
}

@media (max-width: 360px) {
  .card { padding: 13px 14px 12px; }
  .prayer { font-size: 12.5px; }
}

@media (min-height: 760px) and (min-width: 460px) {
  .card { width: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  .glow, .stars span { animation: none !important; }
  .glow { opacity: 0.82; }
  .stars span { opacity: 0.5; }
}
