/* ===================================
   しくじりABR特集 - メインスタイル
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&family=Noto+Serif+JP:wght@400;700&display=swap');

/* ---- リセット & 基本設定 ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent-red:    #E63946;
  --accent-yellow: #FFD166;
  --accent-blue:   #118AB2;
  --accent-green:  #06D6A0;
  --accent-purple: #9B5DE5;
  --accent-orange: #F77F00;
  --bg-cream:      #FFF8F0;
  --bg-dark:       #1A1A2E;
  --text-dark:     #1A1A2E;
  --text-mid:      #444;
  --text-light:    #888;
  --border:        #E0D6CC;
  --font-sans:     'Noto Sans JP', sans-serif;
  --font-serif:    'Noto Serif JP', serif;
}

html { scroll-behavior: smooth; }

/* ===================================
   Material Icons ユーティリティ
   =================================== */
.mi {
  font-family: 'Material Icons Round';
  font-style: normal;
  font-weight: normal;
  font-size: 1.1em;
  line-height: 1;
  vertical-align: -0.15em;
  display: inline-block;
  white-space: nowrap;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-cream);
  color: var(--text-dark);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===================================
   ヘッダー / ナビ
   =================================== */
.site-header {
  background: var(--bg-dark);
  color: #fff;
  padding: 0.6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 4px solid var(--accent-yellow);
}

.site-header .logo {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent-yellow);
  text-decoration: none;
}

.site-header nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.78rem;
  margin-left: 1.4rem;
  transition: color .2s;
}
.site-header nav a:hover { color: var(--accent-yellow); }

/* ===================================
   HERO — 雑誌風表紙
   =================================== */
.hero {
  position: relative;
  background: var(--bg-dark);
  color: #fff;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem 5rem;
}

/* ノイズ風テクスチャ（疑似要素） */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(230,57,70,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(155,93,229,.15) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(6,214,160,.12) 0%, transparent 50%);
  pointer-events: none;
}

/* ドット格子 */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-badge {
  position: relative;
  z-index: 2;
  display: inline-block;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .18em;
  padding: .35rem 1.1rem;
  border-radius: 2px;
  margin-bottom: 1.6rem;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.hero-title-wrap {
  position: relative;
  z-index: 2;
  margin-bottom: 1.2rem;
}

.hero-kana {
  font-size: clamp(.8rem, 2vw, 1rem);
  letter-spacing: .3em;
  color: #aaa;
  display: block;
  margin-bottom: .5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.hero-title .accent-word {
  color: var(--accent-yellow);
  position: relative;
  display: inline-block;
}
.hero-title .accent-word::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 6px;
  background: var(--accent-red);
  border-radius: 3px;
}

.hero-subtitle {
  position: relative;
  z-index: 2;
  font-size: clamp(.9rem, 2.2vw, 1.15rem);
  color: #ccc;
  max-width: 600px;
  margin: 1.2rem auto 2.5rem;
  line-height: 1.8;
}

.hero-issue-info {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 2rem;
  justify-content: center;
  font-size: .75rem;
  letter-spacing: .15em;
  color: #777;
  border-top: 1px solid #333;
  padding-top: 1.2rem;
  margin-top: 1.2rem;
}

.hero-scroll-hint {
  position: absolute;
  z-index: 2;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  color: #555;
  font-size: .7rem;
  letter-spacing: .2em;
  animation: bounce 2s infinite;
}
.hero-scroll-hint svg { display: none; }

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

/* ===================================
   セクション共通
   =================================== */
.section-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent-red);
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.6rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  max-width: 120px;
}

/* ===================================
   編集まえがき（メインコンテンツ）
   =================================== */
#editorial {
  background: #fff;
  border-top: 6px solid var(--accent-red);
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.editorial-sidebar {
  position: sticky;
  top: 90px;
}

.editorial-sidebar .vol-number {
  font-family: var(--font-serif);
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-red);
  opacity: .12;
  display: block;
  margin-bottom: -.8rem;
}

.editorial-sidebar .issue-title {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--text-mid);
  display: block;
  margin-bottom: 1.5rem;
}

.editorial-sidebar .keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.keyword-chip {
  background: var(--bg-cream);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: .3rem .85rem;
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-mid);
}
.keyword-chip.hot {
  background: var(--accent-yellow);
  border-color: var(--accent-yellow);
  color: var(--text-dark);
}

.editorial-body {
  border-left: 3px solid var(--border);
  padding-left: 2.5rem;
}

.editorial-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.editorial-lead {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accent-red);
  border-left: 4px solid var(--accent-red);
  padding-left: 1rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.editorial-text {
  font-size: .95rem;
  color: var(--text-mid);
  line-height: 2;
  margin-bottom: 1.4rem;
}

.editorial-text strong {
  color: var(--text-dark);
  font-weight: 700;
}

.editorial-pullquote {
  background: var(--bg-cream);
  border-left: 6px solid var(--accent-yellow);
  border-radius: 0 8px 8px 0;
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-dark);
  line-height: 1.7;
}

.editorial-list {
  list-style: none;
  margin: 1rem 0 1.4rem 0;
}
.editorial-list li {
  padding: .4rem 0 .4rem 1.6rem;
  position: relative;
  font-size: .95rem;
  color: var(--text-mid);
  border-bottom: 1px dashed var(--border);
}
.editorial-list li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--accent-red);
  font-size: .7rem;
  top: .65rem;
}

.editorial-highlight-box {
  background: linear-gradient(135deg, #fff0f0 0%, #fff8f0 100%);
  border: 2px solid var(--accent-red);
  border-radius: 12px;
  padding: 1.5rem 1.8rem;
  margin: 2rem 0;
}
.editorial-highlight-box .box-title {
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .15em;
  color: var(--accent-red);
  margin-bottom: .8rem;
  text-transform: uppercase;
}
.editorial-highlight-box p {
  font-size: .92rem;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: .6rem;
}
.editorial-highlight-box p:last-child { margin-bottom: 0; }

.editorial-closing {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-dark);
  border-top: 2px solid var(--border);
  padding-top: 1.6rem;
  margin-top: 2rem;
  line-height: 1.9;
}

/* ===================================
   特集記事カード一覧
   =================================== */
#articles {
  background: var(--bg-cream);
}

.articles-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.articles-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: .6rem;
}

.articles-header p {
  color: var(--text-light);
  font-size: .92rem;
  letter-spacing: .08em;
}

/* ---- カードグリッド ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.8rem;
}

/* 理論カード（1枚目）を大きく */
.cards-grid .card:first-child {
  grid-column: 1 / -1;
}

.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 2px solid transparent;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,.13);
  border-color: var(--accent-yellow);
}

/* カラーストライプ（各番号で色変え） */
/* 1枚目 = 理論カード(紫) → .card--theory で上書き済み */
.card-stripe {
  height: 8px;
  flex-shrink: 0;
  background: var(--accent-red); /* fallback */
}
.card:nth-child(2) .card-stripe { background: var(--accent-red); }
.card:nth-child(3) .card-stripe { background: var(--accent-blue); }
.card:nth-child(4) .card-stripe { background: var(--accent-green); }
.card:nth-child(5) .card-stripe { background: var(--accent-purple); }
.card:nth-child(6) .card-stripe { background: var(--accent-orange); }
.card:nth-child(7) .card-stripe { background: var(--accent-yellow); }
.card:nth-child(8) .card-stripe { background: var(--accent-red); }
.card:nth-child(9) .card-stripe { background: var(--accent-blue); }

.card-body {
  padding: 1.4rem 1.6rem 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .9rem;
}

.card-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
}
.card:nth-child(1) .card-number { color: rgba(155,93,229,.2); font-size: 2rem; }

.card-tag {
  background: var(--bg-cream);
  border-radius: 4px;
  padding: .2rem .7rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--text-mid);
  text-transform: uppercase;
  flex-shrink: 0;
}

.card-coming {
  background: #eee;
  color: #aaa;
  border-radius: 4px;
  padding: .2rem .7rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  margin-left: auto;
}

.card-title {
  font-family: var(--font-serif);
  font-size: clamp(.98rem, 2.2vw, 1.15rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-dark);
  margin-bottom: .8rem;
  flex: 1;
}

/* Theory card (1枚目) — フィーチャーサイズ */
.card:first-child .card-body { padding: 2rem 2.4rem 2.4rem; }
.card:first-child .card-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
}
/* 理論カード内のテキスト色を白に */
.card--theory .card-desc { color: #999; }

.card-desc {
  font-size: .82rem;
  color: var(--text-light);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  padding: .9rem 1.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-read-link {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent-red);
  display: flex;
  align-items: center;
  gap: .4rem;
  text-transform: uppercase;
}
.read-arrow {
  display: inline-flex;
  font-size: .95rem;
  line-height: 1;
  transition: transform .2s;
}
.card:hover .read-arrow { transform: translateX(4px); }

.card-soon-label {
  font-size: .72rem;
  color: #bbb;
  font-style: italic;
}

/* ===================================
   理論的背景カード — 専用スタイル
   =================================== */

/* カード全体を紫ベースに */
.card--theory {
  background: var(--bg-dark);
  color: #fff;
  border-color: transparent;
}
.card--theory:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 12px 36px rgba(155,93,229,.28);
}

/* ストライプ */
.card--theory .card-stripe { background: var(--accent-purple); }

/* 番号バッジ */
.card-number--theory {
  font-family: var(--font-serif);
  font-size: 1.4rem !important;
  font-weight: 700;
  color: rgba(155,93,229,.35) !important;
  letter-spacing: .05em;
}

/* タグ */
.card-tag--theory {
  background: var(--accent-purple);
  color: #fff;
}

/* タイトル */
.card--theory .card-title { color: #fff; }

/* 説明文 */
.card--theory .card-desc { color: #aaa; }

/* フッター */
.card--theory .card-footer {
  border-top-color: rgba(255,255,255,.1);
  justify-content: space-between;
}

/* READリンク */
.card-read-link--theory { color: var(--accent-purple); }
.card--theory:hover .card-read-link--theory svg { transform: translateX(4px); }

/* 文献 ref ラベル */
.card-ref {
  font-size: .72rem;
  color: #666;
  font-style: italic;
}

/* ===================================
   フッター
   =================================== */
.site-footer {
  background: var(--bg-dark);
  color: #555;
  text-align: center;
  padding: 3rem 2rem;
  font-size: .78rem;
  letter-spacing: .1em;
  border-top: 4px solid var(--accent-yellow);
}
.site-footer .footer-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-yellow);
  display: block;
  margin-bottom: .6rem;
}
.site-footer p { margin-bottom: .3rem; }
.footer-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: .9rem 0 .5rem;
  padding: .55rem 1.15rem;
  border-radius: 999px;
  color: var(--bg-dark);
  background: var(--accent-yellow);
  font-weight: 900;
  text-decoration: none;
  letter-spacing: .14em;
  transition: transform .2s ease, opacity .2s ease;
}
.footer-home-link:hover {
  opacity: .88;
  transform: translateY(-2px);
}
.footer-note {
  margin-top: .8rem;
  font-size: .7rem;
}
.footer-copyright {
  margin-top: .9rem;
  color: #777;
  font-size: .68rem;
  letter-spacing: .04em;
}

/* ===================================
   レスポンシブ
   =================================== */
@media (max-width: 768px) {
  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .editorial-sidebar {
    position: static;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
  }
  .editorial-sidebar .vol-number {
    font-size: 3.5rem;
    margin-bottom: 0;
  }
  .editorial-body {
    border-left: none;
    border-top: 3px solid var(--border);
    padding-left: 0;
    padding-top: 1.5rem;
  }
  .cards-grid .card:first-child {
    grid-column: auto;
  }
  .site-header nav { display: none; }
}
