/**
 * css/3-card-tarot.css — 3-Card Tarot brand v2 ADDITIONS
 *
 * Loads AFTER css/yes-no-tarot.css. Reuses every shared class
 * (.spread-frame, .vitrine, .modal, .sealed-letter, .yn-audio-toggle,
 * .spread-fan, .fan-card, etc.) and adds only the differences:
 *   - .tc3-question-wrap (small optional question textarea above fan)
 *   - .tc3-fan / .tc3-fan-card (fewer cards than yes/no's 22, slightly smaller)
 *   - .tc3-spread-grid (3-column reveal: Past · Present · Future)
 *   - .tc3-position (per-card cell with label + vitrine + reading)
 *   - .tc3-arc (single sentence tying all three together)
 *   - Pick-order indicators (cards numbered 1/2/3 as user selects)
 */

/* ─── Pick-order pills: PAST → PRESENT → FUTURE ─── */
.tc3-pick-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.4rem auto 0.6rem;
  flex-wrap: wrap;
  font-family: 'EB Garamond', serif;
}
.tc3-pill {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(184, 145, 80, 0.55);
  border: 1px solid rgba(184, 145, 80, 0.35);
  border-radius: 2px;
  background: transparent;
  transition: color 0.35s ease, background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.tc3-pill.is-active {
  color: #D4AC68;
  border-color: #D4AC68;
  background: rgba(212, 172, 104, 0.1);
  box-shadow: 0 0 18px rgba(212, 172, 104, 0.35);
}
.tc3-pill.is-done {
  color: #6B1F2C;
  border-color: rgba(107, 31, 44, 0.55);
  background: rgba(107, 31, 44, 0.12);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(212, 172, 104, 0.6);
}
.tc3-pill-arrow {
  color: rgba(184, 145, 80, 0.5);
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
}
@media (max-width: 600px) {
  .tc3-pick-pills { gap: 0.35rem; }
  .tc3-pill { padding: 0.32rem 0.7rem; font-size: 0.82rem; letter-spacing: 0.16em; }
  .tc3-pill-arrow { font-size: 0.9rem; }
}

/* Hide the pick-pills once revealed — the position labels above each vitrine
   already show Past/Present/Future, so the pills become redundant. */
.spread-frame.is-revealed .tc3-pick-pills,
.spread-frame.is-breath .tc3-pick-pills {
  display: none;
}

/* ─── Optional question textarea (styled like yes/no's, smaller) ─── */
.tc3-question-wrap {
  max-width: 540px;
  margin: 0.5rem auto 1.4rem;
  padding: 0 1rem;
  text-align: center;
}
.tc3-question-label {
  display: block;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #D4AC68;
  margin-bottom: 0.55rem;
}
.tc3-question-optional {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  opacity: 0.7;
  color: #B89150;
}
.tc3-question-input {
  width: 100%;
  padding: 0.7rem 0.95rem;
  background: rgba(245, 239, 224, 0.08);
  border: 1px solid rgba(184, 145, 80, 0.35);
  border-radius: 4px;
  color: #F5EFE0;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.4;
  resize: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.tc3-question-input:focus {
  outline: none;
  border-color: #D4AC68;
  background: rgba(245, 239, 224, 0.13);
}
.tc3-question-input::placeholder {
  color: rgba(184, 145, 80, 0.55);
  font-style: italic;
}

/* ─── 18-CARD FAN (slightly tighter than yes/no's 22) ─── */
.tc3-fan { /* inherits .spread-fan from yes-no-tarot.css; override sizing */ }
.tc3-fan .fan-card.tc3-fan-card {
  /* Slightly smaller cards since we have 18 instead of 22 — but more breathing room */
}

/* Pick-order indicators on fan cards */
/* Boost z-index so picked cards sit above siblings (they later in DOM
   would normally cover the badge in the dome layout). */
.tc3-fan-card.is-picked {
  position: relative;
  filter: drop-shadow(0 0 18px rgba(212, 172, 104, 0.7))
          drop-shadow(0 14px 26px rgba(0, 0, 0, 0.55));
  z-index: 50 !important;
  pointer-events: none;
}
/* Need to elevate the slot itself too — fan-slot's transform creates a
   stacking context per slot, and the slot is the actual stacking sibling */
.fan-slot:has(.tc3-fan-card.is-picked) { z-index: 50; }

.tc3-fan-card.is-picked::after {
  content: attr(data-pick-order);
  position: absolute;
  /* Sit INSIDE the card (top-center, slightly into the card area) so
     neighboring cards in the dome can't cover it. */
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: #6B1F2C;
  color: #D4AC68;
  border: 1.5px solid #D4AC68;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'EB Garamond', serif;
  font-weight: 700;
  font-size: 0.95rem;
  z-index: 60;
  box-shadow: 0 0 14px rgba(212, 172, 104, 0.7),
              0 2px 6px rgba(0, 0, 0, 0.45);
}

/* Dim the unpicked cards once we have at least one pick */
.tc3-fan.has-picks .tc3-fan-card:not(.is-picked) {
  opacity: 0.55;
  transition: opacity 0.35s ease;
}

/* ─── REVEAL: 3-column grid ─── */
.tc3-spread-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;        /* a little more room between columns for the dividers */
  align-items: start;
  margin: 1.5rem 0 0;
  padding: 0 1rem;
  position: relative;
}
.tc3-position {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  position: relative;
}
/* Light gold vertical dividers — ONLY beside the .tc3-scene area
   (from headline down to bottom of paragraph), NOT alongside the tarot
   card vitrine. Skipped on mobile where columns stack. */
@media (min-width: 901px) {
  .tc3-position + .tc3-position .tc3-scene::before {
    content: '';
    position: absolute;
    left: -1.2rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom,
      transparent 0%,
      rgba(184, 145, 80, 0.55) 14%,
      rgba(184, 145, 80, 0.6)  50%,
      rgba(184, 145, 80, 0.55) 86%,
      transparent 100%);
    pointer-events: none;
  }
}
.tc3-pos-label {
  font-family: 'EB Garamond', serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #D4AC68;
  padding: 0.3rem 1.2rem;
  border: 1px solid rgba(184, 145, 80, 0.45);
  border-radius: 2px;
  background: rgba(58, 31, 56, 0.4);
  /* Extra space below so the card vitrine's gold frame doesn't touch
     the bottom of this label's gold border */
  margin-bottom: 0.9rem;
}

/* Per-position vitrine — slightly smaller than the single-card pages */
.tc3-vitrine {
  --vitrine-scale: 0.85;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tc3-vitrine .vitrine-card {
  max-width: 260px;
  width: 100%;
}
/* Reserve consistent vertical space for the card NAME so 1-line names
   ("PAGE OF CUPS") and 2-line names ("TEN OF PENTACLES") create equal
   heights across the 3 columns. The image sits at the same vertical
   position regardless of name length — short names center within. */
.tc3-vitrine .vc-name--lg {
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}

/* SPACING — fine-tuned 2026-05-05 night
   Layout: [card with gold border] → margin → [Card · Suit of X] → margin → [Endure.]
   - Between gold border bottom and attribution: roomy enough that the
     breath animation never touches "Card · Suit of …"
   - Between attribution and headline: tight (closer than I had it before) */
.tc3-vitrine .vitrine-card {
  margin-bottom: 1.4rem;   /* gives breath-animation clearance */
}
.tc3-vitrine .vitrine-attr {
  margin-bottom: 1.2rem;   /* was 2.6rem — too much; back down */
}

/* Per-position scene/reading */
.tc3-scene {
  width: 100%;
  max-width: 320px;        /* narrower paragraph column for readability */
  margin: 0 auto;
  text-align: left;
  position: relative;      /* anchors the gold divider pseudo-element */
}
.tc3-headline {
  font-family: 'EB Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: #D4AC68;
  margin: 0;
  line-height: 1;
  letter-spacing: -0.005em;
  text-shadow: 0 0 14px rgba(212, 172, 104, 0.18);
}
.tc3-tail {
  display: block;
  font-family: 'Italianno', cursive;
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  /* Brighter gold + faux-bold via stroke + glow so the thin Italianno
     script reads visually heavier (Italianno only ships in one weight,
     so we fake "bold" by thickening the strokes). */
  color: #D4AC68;
  -webkit-text-stroke: 0.28px #D4AC68;
  text-shadow:
    0 0 12px rgba(212, 172, 104, 0.32);
  margin: 0.7rem 0 1.2rem;
  line-height: 1;
}
.tc3-reading {
  font-family: 'EB Garamond', serif;
  font-size: 1.08rem;       /* slightly bigger than COTD on this page */
  line-height: 1.85;        /* roomier line-height for tighter columns */
  color: #F5EFE0;
  max-width: 290px;          /* paragraph slightly narrower than headline/tail */
  margin-left: auto;
  margin-right: auto;
}
.tc3-reading p {
  margin: 0 0 0.9rem;
}
.tc3-reading p:last-child {
  margin-bottom: 0;
}
/* Drop-cap on first paragraph — wider right margin so text doesn't crowd it */
.tc3-reading p:first-of-type::first-letter {
  font-family: 'EB Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: 3em;
  float: left;
  line-height: 0.85;
  margin: 0.1em 0.22em 0 0;
  color: #D4AC68;
  text-shadow: 0 0 16px rgba(212, 172, 104, 0.25);
}

/* ─── ARC line (single sentence below the 3 columns) ─── */
.tc3-arc-wrap {
  text-align: center;
  margin: 3rem auto 0;
  max-width: 720px;
  padding: 0 1rem;
}
.tc3-arc-divider {
  margin: 0 auto 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 280px;
}
.tc3-arc-divider::before,
.tc3-arc-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #B89150, transparent);
}
.tc3-arc-divider .fleuron-mark {
  color: #D4AC68;
  font-size: 1.2rem;
}
.tc3-arc {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  color: #F5EFE0;
  margin: 0;
  letter-spacing: 0.005em;
  text-shadow: 0 0 16px rgba(212, 172, 104, 0.12);
}

/* ─── MOBILE: stack 3 columns ─── */
@media (max-width: 900px) {
  .tc3-spread-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }
  .tc3-vitrine .vitrine-card {
    max-width: 220px;
  }
  .tc3-pos-label {
    font-size: 0.92rem;
    letter-spacing: 0.28em;
  }
  .tc3-headline {
    font-size: 1.6rem;
  }
}

/* ─── BREATH state copy variant for 3-card ─── */
.spread-frame.is-breath .breath-label {
  /* Already styled by base; just ensure copy fits */
}
