/* =========================================================
   おかえりのいえ ― HERO と直下の3つの導線（hero.css / v5）
   ---------------------------------------------------------
   ・画面いっぱいの活動写真の上に、キャッチコピーを重ねるHERO。
   ・写真全体は暗くせず、文字の下だけにやわらかい影（veil）を敷いて可読性を確保。
   ・3つの導線は、写真の下端に重なる「タブ」としてHEROと一体化。
     配色はおかえりのいえのグリーン・アイボリー。
   ・base.css の旧HERO（写真4枚グリッド・暗いグラデーション）の指定は、
     このファイルで打ち消しています（base.css は変更していません）。
   ========================================================= */

:root {
  --h3-nav: 56px;
  --h3-gutter: 20px;
  --h3-tab-overlap: 28px;        /* 導線が写真に重なる量 */
  --h3-green: #4f7f4f;           /* 白文字で 4.5:1 以上 */
  --h3-green-deep: #3a6440;
  --h3-ivory: #f7f0e3;
}
@media (min-width: 900px) {
  :root { --h3-gutter: 40px; --h3-tab-overlap: 64px; }
}

/* ── 旧HEROの指定を打ち消す ── */
#hero.hero3 {
  display: block;
  min-height: 0;
  padding: var(--h3-nav) 0 0;
  background: var(--t-ivory, #fbf7f0);
  background-image: none;
  text-align: left;
  overflow: hidden;
  position: relative;
}

.hero3-stage {
  position: relative;
  height: min(calc(100svh - var(--h3-nav) + 10px), 680px);
  min-height: 560px;
}
@media (min-width: 900px) {
  .hero3-stage { height: clamp(600px, calc(100svh - var(--h3-nav) + 20px), 860px); }
}

/* ── 写真（全幅） ── */
.hero3-slides { position: absolute; inset: 0; background: #e9e1d4; }
.hero3-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos-sp, 50% 40%);
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero3-slide.is-active { opacity: 1; }
@media (min-width: 900px) {
  .hero3-slide { object-position: var(--pos-pc, 50% 35%); }
}

/* 文字の下だけをやわらかく沈める */
.hero3-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(30,24,16,0.62) 0%, rgba(30,24,16,0.38) 32%, rgba(30,24,16,0.08) 56%, rgba(30,24,16,0) 70%);
}
@media (min-width: 900px) {
  .hero3-veil {
    background:
      linear-gradient(90deg, rgba(30,24,16,0.50) 0%, rgba(30,24,16,0.30) 28%, rgba(30,24,16,0.06) 52%, rgba(30,24,16,0) 64%),
      linear-gradient(to top, rgba(30,24,16,0.22) 0%, rgba(30,24,16,0) 30%);
  }
}

/* ── ロゴ：左上のアイボリーのタブ ── */
.hero3-logo-tab {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: var(--t-ivory, #fbf7f0);
  padding: 6px 18px 10px 12px;
  border-bottom-right-radius: 28px;
}
.hero3-logo { display: block; width: 74px; height: 74px; object-fit: contain; }
@media (min-width: 900px) {
  .hero3-logo-tab { padding: 10px 30px 16px calc(var(--h3-gutter) - 6px); border-bottom-right-radius: 44px; }
  .hero3-logo { width: 118px; height: 118px; }
}

/* ── キャッチコピー ── */
.hero3-copy {
  position: absolute;
  z-index: 2;
  left: var(--h3-gutter);
  right: var(--h3-gutter);
  bottom: calc(var(--h3-tab-overlap) + 22px);
  color: #fff;
  text-shadow: 0 1px 14px rgba(20,15,10,0.35);
}
@media (min-width: 900px) {
  .hero3-copy {
    left: max(var(--h3-gutter), calc((100vw - 1200px) / 2 + var(--h3-gutter)));
    right: auto;
    max-width: 600px;
    bottom: calc(var(--h3-tab-overlap) + 56px);
  }
}
.hero3-location {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  opacity: 0.95;
}
.hero3-catch {
  font-family: 'Kaisei Opti', serif;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.hero3-catch-a { display: block; font-size: 1.1rem; letter-spacing: 0.14em; margin-bottom: 0.2rem; }
.hero3-catch-b { display: block; font-size: clamp(1.75rem, 8.4vw, 2.3rem); white-space: nowrap; }
.hero3-desc { font-size: 0.84rem; line-height: 1.85; opacity: 0.96; }
.hero3-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255,255,255,0.7);
  padding-bottom: 1px;
}
.hero3-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.hero3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-btn, 50px);
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-shadow: none;
  transition: background 0.2s, color 0.2s;
}
.hero3-btn--primary { background: var(--t-ivory, #fbf7f0); color: var(--h3-green-deep); }
.hero3-btn--primary:hover { background: #fff; }
.hero3-btn--ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8); background: rgba(255,255,255,0.08); }
.hero3-btn--ghost:hover { background: rgba(255,255,255,0.2); }
.hero3-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (min-width: 900px) {
  .hero3-location { font-size: 0.8rem; margin-bottom: 16px; }
  .hero3-catch { margin-bottom: 18px; }
  .hero3-catch-a { font-size: 1.45rem; margin-bottom: 0.4rem; }
  .hero3-catch-b { font-size: clamp(2.6rem, 4.4vw, 3.9rem); line-height: 1.3; }
  .hero3-desc { font-size: 0.98rem; }
  .hero3-tag { font-size: 0.8rem; margin-top: 12px; }
  .hero3-actions { margin-top: 26px; gap: 12px; }
  .hero3-btn { min-height: 50px; padding: 0 28px; font-size: 0.9rem; }
}

/* ── スライド操作（右上） ── */
.hero3-controls {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 2px 10px;
  background: rgba(251,247,240,0.82);
  border-radius: 50px;
}
.hero3-dots { display: flex; gap: 4px; }
.hero3-dot { width: 20px; height: 28px; padding: 0; border: none; background: none; cursor: pointer; position: relative; }
.hero3-dot::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  border-radius: 2px;
  background: rgba(90,74,58,0.3);
  transition: background 0.3s;
}
.hero3-dot.is-active::before { background: var(--h3-green); }
.hero3-pause {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-mid);
  font-size: 0.62rem;
  cursor: pointer;
}
.hero3-dot:focus-visible, .hero3-pause:focus-visible { outline: 3px solid var(--green-light); outline-offset: 1px; border-radius: 4px; }
@media (min-width: 900px) { .hero3-controls { top: 20px; right: var(--h3-gutter); } }

/* ── マスコット：PCでは導線の上からのぞく ── */
.hero3-mascot { display: none; }
@media (min-width: 900px) {
  .hero3-mascot {
    display: block;
    position: absolute;
    z-index: 2;
    right: max(var(--h3-gutter), calc((100vw - 1200px) / 2 + var(--h3-gutter)));
    bottom: calc(var(--h3-tab-overlap) - 6px);
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(20,15,10,0.25));
    pointer-events: none;
  }
}

/* 控えめな登場 */
@keyframes hero3In { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero3-copy > * { animation: hero3In 0.9s ease both; }
.hero3-copy > :nth-child(2) { animation-delay: 0.12s; }
.hero3-copy > :nth-child(3) { animation-delay: 0.24s; }
.hero3-copy > :nth-child(4) { animation-delay: 0.3s; }
.hero3-copy > :nth-child(5) { animation-delay: 0.36s; }
.hero3-visual-none { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hero3-copy > * { animation: none; }
  .hero3-slide { transition: none; }
}

/* =========================================================
   HERO直下の3つの導線（.entry）
   内容・リンク先・HTMLは変えず、写真の下端に重なるタブとして表示
   ========================================================= */
.entry {
  position: relative;
  z-index: 3;
  margin-top: calc(var(--h3-tab-overlap) * -1);
  background: transparent;
  border-bottom: none;
}
.entry::after {               /* タブの下に、HEROの終わりを示す細い線 */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: rgba(90,74,58,0.16);
  z-index: -1;
}
.entry .entry-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  padding-left: 0;
  padding-right: 0;
  margin-left: var(--h3-gutter);
  margin-right: var(--h3-gutter);
  width: auto;
  box-shadow: 0 6px 20px rgba(40,30,20,0.10);
}
.entry .entry-link,
.entry .entry-link:first-child,
.entry .entry-link + .entry-link {
  display: grid;
  grid-template-columns: 1fr 36px;
  grid-template-areas: "who arrow" "what arrow";
  align-items: center;
  gap: 1px 12px;
  min-height: 68px;
  padding: 12px 16px 12px 20px;
  border: none;
  border-radius: 0;
  text-decoration: none;
  background: var(--h3-green);
  color: #fff;
  transition: filter 0.2s;
}
.entry .entry-link:nth-child(2) { background: var(--h3-ivory); color: var(--text-dark); }
.entry .entry-link:nth-child(3) { background: var(--h3-green-deep); }
.entry .entry-who { grid-area: who; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; color: inherit; opacity: 0.92; }
.entry .entry-link:nth-child(2) .entry-who { color: var(--h3-green); opacity: 1; }
.entry .entry-what { grid-area: what; font-family: 'Kaisei Opti', serif; font-size: 1.08rem; font-weight: 700; color: inherit; }
.entry .entry-arrow {
  grid-area: arrow;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.18);
  color: inherit;
  font-size: 0.9rem;
  transition: transform 0.2s;
}
.entry .entry-link:nth-child(2) .entry-arrow { background: var(--h3-green); color: #fff; }
.entry .entry-link:hover { filter: brightness(1.06); }
.entry .entry-link:hover .entry-what { color: inherit; }
.entry .entry-link:hover .entry-arrow { transform: translateX(3px); }
.entry .entry-link:focus-visible { outline: 3px solid var(--green-light); outline-offset: -4px; }

@media (min-width: 900px) {
  .entry .entry-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--h3-gutter);
    padding-right: var(--h3-gutter);
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    box-sizing: content-box;
  }
  .entry .entry-link,
  .entry .entry-link:first-child,
  .entry .entry-link + .entry-link {
    grid-template-columns: 1fr;
    grid-template-areas: "who" "what" "arrow";
    justify-items: center;
    text-align: center;
    gap: 4px;
    min-height: 0;
    padding: 24px 20px 22px;
    border-radius: 22px 22px 0 0;
    box-shadow: inset 0 -5px 0 rgba(0,0,0,0.12);
  }
  .entry .entry-link:nth-child(2) { box-shadow: inset 0 -5px 0 rgba(79,127,79,0.35); }
  .entry .entry-who { font-size: 0.8rem; }
  .entry .entry-what { font-size: 1.4rem; letter-spacing: 0.06em; }
  .entry .entry-arrow { width: 30px; height: 30px; font-size: 0.8rem; margin-top: 6px; }
}

/* ── スマホ／PCで説明・ボタンの表示位置を切り替え（文言は同じ） ── */
.hero3-pc { display: none !important; }
.hero3-sub { padding: 22px var(--h3-gutter) 6px; }
.hero3-sub .hero3-desc { font-size: 0.9rem; line-height: 1.9; color: var(--text-mid); opacity: 1; }
.hero3-sub .hero3-tag { color: var(--text-dark); border-bottom-color: var(--peach-light); margin-top: 10px; }
.hero3-sub .hero3-actions { margin-top: 18px; }
.hero3-sub .hero3-btn { flex: 1 1 0; min-height: 48px; }
.hero3-sub .hero3-btn--primary { background: var(--h3-green); color: #fff; }
.hero3-sub .hero3-btn--primary:hover { background: var(--h3-green-deep); }
.hero3-sub .hero3-btn--ghost { color: var(--text-dark); box-shadow: inset 0 0 0 1px rgba(45,35,24,0.35); background: transparent; }
.hero3-sub .hero3-btn:focus-visible { outline-color: var(--green-light); }
@media (min-width: 900px) {
  .hero3-pc { display: block !important; }
  .hero3-actions.hero3-pc { display: flex !important; }
  .hero3-tag.hero3-pc { display: inline-block !important; }
  .hero3-sub { display: none; }
  /* 3つの導線までが最初の画面に収まる高さ */
  .hero3-stage { height: clamp(560px, calc(100svh - var(--h3-nav) - 56px), 820px); }
  .entry .entry-link,
  .entry .entry-link:first-child,
  .entry .entry-link + .entry-link { padding: 20px 20px 18px; }
  .entry .entry-arrow { margin-top: 4px; }
  .hero3-mascot { width: 78px; height: 78px; }
}
@media (min-width: 900px) {
  .entry .entry-link,
  .entry .entry-link:first-child,
  .entry .entry-link + .entry-link { position: relative; padding: 18px 64px 18px; gap: 2px; grid-template-areas: "who" "what"; }
  .entry .entry-arrow { position: absolute; right: 22px; top: 50%; margin-top: -18px; width: 34px; height: 34px; }
  .entry .entry-link:hover .entry-arrow { transform: translateX(3px); }
}
/* 可読性の微調整：文字の下だけ影を少し深く（写真の右側・上部は明るいまま） */
@media (min-width: 900px) {
  .hero3-veil {
    background:
      linear-gradient(90deg, rgba(30,24,16,0.56) 0%, rgba(30,24,16,0.42) 30%, rgba(30,24,16,0.16) 50%, rgba(30,24,16,0) 64%),
      linear-gradient(to top, rgba(30,24,16,0.22) 0%, rgba(30,24,16,0) 30%);
  }
  .hero3-copy { text-shadow: 0 1px 3px rgba(20,15,10,0.45), 0 2px 18px rgba(20,15,10,0.35); }
}
@media (max-width: 400px) {
  .hero3-sub .hero3-btn { padding: 0 12px; font-size: 0.8rem; }
  .hero3-sub .hero3-btn--primary { flex-grow: 1.35; }
}
