/* ============================================================
   CAESAR'S ANGELS — THE CA JOURNAL
   Listing page: cinematic hero, floating filter pill, featured
   story pairs, and a grid of everything else. Every card animates
   in with a gentle staggered rise (set via --i per-card, driven by
   JS at render time) rather than relying on scroll-triggered
   reveal, since these cards are inserted after page load and the
   site's scroll-observer only ever scans the DOM once at load.
   ============================================================ */

/* ── Hero ── */
.jrnl-hero {
  position: relative; height: 100vh; min-height: 620px; max-height: 900px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center;
}
.jrnl-hero__bg { position: absolute; inset: 0; }
.jrnl-hero__bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  animation: jrnlKenBurns 24s ease-in-out infinite alternate;
}
@keyframes jrnlKenBurns { from { transform: scale(1); } to { transform: scale(1.09); } }
.jrnl-hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(10,16,8,0.35) 0%, rgba(10,16,8,0.78) 100%),
    linear-gradient(to bottom, rgba(10,16,8,0.55) 0%, rgba(10,16,8,0.35) 40%, rgba(10,16,8,0.8) 100%);
}
.jrnl-hero__content { position: relative; z-index: 3; max-width: 780px; padding: 0 var(--gutter); }
.jrnl-hero__content .s-label { text-align: center; color: var(--gold); opacity: 0.9; }
.jrnl-hero__h1 {
  font-family: var(--font-disp); font-size: clamp(3rem, 9vw, 7.2rem); font-weight: 400;
  line-height: 0.92; letter-spacing: 0.02em; text-transform: uppercase;
  color: #F0EDE4; margin: 0.75rem 0 1.5rem;
}
.jrnl-hero__sub {
  font-family: var(--font-body); font-weight: 300; font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  color: rgba(240,237,228,0.78); max-width: 500px; margin: 0 auto 2.5rem; line-height: 1.85;
}
.jrnl-hero__cta {
  display: inline-flex; align-items: center;
  font-family: var(--font-body); font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase; color: #F0EDE4;
  padding: 0.4em 0; background: none; border: none;
  transition: letter-spacing 350ms var(--ease-out), color 350ms;
}
.jrnl-hero__cta:hover { letter-spacing: 0.32em; color: var(--gold); }

/* ── Filter bar (floating pill, same language as Projects) ── */
.jrnl-filter {
  background: transparent; position: sticky; top: calc(var(--nav-h) + 0.85rem);
  z-index: 60; margin-top: clamp(-3rem, -5vw, -2.25rem); padding: 0 var(--gutter);
  pointer-events: none; scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.jrnl-filter__inner {
  pointer-events: auto; max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(138,150,117,0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 999px; padding: 0.4rem 1.4rem 0.4rem 0.4rem;
  box-shadow: 0 20px 48px -20px rgba(20,24,14,0.28), 0 0 0 1px rgba(240,237,228,0.06);
}
.jrnl-filter__tabs.filter-tabs { display: flex; gap: 0.15rem; overflow-x: auto; scrollbar-width: none; }
.jrnl-filter__tabs.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 0.65rem 1.15rem; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-body); font-size: 0.62rem; font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3);
  background: transparent; cursor: pointer; border: none; transition: color 250ms, background 250ms;
}
.filter-tab:hover:not(.active) { color: var(--text-1); background: rgba(43,42,39,0.07); }
.filter-tab.active { color: var(--void); background: var(--gold); }
.jrnl-filter__count { padding-right: 0.4rem; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-1); white-space: nowrap; }

.jrnl-filter__desc {
  pointer-events: none;
  max-width: 640px; margin: 1.1rem auto 0; padding: 0 var(--gutter);
  text-align: center; font-family: var(--font-body); font-weight: 300;
  font-size: clamp(0.8rem, 1.1vw, 0.9rem); color: var(--text-2);
  animation: jrnlDescIn 500ms var(--ease-out) both;
}
@keyframes jrnlDescIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ── Shared card animation-in ── */
@keyframes jrnlFadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ── Featured stories (top, large pair) ── */
.jrnl-featured {
  max-width: var(--max-w); margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.75rem, 3.5vw, 3rem);
}
.jrnl-fcard {
  display: block; text-decoration: none; color: inherit;
  animation: jrnlFadeUp 800ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 120ms);
}
.jrnl-fcard__media {
  position: relative; aspect-ratio: 4/3; border-radius: 6px; overflow: hidden;
  background: var(--surface); box-shadow: 0 34px 64px -26px rgba(20,24,14,0.4);
}
.jrnl-fcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 800ms var(--ease-out); }
.jrnl-fcard:hover .jrnl-fcard__media img { transform: scale(1.07); }
.jrnl-fcard__tag {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  font-family: var(--font-body); font-size: 0.56rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: #F0EDE4; background: rgba(10,14,8,0.55); backdrop-filter: blur(4px);
  padding: 0.5em 0.95em; border-radius: 2px;
}
.jrnl-fcard__body { padding: 1.6rem 0 0 1.35rem; border-left: 2px solid var(--gold); }
.jrnl-fcard__title {
  font-family: var(--font-disp); font-size: clamp(1.5rem, 2.6vw, 2.15rem); font-weight: 400;
  text-transform: uppercase; line-height: 1.05; color: var(--text-1); margin-bottom: 0.65rem;
  transition: color 300ms;
}
.jrnl-fcard:hover .jrnl-fcard__title { color: var(--gold); }
.jrnl-fcard__dek {
  font-family: var(--font-ital); font-style: italic; font-weight: 300;
  font-size: 0.94rem; color: var(--text-2); line-height: 1.65; margin-bottom: 0.9rem; max-width: 46em;
}
.jrnl-fcard__meta { font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--label); }

/* ── Story grid (secondary cards) ── */
.jrnl-grid {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--gutter) clamp(4.5rem, 9vw, 8rem);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 2.8vw, 2.25rem);
}
.jrnl-card {
  display: block; text-decoration: none; color: inherit;
  animation: jrnlFadeUp 700ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms);
}
.jrnl-card__media {
  position: relative; aspect-ratio: 1/1; border-radius: 5px; overflow: hidden;
  background: var(--surface); box-shadow: 0 22px 44px -22px rgba(20,24,14,0.32);
}
.jrnl-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(0.94);
  transition: transform 650ms var(--ease-out), filter 400ms;
}
.jrnl-card:hover .jrnl-card__media img { transform: scale(1.09); filter: brightness(1); }
.jrnl-card__tag {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2;
  font-family: var(--font-body); font-size: 0.52rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: #F0EDE4; background: rgba(10,14,8,0.55); backdrop-filter: blur(4px);
  padding: 0.42em 0.8em; border-radius: 2px;
}
.jrnl-card__body { padding-top: 1.1rem; }
.jrnl-card__title {
  font-family: var(--font-disp); font-size: 1.2rem; font-weight: 400; text-transform: uppercase;
  line-height: 1.12; color: var(--text-1); margin-bottom: 0.4rem; transition: color 300ms;
}
.jrnl-card:hover .jrnl-card__title { color: var(--gold); }
.jrnl-card__meta { font-family: var(--font-body); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }

/* ── Empty state ── */
.jrnl-empty {
  display: none; max-width: 560px; margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) clamp(5rem, 10vw, 8rem); text-align: center;
}
.jrnl-empty.is-visible { display: block; animation: jrnlFadeUp 700ms var(--ease-out) both; }
.jrnl-empty__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--border-2);
  font-size: 1.4rem; color: var(--gold); margin-bottom: 1.75rem;
}
.jrnl-empty__title {
  font-family: var(--font-disp); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 400;
  text-transform: uppercase; line-height: 1.08; color: var(--text-1); margin-bottom: 1.15rem;
}
.jrnl-empty__desc { font-family: var(--font-body); font-weight: 300; color: var(--text-2); line-height: 1.85; font-size: 0.9rem; }

/* ── Closing CTA ── */
.jrnl-cta { background: var(--deep); padding: clamp(4rem, 8vw, 7rem) var(--gutter); text-align: center; }
.jrnl-cta__inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .jrnl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .jrnl-featured { grid-template-columns: 1fr; padding-top: clamp(2.25rem, 6vw, 3.5rem); }
  .jrnl-filter { margin-top: clamp(-2.2rem, -4vw, -1.6rem); padding: 0 1rem; }
  .jrnl-filter__inner { border-radius: 20px; padding: 0.4rem 0.85rem 0.4rem 0.35rem; }
  .filter-tab { padding: 0.6rem 0.85rem; }
}
@media (max-width: 600px) {
  .jrnl-hero { min-height: 560px; }
  .jrnl-grid { grid-template-columns: 1fr; gap: 2rem; }
  .jrnl-fcard__body { padding-left: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .jrnl-hero__bg img { animation: none; }
  .jrnl-fcard, .jrnl-card, .jrnl-empty.is-visible, .jrnl-filter__desc { animation: none; }
}
