/* ═══════════════════════════════════════════════════════════════════════════
   CATARSIS COLECTIVA — Editorial Article Styles
   Premium Long-Form Reading Experience · Moskv Aesthetic
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reading Progress Bar ─────────────────────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 200;
  transition: width 80ms linear;
  box-shadow: 0 0 12px rgba(46, 80, 144, 0.6);
}

/* ── Back Navigation ──────────────────────────────────────────────────────── */
.article-back {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(10, 10, 10, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full, 9999px);
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

.article-back:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(46, 80, 144, 0.3);
}

.article-back svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ── Hero Section ─────────────────────────────────────────────────────────── */
.article-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(46, 80, 144, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(180, 255, 0, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.article-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-dark) 0%, transparent 100%);
  pointer-events: none;
}

.hero-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 0.2s forwards;
}

.article-hero .hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  max-width: 900px;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 0.4s forwards;
}

.hero-title .title-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-hero .hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 3rem;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 0.6s forwards;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 0.8s forwards;
}

.hero-author {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
}

.hero-date,
.hero-reading-time {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hero-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-secondary);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--font-display);
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 1s forwards;
}

.hero-scroll-hint .scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceArrow {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(8px); }
}

/* ── Layout: Article + TOC ────────────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr min(720px, 90vw) 240px;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  position: relative;
}

/* ── Epigraph (intro block) ───────────────────────────────────────────────── */
.article-epigraph {
  grid-column: 2;
  margin-bottom: 4rem;
  padding: 2rem;
  border-left: 3px solid var(--accent-primary);
  background: rgba(46, 80, 144, 0.06);
  border-radius: 0 8px 8px 0;
}

.article-epigraph p {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
}

.article-epigraph p + p {
  margin-top: 1rem;
}

.article-epigraph p strong {
  color: var(--text-primary);
  font-style: normal;
}

/* ── Article Body ─────────────────────────────────────────────────────────── */
.article-body {
  grid-column: 2;
}

.article-section {
  margin-bottom: 4rem;
  scroll-margin-top: 2rem;
}

.section-number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-number::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--accent-primary), transparent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.article-section p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.25rem;
}

.article-section p:last-child {
  margin-bottom: 0;
}

.article-section p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-section p em {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Pull Quotes ──────────────────────────────────────────────────────────── */
.pull-quote {
  margin: 2.5rem -1rem;
  padding: 2rem 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--accent-secondary, #b4ff00);
  border-radius: 0 12px 12px 0;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: relative;
}

.pull-quote p {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-primary);
  font-style: italic;
}

.pull-quote .quote-mark {
  position: absolute;
  top: -0.5rem;
  left: 1.5rem;
  font-size: 4rem;
  color: var(--accent-primary);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

/* Short dramatic lines */
.dramatic {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.5;
}

.dramatic-break {
  display: block;
  text-align: center;
  color: var(--accent-primary);
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 3rem 0;
  opacity: 0.4;
  letter-spacing: 0.5em;
}

/* ── Section Dividers ─────────────────────────────────────────────────────── */
.section-divider {
  grid-column: 2;
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: 0 0 4rem;
}

/* ── Table of Contents (Sidebar) ──────────────────────────────────────────── */
.article-toc {
  grid-column: 3;
  position: sticky;
  top: 3rem;
  height: fit-content;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding-left: 2rem;
}

.toc-title {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 0.25rem;
}

.toc-link {
  display: block;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all 200ms ease;
}

.toc-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.toc-link.active {
  color: var(--accent-primary);
  border-left-color: var(--accent-primary);
  background: rgba(46, 80, 144, 0.08);
}

/* TOC scrollbar */
.article-toc::-webkit-scrollbar {
  width: 3px;
}

.article-toc::-webkit-scrollbar-track {
  background: transparent;
}

.article-toc::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* ── Epilogue Section ─────────────────────────────────────────────────────── */
.article-epilogue {
  grid-column: 2;
  margin-top: 2rem;
  padding: 3rem 2.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  text-align: center;
}

.epilogue-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 2rem;
}

.epilogue-text p {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.25rem;
}

.epilogue-text p strong {
  color: var(--text-primary);
}

.epilogue-mantra {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--accent-secondary, #b4ff00);
  margin-top: 2rem;
  letter-spacing: 0.05em;
}

.article-epilogue--final {
  margin-top: 4rem;
}

/* ── Article Footer ───────────────────────────────────────────────────────── */
.article-footer {
  grid-column: 2;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.article-tag {
  font-family: var(--font-body);
  font-size: 0.7rem;
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 200ms ease;
}

.article-tag:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.article-copyright {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr min(720px, 92vw) 1fr;
  }

  .article-toc {
    display: none;
  }
}

@media (max-width: 768px) {
  .article-layout {
    grid-template-columns: 1fr;
    padding: 2rem 1.25rem 4rem;
  }

  .article-epigraph,
  .article-body,
  .article-epilogue,
  .article-footer,
  .section-divider {
    grid-column: 1;
  }

  .article-hero {
    min-height: 90vh;
    padding: 5rem 1.5rem 3rem;
  }

  .pull-quote {
    margin: 2rem -0.5rem;
    padding: 1.5rem;
  }

  .article-section {
    margin-bottom: 3rem;
  }

  .article-back {
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.65rem;
  }
}

/* ── Print Styles ─────────────────────────────────────────────────────────── */
@media print {
  .reading-progress,
  .article-back,
  .article-toc,
  .hero-scroll-hint {
    display: none;
  }

  .article-hero {
    min-height: 0;
    padding: 2rem;
  }

  .article-section p,
  .pull-quote p {
    color: #000;
  }

  body {
    background: #fff;
    color: #000;
  }
}
