/* ===== ナビゲーション ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.site-header.scrolled {
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 var(--nav-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 24px;
}

.site-header__logo {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.site-header.scrolled .site-header__logo {
  color: var(--text-primary);
}

.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.site-nav__list {
  display: flex;
  gap: 32px;
  align-items: center;
}

.site-nav__list a {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s ease;
}

.site-nav__list a:hover {
  color: #fff;
}

.site-header.scrolled .site-nav__list a {
  color: var(--text-secondary);
}

.site-header.scrolled .site-nav__list a:hover {
  color: var(--text-primary);
}

/* ダークモードトグル */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.site-header.scrolled .theme-toggle {
  color: var(--text-secondary);
}

.theme-toggle__icon {
  display: none;
}

body:not([data-theme="dark"]) .theme-toggle__icon--moon {
  display: block;
}

body[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]):not([data-theme="dark"]) .theme-toggle__icon--sun {
    display: block;
  }
  body:not([data-theme="light"]):not([data-theme="dark"]) .theme-toggle__icon--moon {
    display: none;
  }
}

/* ハンバーガー */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.site-header.scrolled .nav-toggle span {
  background: var(--text-primary);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 52px;
    left: 0; right: 0;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 20px 24px 32px;
    transform: translateY(-120%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid var(--nav-border);
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .site-nav__list a {
    display: block;
    padding: 12px 0;
    font-size: 18px;
    color: var(--text-primary);
  }
}

/* ===== ヒーロー ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.hero__parallax {
  position: absolute;
  inset: -20%;
  background: url('https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1920&q=80') center/cover no-repeat;
  will-change: transform;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
}

.hero__content {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 0 24px;
  max-width: 760px;
}

.hero__eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero__subtitle {
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 300;
  opacity: 0.85;
  margin-bottom: 40px;
  line-height: 1.5;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease-in-out infinite;
}

.hero__scroll-arrow {
  display: block;
  width: 28px;
  height: 28px;
  border-right: 2px solid rgba(255,255,255,0.7);
  border-bottom: 2px solid rgba(255,255,255,0.7);
  transform: rotate(45deg);
}

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

/* ===== ボタン ===== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: scale(1.02);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: #fff;
}

/* ===== 共通セクションタイトル ===== */
.section-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 64px;
}

/* ===== 特徴セクション ===== */
.features {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

@media (max-width: 768px) {
  .features__grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.feature-card__icon {
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 20px;
  line-height: 1;
}

.feature-card__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.feature-card__text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== フルワイドパララックスバナー ===== */
.parallax-banner {
  position: relative;
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.parallax-banner__bg {
  position: absolute;
  inset: -20%;
  background: url('https://images.unsplash.com/photo-1483347756197-71ef80e95f73?w=1920&q=80') center/cover no-repeat;
  will-change: transform;
}

.parallax-banner__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.parallax-banner__content {
  position: relative;
  text-align: center;
  color: #fff;
}

.parallax-banner__title {
  font-size: clamp(28px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.parallax-banner__text {
  font-size: 18px;
  opacity: 0.8;
  font-weight: 300;
}

/* ===== 最新記事 ===== */
.latest-posts {
  padding: 120px 0;
  background: var(--bg);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 64px;
}

.post-grid--archive {
  padding: 64px 0;
}

@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
}

.post-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

.post-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-secondary);
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.05);
}

.post-card__thumb--placeholder {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--border) 100%);
}

.post-card__body {
  padding: 24px;
}

.post-card__meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-card__cat {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.post-card__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-card__title a {
  color: var(--text-primary);
}

.post-card__title a:hover {
  color: var(--accent);
}

.post-card__excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.latest-posts__more {
  text-align: center;
}

/* ===== アーカイブヘッダー ===== */
.archive-header {
  padding: 140px 0 64px;
  background: var(--bg-secondary);
}

.archive-header__title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.archive-header__desc {
  margin-top: 16px;
  font-size: 18px;
  color: var(--text-secondary);
}

/* ===== ページネーション ===== */
.pagination {
  margin: 48px 0;
  display: flex;
  justify-content: center;
}

.pagination .page-numbers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.pagination .page-numbers li a,
.pagination .page-numbers li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.pagination .page-numbers li a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination .page-numbers li span.current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== 記事詳細ヒーロー ===== */
.single-hero {
  position: relative;
  height: 70vh;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.single-hero__parallax {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.single-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
}

.single-hero__content {
  position: relative;
  width: 100%;
  padding: 48px 24px;
  color: #fff;
}

.single-hero__cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.single-hero__title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.single-hero__meta {
  font-size: 14px;
  opacity: 0.75;
  display: flex;
  gap: 16px;
}

/* ヒーローなし記事ヘッダー */
.single-header {
  padding: 140px 0 48px;
  background: var(--bg-secondary);
}

.single-header__cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.single-header__title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.single-header__meta {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  gap: 16px;
}

/* ===== 記事本文 ===== */
.single-body {
  padding: 80px 0 64px;
}

.entry-content {
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-primary);
}

.entry-content h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 56px 0 20px;
  color: var(--text-primary);
}

.entry-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 40px 0 16px;
  color: var(--text-primary);
}

.entry-content p {
  margin-bottom: 28px;
}

.entry-content img {
  border-radius: 12px;
  margin: 40px 0;
  width: 100%;
}

.entry-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 40px 0;
  padding: 16px 24px;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 20px;
}

.entry-content pre {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  margin: 32px 0;
  font-size: 14px;
}

.entry-content ul, .entry-content ol {
  margin-bottom: 28px;
  padding-left: 24px;
}

.entry-content li {
  margin-bottom: 8px;
}

/* ===== タグ ===== */
.single-tags {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.tag-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== 前後の記事ナビ ===== */
.post-nav {
  padding: 64px 0;
  background: var(--bg-secondary);
}

.post-nav__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 640px) {
  .post-nav__inner { grid-template-columns: 1fr; }
}

.post-nav__prev,
.post-nav__next {
  display: flex;
}

.post-nav__next {
  text-align: right;
  justify-content: flex-end;
}

.post-nav__prev a,
.post-nav__next a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-primary);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
  max-width: 100%;
}

.post-nav__prev a:hover,
.post-nav__next a:hover {
  border-color: var(--accent);
}

.post-nav__label {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.post-nav__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

/* ===== 固定ページ ===== */
.page-header {
  padding: 140px 0 64px;
  background: var(--bg-secondary);
}

.page-header__title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

/* ===== 404ページ ===== */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
}

.error-page__code {
  font-size: clamp(96px, 15vw, 180px);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--border);
  line-height: 1;
  margin-bottom: 24px;
}

.error-page__title {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.error-page__text {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* ===== フッター ===== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  padding: 64px 24px 48px;
}

@media (max-width: 640px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

.site-footer__logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 8px;
}

.site-footer__tagline {
  font-size: 14px;
  color: var(--text-secondary);
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__list a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.site-footer__list a:hover {
  color: var(--text-primary);
}

.site-footer__bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
}

.site-footer__bottom p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== スクロールアニメーション ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in--delay-1 { animation-delay: 0.2s; }
.fade-in--delay-2 { animation-delay: 0.4s; }
.fade-in--delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-element {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-element--delay-1 { transition-delay: 0.1s; }
.reveal-element--delay-2 { transition-delay: 0.2s; }
.reveal-element--delay-3 { transition-delay: 0.3s; }

/* ===== メインコンテンツ余白（固定ヘッダー分） ===== */
.main-content {
  min-height: 60vh;
}

/* ===== no-posts ===== */
.no-posts {
  padding: 80px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
}
