/* ============================================================================
 * lumen-phase-c.css — Yousef approved all 12 new ideas 2026-06-16.
 *  3. Animated Cross Rising on first load
 *  4. Print-friendly stylesheet
 * 12. Accent color picker
 *  9. Light a Candle Together visualization
 * ========================================================================== */

/* ─── 3. Animated Cross Rising — first load only ─────────────────────────── */
.lumen-cross-rising {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--jp-cream-100) 0%, var(--jp-gold-100) 100%);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s var(--cb-ease);
}
.lumen-cross-rising.is-leaving { opacity: 0; }
.lumen-cross-rising svg {
  width: 120px; height: 120px;
  filter: drop-shadow(0 4px 12px rgba(212, 168, 67, 0.35));
}
.lumen-cross-rising path,
.lumen-cross-rising line {
  fill: none;
  stroke: var(--jp-gold-400, #D4A843);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: lumen-cross-draw 0.6s var(--cb-ease) forwards;
}
.lumen-cross-rising line + line { animation-delay: 0.3s; }
@keyframes lumen-cross-draw {
  to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lumen-cross-rising { display: none; }
}

/* ─── 4. Print-friendly stylesheet ───────────────────────────────────────── */
@media print {
  /* Hide UI chrome */
  .site-header, .site-footer, .nav-radio, .nav-podcast,
  .lumen-marquee-band, .lumen-signature-ribbon, .lumen-grain,
  .lumen-floating-tip, .lumen-sacred-toolbar, .lumen-cross-rising,
  .hfh-filters, button, .lumen-preloader,
  details > summary { display: none !important; }

  /* Open all details on print */
  details { display: block !important; }
  details > * { display: block !important; }

  /* Page setup */
  html, body {
    background: #fff !important; color: #000 !important;
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }
  .section { max-width: none !important; padding: 0 !important; }
  .section__grid { display: block !important; }
  .section__col--full, .section__col--half, .section__col--third {
    width: 100% !important; max-width: none !important;
    grid-column: span 12 !important;
    margin-bottom: 1em !important;
  }
  h1, h2, h3, h4 { page-break-after: avoid; color: #000 !important; }
  blockquote {
    border-left: 3px solid #8a6f1f !important;
    padding-left: 12pt !important;
    margin: 12pt 0 !important;
    page-break-inside: avoid;
  }
  .scripture-frame, .icon-card__verse, .prayer-card__verse,
  .saint-card__verse, .father-card__quote, .lectio-step,
  .letter-body, .walk-stop { page-break-inside: avoid; }
  .card, .saint-card, .icon-card, .prayer-card, .cat-card,
  .word-card, .father-card, .hfh-card, .walk-stop,
  .altar-card, .lectio-step, .lectio-verse, .story-card {
    border: 1px solid #ddd !important;
    background: #fff !important;
    box-shadow: none !important;
    margin-bottom: 8pt !important;
    page-break-inside: avoid;
  }
  a { color: #000 !important; text-decoration: underline !important; }
  a[href^="http"]:after { content: " (" attr(href) ")"; font-size: 9pt; color: #555 !important; }
  /* Show the verse text from data-section if hidden */
}

/* ─── 12. Accent color picker ────────────────────────────────────────────── */
.lumen-accent-picker {
  position: fixed; bottom: 16px; left: 16px;
  z-index: 200;
  background: var(--jp-cream-100);
  border: 1px solid var(--jp-cream-400);
  border-radius: var(--r-pill, 999px);
  padding: 6px;
  box-shadow: var(--sh-md);
  display: none;
  gap: 6px;
}
.lumen-accent-picker[data-open="true"] { display: flex; }
.lumen-accent-picker__toggle {
  position: fixed; bottom: 16px; left: 16px;
  z-index: 201;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--jp-cream-400);
  background: var(--jp-cream-100);
  box-shadow: var(--sh-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--page-accent, var(--jp-gold-400));
  transition: transform var(--dur-fast) var(--cb-ease);
}
.lumen-accent-picker__toggle:hover { transform: scale(1.1); }
.lumen-accent-picker[data-open="true"] ~ .lumen-accent-picker__toggle {
  transform: rotate(45deg);
}
.lumen-accent-picker__swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--cb-ease);
}
.lumen-accent-picker__swatch:hover,
.lumen-accent-picker__swatch.is-active {
  border-color: var(--jp-ink, #2A2D38);
}
.lumen-accent-picker__swatch--gold  { background: #D4A843; }
.lumen-accent-picker__swatch--rose  { background: #DB7A82; }
.lumen-accent-picker__swatch--sage  { background: #87A862; }
.lumen-accent-picker__swatch--sky   { background: #4477A0; }
.lumen-accent-picker__swatch--lav   { background: #B6A4D6; }

/* ─── 9. Light a Candle Together — visualization ─────────────────────────── */
.candle-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: var(--s-3);
  padding: var(--s-5) 0;
  max-width: 720px;
  margin: 0 auto;
}
.candle-wall__candle {
  position: relative;
  width: 64px; height: 96px;
  margin: 0 auto;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.4s var(--cb-ease), transform 0.3s var(--cb-ease);
}
.candle-wall__candle.is-lit { opacity: 1; }
.candle-wall__candle:hover { transform: translateY(-4px); }
.candle-wall__body {
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 64px;
  background: linear-gradient(180deg, #FFFEFB, #F7EFD6);
  border-radius: 4px 4px 2px 2px;
  border: 1px solid var(--jp-cream-400);
}
.candle-wall__flame {
  position: absolute; top: 2px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 22px;
  background: radial-gradient(ellipse at center bottom,
    #FFF6DC 0%, #F4D77A 50%, #E8C067 80%, transparent 100%);
  border-radius: 50% 50% 30% 30%;
  filter: blur(0.5px);
  opacity: 0;
  transition: opacity 0.4s var(--cb-ease);
}
.candle-wall__candle.is-lit .candle-wall__flame {
  opacity: 1;
  animation: candle-flicker 2.4s ease-in-out infinite alternate;
}
@keyframes candle-flicker {
  0% { transform: translateX(-50%) scale(1) rotate(-1deg); }
  100% { transform: translateX(-50%) scale(1.05) rotate(1deg); }
}
.candle-wall__count {
  text-align: center;
  font-family: var(--ff-serif);
  font-style: italic;
  color: var(--jp-ink-soft);
  margin-bottom: var(--s-4);
}
@media (prefers-reduced-motion: reduce) {
  .candle-wall__candle.is-lit .candle-wall__flame { animation: none; }
}
