/* Journal index (/journal/, /ja/journal/), article template
   (/ja/journal/[slug]/), and the homepage Journal carousel section
   (index.html, ja/index.html). Shared EN + JA.
   Reuses .work-hero / .work-hero-title / .work-hero-intro (work-index.css)
   for the index hero, and .text-link (styles.css) for arrow links. */

/* ---- Journal index: card grid ---- */

.journal-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 96px;
}

.journal-row {
  display: flex;
  gap: 60px;
  width: 100%;
  padding: 24px clamp(20px, 6vw, 60px) 48px;
}

.journal-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 0 1 calc(50% - 30px);
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.journal-card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 2000 / 1307;
  object-fit: cover;
  display: block;
}

.journal-card-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 36px;
  color: var(--text-primary);
}

.journal-card-excerpt {
  font-size: 16px;
  line-height: 24px;
  color: var(--text-primary);
}

.journal-card-link {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.journal-card-link:hover {
  color: var(--text-primary);
  opacity: 0.7;
}

@media (max-width: 1024px) {
  .journal-row {
    flex-direction: column;
    gap: 32px;
  }

  .journal-card {
    flex-basis: 100%;
  }
}

/* ---- Article: hero ---- */

.article-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-bottom: 64px;
}

.article-hero-inner {
  display: flex;
  flex-direction: column;
  width: min(830px, calc(100% - 40px));
  padding: 80px 0 48px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--text-muted);
}

.article-meta-divider {
  width: 1px;
  height: 13px;
  background: var(--border-rule);
}

.article-title {
  padding-top: 48px;
  max-width: 900px;
  font-size: 48px;
  font-weight: 900;
  line-height: 1.33;
  color: var(--text-primary);
}

.article-subhead {
  padding-top: 32px;
  max-width: 908px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.375;
  color: var(--text-muted);
}

.article-hero-image {
  width: 100%;
  aspect-ratio: 1200 / 628;
  object-fit: cover;
  display: block;
}

/* ---- Article: body (single column) ---- */

.article-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 clamp(20px, 5vw, 60px) 96px;
}

.article-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 830px;
  max-width: 100%;
  padding-bottom: 48px;
}

.article-section--last {
  padding-bottom: 60px;
}

.article-h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.article-p {
  font-size: 20px;
  line-height: 32px;
  color: var(--text-primary);
}

.article-p a {
  color: var(--text-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

.article-p a:hover {
  opacity: 0.7;
}

.article-h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 24px;
  font-size: 20px;
  line-height: 32px;
  color: var(--text-primary);
}

.article-list li {
  list-style: disc;
}

.article-author-card {
  display: flex;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--border-rule);
  width: 830px;
  max-width: 100%;
}

.article-author-avatar {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  object-fit: cover;
}

.article-author-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-author-eyebrow {
  font-size: 16px;
  color: var(--text-primary);
}

.article-author-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-muted);
}

.article-author-bio {
  font-size: 16px;
  line-height: 24px;
  color: var(--text-primary);
}

.article-author-link {
  font-size: 16px;
  color: var(--text-primary);
}

.article-author-link a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

.article-author-link a:hover {
  opacity: 0.7;
}

/* ---- Article: prev/next nav ---- */

.article-nav {
  border-top: 1px solid var(--border-rule);
  border-bottom: 1px solid var(--border-rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 32px clamp(20px, 5vw, 60px);
  margin-bottom: 48px;
}

.article-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.article-nav-link:hover {
  color: var(--text-primary);
}

.article-nav-link--disabled {
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 480px) {
  .article-title {
    font-size: 32px;
  }

  .article-subhead {
    font-size: 18px;
  }

  .article-author-card {
    flex-direction: column;
  }
}

/* ---- Homepage: Journal carousel section ---- */

.journal-carousel-section {
  padding: 0 15px 50px;
  max-width: 1920px;
  border-top: 1px solid var(--border-rule);
}

.journal-carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 1px 48px;
}

.journal-carousel-badge {
  display: inline-flex;
  align-items: center;
  background: var(--bg-brand);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.52px;
  text-transform: uppercase;
  padding: 5px 20px;
  border-radius: 2px;
}

.journal-carousel-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.journal-carousel-viewall {
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.journal-carousel-viewall:hover {
  color: var(--text-primary);
}

.journal-carousel-arrows {
  display: flex;
  gap: 8px;
}

.journal-carousel-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-button);
  border-radius: 999px;
  background: none;
  color: var(--text-accent);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.journal-carousel-arrow:hover {
  background: var(--bg-surface);
}

.journal-carousel-arrow:disabled {
  opacity: 0.35;
  cursor: default;
  background: none;
}

.journal-carousel-track {
  display: flex;
  gap: 20px;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  cursor: grab;
  scrollbar-width: none;
}

.journal-carousel-track::-webkit-scrollbar {
  display: none;
}

.journal-carousel-track.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.journal-carousel-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 440px;
  max-width: 82vw;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-rule);
  background: var(--bg-canvas);
  text-decoration: none;
  color: inherit;
}

.journal-carousel-card-image-wrap {
  position: relative;
  width: 100%;
  height: 280px;
}

.journal-carousel-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.journal-carousel-card-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(4, 34, 15, 0.1);
}

.journal-carousel-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
}

.journal-carousel-card-title {
  font-size: 18px;
  line-height: 26px;
  color: var(--text-primary);
}

.journal-carousel-card-link {
  font-size: 14px;
  color: var(--text-accent);
}

@media (max-width: 640px) {
  .journal-carousel-header {
    flex-wrap: wrap;
    gap: 16px;
  }

  .journal-carousel-card {
    width: 320px;
  }

  .journal-carousel-card-image-wrap {
    height: 210px;
  }
}
