/* ==========================================================================
   下地一丸 創作人形サイト共通スタイルシート
   ========================================================================== */

:root {
  --color-bg: #FFFFFF;
  --color-text: #111111;
  --color-nav-bg: #111111;
  --color-nav-active: #666666;
  --color-nav-text: #FFFFFF;
  --color-footer-bg: #666666;
  --color-footer-text: #FFFFFF;
  --content-width: 900px;
  --font-serif: "Noto Serif JP", "游明朝体", "Yu Mincho", "ヒラギノ明朝 ProN",
    "Hiragino Mincho ProN", "MS PMincho", serif;
  --nav-height: 56px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-serif);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   ヘッダー
   ========================================================================== */

.site-header {
  background: var(--color-bg);
  color: var(--color-text);
  text-align: center;
  padding: 46px 20px 34px;
}

.site-header__title {
  margin: 0;
  font-size: clamp(22px, 4.2vw, 34px);
  font-weight: 500;
  letter-spacing: 0.14em;
}

.site-header__subtitle {
  margin: 14px 0 0;
  font-size: clamp(12px, 2.4vw, 15px);
  letter-spacing: 0.08em;
  color: #444444;
}

/* ==========================================================================
   ナビゲーション
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-nav-bg);
}

.site-nav__bar {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-height);
  padding: 0 20px;
}

.site-nav__brand {
  display: none;
}

.nav-toggle {
  display: none;
  width: 32px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 12px 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-nav-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle span {
  top: 11px;
}

.nav-toggle span::before {
  top: -9px;
}

.nav-toggle span::after {
  top: 9px;
}

.nav-toggle.is-active span {
  background: transparent;
}

.nav-toggle.is-active span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.is-active span::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-menu {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav-menu__link {
  display: block;
  padding: 17px 18px;
  color: var(--color-nav-text);
  font-size: 14px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.nav-menu__link:hover,
.nav-menu__link[aria-current="page"] {
  background: var(--color-nav-active);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .site-nav__bar {
    justify-content: flex-end;
    padding: 0 16px;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-menu.is-open {
    max-height: 400px;
  }

  .nav-menu__link {
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* ==========================================================================
   コンテンツ共通
   ========================================================================== */

.page-content {
  background: var(--color-bg);
  color: var(--color-text);
  padding: 40px 0 70px;
}

.page-lead-photo {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  background: #f3f3f3;
}

.page-lead-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.page-text {
  max-width: 640px;
  margin: 40px auto 0;
  padding: 0 24px;
  font-size: 16px;
}

.page-text p {
  margin: 0 0 1.6em;
}

.section-divider {
  max-width: var(--content-width);
  margin: 60px auto;
  border: none;
  border-top: 1px solid #dddddd;
}

.section-subtitle {
  text-align: center;
  font-size: 20px;
  letter-spacing: 0.12em;
  margin: 0 0 34px;
  font-weight: 500;
}

/* ==========================================================================
   横スライダー
   ========================================================================== */

.slider {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.slider-viewport {
  position: relative;
  overflow: hidden;
  background: #f3f3f3;
}

.slider-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.slide {
  flex: 0 0 100%;
  width: 100%;
}

.slide-photo {
  width: 100%;
  aspect-ratio: var(--slide-ratio, 900 / 680);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f3;
}

.slide-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-caption {
  margin: 20px 4px 0;
  font-size: 15px;
  line-height: 2;
  text-align: center;
  color: #222222;
  min-height: 1em;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(17, 17, 17, 0.25);
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.slider-btn:hover {
  background: #ffffff;
}

.slider-btn--prev {
  left: 8px;
}

.slider-btn--next {
  right: 8px;
}

@media (max-width: 560px) {
  .slider-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
}

/* ==========================================================================
   作品一覧（ギャラリー）
   ========================================================================== */

.gallery {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px 12px;
}

.gallery-grid__item {
  cursor: pointer;
  background: #f3f3f3;
  overflow: hidden;
  aspect-ratio: var(--thumb-ratio, 150 / 224);
}

.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.gallery-grid__item:hover img {
  transform: scale(1.045);
  opacity: 0.92;
}

.gallery-grid__item:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

/* ==========================================================================
   ライトボックス（拡大表示）
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.lightbox-stage img.is-fading {
  opacity: 0;
}

.lightbox-caption {
  margin-top: 18px;
  color: #f5f5f5;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-align: center;
  min-height: 1.2em;
}

.lightbox-close {
  position: absolute;
  top: -6px;
  right: 0;
  background: none;
  border: none;
  color: #f5f5f5;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 10px;
}

.lightbox .slider-btn {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.lightbox .slider-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* ==========================================================================
   未完成作品（拡大表示なし）
   ========================================================================== */

.plain-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.plain-grid__item {
  width: 100%;
  aspect-ratio: 400 / 500;
  overflow: hidden;
  background: #f3f3f3;
}

.plain-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 560px) {
  .plain-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

/* ==========================================================================
   フッター
   ========================================================================== */

.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  text-align: center;
  padding: 22px 20px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
}
