/**
 * Chemesis Core — Resources archive + article styles.
 * Port of the approved Vercel /resources presentation. Prefix: .chr-*.
 */

/* ------------------------------------------------------------------
   Archive
   ------------------------------------------------------------------ */
.chr-archive {
  background: var(--ch-paper);
  padding-block: 3.5rem;
}

@media (min-width: 768px) {
  .chr-archive {
    padding-block: 5rem;
  }
}

.chr-cat {
  font-family: var(--ch-font-mono);
  font-size: var(--ch-type-label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ch-blue-600);
}

.chr-read {
  font-family: var(--ch-font-mono);
  font-size: var(--ch-type-label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ch-faint);
}

/* Featured */
.chr-featured {
  display: grid;
  gap: 2rem;
  border-radius: var(--ch-radius-md);
  border: 1px solid var(--ch-line);
  background: #fff;
  padding: 2rem;
  text-decoration: none;
  transition: box-shadow 0.5s var(--ch-ease-expo);
}

@media (min-width: 768px) {
  .chr-featured {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    padding: 2.5rem;
  }
}

.chr-featured:hover {
  box-shadow: 0 40px 80px -60px rgba(0, 12, 48, 0.6);
}

.chr-featured-meta {
  min-width: 0;
}

@media (min-width: 768px) {
  .chr-featured-meta {
    grid-column: span 3;
  }
}

.chr-featured .chr-read {
  display: block;
  margin-top: 0.75rem;
}

.chr-featured-body {
  min-width: 0;
}

@media (min-width: 768px) {
  .chr-featured-body {
    grid-column: span 8;
  }
}

.chr-featured-title {
  font-family: var(--ch-font-display);
  font-size: var(--ch-type-h3);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ch-ink-900);
}

.chr-featured-excerpt {
  margin-top: 1rem;
}

.chr-featured-link {
  margin-top: 1.5rem;
  font-size: var(--ch-type-body-sm);
}

.chr-featured:hover .chr-arrow {
  transform: translateX(4px);
}

/* Cards */
.chr-card-grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .chr-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chr-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  border-radius: var(--ch-radius-md);
  border: 1px solid var(--ch-line);
  background: #fff;
  padding: 2rem;
  text-decoration: none;
  transition: box-shadow 0.5s var(--ch-ease-expo);
}

.chr-card:hover {
  box-shadow: 0 40px 80px -60px rgba(0, 12, 48, 0.6);
}

.chr-card-title {
  margin-top: 1rem;
  font-family: var(--ch-font-display);
  font-size: var(--ch-type-h4);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ch-ink-900);
}

.chr-card-excerpt {
  margin-top: 0.75rem;
  flex: 1;
  font-size: var(--ch-type-body-sm);
  line-height: 1.65;
  color: var(--ch-muted);
}

.chr-card-foot {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chr-card-foot .chr-arrow {
  color: var(--ch-faint);
  transition: transform 0.3s var(--ch-ease-expo), color 0.3s var(--ch-ease-expo);
}

.chr-card:hover .chr-arrow {
  transform: translateX(4px);
  color: var(--ch-blue);
}

/* ------------------------------------------------------------------
   Article template
   ------------------------------------------------------------------ */
.chr-article {
  background: var(--ch-paper);
  padding-block: 3.5rem;
}

@media (min-width: 768px) {
  .chr-article {
    padding-block: 5rem;
  }
}

.chr-article-grid {
  display: grid;
  gap: 3.5rem;
}

@media (min-width: 1024px) {
  .chr-article-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

.chr-main {
  min-width: 0;
}

@media (min-width: 1024px) {
  .chr-main {
    grid-column: span 8;
  }
}

.chr-side {
  min-width: 0;
}

@media (min-width: 1024px) {
  .chr-side {
    grid-column: span 4;
  }
}

.chr-sticky {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .chr-sticky {
    position: sticky;
    top: 7rem;
  }
}

/* Long-form typography */
.chr-prose {
  color: var(--ch-muted);
  max-width: 44rem;
}

.chr-prose > *:first-child {
  margin-top: 0;
}

.chr-prose p {
  margin-top: 1.5rem;
  font-size: var(--ch-type-body-lg);
  line-height: 1.65;
}

.chr-prose h2 {
  margin-top: 2.5rem;
  font-family: var(--ch-font-display);
  font-size: var(--ch-type-h3);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ch-ink-900);
}

.chr-prose ul,
.chr-prose ol {
  margin-top: 1.5rem;
  border-left: 2px solid rgba(0, 84, 252, 0.3);
  padding-left: 1.5rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chr-prose li {
  font-size: var(--ch-type-body-lg);
  line-height: 1.65;
  color: rgba(28, 36, 56, 0.85);
}

.chr-prose blockquote {
  margin: 3rem 0;
  border-top: 1px solid var(--ch-line);
  border-bottom: 1px solid var(--ch-line);
  padding-block: 2rem;
}

.chr-prose blockquote p {
  margin: 0;
  font-family: var(--ch-font-display);
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ch-ink-900);
}

.chr-prose blockquote p::before {
  content: "\201C";
}

.chr-prose blockquote p::after {
  content: "\201D";
}

@media (min-width: 768px) {
  .chr-prose blockquote p {
    font-size: 1.5625rem;
  }
}

.chr-prose a {
  color: var(--ch-blue-600);
}

.chr-prose a:hover {
  color: var(--ch-blue-700);
}

/* Related panel */
.chr-panel {
  border-radius: var(--ch-radius-md);
  border: 1px solid var(--ch-line);
  background: #fff;
  padding: 1.5rem;
}

.chr-panel-eyebrow {
  display: inline-flex;
  color: var(--ch-faint);
}

.chr-related-list {
  margin-top: 1.25rem;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chr-related-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 0.75rem;
  text-decoration: none;
}

.chr-related-name {
  font-size: var(--ch-type-body);
  font-weight: 500;
  color: var(--ch-ink-900);
  transition: color 0.3s var(--ch-ease-expo);
}

.chr-related-item:hover .chr-related-name {
  color: var(--ch-blue-600);
}

.chr-related-arrow {
  color: var(--ch-faint);
}

.chr-related-meta {
  grid-column: 1 / span 2;
  margin-top: 0.25rem;
  font-family: var(--ch-font-mono);
  font-size: var(--ch-type-mono);
  line-height: 1rem;
  color: var(--ch-faint);
}

/* Docs panel */
.chr-docs-panel {
  border-radius: var(--ch-radius-md);
  background: var(--ch-ink-900);
  padding: 1.5rem;
  color: #fff;
}

.chr-docs-title {
  font-family: var(--ch-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.chr-docs-text {
  margin-top: 0.75rem;
  font-size: var(--ch-type-body-sm);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
}

.chr-docs-panel .ch-btn {
  margin-top: 1.25rem;
}

/* Continue reading */
.chr-more {
  margin-top: 4rem;
  border-top: 1px solid var(--ch-line);
  padding-top: 2.5rem;
}

.chr-more-eyebrow {
  display: inline-flex;
  color: var(--ch-faint);
}

.chr-more-grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .chr-more-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chr-more-card {
  display: block;
  border-radius: var(--ch-radius-md);
  border: 1px solid var(--ch-line);
  background: #fff;
  padding: 1.5rem;
  text-decoration: none;
  transition: box-shadow 0.3s var(--ch-ease-expo);
}

.chr-more-card:hover {
  box-shadow: 0 30px 60px -50px rgba(0, 12, 48, 0.6);
}

.chr-more-title {
  margin-top: 0.75rem;
  font-family: var(--ch-font-display);
  font-size: var(--ch-type-h4);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ch-ink-900);
}

.chr-more-link {
  margin-top: 1rem;
  font-size: var(--ch-type-body-sm);
}

/* ------------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .chr-featured,
  .chr-card,
  .chr-more-card,
  .chr-arrow,
  .chr-related-name {
    transition: none;
  }
}

/* ------------------------------------------------------------------
   Elementor kit/theme button shield for Resources blocks
   ------------------------------------------------------------------ */
body :is(.chr-archive, .chr-article) button,
body :is(.chr-archive, .chr-article) button:hover {
  background: transparent;
  color: inherit;
  padding: 0;
}

body .chr-article .ch-btn-light,
body .chr-archive .ch-btn-light {
  background: #fff;
  color: var(--ch-ink-900);
  padding-inline: 1.1rem;
}

body .chr-article .ch-btn-light:hover,
body .chr-archive .ch-btn-light:hover {
  background: #fff;
  color: var(--ch-ink-900);
  box-shadow: 0 14px 34px -16px rgba(255, 255, 255, 0.4);
}
