/* Galok / Themes — three-lens theme clusters.
   Reuses the archive-page system (palette, kickers, hairlines, typography).
   Motion: opacity + transform only, ≤240ms, reduced-motion silent fallback. */

/* --- grid --------------------------------------------------------------- */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

/* --- card --------------------------------------------------------------- */
.themes-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 5px solid var(--accent);
  background: rgba(255, 250, 242, 0.56);
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --- header: kicker + glyph + definition --------------------------------- */
.themes-card-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.themes-card-head .archive-card-meta {
  margin: 0;
}

.themes-card-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.9rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-wrap: balance;
}

.themes-card-head h3 .glyph-draw {
  font-size: 1.5rem;
  line-height: 1;
}

.themes-definition {
  margin: 0 !important;
  color: var(--archive-muted, var(--muted));
  font-size: 0.92rem;
  line-height: 1.55;
}

/* --- maturity distribution ------------------------------------------------ */
.themes-dist {
  display: flex;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  flex-wrap: wrap;
}

.themes-dist-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.themes-dist-item em {
  font-style: italic;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.themes-dist-item[data-maturity="evergreen"] em {
  color: var(--archive-red, #c74637);
}

.themes-dist-item b {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
}

/* --- essay list ----------------------------------------------------------- */
.themes-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.themes-list li {
  border-bottom: 1px solid var(--line);
}

.themes-list li:last-child {
  border-bottom: 0;
}

.themes-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 2px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), color 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
  .themes-list a:hover {
    transform: translateX(4px);
    color: var(--archive-red, #c74637);
  }
}

.themes-list-index {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  flex-shrink: 0;
}

.themes-list-name {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.3;
  flex: 1;
  text-wrap: balance;
}

.themes-list-issue {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.themes-list a .notes-row-maturity {
  margin-left: 0;
  font-size: 0.66rem;
}

/* --- card footer nav ------------------------------------------------------- */
.themes-card-nav {
  margin-top: auto;
  padding-top: 14px;
}

.themes-card-nav a {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  padding-bottom: 3px;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), color 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
  .themes-card-nav a:hover {
    transform: translateX(3px);
    color: var(--archive-red, #c74637);
    border-bottom-color: var(--archive-red, #c74637);
  }
}

/* --- reveal --------------------------------------------------------------- */
.themes-card[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

.themes-card[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 360ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .themes-card[data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* --- responsive ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .themes-grid {
    grid-template-columns: 1fr;
  }
}
