/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* Sections */
.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section--alt {
  background-color: var(--bg-secondary);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.section__title-en {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  font-weight: 500;
}

.section__title-ja {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--text-heading);
  margin-bottom: var(--space-lg);
}

.section__intro {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-body);
  font-size: var(--text-sm);
  line-height: 2;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  background-color: var(--bg-primary);
  padding: var(--space-xl);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-6xl);
  color: var(--text-heading);
  letter-spacing: 0.06em;
  margin-bottom: var(--space-xl);
  line-height: 1.3;
}

.hero__title .accent {
  color: var(--accent-gold);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--text-body);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-3xl);
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-3xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-label);
  font-family: var(--font-en);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* Editorial Layout (Section A) */
.layout-editorial .comment-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  margin-bottom: var(--space-4xl);
}

.layout-editorial .comment-card:nth-child(even) {
  direction: rtl;
}

.layout-editorial .comment-card:nth-child(even) > * {
  direction: ltr;
}

/* Carousel Layout (Section B) */
.layout-carousel-wrapper {
  position: relative;
}

.layout-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Break out of container to show edge peek */
  margin: 0 calc(-1 * var(--space-xl));
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
}

.layout-carousel::-webkit-scrollbar {
  display: none;
}

.layout-carousel .comment-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
}


/* Scroll hint indicator */
.carousel-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-label);
  font-family: var(--font-en);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--space-lg);
  opacity: 0.6;
}

.carousel-hint svg {
  width: 16px;
  height: 16px;
  animation: nudgeRight 1.5s ease-in-out infinite;
}

@keyframes nudgeRight {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

/* Grid + Feature Layout (Section C) */
.layout-grid-feature .feature-card {
  margin-bottom: var(--space-3xl);
}

.layout-grid-feature .grid-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

/* Full-width overlay Layout (Section D) */
.layout-fullwidth .comment-card {
  position: relative;
  padding: var(--space-3xl);
  margin-bottom: var(--space-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.layout-fullwidth .comment-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(24px) brightness(0.2);
  transform: scale(1.15);
  z-index: 0;
}

.layout-fullwidth .comment-card__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 10, 15, 0.8), rgba(10, 10, 15, 0.65));
}

.layout-fullwidth .comment-card__book-image {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.layout-fullwidth .comment-card__book-image img {
  width: 180px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.layout-fullwidth .comment-card__book-image--placeholder {
  width: 180px;
  aspect-ratio: 2 / 3;
  font-size: var(--text-sm);
}

.layout-fullwidth .comment-card__content {
  position: relative;
  z-index: 1;
}

/* Masonry Layout (Section E) */
.layout-masonry {
  columns: 2;
  column-gap: var(--space-xl);
}

.layout-masonry .comment-card {
  break-inside: avoid;
  margin-bottom: var(--space-xl);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
  text-align: center;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: var(--space-5xl) var(--space-xl);
}

/* Footer */
.footer {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-primary);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsive */
@media (max-width: 1024px) {
  .layout-editorial .comment-card {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .layout-editorial .comment-card:nth-child(even) {
    direction: ltr;
  }

  .layout-grid-feature .grid-cards {
    grid-template-columns: 1fr;
  }

  .layout-masonry {
    columns: 1;
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-3xl) 0;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .layout-carousel .comment-card {
    flex: 0 0 280px;
  }

  .layout-fullwidth .comment-card {
    grid-template-columns: 1fr;
    padding: var(--space-xl);
  }

  .layout-fullwidth .comment-card__book-image {
    justify-self: center;
  }

  .layout-fullwidth .comment-card__book-image img {
    width: 140px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__inner {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }
}
