/* ============================================================
   Sidebar (fixed right 180px)
   ============================================================ */
.sidebar {
  position:fixed; top:0; right:0; z-index:var(--z-sidebar);
  width:var(--sidebar-width); height:100vh;
  pointer-events:none;
}
.sidebar > * { pointer-events:auto; }
/* --- Sidebar bar (right 180px panel) --- */
.sidebar__bar {
  position:absolute; top:0; right:0; z-index:3;
  width:var(--sidebar-width); height:100vh;
  background:rgba(255,255,255,0.48);
  border-left:1px solid #E6E6E6;
  display:flex; flex-direction:column; align-items:center;
  padding:0;
}
/* Logo: hidden on top page, visible on inner pages */
.sidebar__logo {
  position:absolute; top:90px; left:50%; transform:translateX(-50%);
  width:111px; height:153px;
  display:flex; align-items:center; justify-content:center;
}
.sidebar__logo a { display:flex; align-items:center; justify-content:center; text-decoration:none; }
.sidebar__logo img { max-width:100%; max-height:100%; }
body.is-top .sidebar__logo { display:none; }

/* Hamburger: 3 VERTICAL lines (Figma spec) */
.sidebar__hamburger {
  position:absolute; top:322px; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:0;
  background:none; border:none; cursor:pointer; padding:0;
}
.sidebar__hamburger-icon {
  display:flex; flex-direction:row;
  width:15px; height:45px; align-items:flex-start;
  gap:6px;
}
.sidebar__hamburger-icon span {
  display:block; width:1px; background:var(--color-text);
  transition: transform var(--duration-normal) var(--easing), opacity var(--duration-normal) var(--easing), height var(--duration-normal) var(--easing);
}
.sidebar__hamburger-icon span:nth-child(1) { height:27px; }
.sidebar__hamburger-icon span:nth-child(2) { height:36px; }
.sidebar__hamburger-icon span:nth-child(3) { height:45px; }
.sidebar__hamburger-label { display:none; }

/* Vertical text */
.sidebar__vertical {
  position:absolute; top:432px; bottom:200px; /* 下部アイコン(stamp/SNS/lang)と重ならないように下限を設定 */
  left:0; right:0;
  display:flex; justify-content:center;  /* Safari対応: translateX(-50%)をflexに置換 */
  overflow:hidden;  /* はみ出し分をクリップ */
}
.sidebar__vertical span {
  writing-mode:vertical-rl; font-family:var(--font-en);
  font-size:var(--fs-sidebar-text); font-weight:400;
  letter-spacing:0.885px; color:var(--color-text); white-space:nowrap;
  max-height:calc(100vh - 632px);  /* Safari: overflowが効かない場合の直接制限 (top:432px + bottom:200px = 632px) */
  overflow:hidden;
}
/* Stamp */
.sidebar__stamp {
  position:absolute; top:auto; bottom:127px; left:50%; transform:translateX(-50%);
  width:60px; height:62px; display:flex; align-items:center; justify-content:center;
}
.sidebar__stamp img { max-width:100%; max-height:100%; }
/* SNS icons */
.sidebar__sns {
  position:absolute; top:auto; bottom:75px; left:50%; transform:translateX(-50%);
  display:flex; gap:15px; margin:0; padding:0; list-style:none;
}
.sidebar__sns a { display:flex; width:24px; height:24px; align-items:center; justify-content:center; }
.sidebar__sns img { width:100%; height:100%; object-fit:contain; }
/* Language switch */
.sidebar__lang {
  position:absolute; top:auto; bottom:30px; left:50%; transform:translateX(-50%);
  display:flex; align-items:center; gap:var(--space-2);
  font-family:var(--font-en); font-size:var(--fs-en-nav); color:var(--color-text);
  letter-spacing:0.54px;
}
.sidebar__lang-link { color:var(--color-text-muted); letter-spacing:0.54px; text-decoration:none; }
.sidebar__lang-link.is-active { color:var(--color-text); }

/* ============================================================
   Menu Overlay
   ============================================================ */
/* --- Menu overlay (full-screen dark green, Figma: Menu/Overlay RECTANGLE) --- */
.menu-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: rgba(0, 60, 44, 0.46);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--duration-slow) var(--easing), visibility var(--duration-slow) var(--easing);
}
.menu-overlay.is-open {
  opacity: 1; visibility: visible; pointer-events: auto;
}

/* --- Nav panel (Figma: Overlay.panel 240px, _overlayBg + _overlayTransition) --- */
.menu-nav {
  position: fixed; top: 0; right: var(--sidebar-width); z-index: var(--z-sidebar);
  width: 240px; height: 100vh;
  background:
    linear-gradient(rgba(255,255,255,0.33), rgba(255,255,255,0.33)),
    url('../images/textures/overlay-menu.webp') center / cover no-repeat;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--duration-slow) var(--easing), visibility var(--duration-slow);
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 400px 20px 0 60px;
  pointer-events: none;
}
.menu-nav.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
.menu-nav__list {
  display: flex; flex-direction: column; gap: 20px;
  margin: 0; padding: 0; list-style: none;
}
.menu-nav__item a {
  font-family: var(--font-jp); font-size: 18px;
  font-weight: 400; color: var(--color-text); letter-spacing: 0.54px;
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--easing);
}
.menu-nav__item a:hover { opacity: 0.7; }
.menu-nav__item.is-active a { font-weight: 700; }
.menu-nav__item.is-active a::before {
  content: '';
  display: inline-block; width: 11px; height: 15px; flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='11' height='15' viewBox='0 0 11 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 .019C.741-.12 1.154.559 1.715.705c.51.384.736.827 1.03 1.258.106.156.426.35.457.457.043.15-.053.344 0 .457.067.143.44.605.457.686.168.777-.12 2.015 0 2.86l.458-.572c.034-1.065.024-2.128-.457-2.974L3.43.933l.687.572c-.113.376.62.686.686.915.041.143-.043.322 0 .457.03.095.213.145.229.229.121.664-.244 1.084-.228 1.715l1.029-1.143c.3.048.679-.37.915-.457.128-.047.311.041.457 0 .094-.026.144-.214.229-.229.2-.036.726-.04.915 0 .083.018.554.405.686.457.181.073.629.099.915.229.245.11.605.365.8.571l-1.486.114c-.36.421-1.161.327-1.601.457-.874.262-1.724.85-2.745 1.143-.111.032-1.334 1.485-1.487 1.715-.31.466-.514 1.287-.686 1.83-.035.11-.51.364-.115.571.238-.174.458-.55.686-.686.316-.188.968-.312 1.372-.457.092-.032.136-.195.229-.229.128-.047.311.042.457 0 .094-.027.144-.213.229-.229.208-.037.707-.037.915 0 .087.016.14.209.229.229.207.046.495-.052.686 0 .715.195 1.492.998 2.059 1.372.094.063.587.165.686.229.243.155.404.381.343.686l-1.944-.229c-1.532.82-3.57.203-5.26.686-.09.026-.136.198-.229.229-.141.047-.33-.051-.457 0-.089.036-.135.186-.229.229-.294.136-.568.209-.8.572-.064.1-.164.583-.228.686-.186.296-.586.702-.8 1.03l-.115-.801c.694-.801.81-1.855 1.144-2.744.05-.132.429-.582.457-.686.106-.389-.028-1.007.457-1.372v-.457c-.349-.183-.157-.496-.228-.686-.27-.725-1.026-1.539-1.373-2.287C.807 4.931 0 3.44 0 3.335V.019Z' fill='%2300664B'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
  margin-left: -23px;
}

/* --- Sidebar state when menu is open --- */
.sidebar[data-state="open"] .sidebar__hamburger-icon {
  width: 12px; height: 44px; gap: 0;
  position: relative;
}
.sidebar[data-state="open"] .sidebar__hamburger-icon span {
  position: absolute; left: 50%; top: 0;
  height: 44px !important; width: 1px;
  transform-origin: center center;
}
.sidebar[data-state="open"] .sidebar__hamburger-icon span:nth-child(1) {
  transform: translateX(-50%) rotate(15deg);
}
.sidebar[data-state="open"] .sidebar__hamburger-icon span:nth-child(2) {
  opacity: 0;
}
.sidebar[data-state="open"] .sidebar__hamburger-icon span:nth-child(3) {
  transform: translateX(-50%) rotate(-15deg);
}
/* "close" label below the X */
.sidebar[data-state="open"] .sidebar__hamburger-label {
  display: block;
  font-family: var(--font-jp); font-size: 12px; font-weight: 400;
  color: var(--color-text); letter-spacing: 0;
  margin-top: 8px;
}
/* Open state: sidebar bar (Figma: _overlayBg + _panelBg white 30%) */
.sidebar[data-state="open"] .sidebar__bar {
  background:
    linear-gradient(rgba(255,255,255,0.30), rgba(255,255,255,0.30)),
    url('../images/textures/overlay-menu.webp') center / cover no-repeat;
  border-left: 0.5px solid var(--color-divider);
}

/* ============================================================
   Hero (shared)
   ============================================================ */
.hero {
  position:relative; width:100%; height:var(--hero-height);
  overflow:hidden; display:flex; align-items:center; justify-content:center;
}
.hero__bg {
  position:absolute; inset:0; background-size:cover; background-position:center;
  background-repeat:no-repeat; z-index:0;
}
/* No gradient overlay for hero top */
.hero__content {
  position:relative; z-index:2; color:var(--color-text-white);
  text-align:center; padding:var(--space-8); max-width:90%;
}
.hero__title-main {
  font-family:var(--font-jp); font-size:4.5rem; font-weight:700;
  color:var(--color-text-white); letter-spacing:var(--ls-wide);
  margin-bottom:var(--space-3); text-shadow:0 2px 12px rgba(0,0,0,0.4);
}
.hero__title-sub {
  font-family:var(--font-jp); font-size:var(--fs-h2); font-weight:400;
  color:var(--color-text-white); letter-spacing:var(--ls-wide);
  text-shadow:0 2px 12px rgba(0,0,0,0.4);
}

/* Hero Top specific — full viewport width (sidebar overlays) */
.hero--top {
  width:100%; height:var(--hero-height);
}

/* Hero logo overlay */
.hero__logo {
  position:absolute; top:104px; left:82px; z-index:3;
  width:248px; height:570px;
}
.hero__logo img { width:100%; height:100%; object-fit:contain; }

/* Hero produced-by text */
.hero__produced {
  position:absolute; top:70px; left:110px; z-index:3;
  font-family:var(--font-jp); font-size:15px; font-weight:400;
  color:var(--color-text-white); letter-spacing:0.096em;
  text-shadow:0 2px 8px rgba(0,0,0,0.4);
}

/* ============================================================
   Hero Slider
   ============================================================ */
.hero-slider {
  position:absolute; inset:0; z-index:0;
}
.hero-slider__slide {
  position:absolute; inset:0;
  background-size:cover; background-position:center; background-repeat:no-repeat;
  opacity:0;
  transition:opacity 2.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change:opacity, transform;
}
.hero-slider__slide.is-active {
  opacity:1;
  z-index:1;
}
.hero-slider__slide.is-leaving {
  opacity:0;
  z-index:1;
  transition:opacity 2.4s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ズーム(Ken Burns)無効化 — クロスフェードのみで切替 (依頼#3) */
.hero-slider__slide.is-active {
  animation:none;
  transform:none;
}

/* Slider dots — 削除済み（クライアント依頼） */

/* ============================================================
   Hero Inner Pages (title overlay)
   ============================================================ */
/* Inner page hero: 1080px, vertical title on right side */
.hero--inner {
  height: var(--hero-height); /* 1080px same as top */
}
.hero--inner .hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
/* Title block positioned on the right side, before sidebar */
.hero--inner .hero__content {
  position: absolute; z-index: 2;
  top: 75px; right: 305px; /* Figma287より少し左。下のwidth固定でSafari/Chrome差を解消 */
  width: 84px; /* 縦書きタイトル幅を固定（autoだとブラウザ毎に変わりズレる） */
  text-align: center;
  padding: 0;
  max-width: none;
}
.hero--inner .hero__page-title {
  font-family: var(--font-jp); font-size: 84px;
  font-weight: 700; color: var(--color-text-white);
  letter-spacing: 0; line-height: 1.0;
  width: 100%;
  writing-mode: vertical-rl;
  text-orientation: upright;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero--inner .hero__page-label {
  position: absolute; top: 0; left: 94px;
  font-family: var(--font-jp); font-size: 28px; font-weight: 400;
  line-height: 1.45;
  color: var(--color-text-white); letter-spacing: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* Tsuboichi: タイトルが長いが位置は他ページと同じ */
.hero--tsuboichi .hero__content {
  right: 305px;
}

/* ============================================================
   BottomBar
   ============================================================ */
.bottom-bar {
  position:relative; width:100%; height:var(--bottombar-height);
  display:flex; align-items:center; justify-content:center;
  background:var(--color-brand-green); color:var(--color-text-white);
}
.bottom-bar__text {
  font-family:var(--font-jp); font-size:var(--fs-bottombar); font-weight:400;
  letter-spacing:var(--ls-bottombar); color:var(--color-text-white);
}

/* ============================================================
   Sidebar — ビューポート高さが不足する場合のフォールバック
   ============================================================ */
/* 800px以下: テキストが中途半端にクリップされるため完全に非表示 */
@media screen and (max-height:800px) and (min-width:769px) {
  .sidebar__vertical { display:none; }
}

