/* atelier-eft v4（Figma e.f.t_web_v4）全ページ共通。デザイン幅 1280 */

@font-face {
  font-family: "A-OTF Midashi Go MB1 Std DeBold";
  src:
    local("A-OTF Midashi Go MB1 Std DeBold"),
    local("A-OTFMidashiGoMB1Std-DeBold"),
    url("../fonts/midashi-go-debold.woff2") format("woff2");
  /* 書体は DeBold の 1 ウェイトだけ。どの太さを指定しても擬似ボールドにしない */
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #140700;
  --paper: #ffffff;
  --line: #d9d9d9;
  --font: "A-OTF Midashi Go MB1 Std DeBold", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", sans-serif;
  --gutter: 45px;
  /* ヘッダーの位置（端末の大きさごと）。ロゴの上の余白・ロゴの幅・ハンバーガーと「×」の中心の高さ。
     ハンバーガーとメニューの「×」は、同じ中心の高さ（--hd-mid）に置く */
  --hd-top: 30px;
  --hd-logo: 90px;
  --hd-mid: 46px;
  /* ヘッダーと目次の文字色。header-tone.js が背景の明るさで切り替える */
  --tone-light: #ffffff;
  --tone-dark: #140700;
  --tone-ease: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #000;
  color: var(--ink);
  font-family: var(--font);
  /* Figma の見出しゴ MB1 DeBold に近い太さ（ヒラギノでは W6）にそろえる */
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p, h1, h2, h3, h4, dl, dd, figure { margin: 0; font-weight: inherit; }
h1, h2, h3, h4 { font-size: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- ページの重なり（フッターは奥に固定） ---------- */

.page {
  position: relative;
  z-index: 1;
  /* 下の余白（footer-spacer）の部分は、奥に固定したフッターのリンクを押せるよう、操作を通す */
  pointer-events: none;
}

/* ヘッダーと目次はこの箱の中で追従し、フッターの手前で止まる */
.page-main {
  position: relative;
  overflow: clip;  /* hidden だとヘッダーと目次の sticky が効かない */
  background: var(--paper);
  pointer-events: auto;
}

.footer-spacer {
  height: var(--footer-h, 677px);
  pointer-events: none;
}

/* 準備中の項目（リンクなし）。「Coming soon」は横に並べる */
.nav-soon { display: flex !important; align-items: center; gap: 8px; width: max-content; cursor: default; }
.nav-soon img { flex: none; }
a.nav-soon { cursor: pointer; }
.nav-soon.is-closed { opacity: .38; cursor: default; pointer-events: none; }

/* 書体をそろえるためアウトライン化したメニューの文字 */
.nav-svg { display: block; height: auto; }

/* ---------- ヘッダー（左上・追従） ---------- */

.header-rail,
.toc-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.header-rail { left: 0; right: 0; z-index: 5; }

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
  padding: var(--hd-top) var(--gutter);
}

.site-header > * { pointer-events: auto; }

[data-tone] {
  color: var(--tone-light);
  transition: color var(--tone-ease);
}

[data-tone].is-dark { color: var(--tone-dark); }

/* 白と墨が切り替わるとき、一度薄くなってから戻る（場面が変わる感じ） */
@keyframes tone-flip { 0% { opacity: 0.15; } 100% { opacity: 1; } }
[data-tone].tone-flip { animation: tone-flip 0.7s ease-out; }

.header-logo { transition: color var(--tone-ease), opacity 0.4s ease-out, visibility 0s linear 0s; }

/* 最初のスクロールでロゴマークだけ消える（トップへ戻ると、また出る） */
.header-logo.is-away {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: color var(--tone-ease), opacity 0.4s ease-out, visibility 0s linear 0.4s;
}

.header-logo img {
  width: var(--hd-logo);
  height: calc(var(--hd-logo) * 95 / 90);
  object-fit: contain;
  transition: filter var(--tone-ease);
}

/* 白ロゴを墨色へ（#140700 に寄せる） */
.header-logo.is-dark img { filter: brightness(0) saturate(100%) invert(4%) sepia(30%) saturate(3000%) hue-rotate(5deg) brightness(90%); }

.header-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: max-content;
  font-size: 15px;
  line-height: 21px;
}

.header-nav > * { display: block; position: relative; }
.header-nav a:hover { opacity: 0.7; }

.header-nav > * + *::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -7.25px;
  height: 0.5px;
  background: currentColor;
  opacity: 0.6;
}

.burger {
  position: absolute;
  top: calc(var(--hd-mid) - 6.5px);
  right: var(--gutter);
  width: 27.1px;
  height: 13px;
  display: grid;
  place-items: center;
}

/* ---------- 右下の目次（今いる項目を 1.3 倍に。Figma 注記: ease-out 0.35s） ---------- */

.toc-rail {
  right: var(--gutter);
  width: 300px;
  z-index: 4;
}

.toc {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 52px;
}

.toc a,
.toc a[data-tone] {
  pointer-events: auto;
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  opacity: 0.4;
  transition:
    font-size 0.35s ease-out,
    line-height 0.35s ease-out,
    padding 0.35s ease-out,
    color 0.35s ease-out,
    background-color 0.35s ease-out,
    opacity 0.35s ease-out;
}

.toc-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* 写真の上を通るときは header-tone.js が白／墨を切り替える */
.toc a[data-tone] { color: var(--tone-light); }
.toc a[data-tone].is-dark { color: var(--tone-dark); }

.toc a:hover { opacity: 1; }

.toc a.is-current {
  font-size: 15.6px;  /* 12 × 1.3 */
  line-height: 21px;
  opacity: 1;
}

/* アートスクール：コラージュの上なので、表示中の項目を白地に乗せる */
.toc--chip a {
  padding: 0;
  color: #fff;
  line-height: 15px;
  letter-spacing: 0;
  opacity: 0.6;
  background: rgba(255, 255, 255, 0);
}

.toc--chip a.is-current {
  padding: 4px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 1);
}

/* ---------- スクロールで現れる（Figma「スクロール演出」: 0.6秒 ease-out、20px 下から） ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity 0.6s ease-out var(--reveal-delay, 0s),
    transform 0.6s ease-out var(--reveal-delay, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- もっとみる（ホバーで矢印が動く） ---------- */

.more {
  --ms: var(--s, 15px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: calc(var(--ms) * 176 / 15);
  height: calc(var(--ms) * 48 / 15);
  justify-content: center;  /* 文字と矢印を、黒い箱の中央に置く */
  padding: 0;
  background: var(--ink);
  color: #fff;
  font-size: calc(var(--ms) * 16 / 15);
  letter-spacing: -0.025em;
  line-height: 1;
}

.more img {
  width: calc(var(--ms) * 19 / 15);
  height: auto;
  transition: transform 0.35s var(--ease-out);
}

.more:hover img,
.more:focus-visible img { transform: translateX(6px); }

/* 矢印つきの文字リンク（黒い矢印） */
.arrow-link img {
  transition: transform 0.35s var(--ease-out);
}

.arrow-link:hover img,
.arrow-link:focus-visible img { transform: translateX(5px); }

/* ---------- フッター（奥に固定） ---------- */

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  min-height: 677px;
  color: #fff;
  overflow: hidden;
  background: #111;
}

.footer-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.45);
}

.footer-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 60px;
}

.footer-logo { width: 90px; height: 94.8px; object-fit: cover; margin-bottom: 24px; }
.footer-logo-link { display: block; width: max-content; }

/* SNS のアイコン：3 つを別々のリンクにする（間隔は元の画像と同じ 19px） */
.sns-links { display: flex; align-items: center; gap: 19px; }
.sns-links a { display: block; line-height: 0; }
.sns-links a:hover { opacity: 0.7; }
.menu-panel .sns-links a { display: block; min-height: 0; padding: 0; line-height: 0; }
.footer-logo-link:hover { opacity: 0.7; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.footer-group { display: flex; flex-direction: column; align-items: flex-start; }
.footer-group > .footer-h { margin-bottom: 15px; }

.footer-h {
  display: block;
  font-size: 21px;
  line-height: 42px;
}

.footer-h--wide { letter-spacing: 1.05px; }

.footer-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 30px;
  row-gap: 6px;
  font-size: 15px;
  line-height: 30px;
}

.footer-list + .footer-list { margin-top: 6px; }
.footer-list--tight + .footer-list--tight { margin-top: 0; }
.footer-list a:hover,
.footer-sub a:hover,
.footer-h:hover { opacity: 0.7; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-sub { display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 42px; }
.footer-copy { font-size: 10px; line-height: 12px; }

.footer-sns {
  position: absolute;
  top: 98px;
  right: 60px;
  width: 104.8px;
  height: 19px;
}

/* ---------- メニュー（ポップアップ） ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.menu[hidden] { display: none; }

.menu-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  animation: fade-in 0.3s ease-out both;
}

.menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(427px, 100%);
  overflow-y: auto;
  padding: 84px 56px 48px;
  background: #fff;
  color: var(--ink);
  animation: slide-in 0.4s var(--ease-out) both;
}

.menu-close {
  position: absolute;
  top: calc(var(--hd-mid) - 10.5px);
  right: 45px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
}

.menu-close img { width: 21px; height: 21px; }

.menu-nav { width: 300px; max-width: 100%; }
.menu-list li { white-space: nowrap; }
.menu-h { display: block; font-size: 19px; line-height: 27px; }
.menu-list { display: flex; flex-direction: column; gap: 9px; margin: 20px 0 0; padding-left: 12px; font-size: 16px; line-height: 26px; opacity: 0.8; }
.menu-list .nav-svg { height: 24px; width: auto; max-width: none; }
.menu-nav hr { margin: 20px 0; border: 0; border-top: 0.5px solid rgba(20, 7, 0, 0.6); }
.menu-sns { margin-top: 43px; filter: brightness(0); }
.menu-bottom { margin-top: 38px; font-size: 12px; }
.menu-bottom p:first-child { display: flex; gap: 12px; line-height: 42px; }
.menu-copy { font-size: 10px; line-height: 12px; }
.menu a:hover { opacity: 0.6; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }

/* ---------- スマホ ---------- */

/* タブレット */
@media (min-width: 768px) and (max-width: 1279px) {
  :root { --hd-top: 30px; --hd-logo: 75px; --hd-mid: 44px; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; --hd-top: 20px; --hd-logo: 60px; --hd-mid: 42px; }

  .site-header { padding: var(--hd-top) var(--gutter) 8px; gap: 0; transition: background-color 0.3s ease-out; }
  .site-header.is-solid { background: rgba(255, 255, 255, 0.96); }
  .header-nav { display: none; }

  .toc-rail { display: none; }

  .site-footer { min-height: 0; }
  .footer-inner { padding: 48px var(--gutter) 32px; }
  .footer-h { font-size: 17px; line-height: 32px; }
  .footer-list { font-size: 15px; line-height: 26px; column-gap: 18px; row-gap: 0; }
  .footer-sns { top: 56px; right: var(--gutter); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .menu-panel { padding: 72px 32px 40px; }
}

/* 視覚効果を減らす設定（prefers-reduced-motion）でも動きは止めない（丹羽さん指示 2026-10-14） */

/* 行末に 1〜2 文字だけが残らないよう、文節の切れ目で、行の長さを整えて折り返す */
p, dd, li, h1, h2, h3, h4, .cls-text, .cls-lead { text-wrap: pretty; word-break: auto-phrase; }
