/* =================================================================
   index.css
   トップページ（index.html）固有のスタイル
   構成：余白のある1枚画像ヒーロー（理念をずらして被せる）
         → News & Events → About テーザー
   ================================================================= */

body {
  background-color: #ffffff;
  line-height: 1.7;
}

/* ----- ヒーロー（画面を覆わないインセット画像） ------------------- */
.hero {
  padding: 92px 5vw 0;
  background: #ffffff;
}
.hero-media {
  position: relative;
  overflow: hidden;
  height: 58vh;
  min-height: 360px;
  background: url('../images/vision.jpeg') center/cover no-repeat; /* JS無効時のフォールバック画像 */
  border-radius: 6px;
}
/* ディゾルブ切替用のレイヤー（js/index.js の HERO_IMAGES から生成） */
.hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.hero-slide.active { opacity: 1; }
/* 理念コピー：画像の左下にずらして被せる白ブロック */
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
  background: #ffffff;
  margin: -120px 5vw 0 0;
  padding: 34px 44px 0 0;
  border-radius: 0 6px 0 0;
}
.hero-en {
  margin: 0 0 14px;
  color: var(--waseda-red);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 5px;
}
.hero-ja {
  margin: 0;
  color: var(--dark-navy);
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 3px;
  line-height: 1.6;
}
.hero-sub {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 2px;
}

/* ----- セクション共通・サブタイトル中央揃え ----------------------- */
section { padding: 90px 5vw; }
.news-section { padding-top: 70px; }
.about-teaser { background-color: var(--light-gray); text-align: center; }

.subtitle-wrapper {
  text-align: center;
  width: 100%;
}
.section-subtitle {
  color: var(--waseda-red);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 60px;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 12px;
  display: inline-block; /* 中央配置・アニメーション幅の基準 */
}
.section-subtitle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 45px;
  height: 2px;
  background: linear-gradient(to right,
    rgba(142, 23, 40, 0) 0%, var(--waseda-red) 70%, transparent 70%,
    transparent 80%, var(--waseda-red) 80%, var(--waseda-red) 100%);
  transform: translateX(var(--scroll-x, 0px));
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* ----- About テーザー --------------------------------------------- */
.about-text {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 50px;
  text-align: left;
  line-height: 1.9;
}

/* ----- News セクション -------------------------------------------- */
/* カード型 */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-bottom: 80px;
}
.featured-card {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}
.card-image {
  height: 200px;
  background: linear-gradient(135deg, #3a6073, #3a7bd5);
  position: relative;
}
.card-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-date { font-size: 0.8rem; color: var(--waseda-red); font-weight: 600; margin-bottom: 12px; }
.card-title { margin: 0 0 12px 0; font-size: 1.15rem; font-weight: 600; line-height: 1.5; }
.card-title a { color: inherit; text-decoration: none; }
.card-text { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* リスト型 */
.news-list-container { border-top: 1px solid var(--border-color); margin-bottom: 50px; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-item {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 10px;
  display: flex;
  align-items: flex-start;
  transition: background-color 0.2s;
}
.news-item:hover { background-color: rgba(142, 23, 40, 0.02); }
.list-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
  width: 120px;
  flex-shrink: 0;
}
.list-main { flex-grow: 1; }
.list-title { font-size: 0.95rem; margin: 0; }
.list-title a { color: var(--text-main); text-decoration: none; transition: color 0.2s; }
.list-title a:hover { color: var(--waseda-red); text-decoration: underline; }
.list-summary { margin: 6px 0 0 0; font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ----- ボタン ----------------------------------------------------- */
.more-link-container { text-align: center; }
.btn-more {
  display: inline-block;
  padding: 12px 45px;
  border: 1px solid var(--waseda-red);
  color: var(--waseda-red);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
  border-radius: 2px;
  transition: background-color 0.3s, color 0.3s;
}
.btn-more:hover { background-color: var(--waseda-red); color: var(--text-light); }

/* ----- スクロール連動フェードアップ -------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- スマホ対応（768px以下） ------------------------------------ */
@media (max-width: 768px) {
  .hero { padding: 74px 5vw 0; }
  .hero-media { height: 44vh; min-height: 260px; }
  .hero-copy { margin: -64px 0 0 0; padding: 22px 22px 0 0; max-width: 100%; }
  .hero-en { font-size: 0.72rem; letter-spacing: 4px; }
  .hero-ja { letter-spacing: 2px; }
  .hero-ja br { display: none; } /* スマホでは固定改行を無効化し、自然な折り返しに */
  section { padding: 64px 6vw; }
  .news-section { padding-top: 52px; }
  .featured-grid { gap: 24px; margin-bottom: 50px; }
}

/* ----- 動きを減らす設定の利用者には演出を無効化（アクセシビリティ） -- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
