/* ── Creative Anthology CSS ── */

.creative-section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-20);
}

.creative-section .container {
  max-width: 1600px;
}

/* ── Typographic Grid ── */
.creative-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

/* ── Poem Card ── */
.poem-card {
  position: relative;
  min-height: 400px;
  border-radius: var(--radius-card);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease-out-expo), border-color 0.3s var(--ease-out-expo);
}

.poem-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

/* ── Card Content Layout ── */
.poem-icon {
  position: absolute;
  top: 2rem;
  left: 2rem;
  color: var(--accent);
  opacity: 0.2;
}

.poem-icon svg {
  width: 32px;
  height: 32px;
}

.poem-excerpt {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-align: center;
  margin: auto 0;
  z-index: 1;
}

/* ── Spotlight Poem & Instagram Card ── */
.spotlight {
  grid-column: span 3;
}

.spotlight .poem-excerpt {
  font-size: 2rem;
}

.instagram-card {
  text-decoration: none;
}

/* ── Card Content Layout ── */
.poem-meta {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  z-index: 1;
}

.poem-title {
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-snug);
  line-height: var(--lh-snug);
  text-wrap: balance;
}

.meta-date {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* ── Immersive Reader (Full-Screen Overlay) ── */
.reader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.reader-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.reader-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: var(--bg-canvas);
}

.reader-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
}

.reader-close:hover {
  background: var(--bg-card-hover);
}

.reader-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--text-primary);
  opacity: 0.01;
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
  user-select: none;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
}

.reader-content-wrapper {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 6rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reader-content {
  width: 100%;
  max-width: 600px;
  /* Optimal readability width */
  margin: auto;
  transform: translateY(20px);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.reader-overlay[aria-hidden="false"] .reader-content {
  transform: translateY(0);
}

.reader-title {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.5rem;
}

.reader-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 3rem;
}

.reader-body {
  display: inline-block;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 1.5rem;
  color: var(--text-primary);
}

.reader-stanza {
  white-space: pre-wrap;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.reader-stanza:last-child {
  margin-bottom: 0;
}

.reader-author {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  text-align: right;
  color: var(--text-secondary);
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .creative-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .spotlight {
    grid-column: span 2;
  }
}

@media (max-width: 1024px) {
  .creative-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .spotlight {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .creative-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .spotlight {
    grid-column: span 1;
  }

  .spotlight .poem-excerpt {
    font-size: 1.5rem;
  }

  .poem-card {
    min-height: 350px;
    padding: 2rem;
  }

  .poem-excerpt {
    font-size: 1.5rem;
  }

  .reader-body {
    font-size: 1.25rem;
  }
}