/* ═══════════════════════════════════════════════════════
   css/top.css
   UP47 Shimane — TOP Page
═══════════════════════════════════════════════════════ */


/* ───────────────────────────────────────
   HEADER 上書き — TOPページのアクティブリンク
─────────────────────────────────────── */
.nav-active {
  opacity: 1;
  border-bottom: 1px solid rgba(200, 169, 110, 0.6);
  padding-bottom: 1px;
}


/* ───────────────────────────────────────
   1. BODY BASE — parchment背景（プロローグと切り替え）
─────────────────────────────────────── */
body {
  background: var(--parchment);
  color: var(--deep-night);
}

/* グレインはそのまま引き継ぎ */


/* ───────────────────────────────────────
   2. PHOTO GRID — 2×2
─────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  /* ヘッダー(70px)の下からスタート、画面の約55%の高さ */
  height: calc(100svh - 70px);
  min-height: 500px;
  margin-top: 70px;
  /* ヘッダー固定分 */
  gap: 0;
}

/* 各パネル */
.grid-panel {
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  cursor: pointer;
}

/* 写真背景 */
.panel-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grid-panel:hover .panel-img {
  transform: scale(1.06);
}

/* 暗いグラデーションオーバーレイ */
.panel-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
      rgba(6, 4, 14, 0.15) 0%,
      rgba(6, 4, 14, 0.55) 100%);
  transition: opacity 0.4s ease;
}

.grid-panel:hover .panel-veil {
  opacity: 0.7;
}

/* 時間帯ラベル — EB Garamond / 画像参照サイズ */
.panel-label {
  position: absolute;
  bottom: 1.2rem;
  left: 1.4rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--parchment);
  z-index: 2;
  transition: transform 0.35s var(--ease-out);
}

.grid-panel:hover .panel-label {
  transform: translateY(-4px);
}

/* Morning / Night は右端から */
.grid-panel[data-time="morning"] .panel-label,
.grid-panel[data-time="night"] .panel-label {
  left: auto;
  right: 1.4rem;
  text-align: right;
}

/* モバイル対応 */
@media (max-width: 600px) {
  .photo-grid {
    height: auto;
    min-height: unset;
  }

  .grid-panel {
    aspect-ratio: 4 / 3;
  }
}


/* ───────────────────────────────────────
   3. PLANNER SECTION
   背景: parchment (#F5F0E9)
─────────────────────────────────────── */
.planner-section {
  background: var(--parchment);
  padding: 100px 6vw 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* 見出し — Zen Old Mincho / pc_和文_本見出し */
.planner-heading {
  font-family: var(--jp);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.12em;
  color: var(--deep-night);
  text-align: center;
  margin-bottom: 56px;
}

/* セレクト群 */
.planner-selects {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 64px;
}

/* セレクトラッパー */
.select-wrap {
  position: relative;
  width: 180px;
}

/* セレクト本体 — EB Garamond / dawn navy枠 */
.plan-select {
  width: 100%;
  height: 48px;
  padding: 0 2.4rem 0 1.2rem;
  border: 1px solid rgba(28, 24, 48, 0.35);
  border-radius: 0;
  background: transparent;
  font-family: var(--jp);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--deep-night);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
  outline: none;
}

.plan-select:focus,
.plan-select:hover {
  border-color: var(--deep-night);
}

/* プレースホルダーオプション */
.plan-select option[value=""][disabled] {
  color: rgba(20, 18, 32, 0.45);
}

/* カスタム矢印 */
.select-arrow {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--deep-night);
  pointer-events: none;
  opacity: 0.55;
  display: flex;
  align-items: center;
}

/* Open ボタン — style.css の .btn-open を上書き（背景色に合わせて調整） */
.planner-section .btn-open {
  color: var(--deep-night);
  border-color: rgba(28, 24, 48, 0.35);
}

.planner-section .btn-open::before {
  background: rgba(28, 24, 48, 0.08);
}

.planner-section .btn-open:hover {
  border-color: var(--deep-night);
  color: var(--deep-night);
}


/* ───────────────────────────────────────
   4. SCROLL TO TOP ボタン
─────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(28, 24, 48, 0.25);
  background: rgba(245, 240, 233, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--deep-night);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s;
  z-index: 700;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  border-color: var(--deep-night);
}


/* ───────────────────────────────────────
   5. SCROLL REVEAL（style.css の .sf を使い回し）
─────────────────────────────────────── */
.sf {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.sf.on {
  opacity: 1;
  transform: translateY(0);
}


/* ───────────────────────────────────────
   6. FOOTER 上書き — TOPページは parchment 上なので微調整
─────────────────────────────────────── */
footer {
  background: var(--deep-night);
}

/* フッターテキスト色をヘッダーナビと同じgoldに */
.footer-nav,
.footer-nav a,
.footer-nav span,
.footer-credit,
.footer-credit a,
.footer-copy {
  color: var(--gold) !important;
}

.footer-nav a:hover {
  opacity: 0.65;
}


/* ───────────────────────────────────────
   RESPONSIVE
─────────────────────────────────────── */
@media (max-width: 768px) {
  .photo-grid {
    margin-top: 60px;
    height: auto;
  }

  .planner-section {
    padding: 72px 6vw 80px;
  }

  .planner-selects {
    flex-direction: column;
    align-items: center;
  }

  .select-wrap {
    width: 240px;
  }
}