/* ============================================================
   lore-calendar.css  —  Themed page for the Calendar of Ulvenor
   Wheel-of-the-year hero + connected month timeline
   ============================================================ */

/* ── Seasonal palette (used by wheel arcs and month cards) ── */
.lore-content {
  --season-winter: #7fb6d8;   /* icy blue */
  --season-spring: #6dbf7c;   /* fresh green */
  --season-summer: #d9b144;   /* warm gold */
  --season-autumn: #c97a3e;   /* burnt orange */
  --season-winter-soft: rgba(127, 182, 216, 0.16);
  --season-spring-soft: rgba(109, 191, 124, 0.16);
  --season-summer-soft: rgba(217, 177, 68, 0.18);
  --season-autumn-soft: rgba(201, 122, 62, 0.18);
}

/* ──────────────────────────────────────────────────────────
   Hero — title + stats on the left, year wheel on the right
   ────────────────────────────────────────────────────────── */
.cal-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.5rem 0 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}
.cal-hero__text {
  flex: 1 1 300px;
  min-width: 0;
}
.cal-hero__title {
  font-family: 'Cinzel', serif;
  font-size: 2.1rem;
  margin: 0 0 0.5rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(201, 162, 39, 0.18);
}
.cal-hero__subtitle {
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 1.2rem;
  max-width: 60ch;
}
.cal-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.cal-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 84px;
  padding: 0.55rem 0.85rem;
  background: rgba(201, 162, 39, 0.06);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 8px;
}
.cal-stat__value {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  color: var(--gold-light);
  line-height: 1.1;
}
.cal-stat__label {
  font-family: 'Crimson Text', serif;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
  text-align: center;
}

/* ── Year wheel SVG ── */
.cal-wheel {
  flex: 0 0 280px;
  width: 280px;
  height: 280px;
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
}
.cal-wheel__svg {
  width: 100%;
  height: auto;
  animation: cal-wheel-rotate 240s linear infinite;
}
@keyframes cal-wheel-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.cal-wheel__arc {
  transition: stroke-width 0.2s, opacity 0.2s;
  opacity: 0.78;
  cursor: pointer;
}
.cal-wheel__arc:hover {
  stroke-width: 18;
  opacity: 1;
}
/* Pause the slow rotation while the user interacts with the wheel */
.cal-wheel:hover .cal-wheel__svg {
  animation-play-state: paused;
}
.cal-wheel__label {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  fill: var(--bg-deep);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.cal-wheel__year-glyph {
  font-size: 18px;
  fill: var(--gold-light);
  font-weight: 600;
}
.cal-wheel__caption {
  font-family: 'Crimson Text', serif;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-dim);
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  .cal-wheel__svg { animation: none; }
}

/* ──────────────────────────────────────────────────────────
   Scroll-style intro/explanatory blocks
   ────────────────────────────────────────────────────────── */
.cal-scroll {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}
.cal-scroll__block {
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.04) 0%, transparent 100%),
    var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 1rem 1.3rem 1.1rem;
}
.cal-scroll__block--soft { border-left-color: rgba(201, 162, 39, 0.4); }
.cal-scroll__heading {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: var(--gold-light);
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: 0.03em;
}
.cal-scroll__icon {
  font-size: 1.25rem;
  filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.4));
}
.cal-scroll__text {
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}

/* ──────────────────────────────────────────────────────────
   Month timeline — connected cards
   ────────────────────────────────────────────────────────── */
.cal-months__title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--gold);
  text-align: center;
  margin: 2rem 0 1.5rem;
  letter-spacing: 0.06em;
  position: relative;
}
.cal-months__title::before,
.cal-months__title::after {
  content: '';
  display: inline-block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  vertical-align: middle;
  margin: 0 0.8rem;
}

.cal-months__list {
  display: flex;
  flex-direction: column;
  gap: 0;            /* the rail/connector spans the gap */
  position: relative;
}

/* Each month card */
.cal-month {
  display: flex;
  gap: 1.1rem;
  padding: 0;
  position: relative;
  scroll-margin-top: 80px;
}

/* Vertical rail with order number, season icon, and connector line.
   The connector is the thin vertical line that visually connects this
   month to the next, coloured by the season. */
.cal-month__rail {
  flex: 0 0 56px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.2rem;
}
.cal-month__order {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--season-color, var(--gold));
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--season-color, var(--gold-light));
  z-index: 2;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.45),
              0 0 0 3px rgba(13, 13, 26, 0.8);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cal-month:hover .cal-month__order {
  transform: scale(1.08);
  box-shadow: 0 0 18px var(--season-color, var(--gold)),
              0 0 0 3px rgba(13, 13, 26, 0.85);
}
.cal-month__season-icon {
  margin-top: 0.3rem;
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px var(--season-color, var(--gold)));
  z-index: 2;
  line-height: 1;
}
.cal-month__connector {
  position: absolute;
  top: 1.2rem;
  bottom: -1.2rem;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg,
              var(--season-color, var(--gold)) 0%,
              rgba(201, 162, 39, 0.25) 50%,
              transparent 100%);
  transform: translateX(-50%);
  z-index: 1;
}
.cal-month:last-child .cal-month__connector { display: none; }

/* Body — the actual content card */
.cal-month__body {
  flex: 1 1 auto;
  margin: 0.8rem 0 2.2rem;
  padding: 1.2rem 1.4rem 1.3rem;
  background:
    linear-gradient(135deg,
                    var(--season-color, var(--gold)) 0%,
                    transparent 0.5%) ,
    linear-gradient(180deg, var(--bg-card) 0%, #15151f 100%);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--season-color, var(--gold));
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.cal-month__body::before {
  /* Soft glow behind the card matching the season */
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 8px;
  background: var(--season-color, var(--gold));
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.cal-month__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed rgba(107, 84, 0, 0.4);
}
.cal-month__name {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--gold-light);
  letter-spacing: 0.05em;
  margin: 0;
}
.cal-month__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: 'Crimson Text', serif;
}
.cal-month__phase {
  font-size: 0.85rem;
  font-style: italic;
  padding: 0.1rem 0.6rem;
  background: var(--season-color, var(--gold));
  color: var(--bg-deep);
  border-radius: 12px;
  font-weight: 600;
}
.cal-month__season {
  font-size: 0.78rem;
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--season-color, var(--gold));
  color: var(--season-color, var(--gold));
  border-radius: 12px;
  background: transparent;
}
.cal-month__days {
  font-size: 0.78rem;
  padding: 0.1rem 0.55rem;
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 12px;
}
.cal-month__desc {
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}
.cal-month__origin {
  margin: 0.7rem 0 0;
  font-family: 'Crimson Text', serif;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-dim);
  padding-left: 1rem;
  border-left: 2px solid rgba(201, 162, 39, 0.3);
}
.cal-month__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(107, 84, 0, 0.3);
}
.cal-month__detail {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.cal-month__detail-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  color: var(--season-color, var(--gold));
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cal-month__detail-text {
  font-family: 'Crimson Text', serif;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ──────────────────────────────────────────────────────────
   Sidebar nav links — coloured per season
   ────────────────────────────────────────────────────────── */
.cal-nav-link {
  display: grid !important;
  grid-template-columns: 26px auto 1fr;
  align-items: center;
  gap: 0.45rem !important;
}
.cal-nav-link__order {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--gold-light);
  border: 1px solid var(--gold);
}
.cal-nav-link__icon { font-size: 1.05rem; line-height: 1; }
.cal-nav-link__name { font-size: 0.85rem; }
.cal-nav-link--zima   .cal-nav-link__order { border-color: var(--season-winter); color: var(--season-winter); }
.cal-nav-link--jaro   .cal-nav-link__order { border-color: var(--season-spring); color: var(--season-spring); }
.cal-nav-link--léto   .cal-nav-link__order { border-color: var(--season-summer); color: var(--season-summer); }
.cal-nav-link--podzim .cal-nav-link__order { border-color: var(--season-autumn); color: var(--season-autumn); }

/* ──────────────────────────────────────────────────────────
   Closing
   ────────────────────────────────────────────────────────── */
.cal-closing {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.cal-closing__quote {
  text-align: center;
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--gold-light);
  padding: 1.5rem 2rem;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.04), rgba(201, 162, 39, 0.08));
  border-top: 1px solid rgba(201, 162, 39, 0.4);
  border-bottom: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 4px;
  position: relative;
}
.cal-closing__quote::before,
.cal-closing__quote::after {
  content: '❦';
  display: block;
  color: var(--gold);
  font-size: 0.95rem;
  margin: 0.3rem 0;
}

/* ──────────────────────────────────────────────────────────
   Wheel tooltip  (position: fixed, controlled by JS)
   ────────────────────────────────────────────────────────── */
.cal-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.55rem 0.9rem 0.6rem;
  background: rgba(13, 13, 26, 0.96);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 8px;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  max-width: 220px;
}
.cal-tooltip--visible {
  opacity: 1;
  transform: translateY(0);
}
.cal-tooltip__name {
  font-family: 'Cinzel', serif;
  font-size: 0.93rem;
  color: var(--gold-light);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.cal-tooltip__phase {
  font-family: 'Crimson Text', serif;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
}
.cal-tooltip__meta {
  font-family: 'Crimson Text', serif;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ──────────────────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .cal-hero { gap: 1.2rem; padding: 1rem 0 1.5rem; }
  .cal-hero__title { font-size: 1.6rem; }
  .cal-hero__subtitle { font-size: 0.92rem; }
  .cal-wheel { flex: 0 0 200px; width: 200px; height: 200px; }
  .cal-month { gap: 0.7rem; }
  .cal-month__rail { flex-basis: 44px; padding-top: 1rem; }
  .cal-month__order { width: 36px; height: 36px; font-size: 0.85rem; }
  .cal-month__season-icon { font-size: 1rem; }
  .cal-month__body { padding: 1rem 1.05rem; margin: 0.6rem 0 1.6rem; }
  .cal-month__name { font-size: 1.15rem; }
  .cal-month__details { grid-template-columns: 1fr; }
  .cal-stat { min-width: 70px; padding: 0.45rem 0.65rem; }
  .cal-stat__value { font-size: 1.1rem; }
}
