/*
 * common.css - TOPページ共通スタイル
 * Why: ヘッダー上書き・メニュー・セクション見出し・プレースホルダーなど
 *      複数セクションが依存する共有スタイル。
 *      このファイルは並行開発時も原則1人が管理する。
 */

/* ============================================================
   共通: セクション垂直リズム
   ============================================================ */
.page-top section {
  position: relative;
}

.page-top .section-inner {
  width: 100%;
  padding: 0 5vw;
}

/* ============================================================
   ヘッダー（TOPページ上書き）
   ============================================================ */
.page-top .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: none;
  transition: background var(--transition-base);
}

.admin-bar.page-top .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar.page-top .site-header {
    top: 46px;
  }
}

.page-top .site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--color-border);
}

.page-top .site-header:not(.is-scrolled) .site-header__logo a {
  color: var(--color-white);
}

/* ============================================================
   オーバーレイメニュー（モーダル型）
   ============================================================ */
.overlay-menu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-menu),
    visibility var(--transition-menu);
}

.overlay-menu__backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.overlay-menu {
  position: fixed;
  top: 50%;
  right: clamp(16px, 3vw, 48px);
  z-index: 200;
  width: min(480px, calc(100vw - 32px));
  max-height: min(90svh, 90vh);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1.5px solid #000;
  padding: 28px 24px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transform: translateY(-48%) scale(0.96);
  opacity: 0;
  visibility: hidden;
  transition:
    transform var(--transition-menu),
    opacity var(--transition-menu),
    visibility var(--transition-menu);
}

.overlay-menu::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.overlay-menu.is-open {
  transform: translateY(-50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.overlay-menu__nav {
  margin-top: 0;
}

.overlay-menu__item + .overlay-menu__item {
  border-top: 1px solid #000;
}

.overlay-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  color: var(--color-text);
  transition: opacity var(--transition-base);
  padding: 14px 0;
}

.overlay-menu__link:hover {
  opacity: 0.65;
}

.overlay-menu__en {
  font-family: var(--font-en-heading);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-magenta);
  line-height: 1.15;
}

.overlay-menu__ja {
  font-family: var(--font-ja);
  display: block;
  margin-top: 3px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.overlay-menu__en--section-heading {
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: 0;
}

.overlay-menu__ja--section-heading {
  margin-top: var(--space-xs);
  font-size: 16px;
  color: var(--color-text-light);
}

.overlay-menu__arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  width: 32px;
  height: 16px;
  position: relative;
  color: var(--color-text);
}

/* 横線 */
.overlay-menu__arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: translateY(-50%);
}

/* 矢じり */
.overlay-menu__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(45deg) translate(-1px, 1px);
}

/* 閉じるボタン: 右下配置 */
.overlay-menu__foot {
  position: absolute;
  top: 8px;
  right: 12px;
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
}

.overlay-menu__close {
  position: relative;
  width: 52px;
  height: 52px;
  background: transparent;
  border: none;
  color: transparent;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: opacity var(--transition-base);
}

.overlay-menu__close::before,
.overlay-menu__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 1.6px;
  background: #4a4a4a;
  border-radius: 999px;
  transform-origin: center;
}

.overlay-menu__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.overlay-menu__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.overlay-menu__close:hover {
  opacity: 0.6;
}

@media (min-width: 768px) {
  .overlay-menu {
    top: clamp(16px, 3vw, 48px);
    transform: translateY(-8px) scale(0.96);
  }

  .overlay-menu.is-open {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 767px) {
  .overlay-menu {
    left: 50%;
    right: auto;
    width: calc(100vw - 32px);
    padding: 20px 16px 16px;
    border-radius: 20px;
    transform: translate(-50%, -48%) scale(0.96);
  }

  .overlay-menu.is-open {
    transform: translate(-50%, -50%) scale(1);
  }

  .overlay-menu__en {
    font-size: 1.25rem;
  }

  .overlay-menu__en--large {
    font-size: 1.8rem;
  }

  .overlay-menu__link {
    padding: 12px 0;
  }

  .overlay-menu__foot {
    position: static;
    margin-top: 16px;
  }

  .overlay-menu__close {
    width: 48px;
    height: 48px;
  }

  .overlay-menu__close::before,
  .overlay-menu__close::after {
    width: 36px;
    height: 1.5px;
  }
}

/* SUDAN専用: catchコピーが上、ENが大きくピンクで下 */
.overlay-menu__catch {
  font-family: var(--font-ja);
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.overlay-menu__en--large {
  font-size: 2.2rem;
  line-height: 1.1;
}

/* 単独1行テキスト */
.overlay-menu__single {
  font-family: var(--font-ja);
  font-size: 1.125rem;
  color: var(--color-text);
  display: inline-flex;
  align-items: baseline;
  gap: 0.08em;
  font-weight: 600;
}

.overlay-menu__single-main {
  color: var(--color-text);
}

.overlay-menu__single-outline {
  color: #fff;
  -webkit-text-fill-color: #fff;
  -webkit-text-stroke: 1.4px #111;
  text-shadow: none;
  paint-order: stroke fill;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   ハンバーガーボタン
   ============================================================ */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger__line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-black);
  transition: background var(--transition-base);
}

.page-top .site-header:not(.is-scrolled) .hamburger__line {
  background: var(--color-white);
}

/* ============================================================
   セクション見出し
   ============================================================ */
.section-heading {
  margin-bottom: clamp(var(--space-lg), 3vw, var(--space-2xl));
}

.section-heading__en {
  font-family: var(--font-en-heading);
  font-size: 88px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
}

.section-heading__ja {
  font-family: var(--font-ja);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-light);
  margin-top: var(--space-xs);
}

/* ============================================================
   プレースホルダー画像
   ============================================================ */
.placeholder-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-light);
  width: 100%;
  overflow: hidden;
}

.placeholder-image svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.placeholder-image--16-9 {
  aspect-ratio: 16 / 9;
}
.placeholder-image--4-3 {
  aspect-ratio: 4 / 3;
}
.placeholder-image--3-4 {
  aspect-ratio: 3 / 4;
}
.placeholder-image--1-1 {
  aspect-ratio: 1 / 1;
}

/* ============================================================
   記事カード大（共有コンポーネント）
   ============================================================ */
.article-card-large {
  display: block;
}

.article-card-large:hover {
  opacity: 1;
}

.article-card-large__thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-card-large__cats {
  margin-top: var(--space-md);
}

.article-card-large__cat {
  display: inline-block;
  background: var(--color-magenta);
  color: var(--color-white);
  font-size: var(--fs-xs);
  padding: 2px 10px;
  border-radius: 2px;
}

.article-card-large__title {
  font-size: clamp(var(--fs-md), 1.5vw, var(--fs-xl));
  font-weight: 700;
  margin-top: var(--space-sm);
  max-width: 75ch;
}

.article-card-large__meta {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  margin-top: var(--space-sm);
}

/* ============================================================
   開発用: セクション識別背景色
   Why: 各コンポーネントの領域を視覚的に確認するための一時的なスタイル。
        本番リリース前に削除すること。
   ============================================================ */
.dev-section-colors .section-hero {
  outline: 3px dashed #ff0080;
}
.dev-section-colors .section-whats-new {
  background: #fff5f0;
  outline: 3px dashed #ff6b35;
}
.dev-section-colors .section-feature {
  background: #f0f5ff;
  outline: 3px dashed #3b82f6;
}
.dev-section-colors .section-hashtag {
  outline: 3px dashed #ffffff;
}
.dev-section-colors .section-search {
  background: #f5fff0;
  outline: 3px dashed #22c55e;
}
.dev-section-colors .section-pickup {
  background: #fff0f5;
  outline: 3px dashed #ec4899;
}
.dev-section-colors .section-brand {
  outline: 3px dashed #ffffff;
}
/* section-contact はマゼンタ背景のため開発色を適用しない */
.dev-section-colors .section-contact {
  outline: 3px dashed #ffffff;
}
.dev-section-colors .site-footer {
  outline: 3px dashed #ffffff;
}

/* TODO: デザインカンプに合わせてピクセル再現を進める */
