/* feast-cards.css — the animated feast cards (feast-cards.js).
 * Ported 20 Nov 2026 from the approved mockup. Every token is scoped to the
 * feast section so nothing here touches the rest of the page. */
#feast-days {
  --fx-ink: #1d1a16; --fx-muted: #6d655a;
  --fx-card: #fffaf1; --fx-card-line: rgba(0,0,0,.07); --fx-shadow: 0 10px 30px rgba(60,40,10,.12);
  --fx-panel: #fffdf8; --fx-panel-line: rgba(0,0,0,.08);
  --fx-purple: #5b2c6f;
  --fx-lbl-begins: #1f78b4; --fx-lbl-service: #c2185b;
  --fx-ref: #8a6d1d;
}
[data-theme="dark"] #feast-days {
  --fx-ink: #f3ece2; --fx-muted: #a59b8e;
  --fx-card: #26221e; --fx-card-line: rgba(255,255,255,.07); --fx-shadow: 0 14px 34px rgba(0,0,0,.45);
  --fx-panel: #1f1b18; --fx-panel-line: rgba(255,255,255,.08);
  --fx-lbl-begins: #64b5f6; --fx-lbl-service: #ff4f7b; --fx-ref: #e2c76f;
}

/* ── grid ── */
.fx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 18px; }
@media (max-width: 1100px) { .fx-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── card + flip ── */
.fx-card { position: relative; perspective: 1400px; min-height: 470px; }
.fx-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.2,.75,.2,1); }
.fx-card.is-flipped .fx-flip { transform: rotateY(180deg); }
.fx-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 24px; overflow: hidden; color: var(--c-ink, var(--fx-ink));
  background: linear-gradient(var(--gdir, 135deg), var(--g1, var(--fx-card)), var(--g2, var(--fx-card)));
  transition: --g1 .9s ease, --g2 .9s ease, color .5s ease;
  border: 1px solid var(--fx-card-line); box-shadow: var(--fx-shadow); }
.fx-back { transform: rotateY(180deg); }
.fx-face.is-radial { background: radial-gradient(circle at 50% 35%, var(--g2), var(--g1) 75%); }
@property --g1 { syntax: '<color>'; inherits: false; initial-value: #26221e; }
@property --g2 { syntax: '<color>'; inherits: false; initial-value: #26221e; }
.fx-card.faq-active .fx-face { outline: 2px solid var(--gold); outline-offset: 3px; }

.fx-front { display: block; width: 100%; text-align: left; font: inherit; font-family: Inter, var(--sans); cursor: pointer; padding: 0; }
.fx-front:focus-visible, .fx-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.fx-top { position: absolute; top: 20px; left: 22px; right: 18px; display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--c-top, var(--c-soft)); }
.fx-top.fx-top-static { position: static; }
.fx-top svg { width: 18px; height: 18px; stroke: currentColor; }
.fx-num { position: absolute; top: 34px; left: 18px; font-size: 92px; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--c-top-ghost, var(--c-ghost)); }
.fx-verse { position: absolute; top: 46px; left: 22px; right: 22px; z-index: 2; text-align: center; pointer-events: none;
  font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 14.5px; line-height: 1.3;
  color: var(--c-top, var(--c-soft)); text-shadow: var(--c-verse-shadow, 0 1px 3px rgba(0,0,0,.45), 0 0 10px rgba(0,0,0,.25)); }
.fx-verse cite { display: block; margin-top: 3px; font-style: normal; font-family: Inter, var(--sans); font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.fx-art { position: absolute; top: 122px; left: 50%; transform: translateX(-50%); width: 82%; height: 35%; display: grid; place-items: center; }
.fx-art video, .fx-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 16px rgba(0,0,0,.35)); }
.fx-bottom { position: absolute; left: 22px; right: 22px; bottom: 22px; }
.fx-title { display: block; font-size: 27px; font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin: 0 0 6px; }
/* The countdown, right of the title (the apps' "150 / Days"). Its colour is
 * --c-cd, chosen per look by countdownLook() against the whole gradient;
 * .cd-badge is the fallback for a look where no plain colour reads. */
.fx-trow { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.fx-trow .fx-title { margin: 0; min-width: 0; }
.fx-cd { flex: none; display: flex; flex-direction: column; align-items: center; color: var(--c-cd, var(--c-ink, var(--fx-ink))); line-height: 1; padding-bottom: 1px; }
.fx-cd[hidden] { display: none; }
.fx-cd-n { font-size: 22px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fx-cd-n.fx-cd-today { font-size: 17px; }
.fx-cd-l { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: 3px; }
.cd-badge .fx-cd { background: #c8a84b; color: #1b1608; border-radius: 14px; padding: 6px 10px 5px; }
.fx-heb { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--c-soft); margin: 0 0 5px; }
.fx-heb [lang="he"] { font-family: "Noto Serif Hebrew", "Taamey Frank CLM", "Times New Roman", serif; font-size: 15px; font-weight: 500; letter-spacing: 0; line-height: 1; }
.fx-aka { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--c-soft); margin: -2px 0 4px; }
.fx-sub { display: block; font-size: 15px; color: var(--c-soft); margin: 0 0 12px; }
.fx-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-pill { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--c-pill); color: var(--c-ink); }
.fx-pill.next { background: var(--gold); color: #1b1608; }

/* back */
.fx-back { padding: 22px; display: flex; flex-direction: column; cursor: pointer; font-family: Inter, var(--sans); }
.fx-back-title { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 21px; line-height: 1.15; margin: 4px 0 14px; color: inherit; }
.fx-row { margin-bottom: 11px; }
.fx-lbl { display: block; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2px; }
.fx-lbl.b, .fx-lbl.e { color: var(--fx-lbl-begins); } .fx-lbl.s { color: var(--fx-lbl-service); }
.is-tinted .fx-lbl { color: var(--c-ink) !important; opacity: .85; }
.fx-date { font-size: 14px; line-height: 1.4; }
.fx-actions { margin-top: auto; display: flex; gap: 8px; }
.fx-btn { font: inherit; font-size: 13px; font-weight: 700; border: 0; border-radius: 99px; padding: 10px 16px; cursor: pointer; }
.fx-btn.primary { flex: 1; background: var(--gold); color: #1b1608; }
.fx-btn.ghost { background: var(--c-pill); color: var(--c-ink); }

@media (prefers-reduced-motion: reduce) {
  .fx-flip, .fx-face { transition: none !important; }
  .fx-faq, .fx-a { transition: none !important; }
}

/* ── FAQ slide-down panel ── */
.fx-faq { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s ease; }
.fx-faq.is-open { grid-template-rows: 1fr; }
.fx-faq[hidden] { display: none; }
.fx-faq-clip { overflow: hidden; min-height: 0; }
.fx-faq-inner { background: var(--fx-panel); color: var(--fx-ink); border: 1px solid var(--fx-panel-line); border-radius: 24px; padding: 26px 28px; margin: 4px 0 6px; box-shadow: var(--fx-shadow); }
.fx-faq-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 10px; }
.fx-faq-title { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 600; margin: 0; color: var(--fx-ink); }
.fx-faq-sub { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fx-ref); }
.fx-faq-close.fx-btn.ghost { background: var(--fx-card-line); color: var(--fx-ink); }
.fx-q { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; font: inherit; font-size: 16px; font-weight: 600; color: var(--fx-ink);
  background: none; border: 0; border-top: 1px solid var(--fx-panel-line); padding: 16px 0; cursor: pointer; }
.fx-q .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--fx-purple); color: #fff; font-size: 12px; }
.fx-q .chev { margin-left: auto; transition: transform .3s; }
.fx-q[aria-expanded="true"] .chev { transform: rotate(180deg); }
.fx-q:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.fx-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.fx-a.is-open { grid-template-rows: 1fr; }
.fx-a > div { overflow: hidden; min-height: 0; }
.fx-a-body { padding: 0 0 18px 38px; font-size: 15px; line-height: 1.6; color: var(--fx-ink); }
.fx-a-body .ref { display: block; color: var(--fx-ref); font-style: italic; font-size: 14px; margin-top: 6px; }
.fx-a-body ul { margin: 6px 0; padding-left: 20px; }
.fx-empty { color: var(--fx-muted); }

.fx-dots { display: none; justify-content: center; gap: 6px; margin: 4px 0 14px; }
.fx-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--fx-panel-line); transition: width .25s, background .25s; }
.fx-dots span.on { width: 20px; border-radius: 4px; background: var(--gold); }
.fx-hint { text-align: center; font-size: 12px; color: var(--fx-muted); margin: 0 0 18px; }

/* ── phone: swipe carousel, FAQ below it ── */
@media (max-width: 640px) {
  .fx-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding: 6px 16px 14px;
    margin-left: -6vw; margin-right: -6vw; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .fx-grid::-webkit-scrollbar { display: none; }
  .fx-card { flex: 0 0 80%; scroll-snap-align: center; min-height: 440px; }
  .fx-num { font-size: 84px; }
  .fx-faq-inner { padding: 20px 18px; }
  .fx-a-body { padding-left: 0; }
  .fx-dots { display: flex; }
}

/* ── space held before the cards are drawn ──
 * The grid is empty in the markup and filled by script, so it holds the
 * height of what is coming and nothing below it jumps:
 *   4 columns, 2 rows = 2 x 470 + 18 = 958    2 columns, 4 rows = 4 x 470 + 3 x 18 = 1934
 *   phone carousel    = 440 + 6 + 14 padding = 460 */
.fx-grid { min-height: 958px; }
@media (max-width: 1100px) { .fx-grid { min-height: 1934px; } }
@media (max-width: 640px)  { .fx-grid { min-height: 460px; } }

/* ── section heading (from the mockup, 20 Nov 2026) ──
 * Replaces the gold bar + purple band. #feast-title and #feast-abib keep
 * their ids: applyFeastMeta() writes the published year into them. */
#feast-days { --fx-kicker: #8a6d1d; --fx-head-ink: #1d1a16; }
[data-theme="dark"] #feast-days { --fx-kicker: #e2c76f; --fx-head-ink: #f3ece2; }
.fx-head { text-align: center; margin-bottom: 28px; }
.fx-kicker { font-family: Inter, var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--fx-kicker); }
.fx-head h2 { font-family: Cinzel, var(--serif); font-weight: 700; font-size: clamp(26px, 4vw, 40px); letter-spacing: .04em; line-height: 1.15; margin: 8px 0 14px; color: var(--fx-head-ink); }
.fx-abib { display: inline-block; background: #5b2c6f; color: #fff; font-family: Inter, var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 9px 18px; border-radius: 99px; max-width: 100%; }

/* ── pull down for a new colour look (home-screen app only, feast-cards.js) ── */
.fx-ptr { position: fixed; top: 0; left: 0; right: 0; height: 0; display: grid; place-items: end center; overflow: hidden; z-index: 9000; pointer-events: none; }
.fx-ptr i { width: 28px; height: 28px; margin-bottom: 10px; border-radius: 50%; border: 3px solid rgba(200,168,75,.25); border-top-color: var(--gold, #C8A84B); transition: transform .2s; }
.fx-ptr.armed i { transform: rotate(180deg); }
.fx-ptr.spin i { animation: fx-ptr .7s linear infinite; }
@keyframes fx-ptr { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fx-ptr.spin i { animation: none; } }
