/* Blog editorial index. Shared Naisho tokens and page chrome live in site.css. */

.blog-page {
  max-width: 1120px;
}

.blog-page .page-title {
  font-size: clamp(40px, 6vw, 62px);
}

.blog-page .page-lede {
  max-width: 620px;
  margin-bottom: clamp(54px, 8vw, 92px);
}

.blog-foundations,
.blog-cover-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.blog-foundations {
  margin-bottom: clamp(48px, 7vw, 84px);
}

.blog-foundations > :first-child {
  grid-column: span 8;
}

.blog-foundations > :last-child {
  grid-column: span 4;
}

.blog-cover-grid > :nth-child(1) {
  grid-column: span 7;
}

.blog-cover-grid > :nth-child(2) {
  grid-column: span 5;
}

.blog-cover-grid > :nth-child(3) {
  grid-column: span 4;
}

.blog-cover-grid > :nth-child(4) {
  grid-column: span 8;
}

.blog-cover-grid > :nth-child(5) {
  grid-column: span 5;
}

.blog-cover-grid > :nth-child(6) {
  grid-column: span 7;
}

.blog-entry {
  min-width: 0;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.blog-art {
  width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface), var(--surface-tint));
  box-shadow: inset 0 0 0 0.5px var(--line);
}

.blog-art picture {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.blog-art img {
  grid-area: 1 / 1;
  width: min(44%, 188px);
  height: auto;
  max-height: 70%;
  display: block;
  object-fit: contain;
}

[data-blog-role="foundation"] .blog-art {
  aspect-ratio: 16 / 9;
}

.blog-foundations > :last-child .blog-art,
[data-blog-role="essay"] .blog-art,
[data-blog-role="system"] .blog-art {
  aspect-ratio: 4 / 5;
}

[data-blog-role="story"] .blog-art,
[data-blog-role="boundary"] .blog-art {
  aspect-ratio: 5 / 4;
}

[data-blog-role="principle"] .blog-art {
  aspect-ratio: 1;
}

[data-blog-role="trust"] .blog-art {
  aspect-ratio: 16 / 9;
}

.theme-dark .blog-page .theme-art-light,
.theme-light .blog-page .theme-art-dark {
  display: none;
}

.blog-category {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.blog-entry h2 {
  margin: 7px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.13;
}

.blog-foundations .blog-entry h2 {
  font-size: clamp(24px, 3vw, 32px);
}

.blog-entry p {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

a.blog-entry {
  transition: transform 180ms var(--ease-standard);
}

a.blog-entry .blog-art {
  transition: box-shadow 180ms var(--ease-standard);
}

a.blog-entry:hover {
  transform: translateY(-3px);
}

a.blog-entry:hover .blog-art {
  box-shadow: inset 0 0 0 0.5px var(--line-strong);
}

a.blog-entry:active {
  transform: translateY(-1px) scale(0.995);
}

a.blog-entry:focus-visible {
  border-radius: 16px;
  outline: 2px solid var(--brand-pink);
  outline-offset: 8px;
}

@media (max-width: 767px) {
  .blog-foundations,
  .blog-cover-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(40px, 10vw, 64px);
  }

  .blog-foundations {
    margin-bottom: clamp(48px, 12vw, 72px);
  }

  .blog-foundations > :first-child,
  .blog-foundations > :last-child,
  .blog-cover-grid > :nth-child(1),
  .blog-cover-grid > :nth-child(2),
  .blog-cover-grid > :nth-child(3),
  .blog-cover-grid > :nth-child(4),
  .blog-cover-grid > :nth-child(5),
  .blog-cover-grid > :nth-child(6) {
    grid-column: 1;
  }

  .blog-entry .blog-art {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .blog-page {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  a.blog-entry,
  a.blog-entry .blog-art {
    transition: none;
  }

  a.blog-entry:hover,
  a.blog-entry:active {
    transform: none;
  }
}
